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.
66 Template:redirect to foo
68 #REDIRECT [[Template:Foo]]
89 MediaWiki:bad image list
91 * [[File:Bad.jpg]] except [[Nasty page]]
126 // For Serbian; localize Template namespace
134 Template:echo_with_span
140 Template:echo_with_div
146 Template:echo with depth
159 Template:table_attribs
162 |</noinclude>style="color:red;"|Foo
166 Template:table_attribs_2
169 |</noinclude>style="color:red;"|Foo
174 Template:table_attribs_3
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
181 Template:table_attribs_4
183 | style="background-color:#DC241f;" width="10px" |
187 Template:table_attribs_5
190 |</noinclude>style="color:red;"||Bar
194 Template:table_attribs_6
196 style="background: <nowiki>
203 Template:table_attribs_7
206 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
210 Template:table_header_cells
212 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
218 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
222 Template:PartialTable
229 Template:image_attribs
232 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
235 ## See T48811 for details
237 Template:mixed_attr_content_template
239 style="color:red;" title="T48811"
245 Template:definition_list
292 Template:EmptyTRWithHTMLAttrTest
295 <tr align="center"></tr>
296 <tr><td>foo</td></tr>
297 <tr align="center"></tr>
298 <tr><td>bar</td></tr>
321 This is a simple paragraph.
323 <p>This is a simple paragraph.
328 Paragraphs with extra newline spacing
351 Paragraphs with newline spacing with comment lines in between
359 <!--foo--><!--More than 1 comment, still stripped-->
363 <!--foo--> <!----> <!-- bar -->
424 Paragraphs with newline spacing with non-empty white-space lines in between
451 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
459 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
498 Extra newlines: More paragraphs with indented comment
513 Extra newlines followed by heading
528 <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>
529 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
532 <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>
537 Extra newlines between heading and content are swallowed
545 <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>
546 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
551 Heading with line break in nowiki
555 wgFragmentMode=[ 'html5', 'legacy' ]
560 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
562 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>
566 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
573 http://fr.wikipedia.org/wiki/🍺
574 <!-- EasterEgg we love beer, better be able be able to link to it -->
576 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
595 *plain''italic''plain
596 *plain''italic''plain''italic''plain
597 *plain'''bold'''plain
598 *plain'''bold'''plain'''bold'''plain
599 *plain''italic''plain'''bold'''plain
600 *plain'''bold'''plain''italic''plain
601 *plain''italic'''bold-italic'''italic''plain
602 *plain'''bold''bold-italic''bold'''plain
603 *plain'''''bold-italic'''italic''plain
604 *plain'''''bold-italic''bold'''plain
605 *plain''italic'''bold-italic'''''plain
606 *plain'''bold''bold-italic'''''plain
607 *plain l'''italic''plain
608 *plain l''''bold''' plain
611 <li>plain<i>italic</i>plain</li>
612 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
613 <li>plain<b>bold</b>plain</li>
614 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
615 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
616 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
617 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
618 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
619 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
620 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
621 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
622 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
623 <li>plain l'<i>italic</i>plain</li>
624 <li>plain l'<b>bold</b> plain</li></ul>
628 # this example taken from the [[simple:Moon]] article (T49326)
630 Italics and possessives (1)
632 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
634 <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
638 # this example taken from [[en:Flaming Pie]] (T51926)
640 Italics and possessives (2)
642 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
644 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
648 # this example taken from [[en:Dictionary]] (T51926)
650 Italics and possessives (3)
652 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''.
654 <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>.
660 ### 2-quote opening sequence tests
663 Italics and bold: 2-quote opening sequence: (2,2)
672 Italics and bold: 2-quote opening sequence: (2,3)
681 Italics and bold: 2-quote opening sequence: (2,4)
691 # same html as previous, but wikitext adjusted to match parsoid html2wt
693 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
695 ''foo<nowiki>''</nowiki>''
701 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
703 Italics and bold: 2-quote opening sequence: (2,5)
716 # same html as previous, but wikitext adjusted to match parsoid html2wt
718 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
720 ''foo'''''<nowiki/>'''
731 ### 3-quote opening sequence tests
735 Italics and bold: 3-quote opening sequence: (3,2)
744 Italics and bold: 3-quote opening sequence: (3,3)
753 Italics and bold: 3-quote opening sequence: (3,4)
761 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
763 Italics and bold: 3-quote opening sequence: (3,5)
776 # same html as previous, but wikitext adjusted to match parsoid html2wt
778 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
780 '''foo'''''<nowiki/>''
791 ### 4-quote opening sequence tests
795 Italics and bold: 4-quote opening sequence: (4,2)
805 # same html as previous, but wikitext adjusted to match parsoid html2wt
807 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
809 <nowiki>''</nowiki>''foo''
816 Italics and bold: 4-quote opening sequence: (4,3)
825 Italics and bold: 4-quote opening sequence: (4,4)
835 # same html as previous, but wikitext adjusted to match parsoid html2wt
837 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
845 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
847 Italics and bold: 4-quote opening sequence: (4,5)
856 <p>'<b>foo</b><i></i>
860 # same html as previous, but wikitext adjusted to match parsoid html2wt
862 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
864 '<nowiki/>'''foo'''''<nowiki/>''
869 <p>'<b>foo</b><i></i>
875 ### 5-quote opening sequence tests
879 Italics and bold: 5-quote opening sequence: (5,2)
889 # same html as previous, but wikitext adjusted to match parsoid html2wt
891 Italics and bold: 5-quote opening sequence: (5,2+3)
900 Italics and bold: 5-quote opening sequence: (5,3)
910 # same html as previous, but wikitext adjusted to match parsoid html2wt
912 Italics and bold: 5-quote opening sequence: (5,3+2)
921 Italics and bold: 5-quote opening sequence: (5,4)
927 <p><i><b>foo'</b></i>
932 Italics and bold: 5-quote opening sequence: (5,5)
941 Italics and bold: 5-quote opening sequence: (5,6)
945 <p><i><b>foo'</b></i>
950 ### multiple quote sequences in a line
954 Italics and bold: multiple quote sequences: (2,4,2)
960 <p><i>foo'<b>bar</b></i>
964 # same html as previous, but wikitext adjusted to match parsoid html2wt
966 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
968 ''foo'<nowiki/>'''bar'''''
970 <p><i>foo'<b>bar</b></i>
975 Italics and bold: multiple quote sequences: (2,4,3)
981 <p><i>foo'<b>bar</b></i>
985 # same html as previous, but wikitext adjusted to match parsoid html2wt
987 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
989 ''foo'<nowiki/>'''bar'''''
991 <p><i>foo'<b>bar</b></i>
996 Italics and bold: multiple quote sequences: (2,4,4)
1002 <p><i>foo'<b>bar'</b></i>
1006 # same html as previous, but wikitext adjusted to match parsoid html2wt
1008 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1010 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1012 <p><i>foo'<b>bar'</b></i>
1016 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1018 Italics and bold: multiple quote sequences: (3,4,2)
1027 <p><b>foo'</b>bar<i></i>
1031 # same html as previous, but wikitext adjusted to match parsoid html2wt
1033 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1035 '''foo''''bar''<nowiki/>''
1040 <p><b>foo'</b>bar<i></i>
1044 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1046 Italics and bold: multiple quote sequences: (3,4,3)
1055 <p><b>foo'</b>bar<b></b>
1059 # same html as previous, but wikitext adjusted to match parsoid html2wt
1061 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1063 '''foo''''bar'''<nowiki/>'''
1068 <p><b>foo'</b>bar<b></b>
1073 ### other quote tests
1076 Italics and bold: other quote tests: (2,3,5)
1078 ''this is about '''foo's family'''''
1080 <p><i>this is about <b>foo's family</b></i>
1086 Italics and bold: other quote tests: (2,(3,3),2)
1088 ''this is about '''foo's''' family''
1090 <p><i>this is about <b>foo's</b> family</i>
1096 Italics and bold: other quote tests: (3,2,3,2)
1100 '''this is about ''foo'''s family''
1102 <p><b>this is about <i>foo</i></b><i>s family</i>
1107 # same html as previous, but wikitext adjusted to match parsoid html2wt
1109 Italics and bold: other quote tests: (3,2,3+2+2,2)
1111 '''this is about ''foo'''''<nowiki/>''s family''
1113 <p><b>this is about <i>foo</i></b><i>s family</i>
1119 Italics and bold: other quote tests: (3,2,3,3)
1121 '''this is about ''foo'''s family'''
1123 <p>'<i>this is about </i>foo<b>s family</b>
1129 Italics and bold: other quote tests: (3,(2,2),3)
1131 '''this is about ''foo's'' family'''
1133 <p><b>this is about <i>foo's</i> family</b>
1139 Italicized possessive
1141 The ''[[Main Page]]'''s talk page.
1143 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1146 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1150 Quote balancing context should be restricted to td/th cells on the same wikitext line
1152 parsoid=wt2html,wt2wt
1166 </td></tr></tbody></table>
1174 Non-html5 tags should be accepted
1176 <center>''foo''</center>
1178 <font>''foo''</font>
1179 <strike>''foo''</strike>
1182 <center><i>foo</i></center>
1183 <p><big><i>foo</i></big>
1184 <font><i>foo</i></font>
1185 <strike><i>foo</i></strike>
1191 <wbr> is valid wikitext (T54468)
1199 # <strike> is HTML4, <s> is HTML4/5.
1201 <s> or <strike> for strikethrough
1203 <strike>strike</strike>
1207 <p><strike>strike</strike>
1215 Text-level semantic html elements in wikitext
1218 <strong>text</strong>
1234 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1241 <strong>text</strong>
1257 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1265 # test cases taken from
1266 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1268 Ruby markup (W3C-style)
1270 ;Mono-ruby for individual base characters
1271 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1273 :<ruby>今日<rt>きょう</rt></ruby>
1275 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1277 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1279 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1282 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1283 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1284 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1287 <dl><dt>Mono-ruby for individual base characters</dt>
1288 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1290 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1291 <dt>Jukugo ruby</dt>
1292 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1293 <dt>Inline ruby</dt>
1294 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1295 <dt>Double-sided ruby</dt>
1296 <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>
1298 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1299 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1300 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1305 # The next two test different paths in the sanitizer.
1307 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1309 <blockquote|>a</blockquote>
1311 <b→> doesn't terminate </b→>
1313 <bä> doesn't terminate </bä>
1315 <boo> doesn't terminate </boo>
1317 <s.foo> doesn't terminate </s.foo>
1321 <p><blockquote|>a</blockquote>
1322 </p><p><b→> doesn't terminate </b→>
1323 </p><p><bä> doesn't terminate </bä>
1324 </p><p><boo> doesn't terminate </boo>
1325 </p><p><s.foo> doesn't terminate </s.foo>
1326 </p><p><sub-ID#1>
1331 Non-word characters don't terminate tag names
1333 <blockquote|>a</blockquote>
1335 <b→> doesn't terminate </b→>
1337 <bä> doesn't terminate </bä>
1339 <boo> doesn't terminate </boo>
1341 <s.foo> doesn't terminate </s.foo>
1345 <p><blockquote|>a
1346 </p><p><b→> doesn't terminate </b→>
1347 </p><p><bä> doesn't terminate </bä>
1348 </p><p><boo> doesn't terminate </boo>
1349 </p><p><s.foo> doesn't terminate </s.foo>
1350 </p><p><sub-ID#1>
1355 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1356 ### This checks that HTML5 tags (with non-word characters in the tag
1357 ### name) make it safely through the parser -- the Sanitizer will
1358 ### munge them later, as it should.
1361 Non-word characters are valid in extension tags (T19663)
1372 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1376 Isolated close tags should be treated as literal text (T54760)
1384 <p class="mw-empty-elt">
1385 </p><p><s.foo>s
1388 <p><s.foo>s</p>
1392 ### Special characters
1396 Bare pipe character (T54363)
1405 Bare pipe character from a template (T54363)
1414 ### <nowiki> test cases
1418 <nowiki> unordered list
1420 <nowiki>* This is not an unordered list item.</nowiki>
1422 <p>* This is not an unordered list item.
1425 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1431 <nowiki>Lorem ipsum dolor
1439 <p>Lorem ipsum dolor
1448 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1458 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1460 <nowiki><span class="error"></nowiki>
1462 <p><span class="error">
1465 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1471 :There is not nowiki.
1472 :There is <nowiki>nowiki</nowiki>.
1474 #There is not nowiki.
1475 #There is <nowiki>nowiki</nowiki>.
1477 *There is not nowiki.
1478 *There is <nowiki>nowiki</nowiki>.
1480 <dl><dd>There is not nowiki.</dd>
1481 <dd>There is nowiki.</dd></dl>
1482 <ol><li>There is not nowiki.</li>
1483 <li>There is nowiki.</li></ol>
1484 <ul><li>There is not nowiki.</li>
1485 <li>There is nowiki.</li></ul>
1488 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1489 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1491 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1492 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1494 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1495 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1499 Entities inside <nowiki>
1501 <nowiki><</nowiki>
1506 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1510 Entities inside template parameters
1517 <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>
1521 Properly escape nowiki when combined with other wiki markup
1525 <p>* </nowiki> tag</p>
1527 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1531 T93824: Put escaped HTML tags inside nowiki
1535 <p><h2>foo</h2></p>
1537 <nowiki><h2>foo</h2></nowiki>
1541 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1545 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1546 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1547 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1549 This text: L'[[Foo]]
1550 This text: L<nowiki>''</nowiki>[[Foo]]
1551 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1554 # This test fails because wikitext whitespace is not normalized before comparing.
1556 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1560 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1563 This text : L<nowiki>''</nowiki>[[Foo]]
1566 # This test and the next one are html2wt only as they test that incorrect wikitext
1567 # passed in template arguments gets escaped or wrapped in nowikis where required.
1569 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1573 <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>
1574 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1576 {{echo|foo{{!}}bar}}
1577 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1581 T53961: Output correct nowikis in template arguments
1585 <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>
1586 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1587 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1588 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1589 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1592 {{echo|<nowiki>a }} b</nowiki>}}
1593 {{echo|<nowiki>a [[ b</nowiki>}}
1594 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1595 {{echo|a <nowiki>}</nowiki>}}
1599 Cases where "!!" needs nowiki protection
1604 <tr><th>this needs protection !! here</th></tr>
1608 <tr><th>this does not need
1609 protection !! here</th></tr>
1613 !<nowiki>this needs protection !! here</nowiki>
1626 Comments and Indent-Pre
1628 <!-- comment 1 --> asdf
1630 <!-- comment 1 --> asdf
1633 <!-- comment 1 --> asdf
1634 <!-- comment 2 -->xyz
1636 <!-- comment 1 --> asdf
1637 <!-- comment 2 --> xyz
1693 asdf<!-- comment 1 -->jkl
1703 <!-- foo --> b <!-- bar -->
1717 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1723 Comment semantics and delimiters
1725 <!-- --><!----><!-----><!------>
1729 <!-- --><!----><!-----><!------>
1733 Comment semantics and delimiters, redux
1735 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1736 -- foo -- funky huh? ... -->
1740 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1741 -- foo -- funky huh? ... -->
1745 Comment semantics and delimiters: directors cut
1747 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1748 everything starting with < followed by !-- until the first -- and > we see,
1749 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1755 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1756 everything starting with < followed by !-- until the first -- and > we see,
1757 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1762 Comment semantics: nesting
1764 <!--<!-- no, we're not going to do anything fancy here -->-->
1769 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1772 # Parsoid closes the unclosed comment, even if it means a slight
1775 Comment semantics: unclosed comment at end
1777 parsoid=wt2html,html2html
1779 <!--This comment will run out to the end of the document
1783 <!--This comment will run out to the end of the document-->
1787 Comment semantics: normalize comments to play nice with XML and browsers
1789 <!-- Browsers --!> think this is closed -->
1790 <!--> This would normally be text -->
1791 <!---> As would this -->
1792 <!-- XML doesn't like trailing dashes -------->
1793 <!-- Nor doubled hyphens -- anywhere in the data -->
1794 But this is not a comment.
1796 <p>But this is not a comment.
1799 <!-- Browsers --!> think this is closed -->
1800 <!--> This would normally be text -->
1801 <!---> As would this -->
1802 <!-- XML doesn't like trailing dashes -------->
1803 <!-- Nor doubled hyphens -- anywhere in the data -->
1804 <p>But this is not a comment.</p>
1808 Comment semantics: round-trip even text which contains encoded -->
1810 <!-- hello & goodbye - > --> --&gt; --&xx -->
1812 <!-- hello & goodbye - > --> --&gt; --&xx -->
1816 Comment in template title
1825 Comment on its own line post-expand
1837 Comment on its own line post-expand with non-significant whitespace
1849 post-expand include size being exceeded
1853 {{echo3|1234567890}}
1855 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1860 max template depth being reached
1864 {{echo with depth|too deep!}}
1866 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1871 multiple templates that are redirects
1882 Multiple comments should still parse as SOL-transparent
1884 parsoid=wt2html,wt2wt
1887 <!--c2--><!--c3--><!--c4-->*b
1896 <!--c2--><!--c3--><!--c4-->
1902 ## Make sure ">" gets escaped in comments to avoid XSS
1904 IE conditional comments
1907 <script>alert('hi');</script>
1910 <!--[if lt IE 9]>
1911 <script>alert('hi');</script>
1916 ### paragraph wrapping tests
1932 Block tag on one line (<div>)
1942 <p>a </p><div>foo</div>
1947 # Remex wraps empty tag runs with p-tags.
1948 # Parsoid strips them out during p-wrapping.
1950 No p-wrappable content
1952 <span><div>x</div></span>
1953 <span><s><div>x</div></s></span>
1954 <small><em></em></small><span><s><div>x</div></s></span>
1956 <span><div>x</div></span>
1957 <span><s><div>x</div></s></span>
1958 <p><small><em></em></small></p><span><s><div>x</div></s></span>
1960 <span><div>x</div></span>
1961 <span><s><div>x</div></s></span>
1962 <small><em></em></small><span><s><div>x</div></s></span>
1965 # T177612: Parsoid-only test
1967 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
1969 {{echo|<span><div>x</div></span>}}
1972 <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>
1977 Block tag on one line (<blockquote>)
1979 a <blockquote>foo</blockquote>
1983 a <blockquote>foo</blockquote>
1987 <p>a </p><blockquote><p>foo</p></blockquote>
1993 Block tag on both lines (<div>)
2003 <p>a </p><div>foo</div><p>
2004 b </p><div>foo</div>
2008 Block tag on both lines (<blockquote>)
2010 a <blockquote>foo</blockquote>
2012 b <blockquote>foo</blockquote>
2014 a <blockquote>foo</blockquote>
2015 b <blockquote>foo</blockquote>
2018 <p>a </p><blockquote><p>foo</p></blockquote><p>
2019 b </p><blockquote><p>foo</p></blockquote>
2023 Multiple lines without block tags
2044 x </p><div>foo</div><p> z
2048 # The difference between Parsoid & Remex here
2049 # is because of Parsoid's Tidy-emulation code
2050 # for p-wrapping. We'll start work to remove this
2051 # emulation code in Parsoid sooner than later.
2052 # Remex wraps empty tag runs with p-tags.
2053 # Parsoid strips them out in a separate pass.
2055 Empty lines between lines with block tags
2090 </p><div>b</div><p>d
2095 <div data-parsoid='{"stx":"html"}'></div>
2098 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2101 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2103 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2106 <div data-parsoid='{"stx":"html"}'>e</div>
2110 Unclosed HTML p-tags should be handled properly
2117 <div><p>foo</p></div>
2122 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2127 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2128 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2131 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2135 a [[Category:A1]] [[Category:A2]]
2140 <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"/>
2144 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2150 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2154 No paragraph necessary for SOL transparent template
2156 <span><div>foo</div></span>
2159 <span><div>foo</div></span>
2160 {{echo|[[Category:Foo]]}}
2162 <span><div>foo</div></span>
2163 <span><div>foo</div></span>
2166 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2167 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2169 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2170 <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}}]}'/>
2174 Avoid expanding multiline sol transparent template ranges unnecessarily
2192 <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">
2195 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2199 ### Preformatted text
2209 And a [[Main Page|link]]
2215 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2220 Tabs don't trigger preformatted text
2224 This is preformatted text.
2230 <pre>This is preformatted text.
2235 preformatted text.</p>
2236 <pre>This is preformatted text.
2241 Space before tab needs nowiki pre protection
2247 <nowiki> </nowiki> a
2251 Ident preformatting with inline content
2262 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2279 Regression with preformatted in <center>
2293 T54763: Preformatted in <blockquote>
2299 indented cell (no pre-wrapping!)
2309 <p> indented cell (no pre-wrapping!)
2317 T53086: Double newlines in blockquotes should be turned into paragraphs
2334 T17491: <ins>/<del> in blockquote
2337 Foo <del>bar</del> <ins>baz</ins> quux
2341 <p>Foo <del>bar</del> <ins>baz</ins> quux
2348 T17491: <ins>/<del> in blockquote (2)
2350 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2353 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2357 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2362 <pre> with attributes (T5202)
2364 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2366 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2371 <pre> with width attribute (T5202)
2373 <pre width="8">Narrow screen goodies</pre>
2375 <pre width="8">Narrow screen goodies</pre>
2380 <pre> with forbidden attribute (T5202)
2382 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2384 <pre width="8">Narrow screen goodies</pre>
2389 Entities inside <pre>
2398 <pre> with forbidden attribute values (T5202)
2400 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2402 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2407 <nowiki> inside <pre> (T15238)
2415 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2423 <pre><nowiki>Foo</nowiki></pre>
2428 <nowiki> inside of #tag:pre
2430 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2432 <pre>Foo →bar</pre>
2435 <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>
2438 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2439 ## aren't enclosed in nowikis.
2441 <nowiki> and <pre> preference (first one wins)
2472 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2477 <p><span typeof="mw:Nowiki">
2485 </pre> inside nowiki
2487 <nowiki></pre></nowiki>
2494 Empty pre; pre inside other HTML tags (T56946)
2511 <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
2513 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2517 HTML pre followed by indent-pre
2530 <p><pre>foo</pre></p>
2532 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2534 <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>
2538 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2546 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2556 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2568 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2589 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2593 {{echo| foo}}{{echo| bar}}
2598 {{echo|<!--cmt--> foo}}
2600 <!--cmt-->{{echo| foo}}
2602 {{echo|{{echo| }}bar}}
2620 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2656 ## Hmm, should Parsoid rt this?
2658 Pres with newline attributes
2660 parsoid=wt2html,html2html
2665 <pre class="one two">hi</pre>
2668 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2672 Things that look like <pre> tags aren't treated as such
2674 Barack Obama <President> of the United States
2675 <President></President>
2677 <p>Barack Obama <President> of the United States
2678 <President></President>
2683 Handle broken pre-like tags (T66025)
2687 {{echo|<pre <pre>x</pre>}}
2689 <table><pre </table>
2692 <table><pre </table>
2696 <pre <table></table>
2698 <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>
2707 Parsoid: handle pre with space after attribute
2711 <pre style="width:50%;" >{{echo|foo}}</pre>
2713 <pre style="width:50%;">{{echo|foo}}</pre>
2716 <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>
2719 # TODO / maybe: fix wt2wt for this
2721 Parsoid: Don't paragraph-wrap fosterable content
2754 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2758 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2786 #--------------------------------------------------------------------
2787 # Transclusion parameter whitespace stripping tests
2788 # Behavior is different for positional and named parameters
2789 #--------------------------------------------------------------------
2791 Templates: Strip leading and trailing whitespace from named-param values
2795 {{echo|1= {{echo|b}} }}
2813 Templates: Don't strip whitespace from positional-param values
2817 {{echo|{{echo|b}} }}
2857 Templates: Don't recognize targets split by newlines
2873 Templates: Recognize targets when newlines and comments don't split the target
2878 <!--X--> ech<!--X-->o<!--X-->
2886 <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>
2890 Templates: Handle empty comment-and-ws-only lines correctly
2893 <!--should be ignored-->
2894 <!--should be ignored as well-->
2901 <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>
2905 Templates: Handle comments in the target
2908 <!-- should be ignored -->
2912 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2915 {{echo<!-- should be ignored -->
2918 {{echo<!-- should be ignored -->|foo}}
2920 {{<!-- should be ignored -->echo|foo}}
2929 <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>
2931 <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>
2933 <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>
2935 <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>
2937 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2941 Templates: Handle comments in parameter names (T69657)
2944 <!-- should be ignored -->
2948 <!-- should be ignored -->
2951 {{echo|1<!-- should be ignored -->=foo}}
2953 {{echo|<!-- should be ignored -->1=foo}}
2961 <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>
2963 <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>
2965 <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>
2967 <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>
2971 Templates: Other wikitext in parameter names (T69657)
2978 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2982 Templates: With colons
2986 <p>Template with colon
2989 <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>
2992 #--------------------------------------------------------------------
2993 # Transclusion parameter escaping tests
2994 #--------------------------------------------------------------------
2997 Templates: Parsoid parameter escaping test 1
2999 {{echo|[foo]|{{echo|[bar]}}}}
3004 <p about="#mwt1" typeof="mw:Transclusion"
3005 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3009 Parsoid: Pipes in external links in template parameter
3011 {{echo|[{{echo|http://example.com}} link]}}
3013 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3016 <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>
3020 Parsoid: pipe in transclusion parameter
3022 {{echo|http://foo.com/a|b}}
3024 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3027 <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>
3031 Parsoid: Pipe in external link target and content in template parameter
3033 parsoid=html2wt,wt2wt
3035 {{echo|[http://foo.com/a|b a|b]}}
3037 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3040 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3041 typeof="mw:Transclusion"
3042 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3043 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3047 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3051 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3053 <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>
3057 Templates: Don't escape already nowiki-escaped text in template parameters
3059 parsoid=html2wt,wt2wt
3061 {{echo|foo<nowiki>|</nowiki>bar}}
3062 {{echo|<nowiki><div></nowiki>}}
3063 {{echo|<nowiki></nowiki>}}
3070 <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>
3071 <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>
3072 <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>
3078 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3080 parsoid=html2wt,wt2wt
3082 {{echo|{{echo|1=bar}}}}
3087 <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>
3092 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3099 <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>
3104 Templates: Preserve blank parameter names
3111 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3115 Templates: Preserve blank parameter names in other positions
3117 {{blank_param|bar|=foo}}
3123 <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
3128 ### Parsoid-centric tests for testing RT edge cases for pre
3132 1a. Indent-Pre and Comments
3145 1b. Indent-Pre and Comments
3158 1c. Indent-Pre and Comments
3171 1d. Indent-Pre and Comments
3172 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3185 2a. Indent-Pre and tables
3206 2b. Indent-Pre and tables
3222 2c. Indent-Pre and tables (T44252)
3239 2d. Indent-Pre and tables
3256 <tbody><tr><td> b</td></tr>
3261 2e. Indent-Pre and table-line syntax
3274 2f. Indent-pre started by table-line syntax
3293 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3298 Text that should be rendered preformatted
3306 <pre>Text that should be rendered preformatted
3315 3a. Indent-Pre and block tags (single-line html)
3319 c <blockquote> foo </blockquote>
3324 c <blockquote> foo </blockquote>
3325 <pre><span> foo </span>
3328 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3329 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3330 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3331 <pre><span> foo </span>
3334 <p> a </p><p> foo </p><p>
3335 b </p><div> foo </div><p>
3336 c </p><blockquote><p> foo </p></blockquote>
3337 <pre><span> foo </span>
3342 3b. Indent-Pre and block tags (multi-line html)
3347 <pre>a <span>foo</span>
3352 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3353 b <div data-parsoid='{"stx":"html"}'> foo </div>
3355 <pre>a <span>foo</span>
3357 b </p><div> foo </div>
3361 3c. Indent-Pre and block tags (pre-content on separate line)
3425 4. Indent-Pre and extension tags
3436 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3440 5. Indent-Pre and html pre
3442 <pre class="123">hi</pre>
3444 <pre class="123">hi</pre>
3447 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3451 Render paragraphs when indent-pre is suppressed in blocklevels
3468 4. Multiple spaces at start-of-line
3486 ## NOTE: the leading white-space chars on empty line are significant
3488 5a. White-space in indent-pre
3500 ## NOTE: the leading white-space chars on empty line are significant
3502 5b. White-space in indent-pre
3521 5c. White-space in indent-pre
3534 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3557 7a. Indent-pre and category links
3559 parsoid=wt2html,wt2wt
3561 [[Category:foo]] <!-- No pre-wrapping -->
3562 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3565 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3566 <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 -->
3569 ## We used to, but no longer wt2wt this test since the default serializer
3570 ## will normalize all categories to serialize on their own line.
3571 ## This wikitext usage is going to be fairly uncommon in production and
3572 ## selser will take care of preserving formatting in those scenarios.
3574 7b. Indent-pre and category links
3579 [[Category:foo]] {{echo|b}}
3581 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3582 <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>
3586 Indent-Pre: Newlines in comments shouldn't affect sol state
3601 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3605 HTML-pre: 1. embedded newlines
3637 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3639 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3642 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3647 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3655 HTML-pre: big spaces
3691 <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"}}'>
3710 HTML-pre: 2: indented text
3723 HTML-pre: 3: other wikitext
3742 <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
3751 ### Definition lists
3758 <dl><dt>name </dt>
3759 <dd>Definition</dd></dl>
3764 Definition list for indentation only
3768 <dl><dd>Indented text</dd></dl>
3773 Definition list with no space
3778 <dd>Definition</dd></dl>
3783 Definition list with URL link
3785 ;http://example.com/ :definition
3787 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3788 <dd>definition</dd></dl>
3793 Definition list with bracketed URL link
3795 ;[http://www.example.com/ Example]:Something about it
3797 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3798 <dd>Something about it</dd></dl>
3803 Definition list with wikilink containing colon
3805 ; [[Help:FAQ]]:The least-read page on Wikipedia
3807 <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>
3808 <dd>The least-read page on Wikipedia</dd></dl>
3812 # At Brion's and JeLuF's insistence... :)
3814 Definition list with news link containing colon
3816 ;news:alt.wikipedia.rox: This isn't even a real newsgroup!
3818 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3819 <dd>This isn't even a real newsgroup!</dd></dl>
3822 <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>
3826 Malformed definition list with colon
3828 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3830 <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>
3835 Definition lists: colon in external link text
3837 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
3839 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
3840 <dd>OK, I made that up</dd></dl>
3845 Definition lists: colon in HTML attribute
3847 ;<b style="display: inline">bold</b>
3849 <dl><dt><b style="display: inline">bold</b></dt></dl>
3854 Definition lists: self-closed tag
3856 ;one<br/>two :two-line fun
3858 <dl><dt>one<br />two </dt>
3859 <dd>two-line fun</dd></dl>
3864 Definition lists: ignore colons inside tags
3866 ;one <b>two : tag <i>fun:</i>:</b>:def
3868 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3874 Definition lists: excess closed tags
3876 ;one</b>two :bad tag fun
3878 <dl><dt>onetwo </dt>
3879 <dd>bad tag fun</dd></dl>
3883 <dd>bad tag fun</dd>
3888 T13748: Literal closing tags
3892 <dd>test test test test test</dd>
3894 <dd>test test test test test</dd>
3899 <dd>test test test test test</dd>
3901 <dd>test test test test test</dd>
3907 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3915 <dl><dt>term </dt>
3916 <dd>description</dd></dl>
3917 <ul><li>unordered</li></ul>
3923 Definition list with empty definition and following paragraph
3936 Nested definition lists using html syntax
3949 Definition Lists: No nesting: Multiple dd's
3962 Definition Lists: Indentation: Regular
3970 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3975 Definition Lists: Indentation: Missing 1st level
3981 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3986 Definition Lists: Indentation: Multi-level indent
3990 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3995 Definition Lists: Hacky use to indent tables
4002 should be left alone
4004 <dl><dd><dl><dd><table>
4009 </td></tr></table></dd></dl></dd></dl>
4011 should be left alone
4016 Definition Lists: Hacky use to indent tables (with content following table)
4021 |} <!--c1--> this text should be part of the dl
4028 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4035 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4039 Definition Lists: Hacky use to indent tables, with comments (T65979)
4047 should be left alone
4050 <dl><dd><dl><dd><table><tr>
4053 </tr></table><!-- bar --></dd></dl></dd></dl>
4055 should be left alone</p>
4059 Definition Lists: Hacky use to indent tables, with comment before table
4065 <dl><dd><dl><dd><!-- foo --><table><tr>
4067 </tr></table></dd></dl></dd></dl>
4070 # The trailing whitespace in this test is to catch a regression in
4071 # Parsoid after T54473.
4073 Definition Lists: Hacky use to indent tables (WS-insensitive)
4082 </td></tr></table></dd></dl>
4086 <tbody><tr><td>a</td></tr>
4087 </tbody></table> </dd></dl>
4090 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4091 ## as an empty dt item. It also ignores all but the last ";" when followed
4092 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4093 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4096 ## Ex: ";;t2 ::d2" is transformed into:
4108 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4109 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4120 ## All Parsoid only definition list tests have this difference.
4122 ## See also: https://phabricator.wikimedia.org/T8569
4123 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4126 Table / list interaction: indented table with lists in table contents
4148 </td></tr></table></dd></dl>
4153 Table / list interaction: lists nested in tables nested in indented lists
4176 </td></tr></table></dd></dl>
4183 Definition Lists: Nesting: Multi-level (Parsoid only)
4211 Definition Lists: Nesting: Test 2
4218 <dl><dd>d2</dd></dl></dd></dl>
4223 Definition Lists: Nesting: Test 3
4228 <dl><dd><dl><dt>t1</dt>
4230 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4235 Definition Lists: Nesting: Test 4
4240 <dl><dd><dl><dd><dl><dt>t3</dt>
4241 <dd>d3</dd></dl></dd></dl></dd></dl>
4246 ## The Parsoid team believes the following three test exposes a
4247 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4248 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4249 ## It also exposes a "misfeature" in tidy, which doesn't like
4250 ## <dl> tags with a single <dt> child; it converts the <dt> into
4251 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4253 Definition Lists: Mixed Lists: Test 1
4259 <dl><dd><dl><dt><ul><li>foo</li>
4260 <li>bar</li></ul></dt></dl>
4261 <dl><dt>baz</dt></dl></dd></dl>
4264 <dl><dd><dl><dt><ul><li>foo</li>
4265 <li>bar</li></ul></dt></dl>
4266 <dl><dt>baz</dt></dl></dd></dl>
4284 Definition Lists: Mixed Lists: Test 2
4289 <ul><li><dl><dd>d1</dd>
4290 <dd>d2</dd></dl></li></ul>
4296 Definition Lists: Mixed Lists: Test 3
4301 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4302 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4308 Definition Lists: Mixed Lists: Test 4
4313 <ul><li><dl><dt>d1 </dt>
4316 <dd>d4</dd></dl></li></ul>
4322 Definition Lists: Mixed Lists: Test 5
4328 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4334 Definition Lists: Mixed Lists: Test 6
4339 <ol><li><ul><li><dl><dd>d1
4340 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4346 Definition Lists: Mixed Lists: Test 7
4351 <dl><dd><ul><li>d1</li>
4352 <li>d2</li></ul></dd></dl>
4358 Definition Lists: Mixed Lists: Test 8
4363 <dl><dd><ul><li>d1</li></ul>
4364 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4370 Definition Lists: Mixed Lists: Test 9
4374 <ul><li><dl><dt>foo </dt>
4375 <dd>bar</dd></dl></li></ul>
4381 Definition Lists: Mixed Lists: Test 10
4385 <ul><li><ol><li><dl><dt>foo </dt>
4386 <dd>bar</dd></dl></li></ol></li></ul>
4390 # The Parsoid team disagrees with the PHP parser's seemingly-random
4391 # rules regarding dd/dt on the next few tests. Parsoid is more
4392 # consistent, and recognizes the shared nesting and keeps the
4393 # still-open tags around until the nesting is complete.
4395 # This is a regression test for T175099
4397 Definition Lists: Mixed Lists: Test 11
4404 <ul><li>b</li></ul></dd></dl>
4408 <dd><ul><li>b</li></ul></dd></dl>
4411 # FIXME: Maybe get rid of this test?
4413 Definition Lists: Mixed Lists: Test 12
4418 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4419 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4420 <dl><dt>boo </dt>
4421 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4424 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4425 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4426 <dl><dt>boo </dt>
4427 <dd>baz</dd></dl></li></ol></li></ul>
4444 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4445 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4449 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4450 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4458 # FIXME: Maybe get rid of this test?
4460 # * The test is wrong, there are two colons where there should be :;
4461 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4463 Definition Lists: Weird Ones: Test 1
4465 *#;*::;;foo :bar (who uses this?)
4467 <ul><li><ol><li><dl><dt>foo </dt>
4468 <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>
4485 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4486 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4498 Definition Lists: colons occurring in tags
4515 <dt><span>a:b</span></dt>
4516 <dt><div>a:b</div></dt>
4517 <dt><div>a</div></dt>
4521 <dt><i>a:b</i></dt></dl>
4522 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4524 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4526 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4527 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4528 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4529 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4531 <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>
4532 <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>
4533 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4536 # Parsoid's output differs here again because it shares
4537 # nesting between the two lists unlike the PHP parser.
4538 # Unsure which is more desirable.
4540 Definition Lists: colons and tables 1
4552 </td></tr></table></dd></dl>
4556 </td></tr></table></dd></dl>
4562 </td></tr></table></dd>
4566 </td></tr></table></dd></dl>
4569 # FIXME: Does this need a html/php section?
4571 Definition Lists: template interaction
4573 ::{{definition_list}}
4576 ::{{definition_list}}
4581 <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">
4582 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4584 <dl><dd data-parsoid='{}'>one
4585 <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">
4586 </span><dd about="#mwt2">two
4588 <dd>three</dd></dl></dd>
4589 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4597 External links: non-bracketed
4599 Non-bracketed: http://example.com
4601 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4605 # parsoid doesn't explicitly mark autonumbered links, see T55505
4607 External links: numbered
4609 Numbered: [http://example.com]
4610 Numbered: [http://example.net]
4611 Numbered: [http://example.com]
4613 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4614 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4615 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4618 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4619 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4620 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4624 External links: specified text
4626 Specified text: [http://example.com link]
4628 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4633 External links: trail
4635 Linktrails should not work for external links: [http://example.com link]s
4637 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4642 External links: dollar sign in URL
4644 http://example.com/1$2345
4646 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4650 # parsoid doesn't explicitly mark autonumbered links, see T55505
4652 External links: dollar sign in URL (autonumber)
4654 [http://example.com/1$2345]
4656 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4659 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4663 External links: open square bracket forbidden in URL (T6377)
4665 parsoid=wt2html,wt2wt,html2html
4667 http://example.com/1[2345
4669 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4672 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4676 External links: open square bracket forbidden in URL (named) (T6377)
4678 parsoid=wt2html,html2html
4680 [http://example.com/1[2345]
4682 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4685 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4688 # parsoid adds a space before the link name
4690 External links: open square bracket forbidden in URL (named) (T6377)
4693 [http://example.com/1 [2345]
4695 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4700 External links: nowiki in URL link text (T8230)
4702 [http://example.com/ <nowiki>''example site''</nowiki>]
4704 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4709 External links: newline forbidden in text (T8230 regression check)
4711 [http://example.com/ first
4714 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4720 External links: Pipe char between url and text
4722 [http://example.com | link]
4724 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4729 External links: protocol-relative URL in brackets
4731 [//example.com/ Test]
4733 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4737 # parsoid doesn't explicitly mark autonumbered links, see T55505
4739 External links: protocol-relative URL in brackets without text
4743 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4746 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4750 External links: protocol-relative URL in free text is left alone
4754 <p>//example.com/Foo
4759 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4761 foo//example.com/Foo
4763 <p>foo//example.com/Foo
4767 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4769 External links: with no contents
4771 parsoid=wt2html,wt2wt
4773 [http://en.wikipedia.org/wiki/Foo]
4775 [[wikipedia:Foo|Bar]]
4777 [[wikipedia:Foo|<span>Bar</span>]]
4779 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4780 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4781 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4784 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4785 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4786 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4790 External links: Free with trailing punctuation
4800 http://example.com/url_with_(brackets)
4801 (http://example.com/url_without_brackets)
4802 http://example.com/url_with_entity&
4803 http://example.com/url_with_entity&
4804 http://example.com/url_with_entity&
4805 http://example.com/url_with_entity
4806 http://example.com/url_with_entity 
4807 http://example.com/url_with_entity 
4808 http://example.com/url_with_entity<
4809 http://example.com/url_with_entity<
4810 http://example.com/url_with_entity<
4812 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4813 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4814 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4815 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4816 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4817 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4818 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4819 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4820 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4821 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4822 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4823 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4824 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4825 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4826 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4827 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4828 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4829 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4830 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4833 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
4834 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
4835 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
4836 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
4837 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
4838 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
4839 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
4840 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
4841 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4842 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4843 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4844 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4845 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4846 <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>
4847 <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>
4848 <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>
4849 <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>
4850 <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>
4851 <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>
4855 External links: tricky Parsoid html2html case
4857 parsoid=wt2html,wt2wt,html2html
4859 http://example.com/url_with_entity&amp;
4861 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4864 <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>
4868 External links: Free with trailing quotes (T113666)
4870 '''News:''' Stuff here
4874 <p><b>News:</b> Stuff here
4875 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4878 <p><b>News:</b> Stuff here</p>
4879 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4883 External links: with entity
4885 [http:// www.librarieswithoutborders.org Libraries without borders]
4887 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4890 <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>
4894 External links: Lone protocols are never linked (T105697)
4913 External links: No preceding word characters allowed (T67278)
4915 NOPEhttp://example.com
4916 N0http://example.com
4917 ok:http://example.com
4918 ok-http://example.com
4920 <p>NOPEhttp://example.com
4921 N0http://example.com
4922 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4923 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4928 External links: nofollow domain exception
4930 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4932 <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>.
4939 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4941 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4946 External image from https
4948 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4950 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4955 External image (when not allowed)
4957 wgAllowExternalImages=0
4959 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4961 <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>
4966 Link to non-http image, no img tag
4968 Link to non-http image, no img tag: ftp://example.com/test.jpg
4970 <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>
4975 External links: terminating separator
4977 Terminating separator: http://example.com/thing,
4979 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4984 External links: intervening separator
4986 Intervening separator: http://example.com/1,2,3
4988 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4993 External links: old bug with URL in query
4995 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4997 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5002 External links: old URL-in-URL bug, mixed protocols
5004 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5006 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5010 # Since Parsoid is starting to emit canonical wikitext for links,
5011 # [http://example.com http://example.com] will not RT back to that
5014 External links: URL in text
5018 URL in text: [http://example.com http://example.com]
5020 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5023 <p>URL in text: <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5027 External links: Clickable images
5029 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5031 <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>
5034 <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>
5038 External links: raw ampersand
5040 Old & use: http://x&y
5042 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5047 External links: encoded ampersand
5049 Old & use: http://x&y
5051 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5054 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5058 External links: encoded equals (T8102)
5060 http://example.com/?foo=bar
5062 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5065 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5069 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5070 ## does it number them. As discussed in T55505, we can identify
5071 ## autonumbered links via CSS.
5075 External links: [raw ampersand]
5077 Old & use: [http://x&y]
5079 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5082 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5085 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5086 # mode will return the [raw ampersand] wikitext
5088 External links: [encoded ampersand]
5090 parsoid=wt2html,wt2wt,html2html
5092 Old & use: [http://x&y]
5094 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5097 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5101 External links: [raw equals]
5103 [http://example.com/?foo=bar]
5105 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5108 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5111 # note that parsoid html is identical to [raw equals] case; so html2wt
5112 # mode will return the [raw equals] wikitext
5114 External links: [encoded equals] (T8102)
5116 parsoid=wt2html,wt2wt,html2html
5118 [http://example.com/?foo=bar]
5120 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5123 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5126 # xxx parsoid strips the IDN character, so the round-trip tests will
5127 # obviously fail and are disabled. --cscott
5129 External links: [IDN ignored character reference in hostname; strip it right off]
5131 parsoid=wt2html,wt2wt,html2html
5133 [http://e‌xample.com/]
5135 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5138 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5141 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5142 # Where an external link could easily circumvent the sanitization of the text of
5143 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5144 # test demands a higher standard. That's a bit strange.
5148 # http://example.com -> [http://example.com|http://example.com]
5149 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5151 # The first example is sanitized, but the second is not. Any security benefits
5152 # from this production are trivial to circumvent. Either remove this test and
5153 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5154 # the test accordingly.
5158 # xxx parsoid strips the IDN character, so the round-trip tests will
5159 # obviously fail and are disabled. --cscott
5161 External links: IDN ignored character reference in hostname; strip it right off
5163 parsoid=wt2html,html2html
5165 http://e‌xample.com/
5167 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5170 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5174 External links: www.jpeg.org (T2554)
5178 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5182 # parsoid doesn't explicitly mark autonumbered links, see T55505
5184 External links: URL within URL (T2002)
5186 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5188 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5191 <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>
5195 T2361: URL inside bracketed URL
5197 [http://www.example.com/foo http://www.example.com/bar]
5199 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5204 T2361: URL within URL, not bracketed
5206 http://www.example.com/foo?=http://www.example.com/bar
5208 <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>
5213 T2289: ">"-token in URL-tail
5215 http://www.example.com/<hello>
5217 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5222 T2289: literal ">"-token in URL-tail
5224 http://www.example.com/<b>html</b>
5226 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5229 <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>
5233 T2289: ">"-token in bracketed URL
5235 [http://www.example.com/<hello> stuff]
5237 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5242 T2289: literal ">"-token in bracketed URL
5244 [http://www.example.com/<b>html</b> stuff]
5246 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5251 T2289: literal double quote at end of URL
5253 http://www.example.com/"hello"
5255 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5260 T2289: literal double quote in bracketed URL
5262 [http://www.example.com/"hello" stuff]
5264 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5269 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5271 [http://www.example.com test]
5273 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5278 External links: link text with spaces
5280 [http://www.example.com a b c]
5281 [http://www.example.com ''a'' ''b'']
5283 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5284 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5288 # Note edge case difference between PHP and Parsoid here.
5290 External links: wiki links within external link (T5695)
5292 parsoid=wt2html,html2html
5294 [http://example.com [[wikilink]] embedded in ext link]
5296 [http://example.com test [[wikilink]] embedded in ext link]
5298 <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>
5299 </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>
5302 <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>
5303 <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>
5307 T2787: Links with one slash after the url protocol are invalid
5311 [http:/example.com title]
5313 <p>http:/example.com
5314 </p><p>[http:/example.com title]
5319 Bracketed external links with template-generated invalid target
5321 [{{echo|http:/example.com}} title]
5323 <p>[http:/example.com title]
5327 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5329 Broken wikilinks (but not external links) prevent templates from closing
5333 [http://example.com x
5335 {{echo|[http://example.com x}}
5341 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5342 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5344 </p><p>{{echo|[[Foo}}
5347 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5348 <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>
5350 <p>{{echo|[[Foo}}</p>
5354 Wikilinks with embedded newlines are not broken
5365 <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>
5377 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5381 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5382 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5386 T4702: Mismatched <i>, <b> and <a> tags are invalid
5388 ''[http://example.com text'']
5389 [http://example.com '''text]'''
5390 ''Something [http://example.com in italic'']
5391 ''Something [http://example.com mixed''''', even bold]'''
5392 '''''Now [http://example.com both''''']
5394 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5395 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5396 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5397 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5398 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5406 http://www.example.com/?title=AT%26T
5408 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5411 <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>
5414 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5415 # % is actually legal in HTML5. Any change in output would need testing though.
5417 T6781, T7267: %25 in URL
5419 http://www.example.com/?title=100%25_Bran
5421 <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>
5424 <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>
5428 T6781, T7267: %28, %29 in URL
5430 http://www.example.com/?title=Ben-Hur_%281959_film%29
5432 <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>
5435 <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>
5440 T6781: %26 in autonumber URL
5442 [http://www.example.com/?title=AT%26T]
5444 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5447 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5451 T6781, T7267: %26 in autonumber URL
5453 [http://www.example.com/?title=100%25_Bran]
5455 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5458 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5462 T6781, T7267: %28, %29 in autonumber URL
5464 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5466 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5469 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5474 T6781: %26 in bracketed URL
5476 [http://www.example.com/?title=AT%26T link]
5478 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5481 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5485 T6781, T7267: %25 in bracketed URL
5487 [http://www.example.com/?title=100%25_Bran link]
5489 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5494 T6781, T7267: %28, %29 in bracketed URL
5496 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5498 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5501 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5505 External link containing a period in the anchor. (T65947)
5507 [//foo.org/bar#baz. bang]
5509 [//foo.org/bar. bang]
5511 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5512 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5515 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5516 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5520 External link containing a single quote. (T65947)
5524 [//foo.org/bar'baz bang]
5526 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5527 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5530 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5531 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5535 External link containing double-single-quotes in text '' (T6598 sanity check)
5537 Some [http://example.com/ pretty ''italics'' and stuff]!
5539 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5544 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5546 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5548 <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>
5552 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5554 External link containing double-single-quotes with no space separating the url from text in italics
5556 [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]].]
5558 <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>.
5561 <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>
5565 External link with comments in link text
5567 [http://www.google.com Google <!-- comment -->]
5569 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5572 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5576 External link to bare IPv4 address
5578 [http://192.168.0.1 Link]
5580 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5583 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5587 URL-encoding in URL functions (single parameter)
5589 {{localurl:Some page|amp=&}}
5591 <p>/index.php?title=Some_page&amp=&
5596 URL-encoding in URL functions (multiple parameters)
5598 {{localurl:Some page|q=?&=&}}
5600 <p>/index.php?title=Some_page&q=?&amp=&
5607 http://example.com/index.php?foozoid%5B%5D=bar
5609 http://example.com/index.php?foozoid[]=bar
5611 <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>
5612 </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>
5615 <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>
5617 <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>
5621 IPv6 urls, autolink format (T23261)
5623 http://[2404:130:0:1000::187:2]/index.php
5625 Examples from RFC 2373, section 2.2:
5627 *http://[1080::8:800:200C:417A]/unicast
5628 *http://[FF01::101]/multicast
5629 *http://[::1]/loopback
5630 *http://[::]/unspecified
5631 *http://[::13.1.68.3]/ipv4compat
5632 *http://[::FFFF:129.144.52.38]/ipv4compat
5634 Examples from RFC 2732, section 2:
5636 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5637 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5638 *http://[3ffe:2a00:100:7031::1]
5639 *http://[1080::8:800:200C:417A]/foo
5640 *http://[::192.9.5.5]/ipng
5641 *http://[::FFFF:129.144.52.38]:80/index.html
5642 *http://[2010:836B:4179::836B:4179]
5644 <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>
5645 </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:
5647 <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>
5648 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5649 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5650 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5651 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5652 <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>
5653 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5655 <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>
5656 <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>
5657 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5658 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5659 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5660 <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>
5661 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5664 <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>
5666 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5667 <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>
5668 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5669 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5670 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5671 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5672 <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>
5674 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5675 <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>
5676 <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>
5677 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5678 <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>
5679 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5680 <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>
5681 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5685 IPv6 urls, bracketed format (T23261)
5687 [http://[2404:130:0:1000::187:2]/index.php test]
5689 Examples from RFC 2373, section 2.2:
5691 *[http://[1080::8:800:200C:417A] unicast]
5692 *[http://[FF01::101] multicast]
5693 *[http://[::1]/ loopback]
5694 *[http://[::] unspecified]
5695 *[http://[::13.1.68.3] ipv4compat]
5696 *[http://[::FFFF:129.144.52.38] ipv4compat]
5698 Examples from RFC 2732, section 2:
5700 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5701 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5702 *[http://[3ffe:2a00:100:7031::1] 3]
5703 *[http://[1080::8:800:200C:417A]/foo 4]
5704 *[http://[::192.9.5.5]/ipng 5]
5705 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5706 *[http://[2010:836B:4179::836B:4179] 7]
5708 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5709 </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:
5711 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5712 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5713 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5714 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5715 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5716 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5717 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5719 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5720 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5721 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5722 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5723 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5724 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5725 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5728 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5730 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5731 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5732 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5733 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5734 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5735 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5736 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5738 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5739 <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>
5740 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5741 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5742 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5743 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5744 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5745 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5749 Non-extlinks in brackets
5758 [{{echo|foo}} ''bar'']
5759 [{{echo|foo}}l's] errand
5760 [{{echo|foo}}l's errand]
5762 [url=http://example.com]
5763 [http:// bare protocols don't count]
5776 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5777 [http:// bare protocols don't count]
5785 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5786 [<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]
5787 [<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>]
5788 [<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
5789 [<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]
5790 [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>]
5791 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5792 [http:// bare protocols don't count]</p>
5796 Percent encoding in external links
5798 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5800 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5803 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5807 Use url link syntax for links where the content is equal the link target
5811 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5814 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5818 Parenthesis in external links, especially URL links
5822 http://example.com/test)
5824 http://example.com/(test)
5826 http://example.com/((test)
5828 (http://example.com/(test))
5830 (http://example.com/(test)))))
5832 http://example.com/a)b
5834 [http://example.com) foo]
5836 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5837 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5838 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5839 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5840 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5841 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5842 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5843 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5846 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
5847 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
5848 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
5849 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
5850 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
5851 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5852 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
5853 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
5857 Parenthesis in external links, w/ transclusion or comment
5859 (http://example.com/{{echo|hi}})
5861 (http://example.com<!-- hi -->)
5863 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5864 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5867 <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>
5869 <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>
5873 Serialize <a> tags with invalid link targets as plain text
5875 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5877 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5878 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5879 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5880 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5883 <nowiki>*</nowiki>text
5884 <nowiki>[[foo]]</nowiki>
5885 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5889 mw:ExtLink -vs- mw:WikiLink (T94723)
5893 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5894 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5895 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5896 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5898 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5899 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5907 [[:en:European_Robin|European Robin]]
5908 [[:en:European_Robin|European Robin]]
5912 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5916 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5918 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5929 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5931 Normal text. '''''Bold italic text.''''' Normal text.
5933 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5934 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5939 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5940 # parser strips. The wikitext contains just the first half of the bold
5943 Unclosed and unmatched quotes
5945 '''''Bold italic text '''with bold deactivated''' in between.'''''
5947 '''''Bold italic text ''with italic deactivated'' in between.'''''
5951 ..spanning two paragraphs (should not work).'''
5953 '''Bold tag left open
5955 ''Italic tag left open
5959 <!-- Unmatching number of opening, closing tags: -->
5960 '''This year''''s election ''should'' beat '''last year''''s.
5962 ''Tom'''s car is bigger than ''Susan'''s.
5964 Plain ''italic'''s plain
5966 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5967 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5968 </p><p><b>Bold text..</b>
5969 </p><p>..spanning two paragraphs (should not work).
5970 </p><p><b>Bold tag left open</b>
5971 </p><p><i>Italic tag left open</i>
5973 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5974 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5975 </p><p>Plain <i>italic'</i>s plain
5978 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5979 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5980 </p><p><b>Bold text..</b>
5981 </p><p>..spanning two paragraphs (should not work).<b></b>
5982 </p><p><b>Bold tag left open</b>
5983 </p><p><i>Italic tag left open</i>
5986 <!-- Unmatching number of opening, closing tags: -->
5987 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5988 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5989 </p><p>Plain <i>italic'</i>s plain
5996 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5999 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6000 # is the bare minimum required by the spec, see:
6001 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6002 # Parsoid team replies: empty table tags are legal in HTML5
6004 A table with no data.
6017 A table with stray table end tags on start tag line (wt2html)
6021 {|style="color: red;"|}
6023 {|style="color: red;" |}
6027 {|style="color: red;"|} id="foo"
6031 {|style="color: red;" |} id="foo"
6035 <table style="color: red;"></table>
6037 <table style="color: red;">
6043 <table style="color: red;" id="foo">
6049 <table style="color: red;" id="foo">
6058 A table with no data (take 2)
6066 # A table with nothing but a caption is invalid XHTML, we might want to render
6067 # this as <p>caption</p>
6068 # Parsoid team replies: table with only a caption is legal in HTML5
6070 A table with nothing but a caption
6078 </caption><tr><td></td></tr></table>
6081 <table><caption>caption</caption></table>
6085 A table with caption with default-spaced attributes and a table row
6088 |+ style="color: red;" | caption1
6094 <caption style="color: red;">caption1
6103 A table with captions with non-default spaced attributes and a table row
6106 |+style="color: red;"|caption2
6107 |+ style="color: red;"|caption3
6113 <caption style="color: red;">caption2
6115 <caption style="color: red;">caption3
6124 Table td-cell syntax variations
6129 |style='color:red;'|baz
6130 |style='color:red;'||baz
6137 <td>foo bar foo</td>
6140 <td style="color:red;">baz
6142 <td>style='color:red;'</td>
6170 Simple table but with multiple dashes for row wikitext
6189 Multiplication table
6191 {| border="1" cellpadding="2"
6192 |+Multiplication table
6212 <table border="1" cellpadding="2">
6213 <caption>Multiplication table
6260 Accept "||" in table headings
6275 Accept "!!" in table data
6289 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6294 Accept "||" in indented table headings
6304 </th></tr></table></dd></dl>
6309 Accept "!!" in templates
6323 <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>
6327 Accept "!!" in table headings after newline
6344 <p>b!!c</p></th></tr>
6349 Accept "!!" in table data of mixed wikitext / html syntax
6353 <tr><td>b!!c</td></tr>
6359 </th></tr><tr><td>b!!c</td></tr>
6363 <tbody><tr><th>a</th></tr>
6364 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6369 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6386 Accept "| !" at start of line in tables (ignore !-attribute)
6390 |!style="color:red"|bar
6402 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 +/-
6406 |style='color:red;'|+1
6407 |style='color:blue;'|-1
6419 <td style="color:red;">+1
6421 <td style="color:blue;">-1
6445 |rowspan=2|Cell 2, row 1 (and 2)
6456 <td rowspan="2">Cell 2, row 1 (and 2)
6474 {| bgcolor=#ABCDEF border=2
6479 |the original table again
6487 <table bgcolor="#ABCDEF" border="2">
6495 <td>the original table again
6501 Invalid attributes in table cell (T3830)
6515 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6519 | title="foo<nowiki>|</nowiki>" |bar
6520 | title="foo<nowiki>|</nowiki>" bar
6527 <td title="foo|">bar
6529 <td>title="foo|" bar
6534 <tbody><tr><td title="foo">bar</td>
6535 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6536 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6540 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6541 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6542 # *2wt modes will fail.
6544 Table security: embedded pipes
6546 parsoid=wt2html,html2html
6549 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6553 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6554 <td>]" onmouseover="alert(document.cookie)">test
6562 <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>
6566 Element attributes with double ! should not be broken up by <th>
6569 !hi <div class="!!">ha</div> ho
6574 <th>hi <div class="!!">ha</div> ho
6579 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6584 ! and || in element attributes should not be parsed as <th>/<td>
6587 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6592 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6597 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6601 # FIXME: The output seems broken. Filed as T110268.
6603 ! and || in td attributes should not be parsed as <th>/<td>
6608 |style="color: red !important;" data-contrived="put this here ||"|foo
6613 <td>style="color: red !important;" data-contrived="put this here</td>
6619 <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>
6624 Break on | in element attribute in template
6626 parsoid=wt2html,html2html
6628 {{echo|1=<div class="hi|ho">ha</div>}}
6630 <p>ho">ha</div>
6633 <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>
6637 Break on | in element attribute name in template
6639 {{echo|<div cla|ss="hiho">ha</div>}}
6641 <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>
6645 Don't break on | in extension attribute in template
6647 {{echo|<ref name="hi|ho">ha</ref>}}
6651 <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>
6653 <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>
6656 ## We don't support roundtripping of these attributes in Parsoid.
6657 ## Selective serialization takes care of preventing dirty diffs.
6658 ## But, on edits, we dirty-diff the invalid attribute text.
6660 Invalid text in table attributes should be discarded
6664 {| <span>boo</span> style='border:1px solid black'
6665 | <span>boo</span> style='color:blue' |1
6666 |<span>boo</span> style='color:blue'|2
6669 <table style="border:1px solid black">
6671 <td style="color:blue">1
6673 <td style="color:blue">2
6677 <table style="border:1px solid black">
6679 <td style="color:blue">1</td>
6680 <td style="color:blue">2</td>
6686 Invalid text in table attributes should be preserved by selective serializer
6689 "modes": ["selser"],
6691 ["td:first-child", "text", "abc"],
6692 ["td + td", "text", "xyz"]
6696 {| <span>boo</span> style='border:1px solid black'
6697 | <span>boo</span> style='color:blue' | 1
6698 |<span>boo</span> style='color:blue'| 2
6701 {| <span>boo</span> style='border:1px solid black'
6702 | <span>boo</span> style='color:blue' |abc
6703 |<span>boo</span> style='color:blue'|xyz
6708 1. Template-generated table cell attributes and cell content
6713 || {{table_attribs_5}}
6714 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6715 |align=center {{table_attribs}}
6716 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6721 <td style="color:red;">Foo
6723 <td style="color:red;">Foo
6725 <td>style="color:red;"</td>
6728 <td style="color:red;">Foo
6730 <td align="center" style="color:red;">Foo
6732 <td align="center" style="color:red;">Foo
6738 2. Template-generated table cell attributes and cell content
6741 |{{table_attribs_2}}
6746 <td style="color:red;">Foo
6754 <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>
6755 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6760 3. Template-generated table cell attributes and cell content
6763 !align=center {{table_header_cells}}
6765 |align=center {{table_cells}}
6770 <th align="center" style="color:red;">Foo</th>
6771 <th style="color:red;"><i>Bar</i></th>
6772 <th style="color:brown;"><i>Foo</i> and Baz
6775 <td align="center" style="color:red;">Foo</td>
6776 <td style="color:red;"><i>Bar</i></td>
6777 <td style="color:brown;"><i>Foo</i> and Baz
6782 <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>
6783 <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>
6788 4. Template-generated table cell attributes and cell content inside a templated table
6791 !align=center {{table_header_cells}}
6793 |align=center {{table_cells}}
6798 <th align="center" style="color:red;">Foo</th>
6799 <th style="color:red;"><i>Bar</i></th>
6800 <th style="color:brown;"><i>Foo</i> and Baz
6803 <td align="center" style="color:red;">Foo</td>
6804 <td style="color:red;"><i>Bar</i></td>
6805 <td style="color:brown;"><i>Foo</i> and Baz
6809 <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}}]}'>
6810 <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>
6812 <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>
6816 ## Edge case fix to prevent future regressions
6818 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6821 |{{table_attribs_7}}
6826 <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>
6828 <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>
6832 Table with row followed by newlines and table heading
6834 parsoid=wt2html,html2html
6852 Table with empty line following the start tag
6854 parsoid=wt2html,html2html
6872 Table attributes with empty value
6874 parsoid=wt2html,html2html
6887 <tbody><tr><td style="">hello</td></tr>
6892 Wikitext table with a lot of comments
6915 Wikitext table comments represented in parsoid dom
6917 {|<!--c1--><!--c2-->
6926 </td></tr></tbody></table>
6928 <table><!--c1--><!--c2-->
6929 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6930 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
6935 Wikitext table with double-line table cell
6952 Table cell with a single comment
6969 Table-cell after a comment-only-empty-line
6986 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6988 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
6994 Build table with {{!}}
6996 {{{!}} class="wikitable"
6999 {{!}}- style="color:red;"
7000 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7003 <table class="wikitable">
7009 <tr style="color:red;">
7011 <td style="color:red;">second data
7017 Build table with pipe as data
7019 {| class="wikitable"
7022 |- style="color:red;"
7023 |data|| style="color:red;" |second data
7025 | style="color:red;" |data with | || style="color:red;" | second data with |
7027 ||data with | |||second data with |
7030 <table class="wikitable">
7036 <tr style="color:red;">
7038 <td style="color:red;">second data
7041 <td style="color:red;">data with |</td>
7042 <td style="color:red;">second data with |
7045 <td>data with |</td>
7046 <td>second data with |
7052 Build table with wikilink
7054 {| class="wikitable"
7055 !header||second header
7056 |- style="color:red;"
7057 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7059 |data||second data [[Main Page|link|text with pipe]]
7062 <table class="wikitable">
7067 <tr style="color:red;">
7068 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7069 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7073 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7078 # The expected HTML structure in this test is debatable. The PHP parser does
7079 # not parse this kind of table at all. The main focus for Parsoid is on
7080 # round-tripping, so this output is ok for now. TODO: revisit!
7082 Wikitext table with html-syntax row
7092 <td>foo</td></tr></tbody></table>
7096 Fostered content in tables: Plain text
7098 parsoid=wt2html,html2html
7116 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7117 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7119 </tr></tbody></table>
7123 Fostered content in tables: Lists
7125 parsoid=wt2html,html2html
7138 <ul><li>a</li></ul><table>
7143 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7144 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7146 </tr></tbody></table>
7150 Template generated table cell with attributes
7154 {{table_attribs_4}} ||a||b
7160 <td style="background-color:#DC241f;" width="10px"></td>
7163 </td></tr></tbody></table>
7166 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7167 <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>
7171 Parsoid: Round-trip tables directly followed by content (T53219)
7173 parsoid=wt2html,wt2wt
7186 </td></tr></tbody></table><p> bar
7190 </td></tr></tbody></table><p><b>quux</b>
7195 Parsoid: Default to a newline after tables in new content (T53219)
7200 <tr><td>foo</td></tr></tbody></table> bar
7202 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7207 <nowiki> </nowiki>bar
7215 Parsoid: newline inducing block nodes don't suppress <nowiki>
7227 Parsoid: Row-syntax table headings followed by comment & table cells
7229 parsoid=wt2html,wt2wt
7233 <!-- foo --> ||baz||quux
7247 <tbody><tr><th> foo </th><th> bar
7248 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7253 Parsoid: Recover better from broken table attributes
7267 </td></tr></tbody></table>
7272 <p>foo</p></td></tr>
7277 Tables: Digest broken attributes on table and tr tag
7288 <tr class='mw-empty-elt'></tr>
7289 <tr class='mw-empty-elt'></tr>
7293 # T137406: Whitespace in the HTML
7295 1. Generate correct wikitext for tables with thead/tbody/tfoot
7300 <caption>Test</caption>
7362 </td></tr></tbody></table>
7365 # T137406: No whitespace in the HTML
7367 2. Generate correct wikitext for tables with thead/tbody/tfoot
7371 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7381 Testing serialization after deletion in references
7390 hi <ref><div id="x">ho</div></ref>
7400 Testing serialization after deletion of table cells
7403 "modes": ["wt2wt", "selser"],
7411 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7421 Testing selser after addition of new row before first row (T125419)
7424 "modes": ["wt2wt", "selser"],
7426 [ "tr", "before", "<tr><td>X</td></tr>" ]
7442 Serialize new table rows in a HTML table using HTML tags
7445 "modes": ["wt2wt", "selser"],
7447 [ "tr", "before", "<tr><td>X</td></tr>" ]
7451 <table><tr><td>a</td></tr></table>
7453 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7457 Serialize new table cells in a HTML row using HTML tags
7460 "modes": ["wt2wt", "selser"],
7462 [ "td", "before", "<td>X</td>" ]
7466 <table><tr><td>a</td></tr></table>
7468 <table><tr><td>X</td><td>a</td></tr></table>
7472 Wikitext tables can be nested inside HTML tables
7476 <table data-parsoid='{"stx":"html"}'>
7479 <tr><td>foo</td></tr>
7494 Serialize wikitext list items as HTML list items when embedded in a HTML list
7498 <ul data-parsoid='{"stx": "html"}'>
7499 <li data-parsoid='{}'>a</li>
7509 # SSS FIXME: Is this actually a good thing given the
7510 # odd nested list output that is generated by MW?
7511 # <ul><li>foo<ul>..</ul></li></ul> instead of
7512 # <ul><li>foo</li><ul>..</ul></ul>
7514 Wikitext lists can be nested inside HTML lists
7518 <ul data-parsoid='{"stx": "html"}'>
7519 <li data-parsoid='{"stx": "html"}'>a
7524 <ul data-parsoid='{"stx": "html"}'>
7547 Plain link, capitalized
7551 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7556 Plain link, uncapitalized
7560 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7567 [[Main Page|The Main Page]]
7569 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7574 Piped link with comment in link text
7576 [[Main Page|The Main<!--front--> Page]]
7578 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7583 Piped link with multiple pipe characters in link text
7585 [[Main Page||The|Main|Page|]]
7587 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7590 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7594 Piped link with no link text
7596 [[Thomas Bek (bishop of St David's)|]]
7598 <p>[[Thomas Bek (bishop of St David's)|]]
7601 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7605 Piped link with empty link text
7607 [[Main Page|<nowiki/>]] - empty nowiki
7608 [[Main Page| ]] - empty space
7609 [[Main Page| ]] - empty non breaking space
7611 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7612 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7613 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7616 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7617 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7618 <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>
7626 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7631 Broken link with fragment
7633 [[Zigzagzogzagzig#zug]]
7635 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7640 Special page link with fragment
7642 [[Special:Version#anchor]]
7644 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7649 Nonexistent special page link with fragment
7651 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7653 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7660 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7662 <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>
7669 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7671 <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>!!!
7682 T45661: Piped links with identical prefixes
7684 [[prefixed article|prefixed articles with spaces]]
7686 [[prefixed article|prefixed articlesaoeu]]
7688 [[Main Page|Main Page test]]
7690 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7691 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7692 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7698 Link with HTML entity in suffix / tail
7700 [[Main Page]]", [[Main Page]]a
7702 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7705 <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>
7709 Link with 3 brackets
7720 Link with 4 brackets
7724 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7729 Piped link with 3 brackets
7731 [[[main page|the main page]]]
7733 <p>[[[main page|the main page]]]
7738 Piped link with extlink-like text
7741 [[Main Page|This is a [bar]]]
7744 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7745 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7746 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7749 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7750 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7751 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7755 Link with multiple pipes
7757 [[Main Page|The|Main|Page]]
7759 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7764 Anchor containing a #. (T65430)
7766 wgFragmentMode=[ 'html5', 'legacy' ]
7768 [[Main Page#And#Link]]
7770 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7773 <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>
7779 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7781 <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>
7786 Link with space in namespace
7788 [[User talk:Foo bar]]
7790 <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>
7795 MemoryAlpha:AlphaTest
7797 This is an article in the MemoryAlpha namespace
7798 (which shadows the memoryalpha interwiki link).
7802 Namespace takes precedence over interwiki link (T53680)
7804 [[MemoryAlpha:AlphaTest]]
7806 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7810 # The previous test doesn't work correctly in html2*, due to not recognizing the
7811 # link as an internal one. This one checks for the correct behavior.
7813 Link to namespace preferred over interwiki with correct rel attribute
7815 parsoid=html2wt,html2html
7817 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7819 [[MemoryAlpha:AlphaTest]]
7823 Piped link to namespace
7825 [[Meta:Disclaimers|The disclaimers]]
7827 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7834 [[Usually caused by a typo (oops}]]
7836 <p>[[Usually caused by a typo (oops}]]
7843 Just a test of an article title containing a percent.
7847 Link containing % (not as a hex sequence)
7850 [[7% Solution|7%25 Solution]]
7852 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7853 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7856 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7857 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7860 # note that the parsoid HTML is identical to the previous test output,
7861 # so the previous test ensures that the html2wt mode will generate the
7862 # "not as a hex sequence" wikitext.
7864 Link containing % as a single hex sequence interpreted to char
7866 parsoid=wt2wt,wt2html,html2html
7869 [[7%25 Solution|7%25 Solution]]
7871 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7872 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7875 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7876 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7880 Link containing % as a double hex sequence interpreted to hex sequence
7884 <p>[[7%2525 Solution]]
7888 ## Example for such a section: == < ==
7890 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7892 wgFragmentMode=[ 'html5', 'legacy' ]
7894 [[%23%3c]][[%23%3e]]
7896 <p><a href="#<">#<</a><a href="#>">#></a>
7899 <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>
7902 ## Example for such a section: == < ==
7904 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7906 wgFragmentMode=[ 'legacy' ]
7908 [[%23%3c]][[%23%3e]]
7910 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7915 Link containing "<#" and ">#" as a hex sequences
7917 [[%3c%23]][[%3e%23]]
7919 <p>[[%3c%23]][[%3e%23]]
7924 Link containing an equals sign
7926 [[Special:BookSources/isbn=4-00-026157-6]]
7928 <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>
7931 <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>
7937 Just a test of an article title containing a tilde.
7940 # note that links containing signatures, like [[Foo~~~~]], are
7941 # massaged by the pre-save transform (PST) and so the tildes are never
7942 # seen by the parser.
7944 Link containing a tilde
7948 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7951 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7955 Link containing double-single-quotes '' (T6598)
7957 [[Lista d''e paise d''o munno]]
7959 <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>
7962 <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>
7966 Link containing double quotes and spaces
7970 <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>
7973 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
7977 File containing double quotes and spaces
7979 [[File:Cool "Gator".png]]
7981 <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>
7985 Redirect containing double quotes and spaces
7987 #REDIRECT [[Cool "Gator"]]
7989 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7993 Link containing double-single-quotes '' in text (T6598 sanity check)
7995 Some [[Link|pretty ''italics'' and stuff]]!
7997 <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>!
8000 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8004 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8006 ''Some [[Link|pretty ''italics'' and stuff]]!''
8008 <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>
8013 Link with double quotes in title part (literal) and alternate part (interpreted)
8015 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8019 [[''Pentecoste''|Pentecoste]]
8021 [[''Pentecoste''|''Pentecoste'']]
8023 <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>
8024 </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>
8025 </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>
8026 </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>
8029 <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>
8030 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8031 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8032 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8036 Broken image links with HTML captions (T41700)
8038 [[File:Nonexistent|<script></script>]]
8039 [[File:Nonexistent|100x100px|<script></script>]]
8040 [[File:Nonexistent|<]]
8041 [[File:Nonexistent|a<i>b</i>c]]
8043 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8044 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8045 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8046 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8049 <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>
8050 <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>
8051 <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>
8052 <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>
8058 [[http://www.example.com]]
8060 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8063 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8067 Plain link to URL with link text
8069 [[http://www.example.com Link text]]
8071 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8076 Plain link to protocol-relative URL
8078 [[//www.example.com]]
8080 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8083 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8087 Plain link to protocol-relative URL with link text
8089 [[//www.example.com Link text]]
8091 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8096 Plain link to page with question mark in title
8102 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8103 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8107 # I'm fairly sure the expected result here is wrong.
8108 # We want these to be URL links, not pseudo-pages with URLs for titles....
8109 # However the current output is also pretty screwy.
8112 # I'm changing it to match the current output--it arguably makes more
8113 # sense in the light of the test above. Old expected result was:
8114 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8116 # But I think this test is bordering on "garbage in, garbage out" anyway.
8121 Piped link to URL: [[http://www.example.com|an example URL]]
8123 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8126 <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>
8130 Plain link in template argument
8134 {{echo|[http://www.example.com |123]}}
8136 {{echo|[[http://www.example.com |123]]}}
8138 {{echo|[[http://www.example.com |123]}}
8140 {{echo|[http://www.example.com |123]]}}
8142 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8143 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8144 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8145 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8148 <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>
8150 <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>
8152 <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>
8154 <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>
8158 T2002: [[page|http://url/]] should link to page, not http://url/
8160 [[Main Page|http://url/]]
8162 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8165 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8168 # Parsoid does not mark self-links, by design.
8170 T2337: Escaped self-links should be bold
8174 [[Bug462]] [[Bug462]]
8176 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8179 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8183 Self-link to section should not be bold
8187 [[Main Page#section]]
8189 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8200 Self-link to numeric title
8206 <p><a class="mw-selflink selflink">0</a>
8211 Link to numeric-equivalent title
8217 <p><a href="/wiki/00" title="00">00</a>
8222 <nowiki> inside a link
8224 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8226 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8231 Non-breaking spaces in title
8233 [[ Main Page ]]
8235 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8239 # Add new article for the test below so that it doesn't red-link
8247 Multiple spaces in titles should normalize to a single underscore
8249 parsoid=wt2html,wt2wt
8255 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8256 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8257 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8260 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8261 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8262 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8267 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8273 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8278 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8284 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8289 Internal link with en linktrail: no apostrophes (T29473)
8295 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8300 Internal link with ca linktrail with apostrophes (T29473)
8306 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8311 Internal link with kaa linktrail with apostrophes (T29473)
8317 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8322 Link with multiple ":" in a subpage-supporting namespace (T65636)
8324 [[User:Foo/Test/63636:Bar|Test]]
8326 <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>
8329 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8332 ## Mainly a sanity check for Parsoid
8334 Handle title parsing for subpages
8354 Link to a subpage from a namespace other than main
8361 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8364 <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>
8368 Ensure that transclusion titles are not url-decoded
8370 subpage title=[[Test]]
8373 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8375 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8378 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8382 Purely hash wikilink
8384 title=[[User:Test/123]]
8389 <p><a href="#a">b</a>
8392 <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>
8396 Serialization of purely hash wikilink
8398 title=[[User:Test/123]]
8402 <p><a href="#a">[[</a></p>
8404 [[#a|<nowiki>[[</nowiki>]]
8406 <p><a href="#a">[[</a>
8411 1. Interaction of linktrail and template encapsulation
8415 <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>
8419 2. Interaction of linktrail and template encapsulation
8423 {{echo|Some [[Fool]]}}s
8425 <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>
8429 3. Interaction of linktrail and template encapsulation
8433 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8435 <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>
8445 Internal link with is link prefix
8449 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8451 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8462 Internal link with is link trail and link prefix
8466 [[mótmælendatrú|xxx]]ar
8468 mótmælenda[[söfnuður]]
8469 mótmælenda[[söfnuður|söfnuðir]]
8470 mótmælenda[[söfnuður|söfnuðir]]xxx
8472 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8473 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8474 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8475 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8476 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8481 Parsoid link trail escaping
8483 parsoid=html2wt,html2html
8485 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8491 Parsoid link prefix escaping
8494 parsoid=html2wt,html2html
8496 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8498 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8502 Parsoid link bracket escaping
8504 parsoid=html2wt,html2html
8506 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8507 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8508 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8509 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8510 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8511 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8519 [[[<nowiki/>[[Test]]]]]
8523 [[[[[<nowiki/>[[Test]]]]]]]
8527 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8535 [http://wp.org ''foo'']
8537 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8538 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8539 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8540 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8545 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8547 [[Foo|{{echo|a}} b {{echo|c}}]]
8549 <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>
8553 Link with angle bracket after anchor
8555 wgFragmentMode=[ 'html5', 'legacy' ]
8559 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8562 <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>
8566 Link with angle bracket after anchor (legacy)
8568 wgFragmentMode=[ 'legacy' ]
8572 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8577 ### Interwiki links (see maintenance/interwiki.sql)
8581 Inline interwiki link
8583 parsoid=wt2html,wt2wt,html2html
8585 [[MeatBall:SoftSecurity]]
8587 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8590 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8594 Inline interwiki link with empty title (T4372)
8596 parsoid=wt2html,wt2wt,html2html
8600 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8603 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8606 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8608 Interwiki link encoding conversion (T3636)
8610 parsoid=wt2html,wt2wt
8612 *[[Wikipedia:ro:Olteniţa]]
8613 *[[Wikipedia:ro:Olteniţa]]
8615 <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>
8616 <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>
8620 <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>
8621 <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>
8625 <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>
8626 <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>
8631 Interwiki link with fragment (T4130)
8633 [[MeatBall:SoftSecurity#foo]]
8635 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8640 Link scenarios with escaped fragments
8642 wgFragmentMode=[ 'html5', 'legacy' ]
8645 [[Foo#Is this great?]]
8646 [[meatball:Foo#Is this great?]]
8648 <p><a href="#Is_this_great?">#Is this great?</a>
8649 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8650 <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>
8653 <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>
8654 <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>
8655 <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>
8659 Link scenarios with escaped fragments (legacy)
8661 wgFragmentMode=[ 'legacy' ]
8664 [[Foo#Is this great?]]
8665 [[meatball:Foo#Is this great?]]
8667 <p><a href="#Is_this_great.3F">#Is this great?</a>
8668 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8669 <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>
8673 # Ideally the wikipedia: prefix here should be proto-relative too
8674 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8675 # define the 'en' prefix, and originally the test used 'wikipedia',
8676 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8679 Different interwiki prefixes mapping to the same URL
8687 [[:wikipedia:Foo|Foo]]
8689 [[wikipedia:en:Foo]]
8691 [[:wikipedia:en:Foo]]
8695 <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>
8697 <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>
8699 <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>
8701 <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>
8703 <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>
8705 <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>
8707 <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>
8711 Interwiki links that cannot be represented in wiki syntax
8714 [[meatball:ok#foo|ok with fragment]]
8715 [[meatball:ok_as_well?|ok ending with ? mark]]
8716 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8717 [http://de.wikipedia.org/wiki/#foo is just fragment]
8720 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8721 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8722 <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>
8723 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8724 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8727 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8728 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8729 <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>
8730 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8731 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8735 Interwiki links: trail
8737 [[wikipedia:Foo|Ba]]r
8739 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8742 <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>
8746 Local interwiki link
8748 parsoid=wt2html,wt2wt,html2html
8750 [[local:Template:Foo]]
8752 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8755 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8758 # Parsoid does not mark self-links, by design.
8760 Local interwiki link: self-link to current page
8763 parsoid=wt2html,wt2wt,html2html
8767 <p><a class="mw-selflink selflink">local:Main Page</a>
8770 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8774 Local interwiki link: prefix only (T66167)
8776 parsoid=wt2html,wt2wt,html2html
8780 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8783 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8787 Local interwiki link: with additional interwiki prefix (T63357)
8789 parsoid=wt2html,wt2wt,html2html
8791 [[local:meatball:Hello]]
8793 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8796 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8800 Multiple local interwiki link prefixes
8802 [[local:local:local:local:mi:local:Foo]]
8804 parsoid=wt2html,wt2wt,html2html
8806 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8809 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8813 ### Interlanguage links
8814 ### Language links (so that searching for '### language' matches..)
8826 <p>Blah blah blah</p>
8827 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8830 ## parsoid html2wt will lose the space variations
8832 Interlanguage link with spacing
8834 parsoid=wt2html,wt2wt,html2html
8842 <p>Blah blah blah</p>
8843 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8847 Double interlanguage link
8856 <p>Blah blah blah</p>
8857 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8858 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8861 ## parsoid html2wt will lose the space variations
8863 Interlanguage link variations
8865 parsoid=wt2html,wt2wt,html2html
8875 <p>Blah blah blah</p>
8876 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8877 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8878 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8882 Escaping of interlanguage links (T129218, T156308)
8886 [[ : zh : Chinese ]]
8889 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8890 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8894 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8895 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8899 Multiple colons escaping interlanguage links
8907 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8912 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8914 [[:::es:Spanish]]</p>
8917 ## parsoid html2wt will normalize the space to _
8919 Space and question mark encoding in interlanguage links (T95473)
8921 parsoid=wt2html,wt2wt,html2html
8929 <p>Blah blah blah</p>
8930 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8934 Interlanguage link, with prefix links
8944 <p>Blah blah blah</p>
8945 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8949 Double interlanguage link, with prefix links (T10897)
8960 <p>Blah blah blah</p>
8961 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8962 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8966 "Extra" interlanguage links (T34189 / gerrit 111390)
8974 <p>Blah blah blah</p>
8975 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8978 ## PHP parser tests script needs an update
8979 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8981 Language links render as inline links if $wgInterwikiMagic=false
8983 wgInterwikiMagic=false
8984 parsoid=wt2html,wt2wt,html2html
8989 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8992 ## PHP parser tests script needs an update
8993 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8995 Language links render as inline links in the Talk namespace
8998 parsoid=wt2html,wt2wt,html2html
9003 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9007 Parsoid-specific test: Wikilinks with should RT properly
9013 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9018 Parsoid T55221: Wikilinks should be properly entity-escaped
9020 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9022 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9023 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9025 He&nbsp;llo [[Foo|He&nbsp;llo]]
9027 He&nbsp;llo He&nbsp;llo
9029 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9030 </p><p>He&nbsp;llo He&nbsp;llo
9034 # html2wt will fail because of title normalization without data-parsoid
9036 Parsoid: handle constructor well
9038 parsoid=wt2html,wt2wt
9044 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9045 </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>
9048 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9050 <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>
9059 # Note that `ko` isn't a known interlanguage prefix
9061 Parsoid: recognize interlanguage links without a target page
9071 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9073 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9076 # Note that `ko` isn't a known interwiki prefix
9078 Parsoid: recognize interwiki links without a target page
9080 parsoid=wt2html,wt2wt,html2html
9086 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9087 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9090 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9091 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9095 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9099 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9102 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9106 Interlanguage link with preceding local interwiki link (T70085)
9108 parsoid=wt2html,wt2wt,html2html
9111 [[local:es:Spanish]]
9114 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9118 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9122 Looks like an interlanguage link, but is actually a local interwiki
9124 parsoid=wt2html,wt2wt,html2html
9130 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9134 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9138 ### Redirects, Parsoid-only
9142 1. Simple redirect to page
9144 #REDIRECT [[Main Page]]
9146 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9150 2. Other redirect variants
9152 #REDIRECT [[Main_Page]]
9154 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9157 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9158 # This tests the Parsoid bail-out code.
9160 3. Other redirect variants
9164 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9166 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9170 4. Redirect to a templated destination
9172 #REDIRECT [[{{echo|Foo}}bar]]
9174 <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"}]]}'/>
9180 parsoid=wt2html,wt2wt
9185 <li>REDIRECT [[]]</li></ol>
9189 Optional colon in #REDIRECT
9191 # the colon is archaic syntax. we support it for wt2html, but we
9192 # don't care that it roundtrips back to the modern syntax.
9193 parsoid=wt2html,html2html
9195 #REDIRECT:[[Main Page]]
9197 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9201 Whitespace in #REDIRECT with optional colon
9203 # the colon and gratuitous whitespace is archaic syntax. we support
9204 # it for wt2html, but we don't care that it roundtrips back to the
9205 # modern syntax (without extra whitespace)
9206 parsoid=wt2html,html2html
9213 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9217 Piped link in #REDIRECT
9219 # content after piped link is ignored. we support this syntax,
9220 # but don't care that the piped link is lost when we roundtrip this.
9223 #REDIRECT [[Main Page|bar]]
9225 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9229 Redirect to category (T104502)
9231 parsoid=wt2html,wt2wt
9233 #REDIRECT [[Category:Foo]]
9235 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9239 Redirect to category with URL encoding (T104502)
9243 #REDIRECT [[Category%3AFoo]]
9245 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9249 Redirect to category page
9251 #REDIRECT [[:Category:Foo]]
9253 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9257 Redirect to image page (1)
9259 #REDIRECT [[File:Wiki.png]]
9261 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9265 Redirect to image page (2)
9267 #REDIRECT [[Image:Wiki.png]]
9269 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9272 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9273 # Next test confirms this.
9275 Redirect to language (1) (T104918)
9277 parsoid=wt2html,wt2wt,html2html
9279 #REDIRECT [[en:File:Wiki.png]]
9281 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9285 Redirect to language (2) (T104918)
9287 #REDIRECT [[:en:File:Wiki.png]]
9289 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9293 Redirect to interwiki (T104918)
9295 #REDIRECT [[meatball:File:Wiki.png]]
9297 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9301 Non-English #REDIRECT
9305 #TILVÍSUN [[Main Page]]
9307 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9311 Redirect syntax under text isn't considered a redirect
9315 #redirect [[Main Page]]
9318 <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>
9326 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9333 Redirect followed by block on the same line
9337 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9339 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9343 Redirect followed by a newline
9345 #REDIRECT [[Main Page]]
9348 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9353 Redirect followed by multiple newlines
9355 #REDIRECT [[Main Page]]
9360 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9367 Drop duplicate redirects
9371 <link rel="mw:PageProp/redirect" href="./Foo"/>
9372 <link rel="mw:PageProp/redirect" href="./Bar"/>
9373 <link rel="mw:PageProp/redirect" href="./Baz"/>
9392 Broken br tag sanitization
9400 # TODO: Fix html2html mode (T53055)!
9402 Parsoid: Broken br tag recognition
9416 Incorrecly removing closing slashes from correctly formed XHTML
9418 <br style="clear:both;" />
9420 <p><br style="clear:both;" />
9425 Failing to transform badly formed HTML into correct XHTML
9427 <br style="clear: left;">
9428 <br style="clear: right;">
9429 <br style="clear: both;">
9431 <p><br style="clear: left;" />
9432 <br style="clear: right;" />
9433 <br style="clear: both;" />
9437 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9438 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9440 Handling html with a div self-closing tag
9449 <p><div title />
9453 <p><div title=bar />
9454 <div title=bar/>
9456 <div title="bar/"></div>
9460 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9461 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9462 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9463 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9464 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9465 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9469 Handling html with a br self-closing tag
9496 Horizontal ruler (should it add that extra space?)
9505 foo </p><hr /><p> bar
9510 Horizontal ruler -- 4+ dashes render hr
9519 Horizontal ruler -- eats additional dashes on the same line
9528 Horizontal ruler -- does not collapse dashes on consecutive lines
9539 Horizontal ruler -- <4 dashes render as plain text
9548 Horizontal ruler -- Supports content following dashes on same line
9560 ### Block-level elements
9569 <ul><li>Common list</li>
9571 <li>item 3</li></ul>
9582 <ol><li>Numbered list</li>
9584 <li>item 3</li></ol>
9588 # the switch from level 3 to ordered should not introduce a newline between
9599 ***#Number on level 4
9601 **#Number on level 3
9602 **#Number on level 3
9606 #**Level 3, but ordered
9609 <ol><li>with numbers</li></ol>
9610 <ul><li>and bullets</li></ul>
9611 <ol><li>and numbers</li></ol></li>
9613 <ul><li>bullet level 2
9614 <ul><li>bullet level 3
9615 <ol><li>Number on level 4</li></ol></li></ul></li>
9617 <ol><li>Number on level 3</li>
9618 <li>Number on level 3</li></ol></li></ul>
9619 <ol><li>number level 2</li></ol></li>
9621 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9622 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9627 1. Nested mixed wikitext and html list
9630 *<ul><li>ho</li></ul>
9635 <li><ul><li>ho</li></ul></li>
9637 <ul><li>ho</li></ul></li></ul>
9641 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9643 <ul><li>ho</li></ul></li></ul>
9647 2. Nested mixed wikitext and html list (incompatible)
9650 :{{echo|<li>ho</li>}}
9653 <dd><li>ho</li></dd></dl>
9657 <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>
9667 <ul><li>bar</li></ul></li></ul>
9677 <ul><li><ul><li>foo</li></ul></li>
9683 Nested lists 3 (first element empty)
9689 <ul><li>bar</li></ul></li></ul>
9694 Nested lists 4 (first element empty)
9699 <ul><li><ul><li></li></ul></li>
9705 Nested lists 5 (both elements empty)
9710 <ul><li><ul><li></li></ul></li>
9716 Nested lists 6 (both elements empty)
9722 <ul><li></li></ul></li></ul>
9727 Nested lists 7 (skip initial nesting levels)
9731 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9736 Nested lists 8 (multiple nesting transitions)
9744 <ul><li><ul><li>bar</li></ul></li>
9745 <li>baz</li></ul></li>
9751 Nested lists 9 (extension interaction)
9757 <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>
9761 1. Lists with start-of-line-transparent tokens before bullets: Comments
9774 2. Lists with start-of-line-transparent tokens before bullets: Template close
9779 <ul><li>foo bar</li>
9785 List items are not parsed correctly following a <pre> block (T2785)
9791 <ul><li><pre>foo</pre></li>
9792 <li><pre>bar</pre></li>
9796 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9797 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9801 # FIXME: Might benefit from a html/parsoid since this has a template
9803 List items from template
9814 *notSOL{{inner list}}
9818 <li>item 2</li></ul>
9821 <li>item 2</li></ul>
9825 <li>item 2</li></ul>
9830 List interrupted by empty line or heading
9838 <ul><li>foo</li></ul>
9839 <ul><li><ul><li>bar</li></ul></li></ul>
9840 <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>
9841 <ul><li>Another list item</li></ul>
9846 Multiple list tags generated by templates
9864 <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
9865 </li><li about="#mwt1">b
9866 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9870 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9873 <!--This line will NOT split the list-->
9875 <!--This line will NOT split the list either-->
9877 <!--foo--> <!----> <!--This line NOT split the list either-->
9888 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9891 <!--This line will NOT split the list-->
9893 <!--This line will NOT split the list either-->
9895 <!--foo--> <!----> <!--This line NOT split the list
9906 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9907 # That pass could possibly be removed.
9909 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9911 parsoid=wt2html,wt2wt
9915 *{{echo|<li>templated li-hack}}
9916 *<!--foo--><li> unsupported li-hack with preceding comments
9919 <li><li>not a li-hack
9924 <li class="mw-empty-elt"></li><li>li-hack</li>
9925 <li class="mw-empty-elt"></li><li>templated li-hack</li>
9926 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
9928 <li class="mw-empty-elt"></li><li>not a li-hack
9933 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
9934 <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>
9935 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
9937 <ul data-parsoid='{"stx":"html"}'>
9938 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9945 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9974 Parsoid: Test of whitespace serialization with Templated bullets
9981 <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>
9985 # ------------------------------------------------------------------------
9986 # The next set of tests are about Parsoid's ability to handle badly nested
9987 # tags (parse, minimize scope of fixup, and roundtrip back)
9988 # ------------------------------------------------------------------------
9990 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
9991 # Parsoid's list handling is more aware of block structure.
9993 Unbalanced closing block tags break a list
10000 <ul><li>a</li></ul></div><div>
10012 Unbalanced closing non-block tags don't break a list
10020 <ul><li>a<span></span></li>
10025 <li>a<span></span></li>
10031 # Parsoid does some post-dom-building cleanup
10032 # which is why its output differs from Remex.
10034 Unclosed formatting tags that straddle lists are closed and reopened
10036 parsoid=wt2html,wt2wt,html2html
10041 <ol><li><s> a</s></li><s>
10042 </s><li><s>b </s></li></ol>
10044 <ol><li><s> a</s></li>
10045 <li><s>b </s></li></ol>
10048 # Output is ugly because of all the misnested tag fixups.
10049 # Remex is wrapping p-tags around empty elements.
10050 # Parsoid has special-case handling of this pattern of
10051 # wrapping lists in formatting tags.
10052 # FIXME: Should we remove this code from Parsoid? Or add
10053 # special support in Remex? If the latter, maybe just wait
10054 # for Parsoid to become the default parser.
10057 1. List embedded in a formatting tag
10064 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10074 # Output is ugly because of all the misnested tag fixups
10075 # Remex is wrapping p-tags around empty elements.
10076 # Parsoid has code that strips useless p-tags.
10078 2. List embedded in a formatting tag in a misnested way
10085 </small></p><small></small><ul><small><li>a</li>
10086 </small><li><small>b</small></li></ul>
10092 <li><small>b</small></li>
10097 Table with missing opening <tr> tag
10099 parsoid=wt2html,wt2wt
10107 <tbody><tr><td>foo</td>
10116 # Note that the current date is hard-coded as
10117 # 1970-01-01T00:02:03Z (a Thursday)
10118 # when running parser tests. The timezone is also fixed to GMT, so
10119 # local date will be identical to current date.
10122 Magic Word: {{CURRENTDAY}}
10131 Magic Word: {{CURRENTDAY2}}
10140 Magic Word: {{CURRENTDAYNAME}}
10149 Magic Word: {{CURRENTDOW}}
10158 Magic Word: {{CURRENTMONTH}}
10167 Magic Word: {{CURRENTMONTH1}}
10176 Magic Word: {{CURRENTMONTHABBREV}}
10178 {{CURRENTMONTHABBREV}}
10185 Magic Word: {{CURRENTMONTHNAME}}
10187 {{CURRENTMONTHNAME}}
10194 Magic Word: {{CURRENTMONTHNAMEGEN}}
10196 {{CURRENTMONTHNAMEGEN}}
10203 Magic Word: {{CURRENTTIME}}
10212 Magic Word: {{CURRENTHOUR}}
10221 Magic Word: {{CURRENTWEEK}} (T6594)
10230 Magic Word: {{CURRENTYEAR}}
10239 Magic Word: {{CURRENTTIMESTAMP}}
10241 {{CURRENTTIMESTAMP}}
10248 Magic Words LOCAL (UTC)
10252 *{{LOCALMONTHNAME}}
10253 *{{LOCALMONTHNAMEGEN}}
10254 *{{LOCALMONTHABBREV}}
10263 *{{LOCALTIMESTAMP}}
10278 <li>19700101000203</li></ul>
10283 Magic Word: {{FULLPAGENAME}}
10285 title=[[User:Ævar Arnfjörð Bjarmason]]
10286 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10290 <p>User:Ævar Arnfjörð Bjarmason
10295 Magic Word: {{FULLPAGENAMEE}}
10297 title=[[User:Ævar Arnfjörð Bjarmason]]
10298 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10302 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10307 Magic Word: {{TALKSPACE}}
10309 title=[[User:Ævar Arnfjörð Bjarmason]]
10310 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10319 Magic Word: {{TALKSPACE}}, same namespace
10321 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10322 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10331 Magic Word: {{TALKSPACE}}, main namespace
10333 title=[[Parser Test]]
10334 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10343 Magic Word: {{TALKSPACEE}}
10345 title=[[User:Ævar Arnfjörð Bjarmason]]
10346 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10355 Magic Word: {{SUBJECTSPACE}}
10357 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10358 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10367 Magic Word: {{SUBJECTSPACE}}, same namespace
10369 title=[[User:Ævar Arnfjörð Bjarmason]]
10370 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10379 Magic Word: {{SUBJECTSPACE}}, main namespace
10381 title=[[Parser Test]]
10382 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10390 Magic Word: {{SUBJECTSPACEE}}
10392 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10393 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10402 Magic Word: {{NAMESPACE}}
10404 title=[[User:Ævar Arnfjörð Bjarmason]]
10405 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10414 Magic Word: {{NAMESPACEE}}
10416 title=[[User:Ævar Arnfjörð Bjarmason]]
10417 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10426 Magic Word: {{NAMESPACENUMBER}}
10428 title=[[User:Ævar Arnfjörð Bjarmason]]
10429 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10431 {{NAMESPACENUMBER}}
10438 Magic Word: {{SUBPAGENAME}}
10440 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10441 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10450 Magic Word: {{SUBPAGENAMEE}}
10452 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10453 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10462 Magic Word: {{ROOTPAGENAME}}
10464 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10465 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10469 <p>Ævar Arnfjörð Bjarmason
10474 Magic Word: {{ROOTPAGENAMEE}}
10476 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10477 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10481 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10486 Magic Word: {{BASEPAGENAME}}
10488 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10489 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10493 <p>Ævar Arnfjörð Bjarmason
10498 Magic Word: {{BASEPAGENAMEE}}
10500 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10501 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10505 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10510 Magic Word: {{TALKPAGENAME}}
10512 title=[[User:Ævar Arnfjörð Bjarmason]]
10513 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10517 <p>User talk:Ævar Arnfjörð Bjarmason
10522 Magic Word: {{TALKPAGENAMEE}}
10524 title=[[User:Ævar Arnfjörð Bjarmason]]
10525 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10529 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10534 Magic Word: {{SUBJECTPAGENAME}}
10536 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10537 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10539 {{SUBJECTPAGENAME}}
10541 <p>User:Ævar Arnfjörð Bjarmason
10546 Magic Word: {{SUBJECTPAGENAMEE}}
10548 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10549 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10551 {{SUBJECTPAGENAMEE}}
10553 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10558 Magic Word: {{NUMBEROFFILES}}
10560 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10569 Magic Word: {{PAGENAME}}
10571 title=[[User:Ævar Arnfjörð Bjarmason]]
10572 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10576 <p>Ævar Arnfjörð Bjarmason
10581 Magic Word: {{PAGENAME}} with metacharacters
10583 title=[['foo & bar = baz']]
10584 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10588 <p><i>'foo & bar = baz'</i>
10593 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10595 title=[[*RFC 1234 http://example.com/]]
10596 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10600 <p>*RFC 1234 http://example.com/
10605 Magic Word: {{PAGENAMEE}}
10607 title=[[User:Ævar Arnfjörð Bjarmason]]
10608 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10612 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10617 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10619 title=[[*RFC 1234 http://example.com/]]
10620 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10624 <p>*RFC_1234_http://example.com/
10629 Magic Word: {{REVISIONID}}
10631 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10638 flags=vary-revision-id
10642 Magic Word: {{SCRIPTPATH}}
10644 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10652 Magic Word: {{STYLEPATH}}
10654 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10663 Magic Word: {{SERVER}}
10665 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10669 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10674 Magic Word: {{SERVERNAME}}
10676 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10685 Magic Word: {{SITENAME}}
10687 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10696 Magic Word: {{PAGELANGUAGE}}
10699 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10708 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10710 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10719 Case-sensitive magic words, when cased differently, should just be template transclusions
10726 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10727 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10728 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10729 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10734 Case-insensitive magic words should still work with weird casing.
10744 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10748 # From plwiki:PLOS_ONE
10750 Parsoid: Page property magic word with magic word contents
10752 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10754 <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>"}]]}'/>
10757 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10758 # But, this is a limitation of our representation and is documented in
10759 # TemplateHandler.js in processSpecialMagicWord
10761 Parsoid: Template-generated DISPLAYTITLE
10763 {{{{echo|DISPLAYTITLE}}:Foo}}
10767 wgAllowDisplayTitle=true
10768 wgRestrictDisplayTitle=false
10773 <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"}]]}'/>
10777 Namespace 1 {{ns:1}}
10786 Namespace 1 {{ns:01}}
10795 Namespace 0 {{ns:0}} (T6783)
10803 Namespace 0 {{ns:00}} (T6783)
10811 Namespace -1 {{ns:-1}}
10820 Namespace User {{ns:User}}
10829 Namespace User talk {{ns:User_talk}}
10838 Namespace User talk {{ns:uSeR tAlK}}
10847 Namespace File {{ns:File}}
10856 Namespace File {{ns:Image}}
10865 Namespace (lang=de) Benutzer {{ns:User}}
10876 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10882 <p>Benutzer Diskussion
10889 {{urlencode:hi world?!}}
10890 {{urlencode:hi world?!|WIKI}}
10891 {{urlencode:hi world?!|PATH}}
10892 {{urlencode:hi world?!|QUERY}}
10902 Magic Word: prioritize type info over data-parsoid
10906 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10912 Magic Word: serialize on separate line (parsoid)
10914 parsoid=wt2wt,html2wt
10920 foo<meta property="mw:PageProp/notoc"/>bar
10924 Magic Word: rt non-english wikis
10931 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10935 __proto__ is treated as normal wikitext (T105997)
10947 Magic links: internal link to RFC (T2479)
10951 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10954 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10958 Magic links: RFC (T2479)
10962 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10965 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a></p>
10969 Magic links: RFC (T67278)
10971 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10973 <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.
10976 <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>
10980 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10982 RFC      822
10986 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10991 <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>
10997 Magic links: ISBN (T3937)
11001 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11004 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11008 Magic links: ISBN (T67278)
11010 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11012 <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.
11015 <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>
11019 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11021 ISBN      978 0 316 09811 3
11027 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11034 <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>
11042 Magic links: PMID incorrectly converts space to underscore
11046 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11049 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></p>
11053 Magic links: PMID (T67278)
11055 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11057 <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.
11060 <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>
11064 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11066 PMID      1234
11070 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11075 <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>
11080 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11081 # since these are ExtLinkText, not MagicLinkText
11083 Magic links: use appropriate serialization for "almost" magic links.
11085 X[[Special:BookSources/0978739256|foo]]
11087 X[https://tools.ietf.org/html/rfc1234 foo]
11089 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11090 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11093 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11094 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11098 Magic links: All disabled (T47942)
11100 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11106 <p>ISBN 0-306-40615-2
11117 Nonexistent template
11119 {{thistemplatedoesnotexist}}
11121 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11126 Template with invalid target containing tags
11128 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11130 <p>{{a<b>b</b>|foo|a=b|a = b}}
11135 Template with invalid target containing unclosed tag
11137 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11139 <p>{{a<b>|foo|a=b|a = b}}</b>
11144 Template with invalid target containing wikilink
11148 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11151 <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>
11155 Template with just whitespace in it, T70421
11159 <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>
11165 This is a test template
11173 <p>This is a test template
11178 Template with explicit namespace
11182 <p>This is a test template
11190 This is a test template with parameter {{{param}}}
11196 {{paramtest|param=foo}}
11198 <p>This is a test template with parameter foo
11203 Template:paramtestnum
11205 [[{{{1}}}|{{{2}}}]]
11209 Template unnamed parameter
11211 {{paramtestnum|Main Page|the main page}}
11213 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11218 Template:templatesimple
11224 Template:templateredirect
11226 #redirect [[Template:templatesimple]]
11230 Template:templateasargtestnum
11236 Template:templateasargtest
11238 {{template{{{templ}}}}}
11242 Template:templateasargtest2
11248 Template with template name as unnamed argument
11250 {{templateasargtestnum|templatesimple}}
11257 Template with template name as argument
11259 {{templateasargtest|templ=simple}}
11266 Template with template name as argument (2)
11268 {{templateasargtest2|templ=templatesimple}}
11275 Template:templateasargtestdefault
11277 {{{{{templ|templatesimple}}}}}
11287 Template with default value
11289 {{templateasargtestdefault}}
11296 Template with default value (value set)
11298 {{templateasargtestdefault|templ=templa}}
11307 {{templateredirect}}
11312 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11316 Template with argument in separate line
11318 {{ templateasargtest |
11326 Template with complex template as argument
11329 param ={{ templateasargtest |
11330 templ = simple }}}}
11332 <p>This is a test template with parameter (test)
11337 Templates with templated name
11339 {{{{echo|echo}}|foo}}
11340 {{{{echo|inner list}} }}
11344 <ul><li>item 1</li></ul>
11347 <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>
11348 <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>
11351 ## Regression test; the output here isn't really that interesting.
11353 Templates with templated name and top level template args
11355 {{1{{2{{{3}}}|4=5}}}}
11357 <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>
11360 # Parsoid markup is deliberate "broken". This is an edge case.
11361 # See long comment in TemplateHandler.js:convertAttribsToString.
11363 Templates with invalid templated targets
11374 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11379 Template with thumb image (with link in description)
11381 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11383 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>
11386 <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>
11388 <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>
11392 Template:complextemplate
11394 {{{1}}} {{paramtest|
11395 param ={{{param}}}}}
11399 Template with complex arguments
11402 param ={{ templateasargtest |
11403 templ = simple }}|[[Template:complextemplate|link]]}}
11405 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11410 T2553: link with two variables in a piped link
11413 |[[{{{1}}}|{{{2}}}]]
11418 <td>[[{{{1}}}|{{{2}}}]]
11423 <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>
11429 Abort table cell attribute parsing on wikilink
11432 |testing [[one|two]] |three||four
11433 |testing one two |three||four
11434 |testing="[[one|two]]" |three||four
11439 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11445 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11451 <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>
11452 <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>
11453 <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>
11458 Don't abort table cell attribute parsing if wikilink is found in template arg
11461 |Test {{#tag:ref|One two "[[three]]" four}}
11465 <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>
11470 Magic variable as template parameter
11472 {{paramtest|param={{SITENAME}}}}
11474 <p>This is a test template with parameter MediaWiki
11481 [[{{{param}}}|link]]
11485 Template parameter as link source
11487 {{linktest|param=Main Page}}
11489 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11494 Template:paramtest2
11496 including another template, {{paramtest|param={{{arg}}}}}
11500 Template passing argument to another template
11502 {{paramtest2|arg='hmm'}}
11504 <p>including another template, This is a test template with parameter 'hmm'
11515 Template as link source
11519 [[{{linktest2}}|Main Page]]
11521 [[{{linktest2}}]]Page
11523 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11524 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11525 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11543 Template infinite loop
11547 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11552 Template from main namespace
11561 Template from non-includable namespace
11563 wgNonincludableNamespaces=10
11567 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11582 T2529: Template with table, not included at beginning of line
11601 T2523: Template shouldn't eat newline (or add an extra one before table)
11621 T2041: Template parameters shown as broken links
11630 Template with targets containing wikilinks
11636 {{[[{{echo|foo}}]]}}
11638 {{{{echo|[[foo}}]]}}
11640 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11641 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11645 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11646 <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>
11647 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11657 Templates: Double quotes as template target
11664 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11668 ## This test is about making sure Parsoid's data-mw is well formed in the
11669 ## face of multiple templates with intersecting and overlapping ranges. The
11670 ## wikitext itself is wretched.
11672 Templates with intersecting and overlapping ranges
11683 </table><p>ho</p><table>
11687 </td></tr></tbody></table>
11689 <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":""}]]}'>
11691 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11693 <tbody><tr><td>hi</td></tr>
11698 Template:MSGNW test
11700 ''None'' of '''this''' should be
11702 but rather passed unmodified
11710 # hmm, fix this or just deprecate msgnw and document its behavior?
11714 {{msgnw:MSGNW test}}
11716 <p>''None'' of '''this''' should be
11718  but rather passed unmodified
11719 {{test}}
11723 <!-- comment -->
11730 {{int:youhavenewmessages|lots of money|not!}}
11732 <p>You have lots of money (not!).
11737 int keyword - non-existing message
11748 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11752 <includeonly> and <noinclude> being included
11763 <onlyinclude>Foo</onlyinclude>bar
11767 <onlyinclude> being included
11779 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11783 <onlyinclude> and <includeonly> being included
11792 <includeonly> and <noinclude> on a page
11794 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11801 Un-closed <noinclude>
11808 <onlyinclude> on a page
11810 <onlyinclude>Foo</onlyinclude>bar
11817 Un-closed <onlyinclude>
11824 Self-closed noinclude, includeonly, onlyinclude tags
11835 Unbalanced includeonly and noinclude tags
11839 |b</noinclude></noinclude>
11840 |c</noinclude></includeonly>
11841 |d</includeonly></includeonly>
11850 <td>c</includeonly>
11852 <td>d</includeonly></includeonly>
11858 Template:Includeonly section
11861 ==Includeonly section==
11867 T8563: Edit link generation for section shown by <includeonly>
11869 {{includeonly section}}
11871 <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>
11872 <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>
11876 # Uses same input as the contents of [[Template:Includeonly section]]
11878 T8563: Section extraction for section shown by <includeonly>
11883 ==Includeonly section==
11891 T8563: Edit link generation for section suppressed by <includeonly>
11894 ==Includeonly section==
11898 <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>
11903 T8563: Section extraction for section suppressed by <includeonly>
11908 ==Includeonly section==
11916 Un-closed <includeonly>
11921 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11924 ## We used to, but no longer wt2wt this test since the default serializer
11925 ## will normalize the include directives to serialize on their own line.
11926 ## Selser will take care of preserving formatting in scenarios where they
11927 ## intermingled with other wikitext.
11929 Includes and comments at SOL
11931 parsoid=wt2html,html2html
11933 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
11940 <includeonly>can have stuff</includeonly>===here===
11943 <h2><span class="mw-headline" id="hu">hu</span></h2>
11948 <h3><span class="mw-headline" id="here">here</span></h3>
11951 <!-- 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>
11953 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11955 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
11958 <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>
11962 # TODO: test with DOM fragment reuse!
11964 Parsoid: DOM fragment reuse
11966 parsoid=wt2wt,wt2html
11968 a{{echo|b<table></table>c}}d
11980 <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>
11982 <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">
11983 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11984 </span><p about="#mwt2">cd</p>
11986 <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">
11988 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11990 </span><p about="#mwt3">b</p>
11994 Parsoid: Merge double tds (T52603)
11999 |{{echo|{{!}} foo}}
12003 <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>
12008 Parsoid: Merge double tds in nested transclusion content (T52603)
12014 |{{echo|{{!}} foo}}
12018 <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}}]}'>
12020 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12026 ### <includeonly> and <noinclude> in attributes
12029 0. includeonly around the entire attribute
12031 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12033 <p><span id="v2">bar</span>
12038 1. includeonly in html attr key
12040 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12042 <p><span id="foo">bar</span>
12047 2. includeonly in html attr value
12049 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12050 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12052 <p><span id="v1">bar</span>
12053 <span id="v1">bar</span>
12058 3. includeonly in part of an attr value
12060 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12062 <p><span style="color:red;">bar</span>
12067 4. includeonly in table attributes
12091 ### Preprocessor precedence tests
12092 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12094 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12096 Preprocessor precedence 1: link is rightmost opening
12102 But close-brace is not a valid character in a link title:
12105 However, we can still tell this was handled as a link in the preprocessor:
12106 {{echo|[[Foo}}|bar]]|bat}}
12108 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12109 </p><p>But close-brace is not a valid character in a link title:
12111 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12115 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12116 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12117 <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>
12121 Preprocessor precedence 2: template is rightmost opening
12130 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12134 Preprocessor precedence 3: language converter is rightmost opening
12150 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12151 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12152 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12156 Preprocessor precedence 4: left-most angle bracket
12167 Template:Precedence5
12173 Preprocessor precedence 5: tplarg takes precedence over template
12175 {{Precedence5|Bullet}}
12177 <ul><li>Bar</li></ul>
12180 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12184 Preprocessor precedence 6: broken link is rightmost opening
12190 {{echo|[[Foo|bar|bat=baz}}
12193 </p><p>{{echo|[[Foo|bar|bat=baz}}
12196 <p>{{echo|[[Foo}}</p>
12197 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12200 # This next test exposes a difference between PHP and Parsoid:
12201 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12202 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12203 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12204 # outer `[[Foo` extends until the `y]]`
12205 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12206 # intermediate result (after template expansion), and link processing
12207 # happens on this intermediate result, which moves the wikilink
12208 # boundary leftward to `[[Foo|Bar]]`
12209 # 2b) Parsoid works in a single step, so it's going to keep the
12210 # wikilink as extending to the `y]]`
12211 # 3a) Then PHP does linktrail processing which slurps up the trailing
12212 # `xy` inside the link.
12213 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12214 # `z` inside the link.
12215 # This is "correct" behavior. Parsoid's basic worldview is that the
12216 # `]]` inside the template shouldn't be allowed to leak out to affect
12217 # the surrounding wikilink. PHP may match Parsoid (in the future)
12218 # if you use {{#balance}} (T114445).
12221 Preprocessor precedence 7: broken template is rightmost opening
12227 [[Foo|{{echo|Bar]]-x}}-y]]-z
12229 Careful: linktrails can move the end of the wikilink:
12230 [[Foo|{{echo|y']]a}}l]]l
12232 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12233 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12234 </p><p>Careful: linktrails can move the end of the wikilink:
12235 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12238 <p>[[Foo|{{echo|Bar]]</p>
12239 <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>
12240 <p>Careful: linktrails can move the end of the wikilink:
12241 <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>
12245 Preprocessor precedence 8: broken language converter is rightmost opening
12256 Template:Preprocessor_precedence_9
12261 ;7: {{{{{{{4}}}}}}}
12265 Preprocessor precedence 9: groups of braces
12267 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12273 <ul><li>Bar</li></ul>
12277 <dd>{Bullet}</dd></dl>
12280 <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}}]}'>
12285 </dl><ul about="#mwt1">
12287 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12296 Template:Preprocessor_precedence_10
12303 ;6: -{{{{{{4}}}}}}-
12304 ;7: -{{{{{{{5}}}}}}}-
12308 Preprocessor precedence 10: groups of braces with leading dash
12312 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12318 <ul><li>Bar-</li></ul>
12325 <ul><li>Bar-</li></ul>
12332 <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}}]}'>
12334 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12337 </dl><ul about="#mwt1">
12339 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12343 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12346 </dl><ul about="#mwt1">
12348 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12352 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12357 Preprocessor precedence 11: found during visual diff testing
12359 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12361 {{echo|-{{echo|-{{echo|x}}}}}}
12363 {{echo|-{{echo|x}}}}
12365 <p><span>-<span>-x</span></span>
12370 <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>
12372 <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>
12374 <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>
12378 Preprocessor precedence 12: broken language converter closed by brace.
12382 This form breaks the template, which is unfortunate:
12383 *{{echo|foo-{bar}bat}}
12385 But if the broken language converter markup is inside an extension
12386 tag, nothing bad happens:
12387 *<nowiki>foo-{bar}bat</nowiki>
12388 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12389 *<pre>foo-{bar}bat</pre>
12390 *{{echo|<pre>foo-{bar}bat</pre>}}
12392 <tag>foo-{bar}bat</tag>
12393 {{echo|<tag>foo-{bar}bat</tag>}}
12396 <p>This form breaks the template, which is unfortunate:
12398 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12399 <p>But if the broken language converter markup is inside an extension
12400 tag, nothing bad happens:
12402 <ul><li>foo-{bar}bat</li>
12403 <li>foo-{bar}bat</li>
12404 <li><pre>foo-{bar}bat</pre></li>
12405 <li><pre>foo-{bar}bat</pre></li></ul>
12406 <pre>'foo-{bar}bat'
12410 <pre>'foo-{bar}bat'
12415 <p>This form breaks the template, which is unfortunate:</p>
12417 <li>{{echo|foo-{bar}bat}}</li>
12419 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12421 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12422 <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>
12423 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12424 <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>
12426 <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>
12430 Preprocessor precedence 13: broken language converter in external link
12434 *[http://example.com/-{foo Example in URL]
12435 *[http://example.com Example in -{link} description]
12436 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12438 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12439 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12440 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12443 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12444 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12445 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12450 Preprocessor precedence 14: broken language converter in comment
12452 *<!--{{foo}}-->...should be ok
12453 *<!---{{foo}}-->...extra dashes
12454 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12456 <ul><li>...should be ok</li>
12457 <li>...extra dashes</li>
12458 <li>foobat...should be ok</li></ul>
12461 <li><!--{{foo}}-->...should be ok</li>
12462 <li><!---{{foo}}-->...extra dashes</li>
12463 <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>
12468 Preprocessor precedence 15: broken brace markup in headings
12470 wgFragmentMode=[ 'html5', 'legacy' ]
12474 __NOTOC__ __NOEDITSECTION__
12483 ===5 foo{{{bar 5===
12488 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12491 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12494 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12497 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12500 <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>
12503 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12507 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12508 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12510 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12512 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12514 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12516 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12518 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12523 Preprocessor precedence 16: matching closing braces to opening braces
12528 -{{{echo|foo}}bar}-
12533 <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>
12537 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12546 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12550 Preprocessor precedence 18: another rightmost wins scenario
12554 {{ -{{{{1|tplarg}}} }} }-
12556 <p>{{ -{tplarg }} }-
12559 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12563 Preprocessor precedence 19: break syntax
12576 ### Token Stream Patcher tests
12578 ### These tests won't always pass wt2wt and other modes because
12579 ### on serialization, the table will be output on a new line.
12580 ### For now, we are blacklisting them, and using this to test selser.
12584 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12586 parsoid=wt2html,wt2wt
12588 {{echo|}}{| width = '100%'
12592 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12593 <tbody><tr><td>foo</td></tr>
12597 ## We used to, but no longer wt2wt this test since the default serializer
12598 ## will normalize the include directives to serialize on their own line.
12599 ## Selser will take care of preserving formatting in scenarios where they
12600 ## intermingled with other wikitext.
12602 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12606 <includeonly>a</includeonly>{| {{{b}}}
12610 <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":""}]]}'>
12611 <tbody><tr><td>c</td></tr>
12616 Table wikitext syntax outside wiki-tables
12620 ! not a table heading
12623 | class="foo bar" | baz
12631 ! not a table heading
12634 | class="foo bar" | baz
12643 ### Testing parsing of templates where a template arg
12644 ### has the same name as the template itself.
12650 {{{quote|{{{1}}}}}}
12654 Templates: Template Name/Arg clash: 1. Use of positional param
12663 Templates: Template Name/Arg clash: 2. Use of named param
12665 {{quote|quote=foo}}
12672 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12681 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12685 Templates: 1. Simple use
12694 Templates: 2. Inside a block tag
12696 <div>{{echo|Foo}}</div>
12697 <blockquote>{{echo|Foo}}</blockquote>
12700 <blockquote>Foo</blockquote>
12704 <blockquote><p>Foo</p></blockquote>
12708 Templates: P-wrapping: 1a. Templates on consecutive lines
12719 Templates: P-wrapping: 1b. Templates on consecutive lines
12733 Templates: P-wrapping: 1c. Templates on consecutive lines
12736 {{echo|bar}} <div>baz</div>
12745 bar </p><div>baz</div>
12749 Templates: P-wrapping: 1d. Template preceded by comment-only line
12758 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12762 Templates: Inline Text: 1. Multiple template uses
12764 {{echo|Foo}}bar{{echo|baz}}
12771 Templates: Inline Text: 2. Back-to-back template uses
12773 {{echo|Foo}}{{echo|bar}}
12780 Templates: Block Tags: 1. Multiple template uses
12782 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12784 <div>Foo</div><div>bar</div><div>baz</div>
12789 Templates: Block Tags: 2. Back-to-back template uses
12791 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12793 <div>Foo</div><div>bar</div>
12797 # This is an edge case relating to paragraph wrapping.
12799 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12804 <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
12809 Templates: Links: 1. Simple example
12811 {{echo|[[Foo|bar]]}}
12813 <p><a href="/wiki/Foo" title="Foo">bar</a>
12818 Templates: Links: 2. Generation of link href
12820 [[{{echo|Foo}}|bar]]
12822 <p><a href="/wiki/Foo" title="Foo">bar</a>
12827 Templates: Links: 3. Generation of part of a link href
12829 [[Fo{{echo|o}}|bar]]
12831 [[Foo{{echo|bar}}]]
12833 [[Foo{{echo|bar}}baz]]
12835 [[Foo{{echo|bar}}|bar]]
12837 [[:Foo{{echo|bar}}]]
12839 [[:Foo{{echo|bar}}|bar]]
12841 <p><a href="/wiki/Foo" title="Foo">bar</a>
12842 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12843 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12844 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12845 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12846 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12851 Templates: Links: 4. Multiple templates generating link href
12853 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12855 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12860 Templates: Links: 5. Generation of link text
12862 [[Foo|{{echo|bar}}]]
12864 <p><a href="/wiki/Foo" title="Foo">bar</a>
12869 Templates: Links: 5. Nested templates (only outermost template should be marked)
12871 {{echo|[[{{echo|Foo}}|bar]]}}
12873 <p><a href="/wiki/Foo" title="Foo">bar</a>
12878 Templates: HTML Tag: 1. Generation of HTML attr. key
12880 <div {{echo|style}}="color:red;">foo</div>
12882 <div style="color:red;">foo</div>
12887 Templates: HTML Tag: 2. Generation of HTML attr. value
12889 <div style={{echo|'color:red;'}}>foo</div>
12891 <div style="color:red;">foo</div>
12896 Templates: HTML Tag: 3. Generation of HTML attr key and value
12898 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12900 <div style="color:red;">foo</div>
12905 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12907 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12909 <div title="This is a long title with just one piece templated">foo</div>
12914 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12916 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12918 <div title="This is a long title with just one piece templated">foo</div>
12923 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12925 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12927 <div title="This is a long title with just one piece templated">foo</div>
12931 # SSS FIXME: While it is great we added support for all this,
12932 # do we want to make this part of the spec? Maybe we want to
12933 # deprecate this kind of usage in the future?
12935 Templates: HTML Tag: 7. Generation of partial attribute key string
12937 <div st{{echo|yle}}="color:red;">foo</div>
12939 <div style="color:red;">foo</div>
12944 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12946 <div {{echo|1=id="v1"}}>bar</div>
12948 <div id="v1">bar</div>
12953 Templates: HTML Tag: 9. Multiple template-generated attributes
12955 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12957 <div id="v1" title="foo">bar</div>
12962 Templates: Support for templates generating attributes and content
12964 {| {{mixed_attr_content_template}}
12969 <table style="color:red;" title="T48811">
12979 <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|}"]}'>
12988 1. Entities and nowikis inside templated attributes should be handled correctly
12990 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12992 <div style="background:#f9f9f9;">foo</div>
12995 <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>
12999 2. Entities and nowikis inside templated attributes should be handled correctly
13002 |{{table_attribs_3}}
13007 <td style="background:#f9f9f9;">Foo
13012 <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>
13017 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13020 |{{table_attribs_3}}
13025 <td style="background:#f9f9f9;">Foo
13029 <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}}]}'>
13030 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13036 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13039 |{{table_attribs_6}} hi
13044 <td style="background: red;">hi
13049 <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>
13054 Templates: HTML Tables: 1. Generating start of a HTML table
13056 {{echo|<table><tr><td>foo</td>}}</tr></table>
13058 <table><tr><td>foo</td></tr></table>
13063 Templates: HTML Tables: 2a. Generating middle of a HTML table
13065 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13067 <table><tr><td>foo</td></tr></table>
13072 Templates: HTML Tables: 2b. Generating middle of a HTML table
13074 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13076 <table><tr><td>foo</td></tr></table>
13081 Templates: HTML Tables: 3. Generating end of a HTML table
13083 <table><tr>{{echo|<td>foo</td></tr></table>}}
13085 <table><tr><td>foo</td></tr></table>
13090 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13092 {{echo|<table>}}<tr><td>foo</td></tr></table>
13094 <table><tr><td>foo</td></tr></table>
13099 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13101 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13103 <table><tr><td>foo</td></tr></table>
13108 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13110 <table><tr>{{echo|<td>}}foo</td></tr></table>
13112 <table><tr><td>foo</td></tr></table>
13117 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13119 <table><tr><td>foo{{echo|</td>}}</tr></table>
13121 <table><tr><td>foo</td></tr></table>
13126 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13128 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13130 <table><tr><td>foo</td></tr></table>
13135 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13137 <table><tr><td>foo</td></tr>{{echo|</table>}}
13139 <table><tr><td>foo</td></tr></table>
13144 Templates: HTML Tables: 5. Proper fostering of categories from inside
13146 parsoid=wt2html,wt2wt
13148 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13149 <!--Two categories (T52330)-->
13150 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13152 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13153 <!--Two categories (T52330)-->
13154 <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>
13158 Templates: Wiki Tables: 1a. Fostering of entire template content
13166 <tr><td></td></tr></table>
13171 <table><tbody><tr><td></td></tr></tbody></table>
13173 <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">
13179 Templates: Wiki Tables: 1b. Fostering of entire template content
13192 <tr><td></td></tr></table>
13200 <tbody><tr><td></td></tr></tbody></table>
13202 <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|}"]}'>
13204 </div><table about="#mwt3">
13210 Templates: Wiki Tables: 2. Fostering of partial template content
13220 <tr><td></td></tr></table>
13225 <div>b</div><table>
13226 <tbody><tr><td></td></tr></tbody></table>
13228 <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">
13235 Templates: Wiki Tables: 3. td-content via multiple templates
13238 {{echo|{{pipe}}a}}{{echo|b}}
13249 Templates: Wiki Tables: 4. Templated tags, no content
13255 <tr><td></td></tr></table>
13260 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13274 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13287 ## This test case is very specific to Parsoid's internals
13288 ## and is hence only tested for Parsoid's code. Parsoid uses
13289 ## a <meta> marker tag for <ref> tags and they are expanded
13290 ## much later. We are verifying that this <meta> tag usage
13291 ## doesn't prevent foster parenting.
13293 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13295 {{PartialTable}}<ref>foo</ref>
13300 <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">
13304 <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>
13308 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13318 <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{{!}}}"]}'>
13319 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13323 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13328 Templates: Lists: Multi-line list-items via templates
13330 *{{echo|a {{nonexistent|
13332 *{{echo|b {{nonexistent|
13335 <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>
13336 <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>
13341 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13343 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13345 <p><i>ab</i>c<i>d</i>e
13350 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13351 (PHP parser generates misnested html)
13353 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13355 <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>
13359 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13360 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13362 parsoid=wt2html,wt2wt
13364 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13366 <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>
13367 <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>
13368 <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>
13372 Templates: Ugly nesting: 4. Divs opened/closed across templates
13374 a<div>b{{echo|c</div>d}}e
13379 <p>a</p><div>bc</div><p>de
13384 Templates: Ugly templates: 3. newline-only template parameter
13393 # This looks like a bug: a single newline triggers p/br for some reason.
13395 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13404 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13405 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13407 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13413 <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
13414 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13418 # T66017 -- ugly wikitext with fostered content generates two template ranges
13419 # that are "identical" and generate nesting cycles in the algorithm
13421 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13423 {{echo|<table><tr><td><table>}}
13427 <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"}'>
13428 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13429 </table></td></tr></tbody></table>
13433 Templates: Parameters substituted at the top-level
13435 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13439 <p><i>who</i> me? <b>never!</b>
13443 <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>
13445 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13449 Templates: Param with empty arg in the final position
13453 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13457 Parser Functions: 1. Simple example
13466 Parser Functions: 2. Nested use (only outermost should be marked up)
13475 ### Pre-save transform tests
13478 pre-save transform: subst:
13484 This is a test template
13488 pre-save transform: normal template
13498 pre-save transform: nonexistent template
13502 {{thistemplatedoesnotexist}}
13504 {{thistemplatedoesnotexist}}
13508 pre-save transform: subst magic variables
13517 # This is T2089, which I fixed. -- wtm
13519 pre-save transform: subst: templates with parameters
13523 {{subst:paramtest|param="something else"}}
13525 This is a test template with parameter "something else"
13529 Template:nowikitest
13531 <nowiki>'''not wiki'''</nowiki>
13535 pre-save transform: nowiki in subst (T3188)
13539 {{subst:nowikitest}}
13541 <nowiki>'''not wiki'''</nowiki>
13545 Template:commenttest
13547 This template has <!-- a comment --> in it.
13551 pre-save transform: comment in subst (T3936)
13555 {{subst:commenttest}}
13557 This template has <!-- a comment --> in it.
13561 pre-save transform: unclosed tag
13565 <nowiki>'''not wiki'''
13567 <nowiki>'''not wiki'''
13571 pre-save transform: mixed tag case
13575 <NOwiki>'''not wiki'''</noWIKI>
13577 <NOwiki>'''not wiki'''</noWIKI>
13581 pre-save transform: unclosed comment in <nowiki>
13585 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13587 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13590 # Leading @ in this template definition works around a limitation
13591 # in parsoid's parserTests which otherwise strips the <span> from the
13592 # result (confusing it for a template wrapper)
13596 @<span onmouseover="alert('crap')">Oh no</span>
13600 (confirming safety of fix for subst T3936)
13602 {{Template:dangerous}}
13604 <p>@<span>Oh no</span>
13609 pre-save transform: comment containing gallery (T7024)
13613 <!-- <gallery>data</gallery> -->
13615 <!-- <gallery>data</gallery> -->
13619 pre-save transform: comment containing extension
13623 <!-- <tag>data</tag> -->
13625 <!-- <tag>data</tag> -->
13629 pre-save transform: comment containing nowiki
13633 <!-- <nowiki>data</nowiki> -->
13635 <!-- <nowiki>data</nowiki> -->
13639 pre-save transform: <noinclude> in subst (T5298)
13649 pre-save transform: <onlyinclude> in subst (T5298)
13653 {{subst:Includes2}}
13661 {{<includeonly>subst:</includeonly>Includes}}
13665 Template:SafeSubstTest
13667 {{<includeonly>safesubst:</includeonly>Includes}}
13671 T24297: safesubst: works during PST
13675 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13681 T24297: safesubst: works during normal parse
13690 subst: does not work during normal parse
13694 <p>{{subst:Includes}}
13699 pre-save transform: context links ("pipe trick")
13703 [[Article (context)|]]
13706 [[Bar:Article (context)|]]
13707 [[:Bar:Article (context)|]]
13709 [[|Article (context)]]
13713 [[Article (context)|Article]]
13714 [[Bar:Article|Article]]
13715 [[:Bar:Article|Article]]
13716 [[Bar:Article (context)|Article]]
13717 [[:Bar:Article (context)|Article]]
13719 [[Article (context)]]
13720 [[Bar:X (Y) Z|X (Y) Z]]
13721 [[:Bar:X (Y) Z|X (Y) Z]]
13725 pre-save transform: context links ("pipe trick") with interwiki prefix
13729 [[interwiki:Article|]]
13730 [[:interwiki:Article|]]
13731 [[interwiki:Bar:Article|]]
13732 [[:interwiki:Bar:Article|]]
13734 [[interwiki:Article|Article]]
13735 [[:interwiki:Article|Article]]
13736 [[interwiki:Bar:Article|Bar:Article]]
13737 [[:interwiki:Bar:Article|Bar:Article]]
13741 pre-save transform: context links ("pipe trick") with parens in title
13743 pst title=[[Somearticle (context)]]
13747 [[Article (context)|Article]]
13751 pre-save transform: context links ("pipe trick") with comma in title
13753 pst title=[[Someplace, Somewhere]]
13756 [[Otherplace, Elsewhere|]]
13757 [[Otherplace, Elsewhere, Anywhere|]]
13759 [[Otherplace, Somewhere|Otherplace]]
13760 [[Otherplace, Elsewhere|Otherplace]]
13761 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13765 pre-save transform: context links ("pipe trick") with parens and comma
13767 pst title=[[Someplace (IGNORED), Somewhere]]
13770 [[Otherplace (place), Elsewhere|]]
13772 [[Otherplace, Somewhere|Otherplace]]
13773 [[Otherplace (place), Elsewhere|Otherplace]]
13777 pre-save transform: context links ("pipe trick") with comma and parens
13779 pst title=[[Who, me? (context)]]
13782 [[Me, Myself, and I (1937 song)|]]
13784 [[Yes, you. (context)|Yes, you.]]
13785 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13789 pre-save transform: context links ("pipe trick") with namespace
13791 pst title=[[Ns:Somearticle]]
13795 [[Ns:Article|Article]]
13799 pre-save transform: context links ("pipe trick") with namespace and parens
13801 pst title=[[Ns:Somearticle (context)]]
13805 [[Ns:Article (context)|Article]]
13809 pre-save transform: context links ("pipe trick") with namespace and comma
13811 pst title=[[Ns:Somearticle, Context, Whatever]]
13815 [[Ns:Article, Context, Whatever|Article]]
13819 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13821 pst title=[[Ns:Somearticle, Context (context)]]
13825 [[Ns:Article (context)|Article]]
13829 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13831 pst title=[[Ns:Somearticle (IGNORED), Context]]
13835 [[Ns:Article, Context|Article]]
13839 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13843 [[Article(context)|]]
13844 [[Bar:Article(context)|]]
13845 [[:Bar:Article(context)|]]
13846 [[|Article(context)]]
13850 [[Article(context)|Article]]
13851 [[Bar:Article(context)|Article]]
13852 [[:Bar:Article(context)|Article]]
13853 [[Article(context)]]
13854 [[Bar:X(Y)Z|X(Y)Z]]
13855 [[:Bar:X(Y)Z|X(Y)Z]]
13859 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13863 [[Article (context)|]]
13864 [[Bar:Article (context)|]]
13865 [[:Bar:Article (context)|]]
13866 [[|Article (context)]]
13870 [[Article (context)|Article]]
13871 [[Bar:Article (context)|Article]]
13872 [[:Bar:Article (context)|Article]]
13873 [[Article (context)]]
13874 [[Bar:X (Y) Z|X (Y) Z]]
13875 [[:Bar:X (Y) Z|X (Y) Z]]
13879 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13883 [[Article(context)|]]
13884 [[Bar:Article(context)|]]
13885 [[:Bar:Article(context)|]]
13886 [[|Article(context)]]
13890 [[Article(context)|Article]]
13891 [[Bar:Article(context)|Article]]
13892 [[:Bar:Article(context)|Article]]
13893 [[Article(context)]]
13894 [[Bar:X(Y)Z|X(Y)Z]]
13895 [[:Bar:X(Y)Z|X(Y)Z]]
13899 pre-save transform: context links ("pipe trick") with commas (T23660)
13903 [[Article (context), context|]]
13904 [[Article (context),context|]]
13905 [[Bar:Article (context), context|]]
13906 [[Bar:Article (context),context|]]
13907 [[:Bar:Article (context), context|]]
13908 [[:Bar:Article (context),context|]]
13910 [[Article (context), context|Article]]
13911 [[Article (context),context|Article]]
13912 [[Bar:Article (context), context|Article]]
13913 [[Bar:Article (context),context|Article]]
13914 [[:Bar:Article (context), context|Article]]
13915 [[:Bar:Article (context),context|Article]]
13919 Parsoid: backwards pipe trick
13926 <p>[[|<b>bar</b>]]</p>
13930 pre-save transform: trim trailing empty lines
13934 Empty lines are trimmed
13940 Empty lines are trimmed
13944 pre-save transform: Signature expansion
13951 * <noinclude>~~~</noinclude>
13952 * <includeonly>~~~</includeonly>
13953 * <onlyinclude>~~~</onlyinclude>
13955 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13956 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13957 * 00:02, 1 January 1970 (UTC)
13958 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13959 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13960 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13965 ParserOutput flags from signature expansion (T84843)
13972 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13973 flags=user-signature
13978 pre-save transform: Signature expansion in nowiki tags (T2093)
13984 <nowiki>~~~~</nowiki>
13986 <includeonly><nowiki>~~~~</nowiki></includeonly>
13988 <noinclude><nowiki>~~~~</nowiki></noinclude>
13990 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13992 {{subst:Foo}} shall be converted to FOO
13994 As well as inside noinclude/onlyinclude
13995 <noinclude>{{subst:Foo}}</noinclude>
13996 <onlyinclude>{{subst:Foo}}</onlyinclude>
13998 But not inside includeonly
13999 <includeonly>{{subst:Foo}}</includeonly>
14003 <nowiki>~~~~</nowiki>
14005 <includeonly><nowiki>~~~~</nowiki></includeonly>
14007 <noinclude><nowiki>~~~~</nowiki></noinclude>
14009 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14011 FOO shall be converted to FOO
14013 As well as inside noinclude/onlyinclude
14014 <noinclude>FOO</noinclude>
14015 <onlyinclude>FOO</onlyinclude>
14017 But not inside includeonly
14018 <includeonly>{{subst:Foo}}</includeonly>
14022 Parsoid: Recognize nowiki with trailing space in tags
14026 <nowiki ><div>[[foo]]</nowiki >
14034 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14041 Parsoid: Recognize nowiki with odd capitalization
14045 <noWikI ><div>[[foo]]</Nowiki >
14047 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14052 Parsoid: Escape nowiki with trailing space in tags
14056 <p><nowiki > foo </nowiki ></p>
14057 <p>a<nowiki />b</p>
14058 <p>c<nowiki/ >d</p>
14060 <nowiki > foo </nowiki >
14068 Parsoid: Escape weird noWikI capitalizations
14072 <p><noWikI > foo </NoWikI ></p>
14074 <noWikI > foo </NoWikI >
14078 ### Message transform tests
14081 message transform: magic variables
14091 message transform: should not transform wiki markup
14101 message transform: <noinclude> in transcluded template (T6926)
14111 message transform: <onlyinclude> in transcluded template (T6926)
14121 {{#special:}} page name, known
14125 {{#special:Recentchanges}}
14127 Special:RecentChanges
14131 {{#special:}} page name with subpage, known
14135 {{#special:Recentchanges/param}}
14137 Special:RecentChanges/param
14141 {{#special:}} page name, unknown
14145 {{#special:foobar nonexistent}}
14147 Special:Foobar nonexistent
14151 {{#speciale:}} page name, known
14155 {{#speciale:Recentchanges}}
14157 Special:RecentChanges
14161 {{#speciale:}} page name with subpage, known
14165 {{#speciale:Recentchanges/param}}
14167 Special:RecentChanges/param
14171 {{#speciale:}} page name, unknown
14175 {{#speciale:foobar nonexistent}}
14177 Special:Foobar_nonexistent
14183 ### For Parsoid-specific tests, see
14184 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14189 parsoid=wt2html,wt2wt,html2html
14191 [[Image:foobar.jpg]]
14193 <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>
14196 <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>
14200 Serialize simple image with span wrapper
14204 <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>
14206 [[File:Foobar.jpg]]
14210 Simple image (using File: namespace, now canonical)
14212 [[File:Foobar.jpg]]
14214 <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>
14217 <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>
14221 Right-aligned image
14223 [[File:Foobar.jpg|right]]
14225 <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>
14228 <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>
14234 [[File:Foobar.jpg|right|Caption text]]
14236 <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>
14239 <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>
14243 Image with caption, T55312 #1
14245 [[File:Foobar.jpg|right|Caption page stuff]]
14247 <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>
14250 <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>
14254 Image with caption, T55312 #2
14256 [[File:Foobar.jpg|right|Caption page=]]
14258 <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>
14261 <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>
14265 Image with caption, T55312 #3
14267 [[File:Foobar.jpg|right|Caption page=stuff]]
14269 <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>
14272 <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>
14276 Image caption with pipe entity
14278 [[File:Foobar.jpg|thumb|one | two]]
14279 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14281 <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>
14282 <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>
14285 <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>
14286 <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>
14290 Allow empty links in image captions (T62753)
14294 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14299 <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>
14302 <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>
14304 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14305 </figcaption></figure>
14309 Titles in unlinked images (T23454)
14311 [[File:Foobar.jpg|link=|stuff]]
14313 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14316 <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>
14320 Link with empty target
14329 Image with link trail
14331 Linktrails should not work for images: [[File:Foobar.jpg]]s
14333 <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
14336 <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>
14340 Image with empty attribute
14342 parsoid=wt2html,wt2wt,html2html
14344 [[File:Foobar.jpg|right||Caption text]]
14346 <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>
14349 <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>
14353 1. Block image with individual attributes from templates
14355 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14357 <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>
14360 <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>
14364 2. Block Image with individual attributes from templates
14366 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14368 <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>
14371 <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>
14375 3. Inline image with individual attributes from templates
14377 [[File:Foobar.jpg|{{echo|50px}}]]
14379 <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>
14382 <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>
14385 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14386 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14388 Image with multiple attributes from the same template
14390 [[File:Foobar.jpg|{{image_attribs}}]]
14392 <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>
14395 <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>
14399 Image with link tails
14403 123[[File:Foobar.jpg]]456
14404 123[[File:Foobar.jpg|right]]456
14405 123[[File:Foobar.jpg|thumb]]456
14407 <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
14409 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
14410 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
14413 <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
14415 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
14416 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
14419 <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>
14420 <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>
14421 <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>
14425 Image with multiple captions -- only last one is accepted
14427 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14429 <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>
14432 <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>
14436 Image with multiple widths -- use last
14438 [[File:Foobar.jpg|200px|300px|caption]]
14440 <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>
14443 <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>
14447 Image with multiple alignments -- use first (T50664)
14451 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14453 [[File:Foobar.jpg|middle|text-top|caption]]
14455 <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>
14456 <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>
14459 <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>
14460 <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>
14464 Image with width attribute at different positions
14466 [[File:Foobar.jpg|200px|right|Caption]]
14467 [[File:Foobar.jpg|right|200px|Caption]]
14468 [[File:Foobar.jpg|right|Caption|200px]]
14470 <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>
14471 <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>
14472 <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>
14475 <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>
14476 <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>
14477 <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>
14480 # a sad bit of backward-compatibility
14482 Image with size specified with pxpx (T15500, T53628)
14484 parsoid=wt2html,wt2wt,html2html
14486 [[File:Foobar.jpg|20pxpx]]
14487 [[File:Foobar.jpg|200x20pxpx]]
14489 <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>
14490 <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>
14493 <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>
14497 Image with link parameter, wiki target
14499 [[File:Foobar.jpg|link=Main Page]]
14501 <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>
14504 <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>
14507 # parsoid T51293 (part 1)
14509 Image with link parameter, URL target
14511 [[File:Foobar.jpg|link=http://example.com/]]
14513 <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>
14516 <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>
14519 # parsoid T51293 (part 2)
14521 Image with link parameter, protocol-less URL target
14523 [[File:Foobar.jpg|link=//example.com/]]
14525 <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>
14528 <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>
14532 Escaping non-block captions (T107435)
14535 "modes": ["wt2wt"],
14537 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14541 [[Image:Foobar.jpg|caption]]
14543 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14546 # wgExternalLinkTarget not supported by Parsoid
14548 Image with link parameter, wgExternalLinkTarget
14550 [[Image:foobar.jpg|link=http://example.com/]]
14552 wgExternalLinkTarget='foobar'
14554 <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>
14559 Image with link parameter, wgNoFollowLinks set to false
14561 [[Image:foobar.jpg|link=http://example.com/]]
14563 wgNoFollowLinks=false
14565 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14570 Image with link parameter, wgNoFollowDomainExceptions
14572 [[Image:foobar.jpg|link=http://example.com/]]
14574 wgNoFollowDomainExceptions='example.com'
14576 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14580 # wgExternalLinkTarget not supported by Parsoid
14582 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14584 [[Image:foobar.jpg|link=http://example.com/|Title]]
14586 wgExternalLinkTarget='foobar'
14588 <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>
14593 Image with empty link parameter
14595 [[File:Foobar.jpg|link=]]
14597 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14600 <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>
14604 Image with link parameter (wiki target) and unnamed parameter
14606 [[File:Foobar.jpg|link=Main_Page|Title]]
14608 <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>
14611 <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>
14615 Image with link parameter (URL target) and unnamed parameter
14617 [[File:Foobar.jpg|link=http://example.com/|Title]]
14619 <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>
14622 <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>
14626 Thumbnail image with link parameter
14629 parsoid=wt2html,wt2wt,html2html
14631 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14633 <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>
14636 <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>
14640 Manually-specified thumbnail image
14644 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14646 <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>
14649 <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>
14653 Manually-specified thumbnail image with explicit link to wiki page
14656 parsoid=wt2html,wt2wt,html2html
14658 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14660 <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>
14663 <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>
14667 Manually-specified thumbnail image with explicit link to url
14670 parsoid=wt2html,wt2wt,html2html
14672 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14674 <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>
14677 <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>
14681 Manually-specified thumbnail image with explicit no link
14684 parsoid=wt2html,wt2wt,html2html
14686 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14688 <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>
14691 <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>
14695 Manually-specified thumbnail image with explicit link and alt text
14698 parsoid=wt2html,wt2wt,html2html
14700 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14702 <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>
14705 <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>
14709 Image with frame and link
14711 parsoid=wt2html,wt2wt,html2html
14713 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14715 <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>
14718 <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>
14722 Image with frame and link and explicit alt
14724 parsoid=wt2html,wt2wt,html2html
14726 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14728 <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>
14731 <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>
14735 Image with wiki markup in implicit alt
14737 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14739 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14741 <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>
14742 </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>
14745 <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>
14747 <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>
14751 Alt image option should handle most kinds of wikitext without barfing
14753 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14755 <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>
14758 <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>
14762 Image with table with attributes in caption
14764 parsoid=wt2html,html2html
14766 [[File:Foobar.jpg|thumb|
14773 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{| 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>
14774 <table class="123">
14775 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14778 </figcaption></figure>
14782 Image with table with rows from templates in caption
14784 [[File:Foobar.jpg|thumb|
14790 <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>
14792 <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>
14794 </figcaption></figure>
14798 Image with nested tables in caption
14800 [[File:Foobar.jpg|thumb|Foo<br />
14809 <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}'/>
14813 <tbody><tr><td>z</td></tr>
14814 </tbody></table></td></tr>
14816 </figcaption></figure>
14819 ###################
14820 # Conflicting image format options.
14821 # First option specified should 'win'.
14822 # All three cases in each test should be identical.
14825 Image with 'frameless' first.
14827 parsoid=wt2html,wt2wt,html2html
14829 [[File:Foobar.jpg|frameless|caption]]
14831 [[File:Foobar.jpg|frameless|frame|caption]]
14833 [[File:Foobar.jpg|frameless|thumb|caption]]
14835 <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>
14836 </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>
14837 </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>
14840 <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>
14841 <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>
14842 <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>
14846 Image with 'frame' first.
14848 parsoid=wt2html,wt2wt,html2html
14850 [[File:Foobar.jpg|frame|caption]]
14851 [[File:Foobar.jpg|frame|frameless|caption]]
14852 [[File:Foobar.jpg|frame|thumb|caption]]
14854 <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>
14855 <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>
14856 <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>
14859 <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>
14860 <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>
14861 <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>
14865 Image with 'thumb' first.
14867 parsoid=wt2html,wt2wt,html2html
14869 [[File:Foobar.jpg|thumb|caption]]
14870 [[File:Foobar.jpg|thumb|frameless|caption]]
14871 [[File:Foobar.jpg|thumb|frame|caption]]
14873 <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>
14874 <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>
14875 <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>
14878 <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>
14879 <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>
14880 <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>
14883 ###################
14885 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14886 # and https://phabricator.wikimedia.org/T64258
14887 # Foobar has actual size of 1941x220
14888 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14889 # a scalable format.
14890 # 2. Framed images always ignore size options; always render at default size.
14891 # 3. "Unspecified format" and border are the only types which can be
14895 Image: unspecified format and border enlarge
14897 parsoid=wt2html,wt2wt,html2html
14899 [[File:Foobar.jpg|2000px]]
14901 [[File:Foobar.jpg|border|2000px]]
14903 <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>
14904 </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>
14907 <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>
14908 <p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></figure-inline></p>
14912 Image: "unspecified format" and border reduce
14914 parsoid=wt2html,wt2wt,html2html
14916 [[File:Foobar.jpg|1000px]]
14918 [[File:Foobar.jpg|border|1000px]]
14920 <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>
14921 </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>
14924 <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>
14925 <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>
14929 Image: thumbs reduce
14931 parsoid=wt2html,wt2wt,html2html
14933 [[File:Foobar.jpg|thumb|50px]]
14935 <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>
14938 <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>
14942 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14944 parsoid=wt2html,wt2wt,html2html
14946 [[File:Foobar.jpg|thumb|2000px]]
14948 [[File:Foobar.svg|thumb|2000px]]
14950 <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>
14951 <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>
14954 <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>
14955 <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>
14959 Image: frameless can reduce in size
14961 parsoid=wt2html,wt2wt,html2html
14963 [[File:Foobar.jpg|frameless|50px]]
14965 <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>
14968 <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>
14972 Image: bitmap frameless can't be enlarged past original size, but vector can
14974 parsoid=wt2html,wt2wt,html2html
14976 [[File:Foobar.jpg|frameless|2000px]]
14978 [[File:Foobar.svg|frameless|2000px]]
14980 <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>
14981 </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>
14984 <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>
14985 <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>
14989 Image: framed images are always unscaled.
14991 parsoid=wt2html,wt2wt,html2html
14993 [[File:Foobar.jpg|frame]]
14995 [[File:Foobar.jpg|frame|50px]]
14997 [[File:Foobar.jpg|frame|50x50px]]
14999 [[File:Foobar.jpg|frame|2000px]]
15001 <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>
15002 <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>
15003 <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>
15004 <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>
15007 <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>
15008 <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>
15009 <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>
15010 <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>
15013 ###################
15016 Link to image page- image page normally doesn't exists, hence edit link
15017 Add test with existing image page
15018 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15022 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15027 T20784 Link to non-existent image page with caption should use caption as link text
15029 [[:Image:test|caption]]
15031 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15036 Frameless image caption with a free URL
15038 [[File:Foobar.jpg|http://example.com]]
15040 <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>
15043 <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>
15047 Thumbnail image caption with a free URL
15051 [[File:Foobar.jpg|thumb|http://example.com]]
15053 <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>
15056 <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>
15060 Thumbnail image caption with a free URL and explicit alt
15063 parsoid=wt2html,wt2wt,html2html
15065 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15067 <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>
15070 <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>
15074 SVG thumbnails with no language set
15077 [[File:Foobar.svg|thumb|caption]]
15079 <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>
15082 <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>
15086 SVG thumbnails with language de
15088 parsoid=wt2html,wt2wt,html2html
15090 [[File:Foobar.svg|thumb|caption|lang=de]]
15092 <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>
15095 <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>
15099 SVG thumbnails with invalid language code
15101 parsoid=wt2html,wt2wt,html2html
15103 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15105 <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>
15108 <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>
15112 T3887: A ISBN with a thumbnail
15114 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15116 <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>
15119 <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>
15123 T3887: A RFC with a thumbnail
15125 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15127 <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>
15130 <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>
15134 T3887: A mailto link with a thumbnail
15136 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15138 <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>
15141 <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>
15144 # Pending resolution to T2368
15146 T2648: Frameless image caption with a link
15148 [[File:Foobar.jpg|text with a [[link]] in it]]
15150 <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>
15153 <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>
15157 T2648: Frameless image caption with a link (suffix)
15159 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15161 <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>
15164 <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>
15168 T2648: Frameless image caption with an interwiki link
15170 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15172 <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>
15175 <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>
15179 T2648: Frameless image caption with a piped interwiki link
15181 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15183 <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>
15186 <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>
15190 T107474: Frameless image caption with <nowiki>
15192 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15194 <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>
15198 Escape HTML special chars in image alt text
15200 [[File:Foobar.jpg|& < > "]]
15202 <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>
15205 <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>
15209 Escape HTML special chars in image alt text with LanguageConverter
15213 [[File:Foobar.jpg|& < > "]]
15215 <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>
15218 <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>
15222 Entities in file name and attributes
15224 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15226 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15229 <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>
15233 T2499: Alt text should have Ӓ, not &1234;
15235 [[File:Foobar.jpg|♀]]
15237 <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>
15240 <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>
15244 Broken image caption with link
15246 parsoid=wt2html,wt2wt,html2html
15248 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15250 <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.
15253 <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>
15257 Image caption containing another image
15259 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15261 <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>
15264 <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>
15268 Image: caption containing a newline
15270 [[File:Foobar.jpg|This
15273 <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>
15276 <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>
15280 Image: caption containing leading space
15281 (The leading space should not trigger nowiki escaping in wt2wt mode)
15283 [[File:Foobar.jpg|thumb| bar]]
15285 <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>
15288 <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>
15291 # html/php output not have newlines after table, td, th, etc. because
15292 # Linker::makeThumbLink2() replaces the newlines with spaces since
15293 # the table is inside a caption.
15294 # FIXME: Verify if that circa 2004 fix is still required.
15296 Image: caption containing a table
15298 parsoid=wt2html,wt2wt,html2html
15300 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15306 and some more text.]]
15308 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This 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>
15311 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
15314 <tr><th>Foo</th><th>Bar</th></tr>
15317 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15321 T5090: External links other than http: in image captions
15323 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15325 <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>
15328 <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>
15334 parsoid=wt2html,wt2wt,html2html
15336 [[Image:foobar.jpg|a|class=b]]
15338 <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>
15341 <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>
15345 Localized image handling (1).
15347 parsoid=wt2html,wt2wt,html2html
15350 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15352 <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>
15355 <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>
15359 Localized image handling (2).
15362 parsoid=wt2html,wt2wt,html2html
15365 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15367 <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>
15370 <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>
15374 Localized image handling (3).
15379 <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>
15381 [[File:Foobar.jpg|بندانگشتی]]
15385 "border", "frameless" and "class" attributes on an image.
15388 parsoid=wt2html,wt2wt,html2html
15390 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15392 <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>
15395 <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>
15398 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15400 Invalid image attributes (T64500)
15403 parsoid=wt2html,wt2wt,html2html
15405 [[File:Foobar.jpg|thumb|float|left|caption]]
15407 [[File:Foobar.jpg|thumb|righ|caption]]
15409 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15411 <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>
15412 <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>
15413 <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>
15416 <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>
15417 <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>
15418 <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>
15424 #REDIRECT [[File:Barfoo.jpg]]
15427 # FIXME: Parsoid should run this test -- but we'd need to teach the
15428 # mockAPI about the redirected Barfoo.jpg image.
15432 [[Image:Barfoo.jpg]]
15434 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15439 Missing image with uploads disabled
15443 [[File:Foobaz.jpg]]
15445 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15448 <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>
15451 # Parsoid-specific testing for images
15452 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15453 # Currently imperfect due to a flaw in the Parsoid testrunner
15455 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15459 Parsoid-specific image handling - simple image with size and middle alignment
15461 [[File:Foobar.jpg|middle|50px]]
15463 <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>
15467 Parsoid-specific image handling - simple image with size, middle alignment,
15468 non-standard namespace alias
15470 parsoid=wt2wt,wt2html,html2html
15472 [[Image:Foobar.jpg|middle|50px]]
15474 <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>
15478 Parsoid-specific image handling - simple image with size and middle alignment
15481 [[File:Foobar.jpg|50px|middle]]
15483 <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>
15487 Parsoid-specific image handling - simple image with size and middle alignment
15488 and non-standard namespace name
15490 parsoid=wt2html,wt2wt,html2html
15492 [[Image:Foobar.jpg|50px|middle]]
15494 <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>
15498 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15500 [[File:Foobar.jpg|500x10px|baseline|caption]]
15502 <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>
15506 Parsoid-specific image handling - simple image with border and size spec
15508 [[File:Foobar.jpg|50px|border|caption]]
15510 <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>
15514 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15516 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15518 <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>
15522 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15525 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15527 <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>
15531 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15533 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15535 <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>
15539 Parsoid-specific image handling - thumbnail with specific size, halign,
15540 valign, and caption (existing content)
15542 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15544 <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>
15548 Parsoid-specific image handling - framed image with specific size and caption
15551 parsoid=wt2html,wt2wt,html2html
15553 [[File:Foobar.jpg|frame|500x50px|caption]]
15555 <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>
15559 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15562 parsoid=wt2html,wt2wt,html2html
15564 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15566 <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>
15570 Parsoid-specific image handling - frameless image with specific size, border, and caption
15572 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15574 <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>
15578 Parsoid-specific image handling - simple image with a formatted caption
15580 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15582 <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>
15586 Parsoid-specific image handling - caption with a template in it
15588 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15590 <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>
15594 Parsoid-specific image handling - caption with unbalanced tags in it
15596 parsoid=wt2html,wt2wt,html2html
15599 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15603 <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>
15608 Parsoid-specific image handling - empty caption (1)
15610 parsoid=wt2html,wt2wt
15612 [[File:Foobar.jpg|thumb|]]
15614 <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>
15617 # empty captions don't get serialized unless we're in the "round trip" case
15619 Parsoid-specific image handling - empty caption (2)
15623 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15624 <a href="./File:Foobar.jpg">
15625 <img resource="./File:Foobar.jpg"
15626 src="//example.com/images/3/3a/Foobar.jpg"
15627 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15628 height="25" width="220"/>
15630 <figcaption></figcaption>
15633 [[File:Foobar.jpg|thumb]]
15637 Parsoid-specific image handling - whitespace caption
15639 [[File:Foobar.jpg|thumb| ]]
15641 <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>
15645 Parsoid-specific image handling - lang option
15648 [[File:Foobar.svg|lang=de|caption]]
15652 <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>
15656 ## Edge case bugs in Parsoid from T93580
15658 T93580: 1. Templated <ref> inside block images
15660 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15664 <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>
15666 <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>
15670 T93580: 2. <ref> inside inline images
15672 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15676 <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>
15678 <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>
15682 T93580: 3. Templated <ref> inside inline images
15684 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15688 <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>
15690 <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>
15697 Subpage test/subpage
15705 subpage title=[[Subpage test]]
15709 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15714 Subpage noslash link
15716 subpage title=[[Subpage test]]
15720 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15725 Subpage test/1/2/subpage
15731 Relative subpage noslash link
15733 parsoid=wt2wt,wt2html,html2html
15734 subpage title=[[Subpage test/1/2/3/4]]
15740 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15741 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15744 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15745 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15749 Parsoid: dot-slash prefixed wikilinks
15759 </p><p>[[././baz/]]
15764 </p><p>[[././baz/]]
15769 Render invalid page names as plain text (T53090)
15781 [[foo[http://example.com]xyz]]
15783 [[{{echo|./../foo}}|bar]]
15784 [[{{echo|foo/.}}|bar]]
15785 [[{{echo|foo/..}}|bar]]
15786 [[{{echo|foo~~~~bar}}]]
15787 [[{{echo|foo>bar}}]]
15788 [[{{echo|foo././bar}}]]
15789 [[{{echo|foo{bar}}]]
15790 [[{{echo|foo}bar}}]]
15791 [[{{echo|foo[bar}}]]
15792 [[{{echo|foo]bar}}]]
15793 [[{{echo|foo<bar}}]]
15795 <p>[[./../foo|bar]]
15805 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15806 </p><p>[[./../foo|bar]]
15819 <p>[[./../foo|bar]]
15829 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15831 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15832 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15833 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15834 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15835 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15836 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15837 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15838 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15839 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15840 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15841 [[<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>
15849 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15854 T2561: {{/Subpage}}
15856 subpage title=[[Page]]
15860 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15868 Category:MediaWiki User's Guide
15876 [[:Category:MediaWiki User's Guide]]
15878 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15887 [[Category:MediaWiki User's Guide]]
15889 cat=MediaWiki_User's_Guide sort=
15891 <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"}}'/>
15895 PAGESINCATEGORY invalid title fatal (r33546 fix)
15897 {{PAGESINCATEGORY:<bogus>}}
15904 Category with different sort key
15908 [[Category:MediaWiki User's Guide|Foo]]
15910 cat=MediaWiki_User's_Guide sort=Foo
15912 <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"}}'/>
15916 Category with identical sort key
15920 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15922 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15924 <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"}}'/>
15928 Category with empty sort key
15933 [[Category:MediaWiki User's Guide|]]
15935 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15939 Category with empty sort key and parentheses
15944 [[Category:Foo (bar)|]]
15946 [[Category:Foo (bar)|Foo]]
15950 Category with link tail
15955 123[[Category:Foo]]456
15957 123[[Category:Foo]]456
15961 Category with template
15966 [[Category:{{echo|Foo}}]]
15968 [[Category:{{echo|Foo}}]]
15972 Category with template in sort key
15977 [[Category:Foo|{{echo|Bar}}]]
15979 [[Category:Foo|{{echo|Bar}}]]
15983 Category with template in sort key and title
15988 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15990 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15993 ## We used to, but no longer wt2wt this test since the default serializer
15994 ## will normalize all categories to serialize on their own line.
15995 ## This wikitext usage is going to be fairly uncommon in production and
15996 ## selser will take care of preserving formatting in those scenarios.
15998 Category / paragraph interactions
16002 Foo [[Category:Baz]] Bar
16004 Foo [[Category:Baz]]
16012 [[Category:Baz]] Bar
16025 {{echo|[[Category:Baz]]}}
16038 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16039 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16040 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16041 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16042 <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>
16043 <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}}]}'/>
16044 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16047 ## We used to, but no longer wt2wt this test since the default serializer
16048 ## will normalize all categories to serialize on their own line.
16049 ## This wikitext usage is going to be fairly uncommon in production and
16050 ## selser will take care of preserving formatting in those scenarios.
16052 ## The whitespace on the empty line is part of the test. Please do not delete
16054 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16060 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16062 {{echo|[[Category:Foo]] and so should this!}}
16064 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16069 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16071 <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>
16074 ## Parsoid will not try to wt2wt this while preserving newlines because
16075 ## it suppresses excess newlines within list items -- and we don't want to
16076 ## introduce a special case just for categories, which is, in reality somewhat
16077 ## odd behavior -- categories are unlikely to be used in list items like this
16078 ## in top-level pages and are only likely to show up in template-generated
16079 ## list items where this RT-ing is a non-issue.
16081 ## The whitespace on the empty line is part of the test. Please do not delete
16083 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16089 [[Category:Foo]] and this should be part of the same list item
16092 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16094 <ul><li>This and this should be part of the same list item</li>
16095 <li>So should this and this should be part of the same list item</li></ul>
16098 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16099 <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>
16103 ## Newlines and categories that follow the last item of a list
16104 ## are treated differently because this (list followed by categories)
16105 ## is an extremely common pattern on wikis.
16107 3. Categories and newlines: newline suppression for last list item should RT properly
16120 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16122 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16123 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16127 4. Categories and newlines: newline suppression for last list item should RT properly
16135 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16137 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16140 ## only wt2html for this to make sure the algo only applies to the rightmost path
16142 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16155 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16157 <ul><li> d</li></ul></li></ul>
16158 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16161 ## We used to, but no longer wt2wt this test since the default serializer
16162 ## will normalize all categories to serialize on their own line.
16163 ## This wikitext usage is going to be fairly uncommon in production and
16164 ## selser will take care of preserving formatting in those scenarios.
16166 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16170 * a [[Category:Foo]]
16172 <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>
16175 # This test also demonstrates because of newline+category tunneling
16176 # through the list hander, template wrapping doesn't expand to the
16177 # containing list when the list item swallows the category.
16179 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16184 <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
16185 </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>
16189 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16193 {{echo|[[Category:Foo]]
16197 <ul><li> a</li></ul>
16199 <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">
16200 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16201 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16205 9. Categories and newlines: should behave properly with linkprefix (T87753)
16220 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16221 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16225 10. No regressions on internal links following category (T174639)
16227 parsoid=wt2html,html2html
16229 [[Category:Foo]]<div>a
16234 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16237 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16239 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16242 # Note that Parsoid differs slightly from PHP due to T175421
16244 11. Special case where only newlines separate links (T175416)
16246 parsoid=wt2html,html2html
16250 [[Foo]][[es:Alimento]]
16255 <a href="/wiki/Foo" title="Foo">Foo</a>
16256 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16259 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16261 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16263 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16267 Category links with multiple namespaces
16269 [[Category:Project:Foo]]
16271 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16275 Parsoid: Serialize link to category page with colon escape
16281 [[:Category:Foo|Bar]]
16284 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16285 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16289 # We used to, but no longer wt2wt this test since the default serializer
16290 # will normalize all categories to serialize on their own line.
16291 # This wikitext usage is going to be fairly uncommon in production and
16292 # selser will take care of preventing whitespace insertion if this
16293 # occurs in an article.
16295 # html2html disabled for the same reason (whitespace insertion between
16298 # html2wt disabled because it localizes the "Category" namespace.
16300 Link prefix/suffixes aren't applied to category links
16310 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16314 Link prefix/suffixes aren't applied to language links
16324 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16328 Parsoid: Serialize link to file page with colon escape
16334 [[:File:Foo.png|Bar]]
16337 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16338 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16343 Parsoid: Serialize a genuine category link without colon escape
16348 [[Category:Foo|Bar]]
16350 <link rel="mw:PageProp/Category" href="./Category:Foo">
16351 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16355 Normalize hrefs properly before testing for invalid link targets (T72894)
16359 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16361 [[Category:Toxine bactérienne]]
16365 Parsoid: Defaultsort
16367 {{DEFAULTSORT:Foo}}
16369 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16372 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16373 # But, this is a limitation of our representation and is documented in
16374 # TemplateHandler.js in processSpecialMagicWord
16376 Parsoid: Defaultsort (template-generated)
16378 {{{{echo|DEFAULTSORT}}:Foo}}
16380 <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"}]]}'/>
16384 ### Inter-language links
16387 Interlanguage links
16395 es:Alimento fr:Nourriture zh:食品
16397 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16398 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16399 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16403 Duplicate interlanguage links (T26502)
16414 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16415 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16416 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16417 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16424 Basic section headings
16431 ===Smaller headline===
16434 <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>
16437 <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>
16440 <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>
16446 Section headings with TOC
16449 ===Subheadline 1===
16450 =====Skipping a level=====
16451 ======Skipping a level======
16455 ===Another headline===
16457 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16459 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16461 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16463 <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>
16465 <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>
16472 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16474 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16480 <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>
16481 <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>
16482 <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>
16483 <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>
16484 <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>
16487 <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>
16492 TOC anchors don't collide
16500 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16502 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16503 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16504 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16505 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16509 <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>
16510 <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>
16511 <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>
16512 <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>
16516 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16517 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16519 Handling of sections up to level 6 and beyond
16524 ==Level 2 Heading==
16525 ===Level 3 Heading===
16526 ====Level 4 Heading====
16527 =====Level 5 Heading=====
16528 ======Level 6 Heading======
16529 =======Level 7 Heading=======
16530 ========Level 8 Heading========
16531 =========Level 9 Heading=========
16532 ==========Level 10 Heading==========
16534 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16536 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16538 <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>
16540 <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>
16542 <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>
16544 <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>
16546 <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>
16547 <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>
16548 <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>
16549 <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>
16550 <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>
16564 <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>
16565 <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>
16566 <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>
16567 <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>
16568 <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>
16569 <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>
16570 <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>
16571 <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>
16572 <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>
16573 <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>
16576 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16577 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16578 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16579 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16580 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16581 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16582 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16583 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16584 <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>
16585 <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>
16589 TOC regression (T11764)
16593 ====title 1.1.1====
16598 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16600 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16602 <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>
16604 <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>
16607 <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>
16610 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16612 <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>
16618 <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>
16619 <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>
16620 <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>
16621 <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>
16622 <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>
16623 <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>
16628 TOC for heading containing <span id="..."></span> (T96153)
16631 ==<span id="old-anchor"></span>New title==
16633 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16635 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16639 <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>
16644 TOC with wgMaxTocLevel=3 (T8204)
16650 ====title 1.1.1====
16655 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16657 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16659 <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>
16660 <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>
16663 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16665 <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>
16671 <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>
16672 <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>
16673 <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>
16674 <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>
16675 <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>
16676 <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>
16681 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16687 ====Section 1.1.1====
16688 ====Section 1.1.1.1====
16691 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16693 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16695 <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>
16698 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16702 <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>
16703 <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>
16704 <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>
16705 <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>
16706 <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>
16712 Resolving duplicate section names
16717 <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>
16718 <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>
16723 Resolving duplicate section names with differing case (T12721)
16728 <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>
16729 <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>
16741 Template with sections, __NOTOC__
16748 <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>
16749 <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>
16750 <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>
16751 <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>
16756 __NOEDITSECTION__ keyword
16762 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16763 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16768 Link inside a section heading
16770 ==Section with a [[Main Page|link]] in it==
16772 <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>
16777 TOC regression (T14077)
16784 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16786 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16788 <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>
16791 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16795 <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>
16796 <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>
16797 <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>
16802 T3219 URL next to image (good)
16804 http://example.com [[File:Foobar.jpg]]
16806 <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>
16809 <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>
16812 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16814 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16816 parsoid=wt2html,html2html
16819 The line above must have a trailing space!
16822 But just in case it doesn't...
16824 <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>
16825 <p>The line above must have a trailing space!
16827 <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>
16828 <p>But just in case it doesn't...
16831 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16832 <p>The line above must have a trailing space!</p>
16833 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16835 <p>But just in case it doesn't...</p>
16839 Header with special characters (T27462)
16841 The tooltips shall not show entities to the user (ie. be double escaped)
16858 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16860 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16862 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16863 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16864 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16865 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16866 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16870 <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>
16873 <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>
16876 <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>
16879 <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>
16882 <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>
16886 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
16888 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
16891 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
16894 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
16897 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
16900 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
16905 Header with space, plus and underscore as entity
16907 Id should not contain + for spaces
16909 ==Space between Text==
16912 ==Space-Entity between Text==
16915 ==Plus+between+Text==
16918 ==Plus-Entity+between+Text==
16921 ==Underscore_between_Text==
16924 ==Underscore-Entity_between_Text==
16927 [[#Space between Text]]
16928 [[#Space-Entity between Text]]
16929 [[#Plus+between+Text]]
16930 [[#Plus-Entity+between+Text]]
16931 [[#Underscore_between_Text]]
16932 [[#Underscore-Entity_between_Text]]
16934 <p>Id should not contain + for spaces
16936 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16938 <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>
16939 <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>
16940 <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>
16941 <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>
16942 <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>
16943 <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>
16947 <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>
16950 <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>
16953 <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>
16956 <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>
16959 <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>
16962 <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>
16964 </p><p><a href="#Space_between_Text">#Space between Text</a>
16965 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16966 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16967 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16968 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16969 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16972 <p>Id should not contain + for spaces</p>
16974 <h2 id="Space_between_Text">Space between Text</h2>
16977 <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>
16980 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
16983 <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>
16986 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
16989 <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>
16992 <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>
16993 <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>
16994 <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>
16995 <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>
16996 <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>
16997 <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>
17000 # Parsoid html2wt disabled because it adds padding spaces around =
17002 Headers with excess '=' characters
17003 (Are similar tests necessary beyond the 1st level?)
17005 parsoid=wt2html,wt2wt,html2html
17009 =''italic'' heading==
17010 ==''italic'' heading=
17012 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17014 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17015 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17016 <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>
17017 <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>
17021 <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>
17022 <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>
17023 <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>
17024 <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>
17027 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17028 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17029 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17030 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17034 HTML headers vs TOC (T25393)
17035 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17047 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17049 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17051 <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>
17052 <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>
17055 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17057 <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>
17058 <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>
17064 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17065 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17066 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17067 <h1><span class="mw-headline" id="Header_2">Header 2
17069 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17070 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17073 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17074 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17075 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17077 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17079 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17080 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17081 <meta property="mw:PageProp/noeditsection"/>
17085 Single-line or multiline-comments can follow headings
17087 parsoid=wt2html,wt2wt
17095 <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>
17096 <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>
17097 <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>
17100 <h2 id="foo">foo</h2><!---->
17101 <h2 id="bar">bar</h2><!--c1-->
17102 <h2 id="baz">baz</h2><!--
17108 T3219 URL next to image (broken)
17110 http://example.com[[File:Foobar.jpg]]
17112 <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>
17115 <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>
17119 T3186 news: in the middle of text
17121 http://en.wikinews.org/wiki/Wikinews:Workplace
17123 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17129 Namespaced link must have a title
17138 Namespaced link must have a title (bad fragment version)
17140 [[Project:#fragment]]
17142 <p>[[Project:#fragment]]
17148 ### HTML tags and HTML attributes
17152 div with no attributes
17154 <div>HTML rocks</div>
17156 <div>HTML rocks</div>
17161 div with double-quoted attribute
17163 <div id="rock">HTML rocks</div>
17165 <div id="rock">HTML rocks</div>
17170 div with single-quoted attribute
17172 <div id='rock'>HTML rocks</div>
17174 <div id="rock">HTML rocks</div>
17179 div with unquoted attribute
17181 <div id=rock>HTML rocks</div>
17183 <div id="rock">HTML rocks</div>
17188 div with illegal double attributes
17190 <div id="a" id="b">HTML rocks</div>
17192 <div id="b">HTML rocks</div>
17197 div with empty attribute value, space before equals
17199 parsoid=wt2html,html2html
17201 <div class =>HTML rocks</div>
17203 <div class="">HTML rocks</div>
17206 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17210 div with multiple empty attribute values
17212 wgFragmentMode=[ 'html5', 'legacy' ]
17214 parsoid=wt2html,html2html
17216 <div id= title=>HTML rocks</div>
17218 <div id="title=">HTML rocks</div>
17221 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17224 # FIXME Parsoid doesn't actually match PHP here.
17225 # Probably we should use the synthetic <foo /> or <indicator>
17226 # extensions for this test, which are enabled when running parser tests.
17228 Extension tag in attribute value
17230 <span title="<translate>123</translate>">ok</span>
17231 !! html/php+disabled
17232 <p><span title="<translate>123</translate>">ok</span>
17235 <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>
17239 table with multiple empty attribute values
17241 parsoid=wt2html,html2html
17247 <table title="id=">
17253 <table title="id=">
17254 <tbody><tr><td>hi</td></tr>
17259 div with braces in attribute value
17261 <div title="{}">Foo</div>
17263 <div title="{}">Foo</div>
17266 <div title="{}">Foo</div>
17270 div with empty attribute value, no space before equals
17272 parsoid=wt2html,html2html
17274 <div class=>HTML rocks</div>
17276 <div class="">HTML rocks</div>
17279 <div class="">HTML rocks</div>
17283 HTML multiple attributes correction
17285 <p class="error" class="awesome">Awesome!</p>
17287 <p class="awesome">Awesome!</p>
17292 Table multiple attributes correction
17295 !+ class="error" class="awesome"|status
17300 <th class="awesome">status
17308 <DIV ID="x">HTML ROCKS</DIV>
17310 <div id="x">HTML ROCKS</div>
17315 Non-ASCII pseudo-tags are rendered as text
17324 Pseudo-tag with URL 'name' renders as url link
17326 <http://example.com/>
17328 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17333 text with amp in the middle of nowhere
17337 <p>Remember AT&T?
17342 text with character entity: eacute
17344 I always thought é was a cute letter.
17346 <p>I always thought é was a cute letter.
17351 text with entity-escaped character entity-like string: eacute
17353 I always thought &eacute; was a cute letter.
17355 <p>I always thought &eacute; was a cute letter.
17360 text with undefined character entity: xacute
17362 I always thought &xacute; was a cute letter.
17364 <p>I always thought &xacute; was a cute letter.
17371 <data value="5">five</data>
17372 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17373 <mark>This highlighted text</mark>
17375 <p><data value="5">five</data>
17376 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17377 <mark>This highlighted text</mark>
17382 HTML tag with leading space is parsed as text
17386 <p>< div>foo< /div>
17390 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17391 ## the HTML5 parsing spec.
17393 Element with broken attribute syntax
17397 <div style=" style="123">hi</div>
17400 <div style="123">hi</div>
17404 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17405 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17409 ### Nesting tests (see T43545, T52604, T53081)
17412 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17413 # Note that html2wt is considerably more difficult if we use <b> in
17414 # the test case, instead of <small>
17416 Ensure that HTML adoption agency algorithm is properly implemented.
17418 <small>X<small>Y</small>Z</small>
17420 <p><small>X<small>Y</small>Z</small>
17424 # This was T43545 in the PHP parser.
17428 <kbd>X<kbd>Y</kbd>Z</kbd>
17430 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17434 # The following cases were T53081 in the PHP parser.
17435 # Note that there are some other nestable tags (b, i, etc) which are
17436 # not covered; see T53081 for discussion.
17441 <em>X<em>Y</em>Z</em>
17443 <p><em>X<em>Y</em>Z</em>
17448 Nesting of <strong>
17450 <strong>X<strong>Y</strong>Z</strong>
17452 <p><strong>X<strong>Y</strong>Z</strong>
17461 <p><q>X<q>Y</q>Z</q>
17468 <ruby>X<ruby>Y</ruby>Z</ruby>
17470 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17477 <bdo>X<bdo>Y</bdo>Z</bdo>
17479 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17491 [[Media:Foobar.jpg]]
17492 [[Media:Video.ogv]]
17493 [[:Media:Video.ogv]]
17495 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17496 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17497 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17500 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17501 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17502 <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>
17506 Media link with text
17508 [[Media:Foobar.jpg|A neat file to look at]]
17510 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17513 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17516 # FIXME: this is still bad HTML tag nesting
17517 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17518 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17520 Media link with nasty text
17522 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17524 <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>
17527 <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>
17529 <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>
17534 Media link to nonexistent file (T3702)
17536 [[Media:No such.jpg]]
17537 [[Media:No_such file.jpg]]
17539 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17540 <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>
17543 <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>
17544 <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>
17548 Image link to nonexistent file (T3850 - good)
17550 [[File:No_such.jpg]]
17552 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17555 <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>
17559 :Image link to nonexistent file (T3850 - bad)
17561 [[:Image:No such.jpg]]
17563 <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>
17566 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17570 Character reference normalization in link text (T3938)
17572 [[Main Page|this&that]]
17574 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17581 Test for unicode normalization
17583 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17587 (T21451) Links should refer to the normalized form.
17595 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17596 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17597 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17598 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17599 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17604 Empty attribute crash test (T4067)
17606 <font color="">foo</font>
17608 <p><font color="">foo</font>
17613 Empty attribute crash test single-quotes (T4067)
17615 <font color=''>foo</font>
17617 <p><font color="">foo</font>
17622 Attribute test: equals, then nothing
17624 parsoid=wt2html,html2html
17626 <font color=>foo</font>
17628 <p><font color="">foo</font>
17631 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17635 Attribute test: unquoted value
17637 parsoid=wt2html,html2html
17639 <font color=x>foo</font>
17641 <p><font color="x">foo</font>
17644 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17648 Attribute test: unquoted but illegal value (hash)
17650 <font color=#x>foo</font>
17652 <p><font color="#x">foo</font>
17656 # Parsoid does not serialize to empty attribute syntax,
17657 # so wt2wt and html2wt cases are skipped
17659 Attribute test: no value (T54330)
17661 parsoid=wt2html,html2html
17663 <font color>foo</font>
17665 <p><font color="">foo</font>
17668 <p><font color="">foo</font></p>
17672 T4095: link with three closing brackets
17676 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17679 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17683 T4095: link with pipe and three closing brackets
17685 [[Main Page|link]]]
17687 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17690 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17694 T4095: link with pipe and three closing brackets, version 2
17696 [[Main Page|[http://example.com/]]]
17698 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17701 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17710 Template:Dangerous attribute
17712 " onmouseover="alert(document.cookie)
17716 Template:Dangerous style attribute
17718 border-size: expression(alert(document.cookie))
17724 <div style="float: right; {{{1}}}">Magic div</div>
17728 T4304: HTML attribute safety (safe template; regression T4309)
17730 <div title="{{test}}"></div>
17732 <div title="This is a test template"></div>
17735 <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>
17738 # Parsoid has enough context to handle this case
17740 T4304: HTML attribute safety (dangerous template; 2309)
17742 <div title="{{dangerous attribute}}"></div>
17744 <div title=""></div>
17747 <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>
17751 T4304: HTML attribute safety (dangerous style template; 2309)
17753 <div style="{{dangerous style attribute}}"></div>
17755 <div style="/* insecure input */"></div>
17758 <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>
17762 T4304: HTML attribute safety (safe parameter; 2309)
17764 {{div style|width: 200px}}
17766 <div style="float: right; width: 200px">Magic div</div>
17769 <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>
17773 T4304: HTML attribute safety (unsafe parameter; 2309)
17775 {{div style|width: expression(alert(document.cookie))}}
17777 <div style="/* insecure input */">Magic div</div>
17780 <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>
17783 ## Parsoid output here differs; needs investigation.
17785 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17787 {{div style|"><script>alert(document.cookie)</script>}}
17789 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17793 ## Parsoid output here differs; needs investigation.
17795 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17797 {{div style|" ><script>alert(document.cookie)</script>}}
17799 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17804 T4304: HTML attribute safety (link)
17806 <div title="[[Main Page]]"></div>
17808 <div title="[[Main Page]]"></div>
17811 <div title="[[Main Page]]"></div>
17815 T4304: HTML attribute safety (italics)
17817 <div title="''foobar''"></div>
17819 <div title="''foobar''"></div>
17824 T4304: HTML attribute safety (bold)
17826 <div title="'''foobar'''"></div>
17828 <div title="'''foobar'''"></div>
17833 T4304: HTML attribute safety (ISBN)
17835 <div title="ISBN 1234567890"></div>
17837 <div title="ISBN 1234567890"></div>
17842 T4304: HTML attribute safety (RFC)
17844 <div title="RFC 1234"></div>
17846 <div title="RFC 1234"></div>
17851 T4304: HTML attribute safety (PMID)
17853 <div title="PMID 1234567890"></div>
17855 <div title="PMID 1234567890"></div>
17860 T4304: HTML attribute safety (web link)
17862 <div title="http://example.com/"></div>
17864 <div title="http://example.com/"></div>
17869 T4304: HTML attribute safety (named web link)
17871 <div title="[http://example.com/ link]"></div>
17873 <div title="[http://example.com/ link]"></div>
17876 <div title="[http://example.com/ link]"></div>
17880 T5244: HTML attribute safety (extension; safe)
17882 <div style="<nowiki>background:blue</nowiki>"></div>
17884 <div style="background:blue"></div>
17887 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17891 T5244: HTML attribute safety (extension; unsafe)
17893 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17895 <div style="/* insecure input */"></div>
17898 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17901 # More MSIE fun discovered by Tom Gilder
17904 MSIE CSS safety test: spurious slash
17906 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17908 <div style="/* insecure input */">evil</div>
17911 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17915 MSIE CSS safety test: hex code
17917 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17919 <div style="/* insecure input */">evil</div>
17922 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17926 MSIE CSS safety test: comment in url
17928 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17930 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17933 <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>
17937 MSIE CSS safety test: comment in expression
17939 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17941 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17944 <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>
17948 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17950 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17952 <p style="/* invalid control char */">A</p>
17955 <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>
17959 MSIE 6 CSS safety test: Fullwidth (T57332)
17961 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17962 <div style="top:EXPRESSION(alert())">B</div>
17964 <p style="/* insecure input */">A</p>
17965 <div style="/* insecure input */">B</div>
17968 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17969 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17973 MSIE 6 CSS safety test: IPA extensions (T57332)
17975 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17976 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17978 <div style="/* insecure input */">A</div>
17979 <p style="/* insecure input */">B</p>
17982 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17983 <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>
17987 MSIE 6 CSS safety test: sup/sub script (T57332)
17989 <div style="background-image:url⁽javascript:alert())">A</div>
17990 <div style="background-image:url₍javascript:alert())">B</div>
17991 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17993 <div style="/* insecure input */">A</div>
17994 <div style="/* insecure input */">B</div>
17995 <p style="/* insecure input */">C</p>
17998 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17999 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18000 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18006 parsoid=wt2html,html2html
18009 title="data:text/html,<img src=1 onerror=alert(1)>"
18010 style="-o-link:attr(title);-o-link-source:current">X</div>
18012 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18015 <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>
18019 MSIE 6 CSS safety test: Repetition markers (T57332)
18021 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18022 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18023 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18024 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18025 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18026 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18027 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18029 <p style="/* insecure input */">A</p>
18030 <p style="/* insecure input */">B</p>
18031 <p style="/* insecure input */">C</p>
18032 <p style="/* insecure input */">D</p>
18033 <p style="/* insecure input */">E</p>
18034 <p style="/* insecure input */">F</p>
18035 <p style="/* insecure input */">G</p>
18038 <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>
18039 <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>
18040 <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>
18041 <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>
18042 <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>
18043 <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>
18044 <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>
18048 Table attribute legitimate extension
18051 !+ style="<nowiki>color:blue</nowiki>"|status
18056 <th style="color:blue">status
18062 Table attribute safety
18065 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18070 <th style="/* insecure input */">status
18076 CSS line continuation 1
18078 <div style="background-image: u\ rl(test.jpg);"></div>
18080 <div style="/* insecure input */"></div>
18085 CSS line continuation 2
18087 <div style="background-image: u\ rl(test.jpg); "></div>
18089 <div style="/* invalid control char */"></div>
18100 Expansion of multi-line templates in attribute values (T8255)
18102 <div style="background: {{identity|#00FF00}}">-</div>
18104 <div style="background: #00FF00">-</div>
18109 Expansion of multi-line templates in attribute values (T8255 sanity check)
18111 <div style="background:
18114 <div style="background: #00FF00">-</div>
18117 <div style="background:
18122 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18124 <div style="background: #00FF00">-</div>
18126 <div style="background: #00FF00">-</div>
18131 Tags which are hidden from tidiers cannot pass through the Sanitizer
18133 <mw:toc><script>alert();</script></mw:toc>
18135 <p><mw:toc><script>alert();</script></mw:toc>
18140 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18144 Parser hook: empty input
18155 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18158 ## Don't expect parsoid to rt this form.
18160 Parser hook: empty input using terminated empty elements
18162 parsoid=wt2html,html2html
18173 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18177 Parser hook: empty input using terminated empty elements (space before)
18188 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18192 Parser hook: basic input
18203 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18206 ## Don't expect parsoid to rt this form.
18208 Parser hook: case insensitive
18210 parsoid=wt2html,html2html
18221 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18224 ## Don't expect parsoid to rt this form.
18226 Parser hook: case insensitive, redux
18228 parsoid=wt2html,html2html
18239 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18243 Parser hook: nested tags
18245 <tag><tag></tag></tag>
18254 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18258 Parser hook: basic arguments
18260 <tag width="200" height="100" depth="50" square=""></tag>
18273 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18276 ## Don't expect parsoid to rt this form.
18278 Parser hook: basic arguments, variations
18280 parsoid=wt2html,html2html
18282 <tag width=200 height = "100" depth = '50' square></tag>
18295 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18299 Parser hook: argument containing a forward slash (T7344)
18301 <tag filename="/tmp/bla"></tag>
18306 'filename' => '/tmp/bla',
18311 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18314 ## Don't expect parsoid to rt this form.
18316 Parser hook: empty input using terminated empty elements (T4374)
18318 parsoid=wt2html,html2html
18330 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18333 ## </tag> should be output literally since there is no matching tag that begins it
18334 ## Don't expect parsoid to rt this form.
18336 Parser hook: basic arguments using terminated empty elements (T4374)
18340 <tag width=200 height = "100" depth = '50' square/>
18357 <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
18361 ## Don't expect parsoid to rt this form.
18363 Parser hook: Don't allow unclosed extension tags
18369 this is a '''test'''
18371 <p>test <tag>123
18372 </p><p>this is a <b>test</b>
18375 <p>test <tag>123</p>
18377 <p>this is a <b>test</b></p>
18381 Parser hook: horizontal rule inside extension tag that outputs <pre>
18402 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18406 Parser hook: static parser hook not inside a comment
18408 <statictag>hello, world</statictag>
18410 <statictag action="flush" />
18416 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18417 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18421 Parser hook: static parser hook inside a comment
18423 <!-- <statictag>hello, world</statictag> -->
18424 <statictag action="flush" />
18429 <!-- <statictag>hello, world</statictag> -->
18430 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18433 # Nested template calls; this case was broken by Parser.php rev 1.506,
18437 Template:One-parameter
18439 (My parameter is: {{{1}}})
18443 Template:Map-one-parameter
18445 {{{{{1}}}|{{{2}}}}}
18449 Nested template calls
18451 {{Map-one-parameter|One-parameter|param}}
18453 <p>(My parameter is: param)
18462 # Remex wraps empty tag runs with p-tags.
18463 # Parsoid strips them out during p-wrapping.
18465 Sanitizer: Closing of open tags
18467 <s></s><table></table>
18469 <p><s></s></p><table></table>
18471 <s></s><table></table>
18475 Sanitizer: Closing of open but not closed tags
18484 Sanitizer: Closing of closed but not open tags
18490 <p class="mw-empty-elt">
18496 Sanitizer: Closing of closed but not open table tags
18500 Table not started</td></tr></table>
18502 <p>Table not started
18507 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18509 wgFragmentMode=[ 'html5', 'legacy' ]
18511 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18513 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18516 <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>
18520 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18522 wgFragmentMode=[ 'legacy' ]
18524 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18526 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18530 # In HTML5, the restrictions are that id must contain at least one character,
18531 # and must not contain any space characters.
18533 Sanitizer: Validating the contents of the id attribute (T6515)
18537 <br id="" /><br id="a space" />
18542 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18544 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18548 <br id="foo" /><br id="foo" />
18550 Something need to be done. foo-2 ?
18554 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18557 <meta itemprop="hello" content="world">
18558 <meta http-equiv="refresh" content="5">
18559 <meta itemprop="hello" http-equiv="refresh" content="5">
18560 <link itemprop="hello" href="{{SERVER}}">
18561 <link rel="stylesheet" href="{{SERVER}}">
18562 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18566 <p> <meta itemprop="hello" content="world" />
18567 <meta http-equiv="refresh" content="5">
18568 <meta itemprop="hello" content="5" />
18569 <link itemprop="hello" href="http://example.org" />
18570 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18571 <link itemprop="hello" href="http://example.org" />
18578 Sanitizer: Strip comments from CSS attributes
18580 parsoid=wt2html,wt2wt
18582 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18584 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18587 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18591 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18593 [[meatball:Soft"Security]]
18595 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18598 <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>
18602 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18604 [[meatball:Foo<Bar]]
18605 [[meatball:Foo>Bar]]
18606 [[meatball:Foo<bar]]
18607 [[meatball:Foo>bar]]
18609 <p>[[meatball:Foo<Bar]]
18610 [[meatball:Foo>Bar]]
18611 [[meatball:Foo<bar]]
18612 [[meatball:Foo>bar]]
18615 <p>[[meatball:Foo<Bar]]
18616 [[meatball:Foo>Bar]]
18617 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18618 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18622 Language converter: output gets cut off unexpectedly (T7757)
18626 this bit is safe: }-
18628 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18630 then we get cut off here: }-
18632 all additional text is vanished
18634 <p>this bit is safe: }-
18635 </p><p>but if we add a conversion instance: xxx
18636 </p><p>then we get cut off here: }-
18637 </p><p>all additional text is vanished
18640 <p>this bit is safe: }-</p>
18641 <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>
18642 <p>then we get cut off here: }-</p>
18643 <p>all additional text is vanished</p>
18647 Language converter glossary rules inside attributes (T119158)
18649 language=sr variant=sr-el
18651 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18653 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18656 </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>
18659 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18661 <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>
18665 Self closed html pairs (T7487)
18667 <center><font id="bug" />Centered text</center>
18668 <div><font id="bug2" />In div text</div>
18670 <center><font id="bug"></font>Centered text</center>
18671 <div><font id="bug2"></font>In div text</div>
18675 Punctuation: nbsp before exclamation
18679 <p>C'est grave !
18684 Punctuation: CSS !important (T13874)
18686 <div style="width:50% !important">important</div>
18688 <div style="width:50% !important">important</div>
18693 Punctuation: CSS ! important (T13874; with space after)
18695 <div style="width:50% ! important">important</div>
18697 <div style="width:50% ! important">important</div>
18702 HTML bullet list, closed tags (T7497)
18715 <ul data-parsoid='{"stx":"html"}'>
18716 <li data-parsoid='{"stx":"html"}'>One</li>
18717 <li data-parsoid='{"stx":"html"}'>Two</li>
18723 HTML bullet list, unclosed tags (T7497)
18735 <ul data-parsoid='{"stx":"html"}'>
18736 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18737 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18743 HTML ordered list, closed tags (T7497)
18756 <ol data-parsoid='{"stx":"html"}'>
18757 <li data-parsoid='{"stx":"html"}'>One</li>
18758 <li data-parsoid='{"stx":"html"}'>Two</li>
18764 HTML ordered list, unclosed tags (T7497)
18777 <ol data-parsoid='{"stx":"html"}'>
18778 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18779 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18785 HTML nested bullet list, closed tags (T7497)
18808 <ul data-parsoid='{"stx":"html"}'>
18809 <li data-parsoid='{"stx":"html"}'>One</li>
18810 <li data-parsoid='{"stx":"html"}'>Two:
18811 <ul data-parsoid='{"stx":"html"}'>
18812 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18813 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18820 HTML nested bullet list, open tags (T7497)
18842 HTML nested ordered list, closed tags (T7497)
18867 HTML nested ordered list, open tags (T7497)
18904 HTML ordered list item with parameters oddity
18906 <ol><li id="fragment">One</li>
18909 <ol><li id="fragment">One</li>
18914 # parsoid doesn't explicitly mark autonumbered links, see T55505
18916 T7918: autonumbering
18918 [http://first/] [http://second] [ftp://ftp]
18922 [mailto:enclosed@mail.tld With target]
18924 [mailto:enclosed@mail.tld]
18926 mailto:inline@mail.tld
18928 <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>
18929 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18930 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18931 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18932 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18935 <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>
18936 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
18937 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
18938 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
18939 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18944 # Security and HTML correctness
18945 # From Nick Jenkins' fuzz testing
18949 Fuzz testing: Parser13
18963 # Note that Parsoid output differs from the PHP parser here: the PHP
18964 # parser breaks the URL for the magic word, while in Parsoid the URL
18965 # production takes precedence.
18967 Fuzz testing: Parser14
18972 <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>
18973 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18975 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18981 <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>
18982 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18984 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18988 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
18989 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
18993 Fuzz testing: Parser14-table
18995 parsoid=wt2html,html2html
19000 <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>
19001 <table style="__TOC__">
19006 <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>
19007 <table style="__TOC__">
19014 <table style="__TOC__"></table>
19017 # Known to produce bogus xml (extra </td>)
19018 # Don't add the html/php section since it generates broken HTML
19020 Fuzz testing: Parser16
19037 Fuzz testing: Parser21
19040 !irc://{{ftp://a" onmouseover="alert('hello world');"
19045 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19055 Fuzz testing: Parser22
19057 http://===r:::https://b
19061 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19069 # Known to produce bad XML for now
19071 Fuzz testing: Parser24
19078 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19079 <br style="onmouseover='alert(document.cookie);' " />
19081 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19086 <u class="|">}}}} >
19087 <br style="onmouseover='alert(document.cookie);'" />
19089 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19097 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19098 <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>"}'/>}}}} >
19099 <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}'>
19103 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19106 # Note: the current result listed for this is not what the original one was,
19107 # but the original bug was JavaScript injection, which is fixed in any case.
19108 # It's not clear that the original result listed was any more correct than the
19109 # current one. Original result:
19112 # <li class="||">
19113 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19115 Fuzz testing: Parser25 (T8055)
19121 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19123 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19126 <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"]}'>
19127 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19131 Fuzz testing: URL adjacent extension (with space, clean)
19133 http://example.com <nowiki>junk</nowiki>
19135 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19138 <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>
19142 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19144 http://example.com<nowiki>junk</nowiki>
19146 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19149 <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>
19153 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19155 http://example.com<pre>junk</pre>
19157 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19160 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19162 <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>
19166 Fuzz testing: image with bogus manual thumbnail
19168 [[Image:foobar.jpg|thumbnail= ]]
19170 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19173 <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>
19176 # Parsoid will emit the newline literally in wt2wt; see next test case.
19178 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19182 <pre dir=" "></pre>
19184 <pre dir=" "></pre>
19187 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19188 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19192 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19196 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19197 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19207 Templates in extension attributes are not expanded
19209 <pre dir="{{echo|ltr}}"></pre>
19211 <pre dir="{{echo|ltr}}"></pre>
19214 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19218 Parsing optional HTML elements (T8171)
19223 <td> Some tabular data</td>
19224 <td> More tabular data ...
19225 <td> And yet som tabular data</td>
19231 <td> Some tabular data</td>
19232 <td> More tabular data ...
19233 </td><td> And yet som tabular data</td>
19240 Correct handling of <td>, <tr> (T8171)
19245 <td> Some tabular data</td>
19246 <td> More tabular data ...</td>
19247 <td> And yet som tabular data</td>
19253 <td> Some tabular data</td>
19254 <td> More tabular data ...</td>
19255 <td> And yet som tabular data</td>
19263 Parsing crashing regression (fr:JavaScript)
19267 <p></body></x>
19272 Inline wiki vs wiki block nesting
19278 <p><b>Bold paragraph</b>
19279 </p><p>New wiki paragraph
19283 # FIXME: The current php output is documented
19284 # and desired output is the parsoid target.
19286 Inline HTML vs wiki block nesting
19292 <p><b>Bold paragraph
19293 </p><p>New wiki paragraph</b>
19296 <p><b>Bold paragraph</b>
19297 </p><p>New wiki paragraph
19301 # Original result was this:
19302 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19304 # While that might be marginally more intuitive, maybe, the six-apostrophe
19305 # construct is clearly pathological and the result stated here (which is what
19306 # the parser actually does) is about as reasonable as anything.
19308 Mixing markup for italics and bold
19311 '''bold''''''bold''bolditalics'''''
19313 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19321 Article for special page transclusion test
19325 Special page transclusion
19328 {{Special:Prefixindex/Xyzzyx}}
19330 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19336 Special page transclusion twice (T7021)
19339 {{Special:Prefixindex/Xyzzyx}}
19340 {{Special:Prefixindex/Xyzzyx}}
19342 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19344 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19350 Transclusion of default MediaWiki message
19352 {{MediaWiki:Mainpage}}
19359 Transclusion of nonexistent MediaWiki message
19361 {{MediaWiki:Mainpagexxx}}
19363 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19368 Transclusion of MediaWiki message with underscore
19370 {{MediaWiki:history_short}}
19377 Transclusion of MediaWiki message with space
19379 {{MediaWiki:history short}}
19386 Invalid header with following text
19396 Section extraction test (section 0)
19416 Section extraction test (section 1)
19438 Section extraction test (section 2)
19459 Section extraction test (section 3)
19479 Section extraction test (section 4)
19503 Section extraction test (section 5)
19523 Section extraction test (section 6)
19544 Section extraction test (section 7)
19564 Section extraction test (section 8)
19584 Section extraction test (section 9)
19605 Section extraction test (section 10)
19625 Section extraction test (nonexistent section 11)
19644 Section extraction test with bogus heading (section 1)
19649 ==bogus== not a legal section
19653 ==bogus== not a legal section
19657 Section extraction test with bogus heading (section 2)
19662 ==bogus== not a legal section
19669 Section extraction test with comment after heading (section 1)
19681 Section extraction test with comment after heading (section 2)
19693 Section extraction test with bogus <nowiki> heading (section 1)
19698 ==bogus== <nowiki>not a legal section</nowiki>
19702 ==bogus== <nowiki>not a legal section</nowiki>
19706 Section extraction test with bogus <nowiki> heading (section 2)
19711 ==bogus== <nowiki>not a legal section</nowiki>
19717 # Formerly testing for T4587, now resolved by the use of unmarked sections
19718 # instead of respecting commented sections
19720 Section extraction prefixed by comment (section 1)
19731 Section extraction prefixed by comment (section 2)
19741 # Formerly testing for T4607, now resolved by the use of unmarked sections
19742 # instead of respecting HTML-style headings
19744 Section extraction, mixed wiki and html (section 1)
19760 Section extraction, mixed wiki and html (section 2)
19776 # Formerly testing for T5342
19778 Section extraction, heading surrounded by <noinclude>
19782 <noinclude>==unmarked==</noinclude>
19788 # Test behavior of T21910
19790 Sectiion with all-equals
19795 The line above must have a trailing space
19798 But just in case it doesn't...
19802 But just in case it doesn't...
19806 Section replacement test (section 0)
19837 Section replacement test (section 1)
19866 Section replacement test (section 2)
19896 Section replacement test (section 3)
19927 Section replacement test (section 4)
19954 Section replacement test (section 5)
19985 Section replacement test (section 6)
20015 Section replacement test (section 7)
20046 Section replacement test (section 8)
20077 Section replacement test (section 9)
20106 Section replacement test (section 10)
20136 Section replacement test with initial whitespace (T15728)
20140 Preformatted initial line
20144 Preformatted initial line
20151 Section extraction, heading followed by pre with 20 spaces (T8398)
20163 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20176 Section extraction, <pre> around bogus header (T12309)
20193 Section replacement, <pre> around bogus header (T12309)
20214 Handling of 
 in URLs
20218 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20221 <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>
20225 Handling of %0A in URLs
20229 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20232 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20235 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20237 5 quotes, code coverage +1 line
20247 # same html as previous, but wikitext adjusted to match parsoid html2wt
20248 # note that wt2html and html2html will put the <i> before the <b>
20250 5 quotes, code coverage +1 line w/ nowiki (1)
20252 parsoid=wt2wt,html2wt
20254 '''''<nowiki/>'''''
20259 <p><b><i></i></b></p>
20262 # same as previous, just swapping the <i> and <b>
20264 5 quotes, code coverage +1 line w/ nowiki (2)
20266 '''''<nowiki/>'''''
20271 <p><i><b></b></i></p>
20275 Special:Search page linking.
20279 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20284 {{!}} is a magic word
20286 {{!}} is a magic word there and {{!}} is still a magic word here
20287 | is not a magic word here but {{!}} is still a magic word here
20289 <p>| is a magic word there and | is still a magic word here
20290 | is not a magic word here but | is still a magic word here
20293 <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
20294 | 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>
20300 title=[[Parser test]]
20314 *{{SUBJECTPAGENAME}}
20315 *{{SUBJECTPAGENAMEE}}
20318 *{{NAMESPACENUMBER}}
20323 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20325 <ul><li>Parser test</li>
20326 <li>Parser_test</li>
20327 <li>Parser test</li>
20328 <li>Parser_test</li>
20329 <li>Parser test</li>
20330 <li>Parser_test</li>
20331 <li>Parser test</li>
20332 <li>Parser_test</li>
20333 <li>Parser test</li>
20334 <li>Parser_test</li>
20335 <li>Talk:Parser test</li>
20336 <li>Talk:Parser_test</li>
20337 <li>Parser test</li>
20338 <li>Parser_test</li>
20346 <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>
20349 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20352 Gallery with valid attributes
20354 <gallery type="123" summary="345">
20355 File:File:Foobar.jpg
20358 <ul class="gallery mw-gallery-traditional" type="123">
20359 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20360 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20361 <div class="gallerytext">
20367 <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"}}'>
20368 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20372 ## Parsoid thinks the "centre" here is a property, not a caption.
20377 "modes": ["wt2html"],
20378 "nativeGallery": true
20386 image4 |300px| centre
20387 image5.svg| http://///////
20392 <ul class="gallery mw-gallery-traditional">
20393 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20394 <div class="thumb" style="height: 150px;">Image1.png</div>
20395 <div class="gallerytext">
20398 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20399 <div class="thumb" style="height: 150px;">Image2.gif</div>
20400 <div class="gallerytext">
20403 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20404 <div class="thumb" style="height: 150px;">Image3</div>
20405 <div class="gallerytext">
20408 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20409 <div class="thumb" style="height: 150px;">Image4</div>
20410 <div class="gallerytext">
20415 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20416 <div class="thumb" style="height: 150px;">Image5.svg</div>
20417 <div class="gallerytext">
20418 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20422 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20423 <div class="thumb" style="height: 150px;">* image6</div>
20424 <div class="gallerytext">
20430 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20431 <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>
20432 <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>
20433 <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>
20434 <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>
20435 <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>
20436 <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>
20441 Gallery (with options, html)
20444 "modes": ["wt2html", "html2html"],
20445 "nativeGallery": true
20448 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20449 File:Nonexistent.jpg|caption
20450 File:Nonexistent.jpg
20451 image:foobar.jpg|some '''caption''' [[Main Page]]
20453 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20456 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20457 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20458 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20459 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20460 <div class="gallerytext">
20465 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20466 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20467 <div class="gallerytext">
20470 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20471 <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>
20472 <div class="gallerytext">
20473 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20477 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20478 <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>
20479 <div class="gallerytext">
20482 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20483 <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>
20484 <div class="gallerytext">
20492 <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":{}}'>
20493 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20494 <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>
20495 <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>
20496 <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>
20497 <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>
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 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>
20503 Gallery (with options, extsrc)
20506 "nativeGallery": false
20509 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20510 File:Nonexistent.jpg|caption
20511 File:Nonexistent.jpg
20512 image:foobar.jpg|some '''caption''' [[Main Page]]
20514 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20517 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20518 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20519 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20520 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20521 <div class="gallerytext">
20526 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20527 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20528 <div class="gallerytext">
20531 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20532 <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>
20533 <div class="gallerytext">
20534 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20538 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20539 <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>
20540 <div class="gallerytext">
20543 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20544 <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>
20545 <div class="gallerytext">
20553 <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"}}'>
20554 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20555 <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>
20556 <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>
20557 <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>
20558 <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>
20559 <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>
20564 Gallery (without px units)
20566 <gallery widths="70" heights="40">
20570 <ul class="gallery mw-gallery-traditional">
20571 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20572 <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>
20573 <div class="gallerytext">
20579 <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"}}'>
20580 <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>
20585 Gallery (with invalid units)
20587 <gallery widths="70em" heights="40em">
20591 <ul class="gallery mw-gallery-traditional">
20592 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20593 <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>
20594 <div class="gallerytext">
20600 <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"}}'>
20601 <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>
20606 Gallery with link that has fragment
20609 "modes": ["wt2html", "html2html"],
20610 "nativeGallery": true
20614 image:foobar.jpg|link=Main_Page
20615 image:foobar.jpg|link=Main_Page#section
20616 image:foobar.jpg|link=Main Page#section|caption
20619 <ul class="gallery mw-gallery-traditional">
20620 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20621 <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>
20622 <div class="gallerytext">
20625 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20626 <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>
20627 <div class="gallerytext">
20630 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20631 <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>
20632 <div class="gallerytext">
20640 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20641 <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>
20642 <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>
20643 <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>
20647 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20649 Gallery with template inside caption
20652 "nativeGallery": true
20655 <gallery caption="{{echo|hi}}">
20656 File:Foobar.jpg|{{echo|ho}}
20659 <ul class="gallery mw-gallery-traditional">
20660 <li class='gallerycaption'>{{echo|hi}}</li>
20661 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20662 <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>
20663 <div class="gallerytext">
20671 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20672 <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>
20673 <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>
20678 Gallery with wikitext inside caption
20681 "nativeGallery": true
20685 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20686 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20689 <ul class="gallery mw-gallery-traditional">
20690 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20691 <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>
20692 <div class="gallerytext">
20693 <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>
20697 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20698 <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>
20699 <div class="gallerytext">
20700 <p>This is a test template
20707 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20708 <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>
20709 <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>
20714 Gallery (with showfilename option)
20717 "nativeGallery": true
20720 <gallery showfilename="">
20721 File:Nonexistent.jpg|caption
20722 File:Nonexistent.jpg
20723 File:Foobar.jpg|some '''caption''' [[Main Page]]
20727 <ul class="gallery mw-gallery-traditional">
20728 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20729 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20730 <div class="gallerytext">
20731 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20736 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20737 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20738 <div class="gallerytext">
20739 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20743 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20744 <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>
20745 <div class="gallerytext">
20746 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20747 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20751 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20752 <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>
20753 <div class="gallerytext">
20754 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20761 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20762 <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>
20763 <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>
20764 <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>
20765 <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>
20769 ## Should Parsoid be preserving these variations? See T151367
20771 Gallery (with namespace-less filenames)
20774 "modes": ["wt2html", "html2html"],
20775 "nativeGallery": true
20779 File:Nonexistent.jpg
20785 <ul class="gallery mw-gallery-traditional">
20786 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20787 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20788 <div class="gallerytext">
20791 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20792 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20793 <div class="gallerytext">
20796 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20797 <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>
20798 <div class="gallerytext">
20801 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20802 <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>
20803 <div class="gallerytext">
20809 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20810 <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>
20811 <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>
20812 <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>
20813 <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>
20818 Gallery override link with wikilink (T36852)
20821 "nativeGallery": true
20825 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20828 <ul class="gallery mw-gallery-traditional">
20829 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20830 <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>
20831 <div class="gallerytext">
20837 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20838 <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>
20843 Gallery override link with absolute external link (T36852)
20846 "nativeGallery": true
20850 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20853 <ul class="gallery mw-gallery-traditional">
20854 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20855 <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>
20856 <div class="gallerytext">
20862 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20863 <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>
20868 Gallery override link with absolute external link with LanguageConverter
20873 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20876 <ul class="gallery mw-gallery-traditional">
20877 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20878 <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>
20879 <div class="gallerytext">
20887 <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"}}'>
20888 <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>
20893 Gallery override link with malicious javascript (T36852)
20896 "modes": ["wt2html", "html2html"],
20897 "nativeGallery": true
20901 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20904 <ul class="gallery mw-gallery-traditional">
20905 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20906 <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>
20907 <div class="gallerytext">
20913 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20914 <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>
20918 # Note that parsoid uses the invalid link as a caption, PHP does not.
20920 Gallery with invalid title as link (T45964)
20923 "modes": ["wt2html", "html2html"],
20924 "nativeGallery": true
20928 File:Foobar.jpg|link=<
20931 <ul class="gallery mw-gallery-traditional">
20932 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20933 <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>
20934 <div class="gallerytext">
20940 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20941 <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>
20946 Serialize gallery without attrs in data-mw
20949 "modes": ["html2wt"],
20950 "nativeGallery": true
20953 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20954 <li class="gallerycaption">123</li>
20955 <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>
20958 <gallery caption="123">
20964 Gallery with class and style attributes
20967 "nativeGallery": true
20970 <gallery class="center" style="text-align: center;">
20974 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20975 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20976 <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>
20977 <div class="gallerytext">
20983 <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":{}}'>
20984 <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>
20989 Gallery in slideshow mode
20992 "nativeGallery": true
20995 <gallery mode="slideshow" showthumbnails="">
20999 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21000 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21001 <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>
21002 <div class="gallerytext">
21008 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21009 <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>
21014 HTML Hex character encoding (spells the word "JavaScript")
21016 parsoid=wt2html,wt2wt,html2html
21018 JavaScript
21020 <p>JavaScript
21023 <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>
21027 HTML Hex character encoding bogus encoding (T28437 regression check)
21031 <p>&#xsee;&#XSEE;
21036 HTML Hex character encoding mixed case
21038 parsoid=wt2html,wt2wt,html2html
21045 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21048 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21049 # Note that U+000C (form feed) is not a valid XML character, so
21050 # it is banned even though allowed in HTML5.
21052 Illegal character references (T106578)
21057 ; Control (low): 
21058 ; Control (high):  Ÿ
21059 ; Surrogate: ��
21060 ; This is an okay astral character: 💩
21068 <dt>Control (low)</dt>
21070 <dt>Control (high)</dt>
21071 <dd>&#x7F; &#x9F;</dd>
21073 <dd>&#xD83D;&#xDCA9;</dd>
21074 <dt>This is an okay astral character</dt>
21075 <dd>💩</dd></dl>
21079 __FORCETOC__ override
21091 ISBN 978-0-1234-56 789
21093 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21096 <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>
21100 ISBN followed by 5 spaces
21111 ISBN ISBN 1234567890
21113 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21116 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21119 # Uppercase X and lowercase x as well
21130 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21131 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21132 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21133 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21134 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21135 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21138 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21139 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21140 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21141 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21142 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21143 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21147 ISBN with empty prefix (parsoid test)
21151 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21154 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21158 T24905: <abbr> followed by ISBN followed by </a>
21160 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21162 <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>
21165 <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>
21173 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21178 Double RFC with a wiki link
21182 <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>
21191 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21194 <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>
21198 Centre-aligned image
21200 [[Image:foobar.jpg|centre]]
21202 <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>
21205 <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>
21211 [[Image:foobar.jpg|none]]
21213 <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>
21216 <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>
21220 Width + Height sized image (using px) (height is ignored)
21222 [[Image:foobar.jpg|640x480px]]
21224 <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>
21227 <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>
21231 Width-sized image (using px, no following whitespace)
21233 [[Image:foobar.jpg|640px]]
21235 <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>
21238 <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>
21242 Width-sized image (using px, with following whitespace - test regression from r39467)
21244 [[Image:foobar.jpg|640px ]]
21246 <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>
21249 <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>
21253 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21255 [[Image:foobar.jpg| 640px]]
21257 <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>
21260 <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>
21264 Image with page parameter
21268 [[File:LoremIpsum.djvu|page=2]]
21270 <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>
21273 <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>
21277 Another italics / bold test
21285 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21291 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21294 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21298 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21300 Images with the "|" character in the comment
21302 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21304 <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>
21307 <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>
21311 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21313 <html><script>alert(1);</script></html>
21315 <p><html><script>alert(1);</script></html>
21320 HTML with raw HTML ($wgRawHtml==true)
21324 <html><script>alert(1);</script></html>
21326 <p><script>alert(1);</script>
21331 Parents of subpages, one level up
21333 subpage title=[[Subpage test/L1/L2/L3]]
21337 <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>
21343 Parents of subpages, one level up, not named
21345 subpage title=[[Subpage test/L1/L2/L3]]
21349 <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>
21356 Parents of subpages, two levels up
21358 subpage title=[[Subpage test/L1/L2/L3]]
21364 <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
21365 </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>
21370 Parents of subpages, two levels up, without trailing slash or name.
21372 subpage title=[[Subpage test/L1/L2/L3]]
21381 Parents of subpages, two levels up, with lots of extra trailing slashes.
21383 subpage title=[[Subpage test/L1/L2/L3]]
21387 <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>
21392 Subpage test/L1/L2/L3Sibling
21398 Transclusion of a sibling page (one level up)
21400 subpage title=[[Subpage test/L1/L2/L3]]
21409 Transclusion of a child page
21411 subpage title=[[Subpage test/L1/L2]]
21419 # This is wt2html only in Parsoid because we add <nowiki>
21420 # because of {{..}} and we don't expect to fix that to
21421 # eliminate the nowikis selective for {{..}} markup.
21423 Non-transclusion because of too many up levels
21425 subpage title=[[Subpage test/L1/L2/L3]]
21428 {{../../../../More than parent}}
21430 <p>{{../../../../More than parent}}
21433 <p>{{../../../../More than parent}}</p>
21437 Definition list code coverage
21443 <dl><dt>title  </dt>
21445 <dt>title </dt>
21451 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21452 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21453 <dt>title</dt><dd> def</dd></dl>
21457 Don't fall for the self-closing div
21459 <div>hello world</div/>
21461 <div>hello world</div>
21470 <p>[[:Template:Msg]]
21479 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21483 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21485 Always escape literal '>' in output, not just after '<'
21499 <p>This is a test template
21500 This is a test template
21512 Inclusion of !userCanEdit() content
21516 <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>
21522 Out-of-order TOC heading levels
21531 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21533 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21535 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21536 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21539 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21541 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21542 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21548 <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>
21549 <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>
21550 <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>
21551 <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>
21552 <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>
21553 <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>
21559 ISBN with a dummy number
21569 ISBN with space-delimited number
21573 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21576 <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>
21581 ISBN with multiple spaces, no number
21600 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21601 </p><p>ISBN 12345678901
21604 <p>ISBN 123456789</p>
21606 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21608 <p>ISBN 12345678901</p>
21613 ISBN with trailing year (T9110)
21615 ISBN 1-234-56789-0 - 2006
21617 ISBN 1 234 56789 0 - 2006
21619 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21620 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21623 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21625 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21632 wgFragmentMode=[ 'html5', 'legacy' ]
21634 {{anchorencode:foo bar©#%n}}
21639 <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>
21643 anchorencode (legacy)
21645 wgFragmentMode=[ 'legacy' ]
21647 {{anchorencode:foo bar©#%n}}
21649 <p>foo_bar.C2.A9.23.25n
21654 anchorencode trims spaces
21656 wgFragmentMode=[ 'html5', 'legacy' ]
21658 {{anchorencode: __pretty__please__}}
21663 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21667 anchorencode deals with links
21669 wgFragmentMode=[ 'html5', 'legacy' ]
21671 {{anchorencode: [[hello|world]] [[hi]]}}
21676 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21680 anchorencode deals with templates
21682 wgFragmentMode=[ 'html5', 'legacy' ]
21684 {{anchorencode: {{Foo}} x}}
21689 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21693 anchorencode encodes like the TOC generator: (T20431)
21695 wgFragmentMode=[ 'html5', 'legacy' ]
21697 ===_ +:.3A%3A _ &&]] x===
21698 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21701 <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>
21702 <p>+:.3A%3A_&&]]_x
21705 <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>
21706 <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>
21707 <meta property="mw:PageProp/noeditsection"/>
21711 anchorencode encodes like the TOC generator: (T20431) (legacy)
21713 wgFragmentMode=[ 'legacy' ]
21715 ===_ +:.3A%3A&&]]===
21716 {{anchorencode: _ +:.3A%3A&&]] }}
21719 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21720 <p>.2B:.3A.253A.26.26.5D.5D
21725 T8200: blockquotes and paragraph formatting
21746 T10293: Use of center tag ruins paragraph formatting
21767 Parsing of overlapping (improperly nested) inline html tags
21769 <span><s>x</span></s>
21771 <p><span><s>x</span></s></span>
21774 <p><span><s>x</s></span>
21779 ### Language variants related tests
21782 # Parsoid does not mark self-links.
21783 # Parsoid does not convert links; PHP will do any necessary redirects.
21786 Self-link in language variants
21788 title=[[Dunav]] language=sr
21790 Both [[Dunav]] and [[Дунав]] are names for this river.
21792 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21795 <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>
21805 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21807 title=[[Duna]] language=sr
21809 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21811 <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.
21814 <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>
21818 Link to a section of a variant of this title shouldn't be parsed as self-link
21820 title=[[Duna]] language=sr
21822 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21824 <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.
21827 <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>
21831 Link to pages in language variants
21835 Main Page can be written as [[Маин Паге]]
21837 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21840 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21845 Multiple links to pages in language variants
21849 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21851 <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>.
21854 <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>
21859 Simple template in language variants
21865 <p>This is a test template
21871 Template with explicit namespace in language variants
21877 <p>This is a test template
21883 Basic test for template parameter in language variants
21887 {{парамтест|param=foo}}
21889 <p>This is a test template with parameter foo
21894 Simple category in language variants
21898 [[Category:МедиаWики Усер'с Гуиде]]
21900 cat=МедиаWики_Усер'с_Гуиде sort=
21902 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21917 ## We used to, but no longer wt2wt this test since the default serializer
21918 ## will normalize all categories to serialize on their own line.
21919 ## This wikitext usage is going to be fairly uncommon in production and
21920 ## selser will take care of preserving formatting in those scenarios.
21922 Don't convert blue categorylinks to another variant (T35210)
21928 [[A]][[Category:分类]]
21932 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21933 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21937 Stripping -{}- tags (language variants)
21941 Latin proverb: -{Ne nuntium necare}-
21943 <p>Latin proverb: Ne nuntium necare
21946 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21951 Prevent conversion with -{}- tags (language variants)
21953 language=sr variant=sr-ec
21955 Latinski: -{Ne nuntium necare}-
21957 <p>Латински: Ne nuntium necare
21960 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21965 Prevent conversion of text with -{}- tags (language variants)
21967 language=sr variant=sr-ec
21969 Latinski: -{Ne nuntium necare}-
21971 <p>Латински: Ne nuntium necare
21974 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21979 Prevent conversion of links with -{}- tags (language variants)
21981 language=sr variant=sr-ec
21985 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21988 <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>
21993 -{}- tags within headlines (within html for parserConvert())
21995 wgFragmentMode=[ 'html5', 'legacy' ]
21997 language=sr variant=sr-ec
22001 Note that even an unprotected headline ID is not affected by language
22006 <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>
22007 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22010 <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>
22013 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22015 <p>Note that even an unprotected headline ID is not affected by language
22018 <h2 id="Latinski">Latinski</h2>
22022 Explicit definition of language variant alternatives
22024 language=zh variant=zh-tw
22026 -{zh:China;zh-tw:Taiwan}-, not China
22028 <p>Taiwan, not China
22031 <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>
22035 Filter syntax for language variants
22037 language=zh variant=zh-tw
22039 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22041 <p>fooblog, WEBJOURNAL, WEBLOGquux
22044 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22047 # Note that Parsoid post-processing for language variants needs to
22048 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22050 Conversion around HTML tags
22052 language=sr variant=sr-ec
22054 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22055 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22058 <span title="ЛаCтин">ски</span>
22061 <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"}]}'/>
22062 <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>
22066 Explicit session-wise two-way language variant mapping (A flag and - flag)
22068 language=zh variant=zh-tw
22070 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22072 Taiwan is not China.
22074 But -{A|zh:China; zh-tw:Taiwan}- is China,
22076 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22078 and -{China}- is China.
22080 <p>This is Taiwan, but we'll forget that now.
22081 </p><p>Taiwan is not China.
22082 </p><p>But Taiwan is Taiwan,
22083 </p><p>(This should be stripped!)
22084 </p><p>and China is China.
22087 <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>
22088 <p>Taiwan is not China.</p>
22089 <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>
22090 <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>
22091 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22095 Explicit session-wise one-way language variant mapping (A flag and - flag)
22097 language=zh variant=zh-tw
22099 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22101 COUNTRY is China or Taiwan.
22103 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22105 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22107 and -{COUNTRY}- is COUNTRY.
22109 <p>This is Taiwan, but we'll forget that now.
22110 </p><p>COUNTRY is China or Taiwan.
22111 </p><p>But Taiwan is Taiwan,
22112 </p><p>(This should be stripped!)
22113 </p><p>and COUNTRY is COUNTRY.
22116 <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>
22117 <p>COUNTRY is China or Taiwan.</p>
22118 <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>
22119 <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>
22120 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22124 Explicit session-wise two-way language variant mapping (H flag for hide)
22126 language=zh variant=zh-tw
22128 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22132 <p>(This should be stripped!)
22133 </p><p>Taiwan is Taiwan.
22136 <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>
22137 <p>Taiwan is China.</p>
22141 Explicit session-wise one-way language variant mapping (H flag for hide)
22143 language=zh variant=zh-tw
22145 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22147 COUNTRY is Taiwan or China.
22149 <p>(This should be stripped!)
22150 </p><p>Taiwan is Taiwan or China.
22153 <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>
22154 <p>COUNTRY is Taiwan or China.</p>
22157 ## Note that parsoid test runner does not support 'showtitle' option.
22159 Adding explicit conversion rule for title (T flag)
22161 language=zh variant=zh-tw showtitle
22163 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22168 <p>Should be stripped!
22169 </p><p>Taiwan is China.
22172 <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>
22173 <p>Taiwan is China.</p>
22177 Code coverage: T combined with H flag
22179 language=zh variant=zh-tw showtitle
22181 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22186 <p>Should be stripped!
22187 </p><p>Taiwan is Taiwan.
22190 <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>
22191 <p>Taiwan is China.</p>
22195 Code coverage: T with no variants
22197 language=zh variant=zh-tw showtitle
22199 -{H|zh:China; zh-tw:Taiwan}-
22200 Taiwan is China.-{T|Taiwan is China}-
22207 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22208 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22212 Code coverage: rules with no variants
22214 language=zh variant=zh-tw
22216 -{H|zh:China; zh-tw:Taiwan}-
22227 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22229 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22230 Taiwan is China.</p>
22235 Code coverage: D flag for conversion rule
22237 language=zh variant=zh-tw
22239 -{D|zh-cn:XA; zh-tw:YA}-
22240 -{A;D|zh-cn:XB; zh-tw:YB}-
22241 -{D;H|zh-cn:XC; zh-tw:YC}-
22243 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22249 XA XB XC YA YB YC FOO BAR BAT 012345
22254 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22258 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22261 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22262 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22263 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22264 <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>
22265 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22266 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22267 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22268 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22272 Code coverage: N flag for conversion rule
22274 language=zh variant=zh-cn
22284 </p><p>српски (ћирилица)
22287 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22288 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22289 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22292 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22294 Code coverage: N flag for conversion rule (wt2html only)
22296 language=zh variant=zh-cn
22297 parsoid=wt2html,html2html
22304 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22308 Testing that changing the language variant here in the tests actually works
22310 language=zh variant=zh showtitle
22312 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22315 <p>Should be stripped!
22318 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22322 Recursive conversion of alt and title attrs shouldn't clear converter state
22324 language=zh variant=zh-cn
22327 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22328 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22332 Should be stripped<span title="Exclamation">!</span>
22335 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22336 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>
22340 T26072: more test on conversion rule for title
22342 language=zh variant=zh-tw showtitle
22344 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22346 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22349 <p>This should be stripped!
22350 </p><p>This won't take interferes with the title rule.
22353 <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>
22354 <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>
22358 Partly disable title conversion if variant == main language code
22360 language=zh variant=zh title=[[ZH]] showtitle
22362 -{T|zh-cn:CN;zh-tw:TW}-
22368 <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>
22372 Partly disable title conversion if variant == main language code, more
22374 language=zh variant=zh title=[[ZH]] showtitle
22382 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22386 Raw output of variant escape tags (R flag)
22388 language=zh variant=zh-tw
22390 Raw: -{R|zh:China;zh-tw:Taiwan}-
22392 <p>Raw: zh:China;zh-tw:Taiwan
22395 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22398 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22400 Raw output of variant escape tags (R flag) (wt2html only)
22402 language=zh variant=zh-tw
22403 parsoid=wt2html,html2html
22405 -{Variant}- -{D|syntax}- -{D;R|options}-
22407 <p>Variant syntax options
22410 <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>
22414 Nested markup inside raw output of variant escape tags (R flag)
22416 language=zh variant=zh-tw
22418 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22420 <p>Nested raw: nested Taiwan nested
22423 <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>
22427 Nested markup and spaces inside raw output of variant escape tags (R flag)
22429 language=zh variant=zh-tw
22431 X-{ outer -{ inner }- outer }-X
22433 <p>X outer inner outer X
22436 <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>
22440 Templates inside raw output of variant escape tags (R flag)
22442 language=zh variant=zh-tw
22444 Nested raw: -{R|nested {{echo|hi}} templates}-
22446 <p>Nested raw: nested hi templates
22449 <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>
22453 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22455 language=zh variant=zh-cn
22457 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22462 <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>
22466 Conversion rules from [numeric-only string] to [something else] (T48634)
22468 language=zh variant=zh-cn
22470 -{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
22475 <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>
22479 Two-way converter rule entries with an empty value should be ignored (T53551)
22481 language=zh variant=zh-cn
22483 -{H|zh-cn:foo;zh-tw:;}-foobar
22488 <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>
22492 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22494 language=zh variant=zh-cn
22496 -{H|=>zh-cn:foo;}-foobar
22501 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22505 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22507 language=zh variant=zh-cn
22514 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22518 Nested using of manual convert syntax
22520 language=zh variant=zh-hk
22522 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22524 <p>Nested: Hello Hong Kong!
22527 <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>
22531 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22533 language=zh variant=zh-cn
22535 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22537 <p><span title="X">A</span>
22540 <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>
22544 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22546 language=zh variant=zh-cn
22548 -{<span title="-{X}-">A</span>}-
22549 !! html/php+disabled
22550 <p><span title="X">A</span>
22553 <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>
22556 # Parsoid and PHP disagree on how to parse this example: Parsoid
22557 # insists that the content of a language converter element be a valid
22558 # DOM fragment or attribute string
22560 Language converter markup with block content
22562 language=zh variant=zh-cn
22564 <span>a-{b<div>c}-d
22566 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22568 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22573 </span></div></span></div></span>
22575 <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>
22577 <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>
22579 <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>
22583 LanguageConverter selser (1)
22585 language=zh variant=zh-cn
22587 "modes": ["wt2wt", "selser"],
22589 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22599 LanguageConverter selser (2)
22601 language=zh variant=zh-cn
22603 "modes": ["wt2wt", "selser"],
22605 ["span[class='x']", "contents", "text", "-{foo}-"],
22606 ["a", "contents", "text", "-{"],
22607 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22611 <span class="x">TEXT1</span>
22612 [http://example.com TEXT2]
22616 <span class="x"><nowiki>-{foo}-</nowiki></span>
22617 [http://example.com -{]
22618 [[Foo|<nowiki>-{</nowiki>]]
22619 {{1x|<nowiki>-{</nowiki>}}
22622 # Tests LanguageVariantText in ConstrainedText
22624 LanguageConverter selser (3)
22626 language=zh variant=zh-cn
22628 "modes": ["wt2wt", "selser"],
22630 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22631 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22642 |<nowiki/>-{edited}-
22646 # Tests LanguageVariantText._fromSelSer
22648 LanguageConverter selser (4)
22650 language=zh variant=zh-cn
22652 "modes": ["wt2wt", "selser"],
22654 ["td > span.x", "remove"]
22660 |<span class="x">Foo</span>-{Bar}-
22661 ||<span class="x">Foo</span>-{Bar}-
22671 # Since Parsoid is starting to emit canonical wikitext for links,
22672 # [http://example.com http://example.com] will not RT back to that
22674 # Parsoid does not language-convert links (it is done in a
22675 # post-processing step)
22677 Proper conversion of text in external links
22679 language=sr variant=sr-ec
22682 http://www.google.com
22683 gopher://www.google.com
22684 [http://www.google.com http://www.google.com]
22685 [gopher://www.google.com gopher://www.google.com]
22686 [https://www.google.com irc://www.google.com]
22687 [ftp://www.google.com www.google.com/ftp://dir]
22688 [//www.google.com www.google.com]
22690 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22691 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22692 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22693 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22694 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22695 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22696 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22699 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22700 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22701 <a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22702 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22703 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22704 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22705 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22709 Do not convert roman numbers to language variants
22711 language=sr variant=sr-ec
22715 <p>Фридрих IV је цар.
22718 <p>Fridrih IV je car.</p>
22722 Unclosed language converter markup "-{"
22733 Don't convert raw rule "-{R|=>}-" to "=>"
22742 <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>
22746 Don't break link parsing if language converter markup is in the caption.
22748 language=sr variant=sr-ec
22750 [[Main Page|-{R|main page}-]]
22752 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22755 <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>
22759 T146304: Don't break template parsing if language converter markup is in the parameter.
22761 language=sr variant=sr-ec
22768 <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>
22772 T146305: Don't break image parsing if language converter markup is in the caption.
22776 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22778 <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>
22781 <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>
22785 T146305: Don't break image parsing if nested language converter markup is in the caption.
22787 language=zh variant=zh-cn
22789 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22791 <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>
22794 <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>
22797 # XXX html2wt disabled because rich markup in alt is not preserved.
22799 Don't break gallery if language converter markup is inside.
22804 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22805 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22808 <ul class="gallery mw-gallery-traditional">
22809 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22810 <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>
22811 <div class="gallerytext">
22812 <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>
22816 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22817 <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>
22818 <div class="gallerytext">
22819 <p>This is a test template
22826 <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"}}'>
22827 <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>
22828 <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>
22833 T153135: Don't break list handling if language converter markup is in the item.
22835 language=zh variant=zh-cn
22837 ;-{zh-cn:AAA;zh-tw:BBB}-
22841 <dt>foo:bar</dt></dl>
22844 <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>
22845 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22849 // Note that parsoid does not protect colons unless language converter
22850 // markup is properly nested, because it is a backtracking parser.
22852 T153135: Unclosed markup in definition list (code coverage)
22854 language=zh variant=zh-cn
22859 <dl><dt><b>foo:bar</b></dt><b>
22860 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22863 <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}'>
22864 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22865 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22870 T153135: Nested language converter markup in definition list (code coverage)
22872 language=zh variant=zh-cn
22874 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22876 <dl><dt>AAA foo:bar bat:baz</dt>
22880 <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>
22881 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22885 # html2wt mode disabled due to <nowiki> insertion.
22887 T153140: Don't break table handling if language converter markup is in the cell.
22889 language=sr variant=sr-ec
22890 parsoid=wt2html,wt2wt,html2html
22907 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22914 Language converter tricky html2wt cases (1)
22917 parsoid=html2wt,wt2wt
22919 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22921 -{<nowiki>}-</nowiki>}-
22928 Language converter tricky html2wt cases (2)
22931 parsoid=html2wt,wt2wt
22935 <nowiki>-{foo}-</nowiki>
22937 <p>-{foo}-
22942 Language converter tricky html2wt cases (3)
22945 parsoid=html2wt,wt2wt
22947 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22948 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22949 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22955 -{<nowiki>-{foo}-</nowiki>}-
22959 </p><p>-{foo}-
22964 Language converter tricky html2wt cases (4)
22967 parsoid=html2wt,wt2wt
22969 <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>
22977 # Note that the <nowiki> escaping added by parsoid for source text,
22978 # destination text, and language names only works on the PHP side
22979 # for *destination text*. (HTML entity escaping wouldn't work
22980 # any better.) This is probably a bug, at least for source texts.
22981 # (For language names PHP uses a precise regexp based on the languages
22982 # it currently knows have variants, which is fragile since this set
22983 # can grow/shrink over time.)
22985 Language converter tricky html2wt cases (5)
22987 language=zh variant=zh-cn
22989 <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>
22990 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22991 <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>
22992 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22995 -{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
22997 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22999 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23001 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23004 !! html/php+disabled
23005 <p>foobat;xyz=>zh-cn:abc
23009 </p><p>a:b=>c 0;zh-tw:bar
23014 T179579: Nowiki and lc interaction
23021 -{123<nowiki>|</nowiki>456}-
23023 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23025 <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>
23029 T2529: Uncovered bullet
23039 T2529: Uncovered bullet in a deeply nested list
23041 *******Foo {{bullet}}
23043 <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>
23049 T2529: Uncovered table already at line-start
23072 T2529: Uncovered bullet in parser function result
23074 *Foo {{lc:{{bullet}} }}
23082 T7678: Double-parsed template argument
23084 {{lc:{{{1}}}|hello}}
23091 T7678: Double-parsed template invocation
23093 {{lc:{{paramtest {{!}} param = hello }} }}
23095 <p>{{paramtest | param = hello }}
23100 Case insensitivity of parser functions for non-ASCII characters (T10143)
23103 title=[[Main Page]]
23105 {{PRVNÍVELKÉ:ěščř}}
23106 {{prvnívelké:ěščř}}
23126 Morwen/13: Unclosed link followed by heading
23133 <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>
23138 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23145 <h1><span class="mw-headline" id="heading">heading</span></h1>
23150 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23157 <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>
23172 Paragraphs inside divs (no extra line breaks)
23184 Paragraphs inside divs (extra line break on open)
23199 Paragraphs inside divs (extra line break on close)
23214 Paragraphs inside divs (extra line break on open and close)
23230 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23231 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23233 Nesting tags, paragraphs on lines which begin with <div>
23235 <div></div><strong>A
23238 <div></div><p><strong>A
23239 </strong></p><strong></strong><p><strong>B</strong>
23248 # T8200: <blockquote> should behave like <div> with respect to line breaks
23250 T8200: paragraphs inside blockquotes (no extra line breaks)
23252 <blockquote>Line one
23254 Line two</blockquote>
23256 <blockquote>Line one
23257 Line two</blockquote>
23260 <blockquote><p>Line one
23261 Line two</p></blockquote>
23265 T8200: paragraphs inside blockquotes (extra line break on open)
23270 Line two</blockquote>
23275 Line two</blockquote>
23281 Line two</p></blockquote>
23284 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23286 T8200: paragraphs inside blockquotes (extra line break on close)
23288 <blockquote>Line one
23293 <blockquote>Line one
23299 <blockquote><p>Line one
23306 T8200: paragraphs inside blockquotes (extra line break on open and close)
23322 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23324 Paragraphs inside blockquotes/divs (no extra line breaks)
23326 <blockquote><div>Line one
23328 Line two</div></blockquote>
23330 <blockquote><div>Line one
23331 Line two</div></blockquote>
23336 Paragraphs inside blockquotes/divs (extra line break on open)
23341 Line two</div></blockquote>
23346 Line two</div></blockquote>
23351 Paragraphs inside blockquotes/divs (extra line break on close)
23353 <blockquote><div>Line one
23356 </div></blockquote>
23358 <blockquote><div>Line one
23361 </div></blockquote>
23366 Paragraphs inside blockquotes/divs (extra line break on open and close)
23372 </div></blockquote>
23378 </div></blockquote>
23383 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23385 wgLinkHolderBatchSize=0
23391 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23392 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23393 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23398 Free external link invading image caption
23400 [[Image:Foobar.jpg|thumb|http://x|hello]]
23402 <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>
23405 <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>
23409 T17196: localised external link numbers
23413 [http://en.wikipedia.org/]
23415 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23418 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23422 Multibyte character in padleft
23424 {{padleft:-Hello|7|Æ}}
23429 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23433 Multibyte character in padright
23435 {{padright:Hello-|7|Æ}}
23440 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23444 formatdate parser function
23446 {{#formatdate:2009-03-24}}
23448 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23453 formatdate parser function, with default format
23455 {{#formatdate:2009-03-24|mdy}}
23457 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23462 Spacing of numbers in formatted dates
23464 {{#formatdate:January 15}}
23466 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23471 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
23473 language=nl title=[[MediaWiki:Common.css]]
23475 {{#formatdate:2009-03-24|dmy}}
23477 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23490 Edit comment with link
23494 I like the [[Main Page]] a lot
23496 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23500 Edit comment with link and link text
23504 I like the [[Main Page|best pages]] a lot
23506 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23510 Edit comment with link and link text with suffix
23514 I like the [[Main Page|best page]]s a lot
23516 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23520 Edit comment with section link (non-local, eg in history list)
23522 comment title=[[Main Page]]
23524 /* External links */ removed bogus entries
23526 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23530 Edit comment with section link and text before it (non-local, eg in history list)
23532 comment title=[[Main Page]]
23534 pre-comment text /* External links */ removed bogus entries
23536 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>
23540 Edit comment with section link (local, eg in diff view)
23542 comment local title=[[Main Page]]
23544 /* External links */ removed bogus entries
23546 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23550 Edit comment with subpage link (T16080)
23554 title=[[Subpage test]]
23556 Poked at a [[/subpage]] here...
23558 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23562 Edit comment with subpage link and link text (T16080)
23566 title=[[Subpage test]]
23568 Poked at a [[/subpage|neat little page]] here...
23570 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23574 Edit comment with bogus subpage link in non-subpage NS (T16080)
23577 title=[[Subpage test]]
23579 Poked at a [[/subpage]] here...
23581 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23585 Edit comment with bare anchor link (local, as on diff)
23589 title=[[Main Page]]
23593 <a href="#section">#section</a>
23597 Edit comment with bare anchor link (non-local, as on history)
23600 title=[[Main Page]]
23604 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23608 Anchor starting with underscore
23614 <p><a href="#_ref">One</a>
23617 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23621 Id starting with underscore
23623 <div id="_ref"></div>
23625 <div id="_ref"></div>
23630 Edit comment with link with more than one pipe (T99346)
23634 [[Main Page|Many|pipes]]
23636 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23640 Complex edit comment with link with more than one pipe (T99346)
23644 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23646 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..."
23650 Space normalisation on autocomment (T24784)
23653 title=[[Main Page]]
23655 /* __hello__world__ */
23657 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23661 percent-encoding and + signs in comments (T28410)
23665 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23667 <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>
23670 # Parsoid doesn't support this yet: see T75581
23671 # but it *should* omit the 'src' attribute if the image is bad.
23672 # PHP side of tests was disabled in
23673 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23674 # because of issues in the PHP parserTests infrastructure
23675 # (but the output below is indeed what the PHP side emits)
23677 Bad images - basic functionality
23680 !! html/php+disabled
23682 <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>
23686 Bad images - T18039: text after bad image disappears
23691 !! html/php+disabled
23697 <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>
23702 Verify that displaytitle works (T24501) no displaytitle
23706 wgAllowDisplayTitle=true
23707 wgRestrictDisplayTitle=false
23709 this is not the the title
23712 <p>this is not the the title
23717 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23722 wgAllowDisplayTitle=true
23723 wgRestrictDisplayTitle=false
23725 this is not the the title
23726 {{DISPLAYTITLE:whatever}}
23729 <p>this is not the the title
23734 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23739 wgAllowDisplayTitle=true
23740 wgRestrictDisplayTitle=true
23742 this is not the the title
23743 {{DISPLAYTITLE:whatever}}
23746 <p>this is not the the title
23751 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23756 wgAllowDisplayTitle=true
23757 wgRestrictDisplayTitle=true
23759 this is not the the title
23760 {{DISPLAYTITLE:screen}}
23763 <p>this is not the the title
23768 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23773 wgAllowDisplayTitle=false
23775 this is not the the title
23776 {{DISPLAYTITLE:screen}}
23779 <p>this is not the the title
23780 <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>
23785 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23790 wgAllowDisplayTitle=false
23792 this is not the the title
23795 <p>this is not the the title
23800 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23805 wgAllowDisplayTitle=true
23806 wgRestrictDisplayTitle=true
23808 this is not the the title
23809 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23811 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23812 <p>this is not the the title
23817 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23822 wgAllowDisplayTitle=true
23823 wgRestrictDisplayTitle=true
23825 this is not the the title
23826 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23828 <span style="color: red;">s</span>creen
23829 <p>this is not the the title
23834 Page status indicators: Empty name is invalid
23838 <indicator name=" "></indicator>
23839 <indicator></indicator>
23841 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23842 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23847 Page status indicators: Weird syntaxes that are okay
23851 <indicator name="empty" />
23852 <indicator name="name"></indicator>
23861 Page status indicators: Torture test
23865 <indicator name="01">hello world</indicator>
23866 <indicator name="02">[[Main Page]]</indicator>
23867 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23868 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23869 <indicator name="05">*foo
23871 <indicator name="06"><nowiki>foo</nowiki></indicator>
23872 <indicator name="07"> Preformatted</indicator>
23873 <indicator name="08"><div>Broken tag</indicator>
23874 <indicator name="09">{| class=wikitable
23877 <indicator name="10">Two
23879 paragraphs</indicator>
23882 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23883 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" />
23884 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>
23885 05=<ul><li>foo</li>
23889 07=<pre>Preformatted
23891 08=<div>Broken tag</div>
23893 09=<table class="wikitable">
23910 preload: check <noinclude> and <includeonly>
23914 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23920 preload: check <onlyinclude>
23924 Goodbye <onlyinclude>Hello world</onlyinclude>
23930 preload: can pass tags through if we want to
23934 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23936 <includeonly>Hello world</includeonly>
23940 preload: check that it doesn't try to do tricks
23944 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23946 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23950 Play a bit with r67090 and T5158
23952 <div style="width:50% !important"> </div>
23953 <div style="width:50% !important"> </div>
23954 <div style="width:50% !important"> </div>
23955 <div style="border : solid;"> </div>
23957 <div style="width:50% !important"> </div>
23958 <div style="width:50% !important"> </div>
23959 <div style="width:50% !important"> </div>
23960 <div style="border : solid;"> </div>
23963 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23964 <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>
23965 <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>
23966 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23971 T5158: Test for French spaces in attributes
23973 <br style=" clear : both ; " />
23975 <p><br style="clear : both ;" />
23980 HTML5 data attributes
23982 <span data-foo="bar">Baz</span>
23983 <p data-abc-def_hij="">Quuz</p>
23985 <p><span data-foo="bar">Baz</span>
23987 <p data-abc-def_hij="">Quuz</p>
23990 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23991 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23995 Strip reserved data attributes
23997 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23999 <div data-ok="fred">d</div>
24002 <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>
24006 percent-encoding and + signs in internal links (T28410)
24008 [[User:+%]] [[Page+title%]]
24009 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24010 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24011 [[%33%45]] [[%33%45+]]
24013 <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>
24014 <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>
24015 <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>
24016 <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>
24019 <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>
24020 <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>
24021 <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>
24022 <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>
24026 Special characters in embedded file links (T29679)
24028 [[File:Contains & ampersand.jpg]]
24029 [[File:Does not exist.jpg|Title with & ampersand]]
24031 <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>
24032 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24035 <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>
24036 <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>
24040 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24042 Text's been normalized?
24044 <p>Text's been normalized?
24049 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24051 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24053 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24058 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24060 [http://www.example.org/ ideograms]
24062 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24067 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24069 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24071 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24095 T33098 Template which includes system messages which includes the template
24099 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24100 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24105 T33490 Turkish: ucfirst 'blah'
24116 T33490 Turkish: ucfirst 'ix'
24127 T33490 Turkish: lcfirst 'BLAH'
24138 T33490 Turkish: ucfırst (with a dotless i)
24144 <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>
24149 T33490 ucfırst (with a dotless i) with English language
24155 <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>
24159 # Note that Parsoid doesn't emit an explicit TOC.
24160 # Note also that the html2wt direction tends to emit an extra newline
24161 # between the __TOC__ magicword and the first heading unless *both*
24162 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24166 T28375: TOC with italics
24168 title=[[Main Page]]
24171 ==''Lost'' episodes==
24173 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24175 <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>
24179 <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>
24182 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24183 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24187 T28375: TOC with bold
24189 title=[[Main Page]]
24192 =='''should be bold''' then normal text==
24194 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24196 <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>
24200 <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>
24203 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24204 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24208 T35845: Headings become cursive in TOC when they contain an image
24210 title=[[Main Page]]
24213 ==Image [[Image:foobar.jpg]]==
24215 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24217 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24221 <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>
24224 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24225 <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>
24229 T35845 (2): Headings become bold in TOC when they contain a blockquote
24231 title=[[Main Page]]
24234 ==<blockquote>Quote</blockquote>==
24236 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24238 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24242 <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>
24245 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24247 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24251 <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>
24253 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24254 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24258 Unclosed tags in TOC
24260 wgFragmentMode=[ 'html5', 'legacy' ]
24262 title=[[Main Page]]
24266 <small>Hanc marginis exiguitas non caperet.</small>
24269 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24271 <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>
24275 <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>
24276 <p><small>Hanc marginis exiguitas non caperet.</small>
24280 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24281 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24282 <p><small>Hanc marginis exiguitas non caperet.</small>
24287 Multiple tags in TOC
24290 ==<i>Foo</i> <b>Bar</b>==
24292 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24294 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24296 <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>
24297 <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>
24301 <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>
24302 <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>
24305 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24307 <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>
24308 <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>
24312 <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>
24313 <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>
24315 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24316 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24318 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24321 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24322 # html5 tag parsing.
24324 Tags with parameters in TOC
24329 ==<sup class="in-h2">Hello</sup>==
24331 ==<sup class="a > b">Evilbye</sup>==
24333 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24335 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24336 <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>
24340 <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>
24341 <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>
24344 <meta property="mw:PageProp/toc" />
24345 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24347 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24351 span tags with directionality in TOC
24354 ==<span dir="ltr">C++</span>==
24356 ==<span dir="rtl">זבנג!</span>==
24358 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24360 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24362 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24364 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24366 <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>
24367 <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>
24368 <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>
24369 <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>
24370 <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>
24374 <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>
24375 <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>
24376 <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>
24377 <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>
24378 <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>
24381 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24382 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24383 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24384 <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>
24385 <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>
24386 <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>
24390 T74884: bdi element in ToC
24393 ==<bdi>test</bdi>==
24395 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24397 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24401 <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>
24404 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24405 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24409 T35715: s/strike element in ToC
24412 ==<s>test</s> test <strike>test</strike>==
24414 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24416 <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>
24420 <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>
24423 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24424 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24428 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24433 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24435 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24439 <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>
24442 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24443 <h2 id="x" data-parsoid='{}'>x</h2>
24449 == {{int:headline_sample}} ==
24453 T34057: Title needed when expanding <h> nodes.
24455 title=[[Main Page]]
24459 <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>
24464 Strip marker in urlencode
24466 {{urlencode:x<nowiki/>y}}
24467 {{urlencode:x<nowiki/>y|wiki}}
24468 {{urlencode:x<nowiki/>y|path}}
24469 {{urlencode:x<pre id="one">two</pre>y}}
24497 Strip marker in formatNum
24499 {{formatnum:1<nowiki/>2}}
24500 {{formatnum:1<nowiki/>2|R}}
24508 Check noCommafy in formatNum
24512 {{formatnum:123456.78}}
24513 {{formatnum:123456.78|NOSEP}}
24521 Wrong option for formatNum (T58199)
24523 {{formatnum:1,234.56|Random}}
24524 {{formatnum:1,234.56|EVERYTHING}}
24525 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24534 Strip marker in grammar
24538 {{grammar:elative|foo<nowiki/>bar}}
24545 Strip marker in padleft
24547 {{padleft:|2|x<nowiki/>y}}
24554 Strip marker in padright
24556 {{padright:|2|x<nowiki/>y}}
24563 Strip marker in anchorencode
24565 {{anchorencode:x<nowiki/>y}}
24570 <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>
24574 nowiki inside link inside heading (T20295)
24576 ==[[foo|x<nowiki>y</nowiki>z]]==
24578 <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>
24583 new support for bdi element (T33817)
24585 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24587 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24592 Ignore pipe between table row attributes
24596 |- id=foo | style='color: red'
24604 <tr id="foo" style="color: red">
24611 Language parser function
24620 Padleft and padright (default 0-padding)
24629 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24630 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24634 Padleft and padright (partial fill)
24636 {{padleft:xyz|6|ab}}
24637 {{padright:xyz|6|ab}}
24643 <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>
24644 <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>
24648 Padleft and padright as substr
24650 {{padleft:|3|abcde}}
24651 {{padright:|3|abcde}}
24657 <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>
24658 <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>
24662 Padleft and padright with non-numerical length (T180403)
24664 {{padleft:abcdef|junk}}
24665 {{padright:abcdef|junk}}
24673 Special parser function
24675 {{#special:RandomPage}}
24676 {{#special:BaDtItLe}}
24677 {{#special:Foobar}}
24686 T36939 - Case insensitive link parsing ([HttP://])
24688 [HttP://MediaWiki.Org/]
24690 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24693 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24697 T36939 - Case insensitive link parsing ([HttP:// title])
24699 [HttP://MediaWiki.Org/ MediaWiki]
24701 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24706 T36939 - Case insensitive link parsing (HttP://)
24708 HttP://MediaWiki.Org/
24710 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24713 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24731 <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>
24732 <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>
24733 <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>
24734 <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>
24735 <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>
24741 ### Parsoid-specific tests
24742 ### Parsoid-PHP parser incompatibilities
24745 1. SOL-sensitive wikitext tokens as template-args
24747 parsoid=wt2html,wt2wt
24753 <span about="#mwt1" typeof="mw:Transclusion">
24754 </span><ul about="#mwt1"><li>a</li>
24756 <span about="#mwt2" typeof="mw:Transclusion">
24757 </span><ol about="#mwt2"><li>a</li>
24759 <span about="#mwt3" typeof="mw:Transclusion">
24760 </span><dl about="#mwt3"><dd>a</dd>
24764 #### -----------------------------------------------------------------
24765 #### Parsoid-specific functionality tests
24766 #### -----------------------------------------------------------------
24768 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24769 # We know wt2wt will fail, but we expect selser to pass.
24770 # Due to the nature of our testing, wt2wt and selser tests will enter the
24771 # blacklist and we'll catch selser regressions based on changes to the
24772 # blacklist entries for selser tests.
24774 1. Bad treebuilder fixup of formatting elt is cleaned up
24776 parsoid=wt2html,wt2wt
24781 [[Image:Foobar.jpg|right|Test]]
24788 <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>
24795 2. Bad treebuilder fixup of formatting elt is cleaned up
24797 parsoid=wt2html,wt2wt
24799 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24801 <small>[[Image:Foobar.jpg|right|300px]]</small>
24805 <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>
24807 <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>
24811 3. Bad treebuilder fixup of formatting elt is cleaned up
24813 parsoid=wt2html,wt2wt
24815 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24817 <p><small><b>foo</b></small></p>
24818 <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>
24819 <p><small><b>bar</b></small></p>
24823 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24825 parsoid=wt2html,wt2wt
24827 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24829 <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>
24832 #### ----------------------------------------------------------------
24833 #### Parsoid-only testing of Parsoid's impl of LST
24834 #### Not implemented yet, see
24835 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24836 #### ----------------------------------------------------------------
24838 ## We still need to support serializing the older format while content is stored.
24840 LST Sections: Backwards compatibility
24843 "suppressErrors": true,
24844 "modes": ["html2wt"]
24847 <section begin="2011-05-16" />
24848 <section end="2014-04-10 (MW 1.23wmf22)" />
24850 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24851 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24855 LST Sections: Newfangled approach
24857 <section begin="2011-05-16" />
24858 <section end="2014-04-10 (MW 1.23wmf22)" />
24860 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24862 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24866 #--------- Test stripping of empty nodes in template content ----------
24869 Empty LI and TR nodes should be stripped from template content
24874 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24878 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24891 Empty LI and TR nodes should not be stripped from top-level content
24905 <li class='mw-empty-elt'></li>
24910 <tr class='mw-empty-elt'></tr>
24919 Empty TR nodes should not be stripped if they have any attributes set
24921 {{EmptyTRWithHTMLAttrTest}}
24923 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24924 <tr align='center'></tr>
24925 <tr><td>foo</td></tr>
24926 <tr align='center'></tr>
24927 <tr><td>bar</td></tr>
24931 #### ----------------------------------------------------------------
24932 #### The following section of tests are primarily to test
24933 #### wikitext escaping capabilities of Parsoid. Given that
24934 #### escaping can be done any number of ways, the wikitext (input)
24935 #### is always adjusted to reflect how Parsoid adds nowiki
24938 #### We are marking several tests as parsoid-only since the
24939 #### HTML in the result section is different from what the
24940 #### PHP parser generates for it.
24941 #### ----------------------------------------------------------------
24944 #### --------------- Headings ---------------
24946 #### 1. Nested inside html <h1>=foo=</h1>
24947 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24948 #### 3. Nested inside html with wikitext split by html tags
24949 #### 4. No escape needed
24950 #### 5. Empty headings <h1></h1>
24951 #### 6. Heading chars in SOL context
24952 #### ----------------------------------------
24954 Headings: 0. Unnested
24964 <p>=foo<i>a</i>=</p>
24966 <nowiki>=foo=</nowiki>
24968 <nowiki> </nowiki>=foo=
24970 <nowiki>=foo=</nowiki>
24972 =foo''a''<nowiki>=</nowiki>
24975 # New headings and existing headings are handled differently
24977 Headings: 1. Nested inside html
24985 <h1 data-parsoid=''>=foo=</h1>
24986 <h2 data-parsoid=''>=foo=</h2>
24987 <h3 data-parsoid=''>=foo=</h3>
24988 <h4 data-parsoid=''>=foo=</h4>
24989 <h5 data-parsoid=''>=foo=</h5>
24990 <h6 data-parsoid=''>=foo=</h6>
24998 =<nowiki>=foo=</nowiki>=
24999 ==<nowiki>=foo=</nowiki>==
25000 ===<nowiki>=foo=</nowiki>===
25001 ====<nowiki>=foo=</nowiki>====
25002 =====<nowiki>=foo=</nowiki>=====
25003 ======<nowiki>=foo=</nowiki>======
25008 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25017 <nowiki>*</nowiki>bar
25023 <nowiki>=bar=</nowiki>
25027 Headings: 3. Nested inside html with wikitext split by html tags
25031 <h1>=<b>bold</b>foo=</h1>
25033 = ='''bold'''foo= =
25037 Headings: 4a. No escaping needed (testing just h1 and h2)
25048 <h1><i>=</i>foo=</h1>
25068 Headings: 4b. No escaping needed (inside p-tags)
25085 Headings: 4c. Short headings (1)
25092 <nowiki>===</nowiki>
25098 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25100 Headings: 4d. Short headings (2)
25102 parsoid=wt2html,html2html
25113 <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>
25114 <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>
25115 <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>
25120 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25121 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25122 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25126 Headings: 5. Empty headings
25130 <h1 data-parsoid='{}'></h1>
25132 <h2 data-parsoid='{}'></h2>
25134 <h3 data-parsoid='{}'></h3>
25136 <h4 data-parsoid='{}'></h4>
25138 <h5 data-parsoid='{}'></h5>
25140 <h6 data-parsoid='{}'></h6>
25150 =====<nowiki/>=====
25152 ======<nowiki/>======
25156 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25166 <nowiki>=a=</nowiki>
25168 <nowiki>=a=</nowiki>
25170 <nowiki>=a=</nowiki>
25174 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25187 <nowiki>=a=</nowiki>
25190 <nowiki>=a=</nowiki>
25193 <nowiki>=a=</nowiki>
25198 Headings: 6c. Heading chars in SOL context (leading newline break)
25206 <nowiki>=b=</nowiki>
25210 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25214 <!--c0--><p>=a=</p>
25216 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25218 <!--c0--><nowiki>=a=</nowiki>
25220 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25224 Headings: 6d. Heading chars in SOL context (No escaping needed)
25234 Headings: 7. Insert a newline between new content and headings
25240 <h2 data-parsoid='{}'>A</h2>
25241 <p data-parsoid='{}'>a</p>
25252 Headings: Used as horizontal rule
25254 wgFragmentMode=[ 'html5', 'legacy' ]
25260 <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>
25263 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25266 #### --------------- Lists ---------------
25267 #### 0. Outside nests (*foo, etc.)
25268 #### 1. Nested inside html <ul><li>*foo</li></ul>
25269 #### 2. Inside definition lists
25270 #### 3. Only bullets at start should be escaped
25271 #### 4. No escapes needed
25272 #### 5. No unnecessary escapes
25273 #### 6. Escape bullets in SOL position
25274 #### 7. Escape bullets in a multi-line context
25275 #### ----------------------------------------
25278 Lists: 0. Outside nests
25288 <nowiki>*</nowiki>foo
25290 <nowiki>#</nowiki>foo
25292 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25295 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25296 ## to test wikitext escaping, and insignificant whitespace diffs
25297 ## cause PHP parser tests to barf
25299 Lists: 1. Nested inside html (No unnecessary escapes)
25308 <li data-parsoid='{}'>*foo</li>
25309 <li data-parsoid='{}'>#foo</li>
25310 <li data-parsoid='{}'>:foo</li>
25311 <li data-parsoid='{}'>;foo</li>
25319 <li data-parsoid='{}'>*foo</li>
25320 <li data-parsoid='{}'>#foo</li>
25321 <li data-parsoid='{}'>:foo</li>
25322 <li data-parsoid='{}'>;foo</li>
25329 *<nowiki>*foo</nowiki>
25330 *<nowiki>#foo</nowiki>
25331 *<nowiki>:foo</nowiki>
25332 *<nowiki>;foo</nowiki>
25338 #<nowiki>*foo</nowiki>
25339 #<nowiki>#foo</nowiki>
25340 #<nowiki>:foo</nowiki>
25341 #<nowiki>;foo</nowiki>
25345 Lists: 2. Inside definition lists
25349 <dl><dt>;foo</dt></dl>
25350 <dl><dt>:foo</dt></dl>
25353 <dl><dd>:foo</dd></dl>
25357 ; <nowiki>:foo</nowiki>
25359 ; <nowiki>:foo</nowiki>
25366 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25372 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25376 *<nowiki>*foo</nowiki>''it''*bar
25380 Lists: 4. No escapes needed
25393 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25397 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25411 Lists: 5. No unnecessary escapes
25415 <ul><li> bar <span>[[foo]]</span></li></ul>
25416 <ul><li> =bar <span>[[foo]]</span></li></ul>
25417 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25418 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25419 <ul><li> =bar <span>foo]]</span>=</li></ul>
25420 <ul><li> <s></s>: a</li></ul>
25421 <ul><li> <i>* foo</i></li></ul>
25424 * bar <span><nowiki>[[foo]]</nowiki></span>
25426 * =bar <span><nowiki>[[foo]]</nowiki></span>
25428 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25430 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25432 * =bar <span>foo]]</span>=
25440 Lists: 6. Escape bullets in SOL position
25444 <p><!--cmt-->*foo</p>
25446 <!--cmt--><nowiki>*</nowiki>foo
25450 Lists: 7. Escape bullets in a multi-line context
25459 <nowiki>*</nowiki>b
25463 Lists: 8. Escape colons only if not present in tags
25467 <dl><dt>a:b<i>c:d</i></dt></dl>
25469 ; <nowiki>a:b</nowiki>''c:d''
25472 #### --------------- HRs ---------------
25473 #### 1. Single line
25474 #### -----------------------------------
25477 HRs: 1. Single line
25485 ----<nowiki>----</nowiki>
25490 #### --------------- Tables ---------------
25491 #### 1a. Simple example
25492 #### 1b. No escaping needed (!foo)
25493 #### 1c. No escaping needed (|foo)
25494 #### 1d. No escaping needed (|}foo)
25496 #### 2a. Nested in td (<td>foo|bar</td>)
25497 #### 2b. Nested in td (<td>foo||bar</td>)
25498 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25500 #### 3a. Nested in th (<th>foo!bar</th>)
25501 #### 3b. Nested in th (<th>foo!!bar</th>)
25502 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25506 #### 4c. No escaping needed
25507 #### --------------------------------------
25510 Tables: 1a. Simple example
25518 <nowiki>{|</nowiki>
25523 Tables: 1b. No escaping needed
25534 Tables: 1c. No escaping needed
25545 Tables: 1d. No escaping needed
25556 Tables: 2a. Nested in td
25561 <td>foo|bar</td></tr>
25562 <tr><td>x<div>a|b</div></td>
25566 |<nowiki>foo|bar</nowiki>
25568 |x<div><nowiki>a|b</nowiki></div>
25576 <td>x<div>a|b</div>
25577 </td></tr></tbody></table>
25581 Tables: 2b. Nested in td
25587 <td>a<i>b||c</i></td>
25588 <td>a<i><div>b||c</div></i></td>
25589 </tr></tbody></table>
25592 |<nowiki>foo||bar</nowiki>
25593 |a''<nowiki>b||c</nowiki>''
25594 |a''<div><nowiki>b||c</nowiki></div>''
25603 <td>a<i><div>b||c</div></i>
25609 Tables: 2c. Nested in td -- no escaping needed
25625 Tables: 3a. Nested in th
25641 Tables: 3b. Nested in th
25646 <tr><th>foo!!bar</th>
25647 <th><i>foo|bar</i></th>
25648 <th><i>foo!!bar</i></th>
25649 <th><i><span>foo!!bar</span></i></th>
25650 </tr></tbody></table>
25653 !<nowiki>foo!!bar</nowiki>
25654 !''<nowiki>foo|bar</nowiki>''
25655 !''<nowiki>foo!!bar</nowiki>''
25656 !''<span><nowiki>foo!!bar</nowiki></span>''
25665 <th><i>foo!!bar</i>
25667 <th><i><span>foo!!bar</span></i>
25673 Tables: 3c. Nested in th
25678 <tr><th>foo||bar</th>
25679 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25680 </tr></tbody></table>
25683 !<nowiki>foo||bar</nowiki>
25684 !<nowiki>foo||bar</nowiki>
25697 Tables: 4a. Escape -
25713 |<nowiki>-bar</nowiki>
25718 Tables: 4b. Escape +
25734 |<nowiki>+bar</nowiki>
25739 Tables: 4c. No escaping needed
25744 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25745 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25751 <div>a|b</div></td>
25796 Tables: 4d. No escaping needed
25801 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25802 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25803 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25814 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25824 T97430: Don't emit empty nowiki pairs around marker meta tags
25828 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25829 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25831 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25832 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25836 Unclosed xmlish element in table line shouldn't eat end delimiters
25841 <tbody><tr><td> <foo</td>
25842 <td> bar></td></tr>
25859 #### --------------- Links ----------------
25860 #### 1. Quote marks in link text
25861 #### 2. Wikilinks: Escapes needed
25862 #### 3. Wikilinks: No escapes needed
25863 #### 4. Extlinks: Escapes needed
25864 #### 5. Extlinks: No escapes needed
25865 #### --------------------------------------
25867 Links 1. WikiLinks: No escapes needed
25871 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25872 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25873 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25877 [[Foo|x [Foobar] x]]
25879 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25880 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25881 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25886 Links 2. WikiLinks: Escapes needed
25890 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25891 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25892 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25893 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25894 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25895 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25896 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25897 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25898 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25899 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25901 [[Foo|<nowiki>Foobar]</nowiki>]]
25902 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25903 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25904 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25905 [[Foo|<nowiki>|Bar</nowiki>]]
25906 [[Foo|<nowiki>]]bar</nowiki>]]
25907 [[Foo|<nowiki>[[bar</nowiki>]]
25908 [[Foo|<nowiki>x [[ y</nowiki>]]
25909 [[Foo|<nowiki>x ]] y</nowiki>]]
25910 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25912 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25913 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25914 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25915 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25916 <a href="/wiki/Foo" title="Foo">|Bar</a>
25917 <a href="/wiki/Foo" title="Foo">]]bar</a>
25918 <a href="/wiki/Foo" title="Foo">[[bar</a>
25919 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25920 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25921 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25926 Links 3. WikiLinks: No escapes needed
25930 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25931 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25936 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25937 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25942 Links 4. ExtLinks: Escapes needed
25946 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25947 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25948 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25949 <p>[http://google.com]</p>
25950 <p>[http://google.com google]</p>
25951 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25952 <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>
25954 [http://google.com <nowiki>[google]</nowiki>]
25955 [http://google.com <nowiki>google]</nowiki>]
25956 [http://google.com <nowiki>goog] le</nowiki>]
25958 <nowiki>[http://google.com]</nowiki>
25960 <nowiki>[http://google.com google]</nowiki>
25962 [http://google.com<nowiki>]</nowiki>
25964 [{{echo|http://google.com}}<nowiki>]</nowiki>
25966 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25967 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25968 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25969 </p><p>[http://google.com]
25970 </p><p>[http://google.com google]
25971 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25972 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25977 Links 5. ExtLinks: No escapes needed
25981 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25982 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25984 [http://google.com [google]
25986 [[http://google.com]]
25988 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25989 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25994 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25998 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25999 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26000 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26001 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26002 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26003 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26004 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26005 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26006 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26007 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26008 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26009 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26010 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26013 x<nowiki/>http://example.com<nowiki/>y
26014 http://example.com<nowiki/>?x
26015 http://example.com<nowiki/>&x
26016 http://example.com<nowiki/>'x
26017 http://example.com<nowiki/>,x
26018 http://example.com<nowiki/>.x
26019 http://example.com<nowiki/>;x
26020 http://example.com<nowiki/>:x
26021 http://example.com<nowiki/>;x
26022 http://example.com<nowiki/>!x
26023 http://example.com<nowiki/>=x
26024 http://example.com<nowiki/>(x)
26025 http://example.com(x<nowiki/>)
26029 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26034 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26036 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26037 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26038 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26039 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26040 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26046 "http://example.com"
26047 (http://example.com)
26048 (http://example.com) foo
26049 http://example.com,
26050 http://example.com, foo
26053 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26055 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26056 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26057 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26058 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26059 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26064 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26068 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26069 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26071 http://example.com.,;:!?\
26072 -http://example.com:
26074 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26075 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26080 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26084 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26085 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26086 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26090 X<nowiki/>RFC 123<nowiki/>y
26094 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26098 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26099 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26100 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26107 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26108 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26109 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26114 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26118 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26119 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26120 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26124 X<nowiki/>PMID 123<nowiki/>y
26128 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26132 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26133 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26134 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26141 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26142 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26143 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26148 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26152 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26153 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26154 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26157 ISBN 1234567890<nowiki/>1
26158 ISBN 1234567890<nowiki/>x
26159 a<nowiki/>ISBN 1234567890<nowiki/>b
26163 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26167 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26171 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26176 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26180 <p>this is not a link: http://example.com
26183 this is not a link: <nowiki>http://example.com</nowiki>
26187 Links 15. Link trails can't become link prefixes.
26192 <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>
26194 [[Söfnuður]]-[[00]]
26196 <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>
26200 #### --------------- Quotes ---------------
26201 #### 1. Quotes inside <b> and <i>
26202 #### 2. Link fragments separated by <i> and <b> tags
26203 #### 3. Link fragments inside <i> and <b>
26204 #### 4. No escaping needed
26205 #### --------------------------------------
26207 1a. Quotes inside <b> and <i>
26218 <b>foo'<i>bar'</i>baz</b>
26227 <i>fools'<span> errand</span></i>
26228 <i><span>fool</span>'s errand</i>
26229 '<i>foo</i> bar '<i>baz</i>
26230 a|!*#-:;+-~[]{}b'<i>x</i>
26234 ''<nowiki>''foo''</nowiki>''
26235 ''<nowiki>'''foo'''</nowiki>''
26237 '''<nowiki/>'foo''''
26238 '''<nowiki>''foo''</nowiki>'''
26239 '''<nowiki>'''foo'''</nowiki>'''
26240 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26241 '''foo'''<nowiki/>'s
26247 '''foo'''<nowiki/>'
26248 ''''foo'''<nowiki/>'
26249 ''fools'<span> errand</span>''
26250 ''<span>fool</span>'s errand''
26251 '<nowiki/>''foo'' bar '''baz''
26252 a|!*#-:;+-~[]{}b'''x''
26256 1b. Quotes inside <b> and <i> with other tags on same line
26260 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26261 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26262 <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>
26263 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26264 '<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>
26265 '<i>foo</i> <div title="name">test</div>
26266 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26267 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26268 <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>
26271 '''a'' foo ''[[bar]]''
26272 ''a''' foo ''[[bar]]''
26273 ''a''' foo '''{{echo|[[bar]]}}'''
26274 [[foo]] x'''[[bar]]''
26275 '''foo'' <ref>test</ref>
26276 '''foo'' <div title="name">test</div>
26277 '''foo'' and <br> bar
26282 2. Link fragments separated by <i> and <b> tags
26286 <p>[[<i>foo</i>hello]]</p>
26287 <p>[[<b>foo</b>hello]]</p>
26289 [[''foo''<nowiki>hello]]</nowiki>
26291 [['''foo'''<nowiki>hello]]</nowiki>
26294 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26295 # this is one of the shortcomings of this format
26297 3. Link fragments inside <i> and <b>
26301 <p><i>[[foo</i>]]</p>
26302 <p><b>[[foo</b>]]</p>
26304 ''[[foo''<nowiki>]]</nowiki>
26306 '''[[foo'''<nowiki>]]</nowiki>
26310 4. No escaping needed
26314 <p>'<span><i>bar</i></span>'
26315 '<span><b>bar</b></span>'
26319 '<span>''bar''</span>'
26320 '<span>'''bar'''</span>'
26324 #### ----------- Paragraphs ---------------
26325 #### 1. No unnecessary escapes
26326 #### --------------------------------------
26329 1. No unnecessary escapes
26333 <p>bar <span>[[foo]]</span>
26334 </p><p>=bar <span>[[foo]]</span>
26335 </p><p>[[bar <span>[[foo]]</span>
26336 </p><p>]]bar <span>[[foo]]</span>
26337 </p><p>=bar <span>foo]]</span>=
26340 bar <span><nowiki>[[foo]]</nowiki></span>
26342 =bar <span><nowiki>[[foo]]</nowiki></span>
26344 [[bar <span><nowiki>[[foo]]</nowiki></span>
26346 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26348 =bar <span>foo]]</span><nowiki>=</nowiki>
26351 #### ----------------------- PRE --------------------------
26352 #### 1. Leading whitespace in SOL context should be escaped
26353 #### ------------------------------------------------------
26355 1. Leading whitespace in SOL context should be escaped
26378 <nowiki> </nowiki>a
26380 <nowiki> </nowiki> a
26384 <nowiki> </nowiki> a
26386 <nowiki> </nowiki>a
26389 <nowiki> </nowiki>b
26412 2. Leading whitespace in non-indent-pre contexts should not be escaped
26416 <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>
26417 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26418 <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>
26428 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26447 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26451 <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>
26453 [[File:Foobar.jpg|thumb|caption]]
26457 5. Nowiki escaping should account for indent-pres
26467 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26480 #### --------------- Behavior Switches --------------------
26483 1. Valid behavior switches should be escaped
26490 <nowiki>__TOC__</nowiki>
26491 ''<nowiki>__TOC__</nowiki>''
26495 2. Invalid behavior switches should not be escaped
26506 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26508 Behavior switches should be SOL-transparent
26512 <meta property="mw:PageProp/toc" />
26514 <!-- this one's bogus -->
26517 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26519 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26523 <!-- this one's bogus -->
26532 #### --------------- HTML tags ---------------
26535 #### 3. multi-line html tag
26536 #### 4. extension tags
26537 #### -----------------------------------------
26543 <a href="http://google.com">google</a>
26545 <a href="http://google.com">google</a>
26553 <ul><li> <div>foo</div></li>
26554 <li> <div style="color:red">foo</div></li>
26555 <li> <td></li></ul>
26558 * <nowiki><div>foo</div></nowiki>
26559 * <nowiki><div style="color:red">foo</div></nowiki>
26560 * <nowiki><td></nowiki>
26564 3. multi-line html tag
26583 <p><ref>foo</ref>
26584 </p><p><ref>bar
26585 </p><p>baz</ref>
26588 <nowiki><ref>foo</ref></nowiki>
26590 <nowiki><ref>bar</nowiki>
26592 baz<nowiki></ref></nowiki>
26595 #### --------------- Others ---------------
26601 <p><nowiki>foo</nowiki>
26604 <nowiki>foo</nowiki>
26607 ## The quote-char in the input is necessary for triggering the bug
26609 (T54035) Nowiki-escaping should not get tripped by " :" in text
26618 #----------- End of wikitext escaping tests --------------
26622 Tag-like HTML structures are passed through as text
26644 </p><p>1<d e>f
26649 HTML tag with necessary entities in attributes
26651 <span title="&amp;">foo</span>
26653 <p><span title="&amp;">foo</span>
26658 HTML tag with 'unnecessary' entity encoding in attributes
26660 <span title="&">foo</span>
26662 <p><span title="&">foo</span>
26667 HTML tag with broken attribute value quoting
26669 parsoid=wt2html,html2html
26671 <span title="Hello world>Foo</span>
26673 <p><span title="Hello world">Foo</span>
26676 <p><span title="Hello world">Foo</span></p>
26680 Self-closed tag with broken attribute value quoting
26682 parsoid=wt2html,html2html
26684 <div title="Hello world />Foo
26686 <div title="Hello world"></div><p>Foo
26689 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26693 Table with broken attribute value quoting
26695 parsoid=wt2html,html2html
26698 | title="Hello world|Foo
26703 <td title="Hello world">Foo
26709 <td title="Hello world">Foo
26715 Table with broken attribute value quoting on consecutive lines
26717 parsoid=wt2html,html2html
26720 | title="Hello world|Foo
26721 | style="color:red|Bar
26726 <td title="Hello world">Foo
26728 <td style="color:red">Bar
26734 <td title="Hello world">Foo
26735 </td><td style="color: red">Bar
26736 </td></tr></tbody></table>
26741 Accept empty td cell attribute
26744 | align="center" |foo|| |
26749 <td align="center">foo</td>
26756 Non-empty attributes in th-cells
26759 !Foo!! style="color: red" |Bar
26765 <th style="color: red">Bar
26771 Accept empty attributes in th-cells
26786 Empty table rows go away
26807 ### Parsoid-centric tests for testing RTing of inter-element separators
26808 ### Edge cases not tested by existing parser tests and specific to
26809 ### Parsoid-specific serialization strategies.
26813 RT-ed inter-element separators should be valid separators
26825 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26829 # Parsoid-only test of a DOM pass
26831 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26843 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26844 <p>bar</p></small></td></tr>
26848 <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>
26852 # Note that the "style" attribute is really a template parameter here.
26853 # The = would have to be {{=}} if you wanted the literal.
26855 Empty TD followed by TD with tpl-generated attribute
26860 |{{echo|style='color:red'}}|foo
26874 Indented table with an empty td
26892 ## We have some newline diffs RT-ing this edge case
26893 ## and it is not important enough -- we seem to be emitting
26894 ## at most 2 newlines after a </tr> and this is unrelated to
26895 ## the issue from T85627 that this is testing.
26897 Indented table with blank lines in between (T85627)
26916 Indented block & table
26930 <div data-parsoid='{"stx":"html"}'>foo</div>
26932 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26937 Indent and comment before table row
26952 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26953 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26957 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26959 Empty TR followed by a template-generated TR
26965 {{echo|<tr><td>foo</td></tr>}}
26970 <tr class='mw-empty-elt'></tr>
26971 <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}}]}'>
26976 ## PHP and parsoid output differ for this, and since this is primarily
26977 ## for testing Parsoid's serializer, marking this Parsoid only
26979 Empty TR followed by mixed-ws-comment line should RT correctly
26992 <tr class='mw-empty-elt'></tr>
26995 <!--c--> </tr><!--d-->
27001 Multi-line image caption generated by templates with/without trailing newlines
27003 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27004 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27006 <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>
27007 <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>
27011 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27015 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27017 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27019 <includeonly>foo</includeonly>
27027 ## PHP emits broken html for this, and since this is primarily
27028 ## a Parsoid serializer test, marking this Parsoid only
27030 Improperly nested inline or quotes tags with whitespace in between
27032 <span> <s>x</span> </s>
27035 <p><span> <s>x</s></span><s> </s>
27036 <b> <i>x</i></b><i> </i>
27041 Encapsulate protected attributes from wt
27043 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27045 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27049 <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>
27051 <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">
27052 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
27056 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27057 ## Having nested or stray pre tags results in the attempt to add duplicates,
27058 ## causing an assertion fail. This test tries to prevent that situation.
27060 Ensure ParagraphWrapper can deal with stray closing pre tags
27070 1. Ensure fostered text content is wrapped in element nodes
27074 <table>hi</table><table>ho</table>
27083 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27085 parsoid=wt2html,wt2wt
27094 <tbody><tr><td> a</td></tr>
27099 Encapsulation properly handles null DSR information from foster box
27101 parsoid=wt2html,wt2wt
27103 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27105 <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>
27109 1. Encapsulate foster-parented transclusion content
27111 parsoid=wt2wt,wt2html
27113 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27115 <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>
27125 2. Encapsulate foster-parented transclusion content
27127 parsoid=wt2wt,wt2html
27129 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27131 <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>
27142 3. Encapsulate foster-parented transclusion content
27144 parsoid=wt2wt,wt2html
27146 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27148 <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>"]}">
27161 4. Encapsulate foster-parented transclusion content
27163 parsoid=wt2wt,wt2html
27165 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27167 <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>"]}">
27180 5. Encapsulate foster-parented transclusion content
27182 parsoid=wt2wt,wt2html
27184 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27186 <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>
27201 6. Encapsulate foster-parented transclusion content
27203 parsoid=wt2wt,wt2html
27205 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27207 <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>
27223 7. Encapsulate foster-parented transclusion content
27225 parsoid=wt2wt,wt2html
27227 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27229 <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>
27239 # Note that the wt is broken on purpose: the = should be {{=}} if you
27240 # don't want it to be a template parameter key.
27242 8. Encapsulate foster-parented transclusion content
27244 parsoid=wt2wt,wt2html
27247 }}{|{{echo|style='color:red'}}
27252 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27254 <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>
27265 9. Encapsulate foster-parented transclusion content
27267 parsoid=wt2wt,wt2html
27269 <table>{{echo|hi</table>hello}}
27271 <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>
27275 Table in fosterable position
27286 <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">
27288 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27294 # Parsoid only for T66747
27296 Properly encapsulate empty-content transclusions in fosterable positions
27304 <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"}]]}'>
27310 Always encapsulate foster box when template range is expanded to table
27323 T115289: Unclosed table
27325 {{echo|<table>}}<!--c-->[[Category:Two]]
27327 <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>
27331 T115289: Don't migrate newlines out of tables with fostered content
27333 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27335 <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>
27339 T73074: More fostering fun
27341 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27343 <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>
27347 Support <object> element with .data attribute
27351 <object data="test.swf"></object>
27353 <object data="test.swf"></object>
27357 Don't block XML namespace declaration
27359 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27361 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27364 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27367 # -----------------------------------------------------------------
27368 # The following section of tests are primarily to spec requirements
27369 # around Parsoid's serialization (old, new, edited content)
27371 # All these tests are marked Parsoid html2wt and html2html only
27372 # ----------------------------------------------------------------
27375 Ignore rel attribute in a-tags during serialization to url-links
27379 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27380 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27381 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27383 http://en.wikipedia.org/wiki/Foobar
27384 http://en.wikipedia.org/wiki/Foobar
27385 http://en.wikipedia.org/wiki/Foobar
27388 # 'mi' is a localinterwiki prefix as well as a language
27390 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27394 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27400 Parsoid should accept interwiki shortcuts
27404 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27405 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27406 <a href='./fr:Foo'>Foo</a></p>
27407 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27408 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27409 <a href='fr%3AFoo'>Foo</a></p>
27410 <p><a href='FR%3AFoo'>Foo</a>
27411 <a href='./FR:Foo'>Foo</a></p>
27426 Parsoid should not accept invalid interwiki shortcuts
27430 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27431 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27432 <a href='news:Foo'>Foo</a></p>
27441 New wikilinks should be serialized properly
27445 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27446 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27447 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27448 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27449 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27453 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27454 http://en.wikipedia.org/wiki/Foo
27455 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27459 New wiki links (href variations)
27463 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27464 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27465 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27466 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27471 [[Toxine bactérienne]]
27475 New wiki links (content string variations)
27479 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27480 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27481 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27485 [[Foo_bar|./Foo_bar]]
27489 New category links (href variations)
27493 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27494 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27495 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27497 [[Category:Toxine bactérienne]]
27498 [[Category:Toxine bactérienne]]
27499 [[Category:Toxine bactérienne]]
27503 New sol transparent links don't need indent-pre nowiki protection
27508 <link rel="mw:PageProp/redirect" href="./Main_Page">
27509 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27510 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27512 #WEITERLEITUNG [[Main Page]]
27513 <!-- this is good --> [[Category:Good]]
27514 <!-- this is great --> [[Kategorie:Great]]
27518 New interlanguage links (href variations)
27522 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27523 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27524 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27526 [[es:Toxine bactérienne]]
27527 [[es:Toxine_bactérienne]]
27528 [[es:Toxine_bactérienne]]
27532 Image: Modifying size of an image (1)
27535 "modes": ["wt2wt"],
27537 ["img[height]", "attr", "height", "22"],
27538 ["img[width]", "attr", "width", "200"]
27542 [[Image:Foobar.jpg|230x230px]]
27544 [[Image:Foobar.jpg|200x200px]]
27548 Image: Modifying size of an image (2)
27551 "modes": ["wt2wt"],
27553 ["img[height]", "attr", "height", "100"],
27554 ["img[width]", "attr", "width", "500"]
27558 [[Image:Foobar.jpg|230x230px]]
27560 [[Image:Foobar.jpg|500x500px]]
27563 # Change in size is ignored so long as class='mw-default-size'
27565 Image: Modifying size of an image (3)
27568 "modes": ["wt2wt"],
27570 ["figure[class]", "removeClass", "mw-default-size"],
27571 ["figure img", "attr", "height", "19"],
27572 ["figure img", "attr", "width", "170"]
27576 [[Image:Foobar.jpg|thumb]]
27578 [[Image:Foobar.jpg|thumb|170x170px]]
27582 Image: Modifying alignment of an image (T50665)
27585 "modes": ["wt2wt"],
27587 ["figure[class]", "removeClass", "mw-halign-right"],
27588 ["figure[class]", "addClass", "mw-halign-left"]
27592 [[Image:Foobar.jpg|thumb|caption|right]]
27594 [[Image:Foobar.jpg|thumb|caption|left]]
27598 Image: Modifying mw-default-size of an frameless image (T64805)
27601 "modes": ["wt2wt"],
27603 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27607 [[Image:Foobar.jpg|frameless|right]]
27609 [[Image:Foobar.jpg|frameless|right|220x220px]]
27613 Image: Modifying valign of an image (T51221)
27616 "modes": ["wt2wt"],
27618 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27619 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27623 [[File:Foobar.jpg|20px|middle]]
27625 [[File:Foobar.jpg|20px|text-top]]
27629 Image: Modifying alt attribute of an image (T58400)
27632 "modes": ["wt2wt"],
27634 ["img[alt]", "attr", "alt", "some alternate edited text"]
27638 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27640 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27644 Image: Modifying caption of an image
27647 "modes": ["wt2wt"],
27649 ["figcaption", "text", "new caption"]
27653 [[Image:Foobar.jpg|thumb|original caption]]
27655 [[Image:Foobar.jpg|thumb|new caption]]
27659 Image: empty alt attribute (T50924)
27663 [[File:Foobar.jpg|thumb|alt=|bar]]
27665 <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>
27669 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27675 <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>
27677 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27681 Image: Block level image should have \n before and after
27684 [[File:Foobar.jpg|right|thumb|150x150px]]
27688 <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>
27693 Image: New block level image should have \n before and after (existing content)
27696 [[File:Foobar.jpg|right|thumb|150x150px]]
27700 <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>
27705 Image: upright option (parsoid)
27707 [[File:Foobar.jpg|thumb|upright|caption]]
27708 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27709 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27711 <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>
27712 <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>
27713 <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>
27717 Image: upright option is ignored on inline and frame images (parsoid)
27719 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27721 <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>
27725 Image: in template parameter with empty parameter
27727 {{echo|[[File:Foobar.jpg|link=]]}}
27729 <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>
27733 Image: from basic HTML (1)
27737 <span typeof="mw:Image">
27738 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27741 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27745 Image: from basic HTML (2)
27749 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27751 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27755 Image: from basic HTML (3)
27759 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27761 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27765 Image: from basic HTML (4)
27769 <img src="./File:Foobar.jpg">
27771 [[File:Foobar.jpg|link=]]
27775 Image: Invalid title as link
27777 [[File:Foobar.jpg|link=<]]
27779 <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>
27782 <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>
27786 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27791 <li><p>foo</p></li>
27798 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27802 <ul> <li>foo</li></ul>
27808 Don't strip leading whitespace when handling indent-pre suppressing tags
27813 <tr><td> indented row</td></tr>
27816 <b>This is very bold of you!</b>
27819 indented cell (no pre-wrapping!)
27829 '''This is very bold of you!'''
27833 indented cell (no pre-wrapping!)
27841 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27863 <nowiki> </nowiki></span>bar2
27866 <nowiki> </nowiki><span>bar</span>
27869 <nowiki> </nowiki><span>foo</span>
27874 Lists: Dont insert newlines in a serialized list item.
27878 <ul><li>a<br>b</li><li>c</li></ul>
27885 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27888 "modes": ["html2wt"],
27889 "scrubWikitext": false
27892 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27893 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27895 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27896 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27898 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27900 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27902 == hello there [[Category:A1]] ==
27904 == [[Category:A2]] hi pal ==
27906 == <!--foo--> [[Category:A3]] how goes it ==
27908 == it goes well [[Category:A4]] <!--bar--> ==
27910 ==howdy [[Category:A5]]==
27916 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27919 "modes": ["html2wt"],
27920 "scrubWikitext": true
27923 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27924 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27926 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27927 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27929 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27937 <!--foo--> [[Category:A3]]
27942 [[Category:A4]] <!--bar-->
27950 Headings: Don't hoist metas that come from templates
27953 "modes": ["html2wt"],
27954 "scrubWikitext": true
27957 <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>
27959 == {{echo|foo [[Category:Foo]]}} ==
27963 Headings: Category in ref isn't hoisted
27966 "modes": ["html2wt"],
27967 "scrubWikitext": true
27970 <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>
27972 <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>
27975 [[Category:Baz]] </ref> ==
27981 Parsoid: Serialize positional parameters with = in them as named parameter
27985 <p about="#mwt1" typeof="mw:Transclusion"
27986 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27988 <p about="#mwt1" typeof="mw:Transclusion"
27989 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27991 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27992 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27993 <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>
27997 {{echo|1=f=oo|2=bar}}
27999 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28000 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28001 {{echo|<nowiki>f=oo</nowiki>|bar}}
28005 Parsoid: Serialize positional parameters with = in extlink as named parameter
28009 <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>
28011 {{echo|1=http://stuff?is=ok}}
28015 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28019 <div>a<p>b</p></div>
28040 Substrings resembling wikitext in hrefs should not get nowiki escapes
28044 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28050 Enforce single-line context in the serializer
28057 <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">
28058 </span><span about="#mwt1">you</span> </h2>
28060 <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>
28062 <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
28063 there</span></li></ol>
28075 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28082 </tbody></table></dd></dl>
28086 == hi {{bogus|there
28097 * foo '''bar''' baz
28109 Serialize new placeholder space without spans
28113 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28115 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28117 <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>
28123 <ref>foo : bar</ref>ok
28127 #-----------------------
28128 # Tag minimization tests
28129 #-----------------------
28132 1. I/B quote minimization: wikitext-only tags should be combined
28136 <p><i>A</i><i>B</i></p>
28137 <p><b>A</b><b>B</b></p>
28138 <p><i>A</i><b><i>B</i></b></p>
28139 <p><b>A</b><i><b>B</b></i></p>
28140 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28141 <p><i><b>A</b></i><i><b>B</b></i></p>
28142 <p><i><b>A</b></i><b><i>B</i></b></p>
28143 <p><b><i>A</i></b><i><b>B</b></i></p>
28163 2. I/B quote minimization: wikitext and html tags should not be combined
28167 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28168 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28172 ''A''<nowiki/>'''<i>B</i>'''
28176 3. I/B quote minimization: templated content stops minimization
28180 <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>
28181 <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>
28183 ''A''{{echo|''B''}}
28185 ''A''{{echo|'''''B'''''}}
28189 4. I/B quote minimization: new content should be mimimized with adjacent old content
28193 <p><i>A</i><i>B</i></p>
28194 <p><b>A</b><b>B</b></p>
28195 <p><i>A</i><b><i>B</i></b></p>
28205 5a. Merge adjacent quote nodes if they've been edited
28208 "modes": ["wt2wt", "selser"],
28210 ["p", "contents", "remove", ":contains('b')"]
28220 5b. Merge adjacent quote nodes if they've been edited
28223 "modes": ["wt2wt", "selser"],
28229 ''a''<span id="x">b</span>''c''
28235 1. Merge adjacent link nodes as long as at least one element is new
28238 "modes": ["html2wt"],
28239 "scrubWikitext": true
28242 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28243 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28244 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28248 [[Football|Foot]][[Football|ball]]
28252 2. Merge adjacent link nodes and enable additional normalizations
28255 "modes": ["html2wt"],
28256 "scrubWikitext": true
28259 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28261 [[Football|''Football'']]
28265 3. Don't merge adjacent link nodes if scrubWikitext is false
28268 "modes": ["html2wt"],
28269 "scrubWikitext": false
28272 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28274 [[Football|Foot]][[Football|ball]]
28277 #------------------------------
28278 # End of tag minimization tests
28279 #------------------------------
28282 T56262: New entities
28286 <span typeof="mw:Entity"> </span>
28291 ## Note that there is no wikitext output for 'unknownproperty' ##
28292 ## Unknown magic words are silently dropped ##
28299 <meta property='mw:PageProp/toc' />
28300 <meta property='mw:PageProp/notoc' />
28301 <meta property='mw:PageProp/forcetoc' />
28302 <meta property='mw:PageProp/index' />
28303 <meta property='mw:PageProp/noindex' />
28304 <meta property='mw:PageProp/nogallery' />
28305 <meta property='mw:PageProp/noeditsection' />
28306 <meta property='mw:PageProp/notitleconvert' />
28307 <meta property='mw:PageProp/nocontentconvert' />
28308 <meta property='mw:PageProp/unknownproperty' />
28318 __NOCONTENTCONVERT__
28322 Consecutive <pre>s should not get merged
28324 parsoid=html2wt,html2html
28326 <pre>a</pre><pre>b</pre>
28354 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28358 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28360 [[Special:BookSources/1234567890|ISBN 1234567895]]
28364 Edited RFC links not serializable as RFC links should serialize as extlinks
28368 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28370 [https://tools.ietf.org/html/rfc123 New RFC]
28374 Edited PMID links not serializable as PMID links should serialize as extlinks
28378 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28380 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28384 WTS of autolinks with trailing/surrounding context
28388 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28389 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28390 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28391 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28392 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28393 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28395 http://cscott.net'''foo'''
28397 http://cscott.net<b>foo</b>
28399 '''http://cscott.net'''
28401 '''http://cscott.net '''
28403 '''http://cscott.net<nowiki/>x'''
28405 http://cscott.net<nowiki/>x
28409 WTS of autolinks with nowikis (round-trip)
28411 x<nowiki/>http://cscott.net<nowiki/>x
28413 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28416 # this is the "easy" test because it leaves in place all the
28417 # data-parsoid information indicating this is an autolink
28419 WTS of autolinks with escapes (editing)
28422 "modes": ["wt2wt"],
28424 [ "span", "remove" ]
28428 x<nowiki/>http://cscott.net<nowiki/>x
28430 x<nowiki/>http://cscott.net<nowiki/>x
28434 WTS of edited autolink-like text (T103364)
28437 "modes": ["wt2wt"],
28439 [ "span[typeof]", "removeAttr", "typeof" ]
28443 Not a link: <nowiki>http://example.com</nowiki>.
28445 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28449 WTS of newly-authored autolink-like text (T103364)
28453 <p>http://example.com is not a link.</p>
28455 <nowiki>http://example.com</nowiki> is not a link.
28459 WTS of autolink-like text after an autolink (T108563)
28463 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28465 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28469 Magic links inside links (not autolinked)
28471 [[Foo|http://example.com]]
28474 [[Foo|ISBN 123456789x]]
28476 [http://foo.com http://example.com]
28477 [http://foo.com RFC 1234]
28478 [http://foo.com PMID 1234]
28479 [http://foo.com ISBN 123456789x]
28481 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28482 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28483 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28484 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28485 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28486 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28487 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28488 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28491 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28492 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28493 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28494 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28496 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28497 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28498 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28499 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28503 Magic links inside image captions (autolinked)
28505 [[File:Foobar.jpg|thumb|http://example.com]]
28506 [[File:Foobar.jpg|thumb|RFC 1234]]
28507 [[File:Foobar.jpg|thumb|PMID 1234]]
28508 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28510 <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>
28511 <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>
28512 <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>
28513 <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>
28515 <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>
28516 <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>
28517 <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>
28518 <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>
28522 WTS of magic word text (T109371)
28527 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28528 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28530 <nowiki>RFC 1234</nowiki>
28532 [http://foo.com RFC 1234]
28538 Edited Redirect link should emit a non-piped wikitext link
28542 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28548 T75121: Infer extension name from typeOf if data-mw is not present
28550 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28552 <div typeOf="mw:Extension/foo"></div>
28557 # Note that the <p> wrapping isn't present in PHP parser output
28558 # The important thing for this test is that P-wrapping doesn't
28559 # interfere with the <nowiki> protection for leading - in <td>
28560 # (which isn't necessary for <th>).
28562 T88318: p-wrapped dash in table.
28564 parsoid=html2wt,wt2wt
28567 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28568 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28569 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28576 |<nowiki>-</nowiki>
28577 |<nowiki>- </nowiki>
28598 <td><small>-</small>
28607 </td></tr></tbody></table>
28611 T149209: WTS: Handle newlines in table cells properly
28619 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28621 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28627 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28629 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28651 T149209: Selser: Handle newlines in table cells properly
28654 "modes": ["selser"],
28656 [ "#h1", "html", "a\nb\n" ],
28657 [ "#h2", "html", "a\nb\n" ],
28658 [ "#c1", "html", "a\nb\n" ],
28659 [ "#c2", "html", "<p>a</p>" ],
28660 [ "#c3", "html", "<p>a</p>" ],
28661 [ "#c4", "html", "edit-me<p>a</p>" ]
28666 ! id="h1" |edit-me!!1
28668 ! id="h2" |edit-me||2
28670 | id="c1" |edit-me||3
28672 | id="c2" |edit-me||4
28674 | id="c3" |edit-me||p||q||r
28676 | id="c4" |edit-me||p||q||r
28705 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28710 <td id='mwAc'>foo</td>
28711 <td id='serialize-this'>bar</td>
28716 | id="serialize-this" |bar
28721 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28725 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28727 <div id="hello">ok</div>
28734 "modes": ["wt2wt"],
28736 [ "#xyz", "before", "<b>before</b> stuff " ],
28737 [ "#xyz", "after", " stuff <i>after</i>" ],
28738 [ "#xyz", "html", "x <b>y</b> z" ]
28742 <span id="xyz">hello</span>
28744 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28748 Never serialize a-tag as html, regardless of what data-parsoid has to say
28750 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28752 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28757 ## SSS FIXME: This is broken output nevertheless.
28758 ## What might be a reasonable non-broken output for this?
28759 ## This is an edge case unlikely to be seen in production
28760 ## that I am not wasting more time on this right now.
28762 Never serialize a-tag as html, no matter what attributes it has
28764 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28766 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28768 [http://boo.org http://boohoo.org]
28771 # Misnested is an indication that selser can reuse the source but these have
28772 # shown to sneak through on occasion. See T101768.
28773 # The original wikitext here is: [http://test.com [[one]] two three]
28775 Strip span tags added to mark misnested links
28779 <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>
28781 [http://test.com][[one]] two three
28785 Catch regression when unpacking misnested links
28789 {{echo|hi}}[http://example.com [[ho]]]
28791 <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>
28795 Catch regression when unpacking with trailing content
28797 {{echo|Foo <references/> bar}}
28799 <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>
28803 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28807 <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|}"]}'>
28819 ## This test verifies the presence and computation of this attribute indirectly
28820 ## by making an edit and ensuring that the serialization is correct (which it would be
28821 ## only if firstWikitextNode is properly set).
28823 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28826 "modes": ["wt2wt"],
28828 [ "div#x", "remove" ],
28829 [ "div", "before", "<div>new</div>" ]
28833 <div id="x">foo</div>
28835 {{echo|<div>boo</div>
28843 {{echo|<div>boo</div>
28849 # --------------------------------------------
28850 # Tests spec'ing wikitext serialization norms |
28851 # --------------------------------------------
28854 Serialize multi-line indent-pre starting with wikitext syntax
28868 1. Categories should always be serialized on their own line
28872 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28880 2. Categories that are part of templates should not introduce a line break
28882 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28884 <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>
28887 # Careful while editing these next 2 tests. There are \u200f characters
28888 # before and after the <link> tags in the HTML and following some
28889 # of the categories in wikitext
28890 # Do not remove these characters in edits.
28892 # As part of the serialization, these bidi characters will get stripped.
28894 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28897 "modes": ["html2wt"],
28898 "scrubWikitext": true
28901 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28902 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28905 [[קטגוריה: שיטות משפט]]
28909 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28912 "modes": ["html2wt"],
28913 "scrubWikitext": true
28916 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28923 Lists: Add space after bullets
28930 <li><span> baz</span></li>
28935 * <span> baz</span>
28939 1. Headings: Add space before/after == (T53744)
28946 <h2><span> baz</span></h2>
28954 == <span> baz</span> ==
28958 2. Headings: Add space before/after == even after hoisted content
28961 "modes": ["html2wt"],
28962 "scrubWikitext": true
28965 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28973 1. Headings: suppress newly created empty headings
28976 "modes": ["html2wt"],
28977 "scrubWikitext": true
28985 2. Headings: don't suppress empty headings if scrubWikitext is false
28995 3. Headings: suppress empty headings on edits
28998 "modes": ["selser"],
28999 "scrubWikitext": true,
29005 ==<span id="x">foo</span>==
29010 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29013 "modes": ["html2wt"],
29014 "scrubWikitext": true
29017 <h2>foo<br/>bar</h2>
29018 <h2>foo <span><br/>bar</span> baz</h2>
29022 == foo <span> bar</span> baz ==
29026 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29029 "modes": ["html2wt"],
29030 "scrubWikitext": false
29033 <h2>foo<br/>bar</h2>
29035 == foo<br /> bar ==
29039 1. WT Quote Tags: suppress newly created empty style tags
29042 "modes": ["html2wt"],
29043 "scrubWikitext": true
29051 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29057 ''<nowiki/>'''''<nowiki/>'''
29061 3. WT Quote Tags: suppress empty style tags on edits
29064 "modes": ["selser"],
29065 "scrubWikitext": true,
29071 '''<span id="x">foo</span>'''
29076 1. Anchors: suppress newly created empty anchors
29079 "modes": ["html2wt"],
29080 "scrubWikitext": true
29083 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29088 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29091 "modes": ["html2wt"],
29092 "scrubWikitext": false
29095 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29101 3. Anchors: suppress empty anchors on edits
29104 "modes": ["selser"],
29105 "scrubWikitext": true,
29111 [[Test|<span id="x">foo</span>]]
29116 3a. Anchors: do not suppress numbered extlinks
29119 "modes": ["wt2wt"],
29120 "scrubWikitext": true
29125 <a rel="mw:ExtLink" href="http://foo.com"></a>
29129 3b. Anchors: do not suppress numbered extlinks
29132 "modes": ["wt2wt"],
29133 "scrubWikitext": true,
29139 [http://foo.com <span id="x">foo</span>]
29145 Normalizations should be restricted to edited content
29148 "modes": ["selser"],
29149 "scrubWikitext": true,
29151 [ "h1", "before", "<i></i>"]
29165 1. Multiple normalizations (html2wt)
29168 "modes": ["html2wt"],
29169 "scrubWikitext": true
29173 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29174 </a><b><i></i></b>x</p>
29183 2. Multiple normalizations (selser)
29186 "modes": ["selser"],
29187 "scrubWikitext": true,
29189 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29193 <span id="x">foo</span>
29195 <span id="x">foo</span>
29201 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29204 "modes": ["html2wt"],
29205 "scrubWikitext": true
29217 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29224 <nowiki> </nowiki>hi
29226 <nowiki> </nowiki> hello
29230 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29233 "modes": ["html2wt"],
29234 "scrubWikitext": true
29243 baz bang</td></tr></table>
29249 bar<span>boo</span></p>
29265 bar<span>boo</span>
29269 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29272 "modes": ["selser"],
29273 "scrubWikitext": true,
29275 [ "p", "html", " a\n b" ]
29286 1. New links that end in spaces
29289 "modes": ["html2wt"],
29290 "scrubWikitext": false
29293 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29294 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29295 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29297 [[Berlin ]]<nowiki/>is the capital of Germany.
29301 [[Boston ]] is a city.
29305 2. New links that end in spaces
29308 "modes": ["html2wt"],
29309 "scrubWikitext": true
29312 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29313 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29314 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29316 [[Berlin]] is the capital of Germany.
29320 [[Boston]] is a city.
29324 1. Table cells with escapable prefixes
29327 "modes": ["html2wt"],
29328 "scrubWikitext": false
29332 <tr><td>a</td></tr>
29333 <tr><td>-</td></tr>
29334 <tr><td>+</td></tr>
29340 |<nowiki>-</nowiki>
29342 |<nowiki>+</nowiki>
29347 2. Table cells with escapable prefixes
29350 "modes": ["html2wt"],
29351 "scrubWikitext": true
29355 <tr><td>a</td></tr>
29356 <tr><td>-</td></tr>
29357 <tr><td>+</td></tr>
29370 3a. Table cells with escapable prefixes after edits
29373 "modes": ["selser"],
29374 "scrubWikitext": true,
29376 [ "table tbody tr:first-child td:first-child", "remove"]
29390 3b. Table cells with escapable prefixes after edits
29393 "modes": ["selser"],
29394 "scrubWikitext": true,
29396 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29403 |<span id="x">foo</span>+
29412 # FIXME: This test will fail because
29413 # normalization doesn't realize that the id attribute
29414 # will eliminate the escapable scenario
29416 4a. Table cells without escapable prefixes after edits
29419 "modes": ["selser"],
29420 "scrubWikitext": true,
29422 [ "#x", "html", "-" ]
29435 ## This tests normalizer's ability to discriminate between
29436 ## cells having identical content.
29438 4b. Table cells without escapable prefixes after edits
29441 "modes": ["selser"],
29442 "scrubWikitext": true,
29444 [ "td", "html", "-" ]
29457 ## This tests normalizer's ability to not be tripped by
29458 ## comments (and whitespace)
29460 4c. Table cells without escapable prefixes after edits
29463 "modes": ["selser"],
29464 "scrubWikitext": true,
29466 [ "table tbody tr td:first-child", "remove" ]
29481 ## This tests normalizer's ability to handle HTML cells
29483 4d. Table cells without escapable prefixes after edits
29486 "modes": ["selser"],
29487 "scrubWikitext": true,
29489 [ "td", "html", "-" ]
29494 <tr><td>a</td></tr>
29498 <tr><td>-</td></tr>
29502 ## T111151 Remove font elements without attributes
29504 5a. font tags without attributes should be dropped in scrubWikitext mode
29507 "modes": ["html2wt"],
29508 "scrubWikitext": true
29512 <font><font>bar</font></font>
29513 <font class="x">boo</font>
29517 <font class="x">boo</font>
29521 5b. font tags should not be dropped without scrubWikitext being enabled
29524 "modes": ["html2wt"],
29525 "scrubWikitext": false
29534 Escape nowiki DOM elements
29538 <nowiki><i>foo</i></nowiki>
29540 <nowiki>''foo''</nowiki>
29543 # This is meant to be an interim fix while we go about figuring out
29544 # how to not introduce these trailing <nowiki/>s in the first place.
29546 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29550 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29552 <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>
29553 <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>
29567 New list is serialized on newlines
29571 <p>The quick brown fox jumps over the lazy dog.</p><ul>
29575 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
29577 The quick brown fox jumps over the lazy dog.
29583 The quick onyx goblin jumps over the lazy dwarf.
29587 New lists in formatting elements serialized w/o newlines
29599 <small><ul><li>hi</li></ul></small>
29611 New list in table doesn't need newlines
29615 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
29624 # ---------------------------------------------------
29625 # End of tests spec'ing wikitext serialization norms |
29626 # ---------------------------------------------------
29630 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29638 <td><b>c</b><p>d</p></td>
29657 Anchor without href scenarios
29659 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29662 <a class="no">dice</a>
29667 <span name="foo"></span>
29671 New transclusion added after a list should be serialized after the list
29675 <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>
29681 # -----------------------------------------------------------------
29682 # End of section for Parsoid-only html2wt tests for serialization
29684 # -----------------------------------------------------------------
29686 # -----------------------------------------------------------------
29687 # The following section of tests are primarily to spec behavior of
29688 # the selective serializer. All these tests have manual selser
29689 # changes. The automated selser changes for all tests handle the
29690 # wide variation of changes, but these tests here capture specs
29691 # deterministically.
29692 # ----------------------------------------------------------------
29696 Selser: New comments should not be lost
29699 "modes": ["selser"],
29701 [ "#a", "after", "<!--c1-->" ],
29702 [ "#b", "before", "<!--c2-->" ]
29706 <span id="a">a</span>
29708 <span id="b">b</span>
29710 <span id="a">a</span><!--c1-->
29712 <!--c2--><span id="b">b</span>
29717 Selser: Check for validity of DSR before using it
29720 "modes": ["selser"],
29722 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29726 <span id="a">a</span>
29728 {{DISPLAYTITLE:foo}}
29729 <span id="a">a</span>
29733 1. DOMDiff: Changes to <ref> content should be looked up using id
29736 "modes": ["selser"],
29738 ["#X", "after", "bar"],
29739 ["#Y", "after", "baz"]
29743 X <ref><span id="X">foo</span></ref>
29746 <ref name="a"><span id="Y">foo</span></ref>
29749 X <ref><span id="X">foo</span>bar</ref>
29752 <ref name="a"><span id="Y">foo</span>baz</ref>
29757 2. DOMDiff: Changes to <ref> content should be looked up using id
29760 "modes": ["selser"],
29762 ["#Z", "after", "bar"]
29766 A <ref>foo bar for a</ref>
29767 B <ref group="X" name="b" />
29771 <references group="X">
29772 <ref name="b"><span id="Z">foo</span></ref>
29775 A <ref>foo bar for a</ref>
29776 B <ref group="X" name="b" />
29780 <references group="X">
29781 <ref name="b"><span id="Z">foo</span>bar</ref>
29786 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29789 "modes": ["selser"],
29791 [ "div:first-child", "text", "bar" ]
29795 <div style="{{1x|color:red;}}%">foo</div>
29797 <div style="{{1x|color:red;}}%">bar</div>
29809 <li class="mw-empty-elt"></li>
29810 <li class="mw-empty-elt"></li>
29817 [[File:Thumb.png|thumb]]
29819 <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>
29821 <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>
29825 unclosed internal link XSS (T137264)
29827 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29829 <p>[[#<script>alert(1)</script>|
29832 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29836 Validating that <style> isn't eaten by tidy (T167349)
29841 <style>.foo::before { content: "<foo>"; }</style>
29842 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29846 <style>.foo::before { content: "<foo>"; }</style>
29847 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29852 Validating that <style> isn't wrapped in a paragraph (T186965)
29856 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29858 <style>.foo::before { content: "<foo>"; }</style>
29860 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29862 But if it's on a line with other content, let it be wrapped.
29864 <style>.foo::before { content: "<foo>"; }</style> bar
29866 foo <style>.foo::before { content: "<foo>"; }</style>
29868 foo <style>.foo::before { content: "<foo>"; }</style> bar
29870 And the same if we have non-paragraph-breaking whitespace
29873 <style>.foo::before { content: "<foo>"; }</style>
29876 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29878 <style>.foo::before { content: "<foo>"; }</style>
29879 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29880 <p>But if it's on a line with other content, let it be wrapped.
29881 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
29882 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
29883 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
29884 </p><p>And the same if we have non-paragraph-breaking whitespace
29886 <style>.foo::before { content: "<foo>"; }</style>
29892 Validating that <link> isn't wrapped in a paragraph (T186965)
29896 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29898 <link rel="foo" href="bar"/>
29900 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29902 But if it's on a line with other content, let it be wrapped.
29904 <link rel="foo" href="bar"/> bar
29906 foo <link rel="foo" href="bar"/>
29908 foo <link rel="foo" href="bar"/> bar
29910 And the same if we have non-paragraph-breaking whitespace
29913 <link rel="foo" href="bar"/>
29916 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29918 <link rel="foo" href="bar"/>
29919 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29920 <p>But if it's on a line with other content, let it be wrapped.
29921 </p><p><link rel="foo" href="bar"/> bar
29922 </p><p>foo <link rel="foo" href="bar"/>
29923 </p><p>foo <link rel="foo" href="bar"/> bar
29924 </p><p>And the same if we have non-paragraph-breaking whitespace
29926 <link rel="foo" href="bar"/>
29932 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29934 wgFragmentMode=[ 'html5', 'legacy' ]
29936 ==A&B&C&amp;D&amp;amp;E==
29937 [[#A&B&C&amp;D&amp;amp;E]]
29939 <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>
29940 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29943 <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>
29944 <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>
29948 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29950 wgFragmentMode=[ 'legacy' ]
29952 ==A&B&C&amp;D&amp;amp;E==
29953 [[#A&B&C&amp;D&amp;amp;E]]
29955 <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>
29956 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29961 Decoding of HTML entities in embedded HTML tags
29963 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29965 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29968 <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>
29972 Decoding of HTML entities in indicator names for IDs (T104196)
29974 parsoid=wt2html,html2html
29977 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29979 1&2&3&4&amp;5=Indicator
29982 <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>
29985 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29987 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29991 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29993 1&2&3&4&amp;5=Indicator
29996 <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>
29999 # This fragment mode is what Parsoid supports.
30001 HTML5 ids: fallback to legacy
30003 wgFragmentMode=[ 'html5', 'legacy' ]
30015 ==Hey < # " > % : '==
30016 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30018 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30020 <!-- These two links should produce identical HTML -->
30021 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30024 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30026 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30027 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30028 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30029 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30030 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30031 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30035 <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>
30036 <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>
30037 <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>
30038 <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>
30039 <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>
30040 <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>
30041 <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>
30042 </p><p>💩 <span id="💩"></span>
30043 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30046 <h2 id="Foo_bar">Foo bar</h2>
30048 <h2 id="foo_Bar_2">foo Bar</h2>
30050 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30052 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30054 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30056 <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>
30057 <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>
30059 <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>
30061 <!-- These two links should produce identical HTML -->
30062 <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>
30065 # Parsoid doesn't support this mode
30067 HTML5 ids: legacy with a fallback to modern
30069 wgFragmentMode=[ 'legacy', 'html5' ]
30081 ==Hey < # " > % : '==
30082 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30084 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30086 <!-- These two links should produce identical HTML -->
30087 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30090 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30092 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30093 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30094 <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>
30095 <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>
30096 <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>
30097 <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>
30101 <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>
30102 <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>
30103 <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>
30104 <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>
30105 <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>
30106 <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>
30107 <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>
30108 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30109 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30113 # Parsoid doesn't support this mode.
30115 HTML5 ids: no legacy
30117 wgFragmentMode=[ 'html5' ]
30129 ==Hey < # " > % : '==
30130 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30132 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30134 <!-- These two links should produce identical HTML -->
30135 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30138 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30140 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30141 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30142 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30143 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30144 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30145 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30149 <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>
30150 <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>
30151 <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>
30152 <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>
30153 <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>
30154 <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>
30155 <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>
30156 </p><p>💩 <span id="💩"></span>
30157 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30162 T90902: Normalize weird characters in section IDs
30164 wgFragmentMode=[ 'html5', 'legacy' ]
30170 <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>
30171 <p><a href="#Foo_bar">#Foo bar</a>
30174 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30175 <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>
30179 T51672: Test for brackets in attributes of elements in external link texts
30181 [http://example.com/ link <span title="title with [brackets]">span</span>]
30182 [http://example.com/ link <span title="title with [brackets]">span</span>]
30185 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30186 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30189 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30190 <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>
30194 T72875: Test for brackets in attributes of elements in internal link texts
30196 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30197 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30200 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30201 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30204 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30205 <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>
30209 T179544: {{anchorencode:}} output should be always usable in links
30211 wgFragmentMode=[ 'html5' ]
30213 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30215 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30218 <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>
30221 ## ------------------------------
30222 ## Parsoid section-wrapping tests
30223 ## ------------------------------
30225 Section wrapping for well-nested sections (no leading content)
30228 "wrapSections": true
30249 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30252 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30255 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30258 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30261 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30264 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30271 Section wrapping for well-nested sections (with leading content)
30274 "wrapSections": true
30279 Para 2 with a <div>nested in it</div>
30292 <section data-mw-section-id="0"><p>Para 1.</p>
30294 <p>Para 2 with a </p><div>nested in it</div>
30298 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30301 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30304 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30307 </section></section>
30311 Section wrapping with template-generated sections (good nesting 1)
30314 "wrapSections": true
30331 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30334 <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">
30335 </span><p about="#mwt1">b</p>
30336 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30339 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30343 # In this example, the template scope is mildly expanded to incorporate the
30344 # trailing newline after the transclusion since that is part of section 1.1.1
30346 Section wrapping with template-generated sections (good nesting 2)
30349 "wrapSections": true,
30350 "modes": ["wt2html", "wt2wt"]
30365 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30368 <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">
30369 </span><p about="#mwt1">b</p><span about="#mwt1">
30370 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30371 </span><p about="#mwt1">d</p><span about="#mwt1">
30372 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30376 # In this example, the template scope is mildly expanded to incorporate the
30377 # trailing newline after the transclusion since that is part of section 1.2.1
30379 Section wrapping with template-generated sections (good nesting 3)
30382 "wrapSections": true,
30383 "modes": ["wt2html", "wt2wt"]
30401 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30404 <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">
30405 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30406 </span><p about="#mwt1">b</p><span about="#mwt1">
30407 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30408 </span><p about="#mwt1">c</p><span about="#mwt1">
30409 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30410 </span><p about="#mwt1">d</p><span about="#mwt1">
30411 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30415 # Because of section-wrapping and template-wrapping interactions,
30416 # the scope of the template is expanded so that the template markup
30417 # is valid in the presence of <section> tags.
30418 # This exercises the s1 is null scenario in the wrapSections code
30420 Section wrapping with template-generated sections (bad nesting 1)
30423 "wrapSections": true
30437 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30440 <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"]}'>
30441 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30442 </span><p about="#mwt1">b
30443 </p><span about="#mwt1">
30445 </span><p about="#mwt1">c</p><span about="#mwt1">
30446 </span></section></div></section>
30449 # Because of section-wrapping and template-wrapping interactions,
30450 # the scope of the template is expanded so that the template markup
30451 # is valid in the presence of <section> tags.
30452 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30454 Section wrapping with template-generated sections (bad nesting 2)
30457 "wrapSections": true
30475 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30478 </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">
30479 </span><p about="#mwt1">b</p><span about="#mwt1">
30480 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30481 </span><p about="#mwt1">c</p><span about="#mwt1">
30483 </span><p about="#mwt1">d</p><span about="#mwt1">
30485 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
30489 # Because of section-wrapping and template-wrapping interactions,
30490 # additional template wrappers are added to <section> tags
30491 # so that template wrapping semantics are valid whether section
30492 # tags are retained or stripped. But, the template scope can expand
30493 # greatly when accounting for section tags.
30494 # This exercises the s1 and s2 are in different subtrees scenario
30496 Section wrapping with template-generated sections (bad nesting 3)
30499 "wrapSections": true,
30500 "modes": ["wt2html", "wt2wt"]
30518 <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>
30521 <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">
30522 </span><p about="#mwt1">b</p><span about="#mwt1">
30523 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
30524 </span><p about="#mwt1">c</p>
30527 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
30532 Section wrapping with uneditable lead section + div wrapping multiple sections
30535 "wrapSections": true
30540 <div style="border:1px solid red;">
30557 <section data-mw-section-id="-1"><p>foo</p>
30559 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30560 <section data-mw-section-id="1"><h1 id="1">1</h1>
30563 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30566 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30570 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30573 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30575 </section></section>
30579 Section wrapping with editable lead section + div overlapping multiple sections
30582 "wrapSections": true
30589 <div style="border:1px solid red;">
30606 <section data-mw-section-id="0"><p>foo</p>
30608 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
30610 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30613 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30616 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30621 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30624 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30626 </section></section>
30630 HTML header tags should not be wrapped in section tags
30633 "wrapSections": true
30646 <section data-mw-section-id="0"><p>foo</p>
30648 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30650 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
30652 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30654 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
30658 Lead section containing only whitespace and comments.
30661 "wrapSections": true
30665 <!-- this is a comment, presumably significant to editors -->
30672 <section data-mw-section-id="0" data-parsoid="{}">
30673 <!-- this is a comment, presumably significant to editors -->
30674 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30677 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30682 Pseudo-sections emitted by templates should have id -2
30685 "wrapSections": true
30695 <section data-mw-section-id="-1"><p>foo</p>
30696 </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}}]}'>
30697 <section data-mw-section-id="-1"><h2 id="a">a</h2>
30698 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
30699 </section></div><span about="#mwt1">
30703 ##########################################################################
30704 Tests demonstrating white-space insensitivity in input wikitext
30705 for wikitext headings, wikitext list items, and wikitext table captions,
30706 headings, and cells. HTML versions of the same should preserve whitespace.
30707 ##########################################################################
30709 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
30712 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
30713 == <!--c2--> <!--c2--> Tabs <!--c3--><!--c4--> ==
30714 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
30715 ; <!--term to define--> term : <!--term's definition--> definition
30717 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
30719 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
30721 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30723 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
30725 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
30728 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30731 <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>
30732 <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>
30733 <ul><li>List item</li></ul>
30734 <dl><dt>term </dt>
30735 <dd>definition</dd></dl>
30737 <caption>Table Caption
30740 <th>Table Heading 1</th>
30741 <th>Table Heading 2
30744 <td>Table Cell 1</td>
30748 <td>class="foo"</td>
30752 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
30753 </td></tr></tbody></table>
30756 <td>Table Cell 1</td>
30758 </td></tr></tbody></table> foo</dd></dl>
30761 # Looks like <caption> is not accepted in HTML
30763 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
30766 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
30767 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
30769 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
30770 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
30773 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
30774 <ul><li> List item </li></ul>
30776 <tbody><tr><th> Table Heading </th><th></th></tr>
30777 <tr><td> Table Cell </td><th></th></tr>
30782 Do not trim whitespace in links and quotes
30784 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
30785 [[Foo| some text ]]
30787 <p>foo <i> italic </i> and <b> bold </b>
30788 <a href="/wiki/Foo" title="Foo"> some text </a>
30793 Remove p tags surrounding a single element in a figcaption
30797 [[File:Foobar.jpg|right|200x200px|Caption]]
30799 <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>
30803 Selser preserves lack of newline before list and allows newline after the list
30806 "modes": ["selser"],
30807 "scrubWikitext": true,
30809 [ "ul", "after", "<p>footer</p>" ]
30826 Selser does not introduce newlines between unedited paragraph preceding the list
30829 "modes": ["selser"],
30831 [ "table tbody tr td p:last-child", "empty" ]
30853 Selser does not introduce newlines between unedited paragraph following the list
30856 "modes": ["selser"],
30858 [ "table tbody tr td p:first-child", "empty" ]
30880 Remove a list item but do not insert newline above list
30883 "modes": ["selser"],
30885 [ "ul li:last-child", "remove" ]