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
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
41 # For testing purposes, temporary articles can created:
42 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
43 # where '/' denotes a newline.
45 # This is the standard article assumed to exist.
82 MediaWiki:bad image list
84 * [[File:Bad.jpg]] except [[Nasty page]]
112 Template:echo_with_span
118 Template:echo_with_div
131 Template:table_attribs
134 |</noinclude>style="color:red;"|Foo
138 Template:table_attribs_2
141 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_3
149 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
153 Template:table_attribs_4
155 | style="background-color:#DC241f;" width="10px" |
159 Template:table_attribs_5
162 |</noinclude>style="color:red;"||Bar
166 Template:table_attribs_6
168 style="background: <nowiki>
175 Template:table_attribs_7
178 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
182 Template:table_header_cells
184 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
190 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
194 Template:PartialTable
201 Template:image_attribs
204 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
207 ## See T48811 for details
209 Template:mixed_attr_content_template
211 style="color:red;" title="T48811"
217 Template:definition_list
264 Template:EmptyTRWithHTMLAttrTest
267 <tr align="center"></tr>
268 <tr><td>foo</td></tr>
269 <tr align="center"></tr>
270 <tr><td>bar</td></tr>
287 This is a simple paragraph.
289 <p>This is a simple paragraph.
294 Paragraphs with extra newline spacing
317 Paragraphs with newline spacing with comment lines in between
325 <!--foo--><!--More than 1 comment, still stripped-->
329 <!--foo--> <!----> <!-- bar -->
390 Paragraphs with newline spacing with non-empty white-space lines in between
417 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
425 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
464 Extra newlines: More paragraphs with indented comment
479 Extra newlines followed by heading
494 <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>
495 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
498 <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>
503 Extra newlines between heading and content are swallowed
511 <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>
512 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
519 http://fr.wikipedia.org/wiki/🍺
520 <!-- EasterEgg we love beer, better be able be able to link to it -->
522 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
526 # Note that the html+tidy output removes the spaces after the <li>,
527 # which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
528 # This is an issue for all tests with lists. We intentionally do
529 # *not* add html+tidy clauses for these, as we don't want to
530 # document/test the broken behavior. (Parsoid matches the non-tidy
531 # output in these cases.)
540 <li> Item 2</li></ul>
548 * plain''italic''plain
549 * plain''italic''plain''italic''plain
550 * plain'''bold'''plain
551 * plain'''bold'''plain'''bold'''plain
552 * plain''italic''plain'''bold'''plain
553 * plain'''bold'''plain''italic''plain
554 * plain''italic'''bold-italic'''italic''plain
555 * plain'''bold''bold-italic''bold'''plain
556 * plain'''''bold-italic'''italic''plain
557 * plain'''''bold-italic''bold'''plain
558 * plain''italic'''bold-italic'''''plain
559 * plain'''bold''bold-italic'''''plain
560 * plain l'''italic''plain
561 * plain l''''bold''' plain
564 <li> plain<i>italic</i>plain</li>
565 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
566 <li> plain<b>bold</b>plain</li>
567 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
568 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
569 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
570 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
571 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
572 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
573 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
574 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
575 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
576 <li> plain l'<i>italic</i>plain</li>
577 <li> plain l'<b>bold</b> plain</li></ul>
581 # this example taken from the [[simple:Moon]] article (bug 47326)
583 Italics and possessives (1)
585 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
587 <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
591 # this example taken from [[en:Flaming Pie]] (bug 49926)
593 Italics and possessives (2)
595 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
597 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
601 # this example taken from [[en:Dictionary]] (bug 49926)
603 Italics and possessives (3)
605 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''.
607 <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>.
613 ### 2-quote opening sequence tests
616 Italics and bold: 2-quote opening sequence: (2,2)
625 Italics and bold: 2-quote opening sequence: (2,3)
634 Italics and bold: 2-quote opening sequence: (2,4)
644 # same html as previous, but wikitext adjusted to match parsoid html2wt
646 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
648 ''foo<nowiki>''</nowiki>''
654 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
656 Italics and bold: 2-quote opening sequence: (2,5)
669 # same html as previous, but wikitext adjusted to match parsoid html2wt
671 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
673 ''foo'''''<nowiki/>'''
684 ### 3-quote opening sequence tests
688 Italics and bold: 3-quote opening sequence: (3,2)
697 Italics and bold: 3-quote opening sequence: (3,3)
706 Italics and bold: 3-quote opening sequence: (3,4)
714 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
716 Italics and bold: 3-quote opening sequence: (3,5)
729 # same html as previous, but wikitext adjusted to match parsoid html2wt
731 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
733 '''foo'''''<nowiki/>''
744 ### 4-quote opening sequence tests
748 Italics and bold: 4-quote opening sequence: (4,2)
758 # same html as previous, but wikitext adjusted to match parsoid html2wt
760 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
762 <nowiki>''</nowiki>''foo''
769 Italics and bold: 4-quote opening sequence: (4,3)
778 Italics and bold: 4-quote opening sequence: (4,4)
788 # same html as previous, but wikitext adjusted to match parsoid html2wt
790 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
798 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
800 Italics and bold: 4-quote opening sequence: (4,5)
809 <p>'<b>foo</b><i></i>
813 # same html as previous, but wikitext adjusted to match parsoid html2wt
815 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
817 '<nowiki/>'''foo'''''<nowiki/>''
822 <p>'<b>foo</b><i></i>
828 ### 5-quote opening sequence tests
832 Italics and bold: 5-quote opening sequence: (5,2)
842 # same html as previous, but wikitext adjusted to match parsoid html2wt
844 Italics and bold: 5-quote opening sequence: (5,2+3)
853 Italics and bold: 5-quote opening sequence: (5,3)
863 # same html as previous, but wikitext adjusted to match parsoid html2wt
865 Italics and bold: 5-quote opening sequence: (5,3+2)
874 Italics and bold: 5-quote opening sequence: (5,4)
880 <p><i><b>foo'</b></i>
885 Italics and bold: 5-quote opening sequence: (5,5)
894 Italics and bold: 5-quote opening sequence: (5,6)
898 <p><i><b>foo'</b></i>
903 ### multiple quote sequences in a line
906 Italics and bold: multiple quote sequences: (2,4,2)
912 <p><i>foo'<b>bar</b></i>
917 # same html as previous, but wikitext adjusted to match parsoid html2wt
919 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
921 ''foo'<nowiki/>'''bar'''''
923 <p><i>foo'<b>bar</b></i>
929 Italics and bold: multiple quote sequences: (2,4,3)
935 <p><i>foo'<b>bar</b></i>
940 # same html as previous, but wikitext adjusted to match parsoid html2wt
942 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
944 ''foo'<nowiki/>'''bar'''''
946 <p><i>foo'<b>bar</b></i>
952 Italics and bold: multiple quote sequences: (2,4,4)
958 <p><i>foo'<b>bar'</b></i>
963 # same html as previous, but wikitext adjusted to match parsoid html2wt
965 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
967 ''foo'<nowiki/>'''bar'<nowiki/>'''''
969 <p><i>foo'<b>bar'</b></i>
974 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
976 Italics and bold: multiple quote sequences: (3,4,2)
985 <p><b>foo'</b>bar<i></i>
989 # same html as previous, but wikitext adjusted to match parsoid html2wt
991 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
995 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
1000 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1005 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1007 Italics and bold: multiple quote sequences: (3,4,3)
1016 <p><b>foo'</b>bar<b></b>
1020 # same html as previous, but wikitext adjusted to match parsoid html2wt
1022 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1024 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1029 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1034 ### other quote tests
1037 Italics and bold: other quote tests: (2,3,5)
1039 ''this is about '''foo's family'''''
1041 <p><i>this is about <b>foo's family</b></i>
1047 Italics and bold: other quote tests: (2,(3,3),2)
1049 ''this is about '''foo's''' family''
1051 <p><i>this is about <b>foo's</b> family</i>
1057 Italics and bold: other quote tests: (3,2,3,2)
1061 '''this is about ''foo'''s family''
1063 <p><b>this is about <i>foo</i></b><i>s family</i>
1068 # same html as previous, but wikitext adjusted to match parsoid html2wt
1070 Italics and bold: other quote tests: (3,2,3+2+2,2)
1072 '''this is about ''foo'''''<nowiki/>''s family''
1074 <p><b>this is about <i>foo</i></b><i>s family</i>
1080 Italics and bold: other quote tests: (3,2,3,3)
1082 '''this is about ''foo'''s family'''
1084 <p>'<i>this is about </i>foo<b>s family</b>
1090 Italics and bold: other quote tests: (3,(2,2),3)
1092 '''this is about ''foo's'' family'''
1094 <p><b>this is about <i>foo's</i> family</b>
1100 Italicized possessive
1102 The ''[[Main Page]]'''s talk page.
1104 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1107 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1111 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1112 (Requires tidy for PHP parser output to be fixed up)
1114 parsoid=wt2html,wt2wt
1131 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1132 <td><i>a</i></td><td><i>b</i></td></tr>
1141 Non-html5 tags should be accepted
1143 <center>''foo''</center>
1145 <font>''foo''</font>
1146 <strike>''foo''</strike>
1149 <center><i>foo</i></center>
1150 <p><big><i>foo</i></big>
1151 <font><i>foo</i></font>
1152 <strike><i>foo</i></strike>
1158 <wbr> is valid wikitext (bug 52468)
1166 # <strike> is HTML4, <s> is HTML4/5.
1168 <s> or <strike> for strikethrough
1170 <strike>strike</strike>
1174 <p><strike>strike</strike>
1182 Text-level semantic html elements in wikitext
1185 <strong>text</strong>
1201 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1208 <strong>text</strong>
1224 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1232 # test cases taken from
1233 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1235 Ruby markup (W3C-style)
1237 ; Mono-ruby for individual base characters
1238 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1240 : <ruby>今日<rt>きょう</rt></ruby>
1242 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1244 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1246 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1248 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1249 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1250 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1253 <dl><dt> Mono-ruby for individual base characters</dt>
1254 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1255 <dt> Group ruby</dt>
1256 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1257 <dt> Jukugo ruby</dt>
1258 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1259 <dt> Inline ruby</dt>
1260 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1261 <dt> Double-sided ruby</dt>
1262 <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>
1264 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1265 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1266 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1271 # The next two test different paths in the sanitizer.
1273 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1275 <blockquote|>a</blockquote>
1277 <b→> doesn't terminate </b→>
1279 <bä> doesn't terminate </bä>
1281 <boo> doesn't terminate </boo>
1283 <s.foo> doesn't terminate </s.foo>
1287 <p><blockquote|>a</blockquote>
1288 </p><p><b→> doesn't terminate </b→>
1289 </p><p><bä> doesn't terminate </bä>
1290 </p><p><boo> doesn't terminate </boo>
1291 </p><p><s.foo> doesn't terminate </s.foo>
1292 </p><p><sub-ID#1>
1296 # There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
1297 # If the non-word-character tag made it through the sanitizer, tidy
1298 # would munge it up.
1300 Non-word characters don't terminate tag names + tidy
1302 <blockquote|>a</blockquote>
1304 <b→> doesn't terminate </b→>
1306 <bä> doesn't terminate </bä>
1308 <boo> doesn't terminate </boo>
1310 <s.foo> doesn't terminate </s.foo>
1314 <p><blockquote|>a</p>
1315 <p><b→> doesn't terminate </b→></p>
1316 <p><bä> doesn't terminate </bä></p>
1317 <p><boo> doesn't terminate </boo></p>
1318 <p><s.foo> doesn't terminate </s.foo></p>
1319 <p><sub-ID#1></p>
1323 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1324 ### This checks that HTML5 tags (with non-word characters in the tag
1325 ### name) make it safely through the parser -- the Sanitizer will
1326 ### munge them later, as it should.
1329 Non-word characters are valid in extension tags (T19663)
1340 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1344 Isolated close tags should be treated as literal text (bug 52760)
1352 <p><s.foo>s</p>
1354 <p><s.foo>s</p>
1358 ### Special characters
1362 Bare pipe character (bug 52363)
1371 Bare pipe character from a template (bug 52363)
1380 ### <nowiki> test cases
1384 <nowiki> unordered list
1386 <nowiki>* This is not an unordered list item.</nowiki>
1388 <p>* This is not an unordered list item.
1391 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1397 <nowiki>Lorem ipsum dolor
1405 <p>Lorem ipsum dolor
1414 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1424 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1426 <nowiki><span class="error"></nowiki>
1428 <p><span class="error">
1435 :There is not nowiki.
1436 :There is <nowiki>nowiki</nowiki>.
1438 #There is not nowiki.
1439 #There is <nowiki>nowiki</nowiki>.
1441 *There is not nowiki.
1442 *There is <nowiki>nowiki</nowiki>.
1444 <dl><dd>There is not nowiki.</dd>
1445 <dd>There is nowiki.</dd></dl>
1446 <ol><li>There is not nowiki.</li>
1447 <li>There is nowiki.</li></ol>
1448 <ul><li>There is not nowiki.</li>
1449 <li>There is nowiki.</li></ul>
1452 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1453 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1455 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1456 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1458 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1459 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1463 Entities inside <nowiki>
1465 <nowiki><</nowiki>
1472 Entities inside template parameters
1478 <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>
1482 Properly escape nowiki when combined with other wiki markup
1486 <p>* </nowiki> tag</p>
1488 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1492 T93824: Put escaped HTML tags inside nowiki
1496 <p><h2>foo</h2></p>
1498 <nowiki><h2>foo</h2></nowiki>
1502 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1506 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1507 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1508 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1510 This text: L'[[Foo]]
1511 This text: L<nowiki>''</nowiki>[[Foo]]
1512 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1515 # This test fails because wikitext whitespace is not normalized before comparing.
1517 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1521 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1524 This text : L<nowiki>''</nowiki>[[Foo]]
1527 # This test and the next one are html2wt only as they test that incorrect wikitext
1528 # passed in template arguments gets escaped or wrapped in nowikis where required.
1530 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1534 <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>
1535 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1537 {{echo|foo{{!}}bar}}
1538 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1542 T53961: Output correct nowikis in template arguments
1546 <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>
1547 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1548 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1549 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1550 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1553 {{echo|<nowiki>a }} b</nowiki>}}
1554 {{echo|<nowiki>a [[ b</nowiki>}}
1555 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1556 {{echo|a <nowiki>}</nowiki>}}
1560 Cases where "!!" needs nowiki protection
1565 <tr><th>this needs protection !! here</th></tr>
1569 <tr><th>this does not need
1570 protection !! here</th></tr>
1574 !<nowiki>this needs protection !! here</nowiki>
1587 Comments and Indent-Pre
1589 <!-- comment 1 --> asdf
1591 <!-- comment 1 --> asdf
1594 <!-- comment 1 --> asdf
1595 <!-- comment 2 -->xyz
1597 <!-- comment 1 --> asdf
1598 <!-- comment 2 --> xyz
1654 asdf<!-- comment 1 -->jkl
1664 <!-- foo --> b <!-- bar -->
1678 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1684 Comment semantics and delimiters
1686 <!-- --><!----><!-----><!------>
1690 <!-- --><!----><!-----><!------>
1694 Comment semantics and delimiters, redux
1696 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1697 -- foo -- funky huh? ... -->
1701 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1702 -- foo -- funky huh? ... -->
1706 Comment semantics and delimiters: directors cut
1708 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1709 everything starting with < followed by !-- until the first -- and > we see,
1710 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1716 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1717 everything starting with < followed by !-- until the first -- and > we see,
1718 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1723 Comment semantics: nesting
1725 <!--<!-- no, we're not going to do anything fancy here -->-->
1730 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1733 # Parsoid closes the unclosed comment, even if it means a slight
1736 Comment semantics: unclosed comment at end
1738 parsoid=wt2html,html2html
1740 <!--This comment will run out to the end of the document
1744 <!--This comment will run out to the end of the document-->
1748 Comment semantics: normalize comments to play nice with XML and browsers
1750 <!-- Browsers --!> think this is closed -->
1751 <!--> This would normally be text -->
1752 <!---> As would this -->
1753 <!-- XML doesn't like trailing dashes -------->
1754 <!-- Nor doubled hyphens -- anywhere in the data -->
1755 But this is not a comment.
1757 <p>But this is not a comment.
1760 <!-- Browsers --!> think this is closed -->
1761 <!--> This would normally be text -->
1762 <!---> As would this -->
1763 <!-- XML doesn't like trailing dashes -------->
1764 <!-- Nor doubled hyphens -- anywhere in the data -->
1765 <p>But this is not a comment.</p>
1769 Comment semantics: round-trip even text which contains encoded -->
1771 <!-- hello & goodbye - > --> --&gt; --&xx -->
1773 <!-- hello & goodbye - > --> --&gt; --&xx -->
1777 Comment in template title
1786 Comment on its own line post-expand
1798 Comment on its own line post-expand with non-significant whitespace
1810 Multiple comments should still parse as SOL-transparent
1812 parsoid=wt2html,wt2wt
1815 <!--c2--><!--c3--><!--c4-->*b
1824 <!--c2--><!--c3--><!--c4-->
1831 ### paragraph wrapping tests
1846 Block tag on one line (<div>)
1862 Block tag on one line (<blockquote>)
1864 a <blockquote>foo</blockquote>
1868 a <blockquote>foo</blockquote>
1880 Block tag on both lines (<div>)
1897 Block tag on both lines (<blockquote>)
1899 a <blockquote>foo</blockquote>
1901 b <blockquote>foo</blockquote>
1903 a <blockquote>foo</blockquote>
1904 b <blockquote>foo</blockquote>
1918 Multiple lines without block tags
1942 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1943 # So, we have a separate section for Parsoid. We don't want
1944 # to mimic this stripping behavior in Parsoid. It affects
1945 # editing experience and also requires us to maintain additional
1948 Empty lines between lines with block tags
1986 <div data-parsoid='{"stx":"html"}'></div>
1989 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1992 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1994 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1997 <div data-parsoid='{"stx":"html"}'>e</div>
2000 ## PHP parser emits output which is broken
2002 Unclosed HTML p-tags should be handled properly
2015 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2020 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2021 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2024 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2028 a [[Category:A1]] [[Category:A2]]
2033 <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"/>
2037 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2043 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2047 ### Preformatted text
2056 And a [[Main Page|link]]
2062 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2067 Tabs don't trigger preformatted text
2071 This is preformatted text.
2077 <pre>This is preformatted text.
2082 preformatted text.</p>
2083 <pre>This is preformatted text.
2088 Space before tab needs nowiki pre protection
2094 <nowiki> </nowiki> a
2098 Ident preformatting with inline content
2109 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2126 Regression with preformatted in <center>
2140 Bug 52763: Preformatted in <blockquote>
2146 indented cell (no pre-wrapping!)
2156 <p> indented cell (no pre-wrapping!)
2164 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2181 Bug 15491: <ins>/<del> in blockquote
2184 Foo <del>bar</del> <ins>baz</ins> quux
2188 <p>Foo <del>bar</del> <ins>baz</ins> quux
2194 # Note that the p-wrapping is newline sensitive, which could be
2195 # considered a bug: tidy will wrap only the 'Foo' in the example
2196 # below in a <p> tag. (see comment 23-25 of bug #6200)
2198 Bug 15491: <ins>/<del> in blockquote (2)
2200 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2203 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2209 <del>bar</del> <ins>baz</ins> quux</blockquote>
2213 <pre> with attributes (bug 3202)
2215 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2217 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2222 <pre> with width attribute (bug 3202)
2224 <pre width="8">Narrow screen goodies</pre>
2226 <pre width="8">Narrow screen goodies</pre>
2231 <pre> with forbidden attribute (bug 3202)
2233 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2235 <pre width="8">Narrow screen goodies</pre>
2240 Entities inside <pre>
2249 <pre> with forbidden attribute values (bug 3202)
2251 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2253 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2258 <nowiki> inside <pre> (bug 13238)
2266 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2274 <pre><nowiki>Foo</nowiki></pre>
2279 <nowiki> inside of #tag:pre
2281 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2283 <pre>Foo →bar</pre>
2286 <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>
2290 <nowiki> and <pre> preference (first one wins)
2319 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2321 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2324 <p><span typeof="mw:Nowiki">
2333 </pre> inside nowiki
2335 <nowiki></pre></nowiki>
2341 # Parsoid doesn't strip empty tags, like Tidy does.
2343 Empty pre; pre inside other HTML tags (bug 54946)
2345 parsoid=wt2html,wt2wt
2376 HTML pre followed by indent-pre
2386 # Note that tidy removes the empty <p> tags from the start and end.
2387 # Parsoid does not, by design.
2391 <p><pre>foo</pre></p>
2397 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2401 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2409 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2419 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2431 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2452 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2456 {{echo| foo}}{{echo| bar}}
2461 {{echo|<!--cmt--> foo}}
2463 <!--cmt-->{{echo| foo}}
2465 {{echo|{{echo| }}bar}}
2483 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2520 Pres with newline attributes
2525 <pre class="one two">hi</pre>
2529 two" data-parsoid='{"stx":"html"}'>hi</pre>
2533 Things that look like <pre> tags aren't treated as such
2535 Barack Obama <President> of the United States
2536 <President></President>
2538 <p>Barack Obama <President> of the United States
2539 <President></President>
2544 Handle broken pre-like tags (bug 64025)
2548 {{echo|<pre <pre>x</pre>}}
2550 <table><pre </table>
2553 <table><pre </table>
2561 <pre about="#mwt1" typeof="mw:Transclusion" 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>
2570 Parsoid: handle pre with space after attribute
2574 <pre style="width:50%;" >{{echo|foo}}</pre>
2576 <pre style="width:50%;">{{echo|foo}}</pre>
2579 <pre style="width:50%;">{{echo|foo}}</pre>
2582 # TODO / maybe: fix wt2wt for this
2584 Parsoid: Don't paragraph-wrap fosterable content
2610 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2638 #--------------------------------------------------------------------
2639 # Transclusion parameter whitespace stripping tests
2640 # Behavior is different for positional and named parameters
2641 #--------------------------------------------------------------------
2643 Templates: Strip leading and trailing whitespace from named-param values
2647 {{echo|1= {{echo|b}} }}
2660 <ul><li> d</li></ul>
2665 Templates: Don't strip whitespace from positional-param values
2669 {{echo|{{echo|b}} }}
2701 <ul><li> f</li></ul>
2709 Templates: Handle empty comment-and-ws-only lines correctly
2712 <!--should be ignored-->
2713 <!--should be ignored as well-->
2720 <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>
2724 Templates: Handle comments in the target
2727 <!-- should be ignored -->
2730 {{echo<!-- should be ignored -->
2733 {{echo<!-- should be ignored -->|foo}}
2735 {{<!-- should be ignored -->echo|foo}}
2743 <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>
2745 <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>
2747 <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>
2749 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2753 Templates: Handle comments in parameter names (bug 67657)
2756 <!-- should be ignored -->
2760 <!-- should be ignored -->
2763 {{echo|1<!-- should be ignored -->=foo}}
2765 {{echo|<!-- should be ignored -->1=foo}}
2773 <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>
2775 <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>
2777 <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>
2779 <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>
2783 Templates: Other wikitext in parameter names (bug 67657)
2790 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2793 #--------------------------------------------------------------------
2794 # Transclusion parameter escaping tests
2795 #--------------------------------------------------------------------
2797 Templates: Parsoid parameter escaping test 1
2799 {{echo|[foo]|{{echo|[bar]}}}}
2803 <p about="#mwt1" typeof="mw:Transclusion"
2804 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2808 Parsoid: Pipes in external links in template parameter
2810 {{echo|[{{echo|http://example.com}} link]}}
2812 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2814 <p><a rel="mw:ExtLink" 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>
2818 Parsoid: pipe in transclusion parameter
2820 {{echo|http://foo.com/a|b}}
2822 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2824 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2825 typeof="mw:Transclusion"
2826 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|b</a></p>
2830 Parsoid: Pipe in external link target and content in template parameter
2832 parsoid=html2wt,wt2wt
2834 {{echo|[http://foo.com/a|b a|b]}}
2836 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2838 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2839 typeof="mw:Transclusion"
2840 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2841 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2845 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2849 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2851 <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>
2855 Templates: Don't escape already nowiki-escaped text in template parameters
2857 parsoid=html2wt,wt2wt
2859 {{echo|foo<nowiki>|</nowiki>bar}}
2860 {{echo|<nowiki><div></nowiki>}}
2861 {{echo|<nowiki></nowiki>}}
2863 <p>foo|bar <div></p>
2865 <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>
2866 <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>
2867 <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>
2873 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2875 parsoid=html2wt,wt2wt
2877 {{echo|{{echo|1=bar}}}}
2881 <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>
2886 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2892 <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>
2897 Templates: Preserve blank parameter names
2903 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2907 Templates: Preserve blank parameter names in other positions
2909 {{blank_param|bar|=foo}}
2913 <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
2918 ### Parsoid-centric tests for testing RT edge cases for pre
2922 1a. Indent-Pre and Comments
2935 1b. Indent-Pre and Comments
2948 1c. Indent-Pre and Comments
2961 1d. Indent-Pre and Comments
2962 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2975 2a. Indent-Pre and tables
2996 2b. Indent-Pre and tables
3012 2c. Indent-Pre and tables (bug 42252)
3029 2d. Indent-Pre and tables
3046 <tbody><tr><td> b</td></tr>
3051 2e. Indent-Pre and table-line syntax
3064 2f. Indent-pre started by table-line syntax
3083 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3088 Text that should be rendered preformatted
3096 <pre>Text that should be rendered preformatted
3105 3a. Indent-Pre and block tags (single-line html)
3109 c <blockquote> foo </blockquote>
3114 c <blockquote> foo </blockquote>
3115 <pre><span> foo </span>
3118 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3119 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3120 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3121 <pre><span> foo </span>
3138 3b. Indent-Pre and block tags (multi-line html)
3143 <pre>a <span>foo</span>
3148 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3149 b <div data-parsoid='{"stx":"html"}'> foo </div>
3159 3c. Indent-Pre and block tags (pre-content on separate line)
3223 4. Indent-Pre and extension tags
3234 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3238 Render paragraphs when indent-pre is suppressed in blocklevels
3255 4. Multiple spaces at start-of-line
3273 ## NOTE: the leading white-space chars on empty line are significant
3275 5a. White-space in indent-pre
3287 ## NOTE: the leading white-space chars on empty line are significant
3289 5b. White-space in indent-pre
3308 5c. White-space in indent-pre
3321 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3344 7a. Indent-pre and category links
3346 parsoid=wt2html,wt2wt
3348 [[Category:foo]] <!-- No pre-wrapping -->
3349 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3352 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3353 <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 -->
3356 ## We used to, but no longer wt2wt this test since the default serializer
3357 ## will normalize all categories to serialize on their own line.
3358 ## This wikitext usage is going to be fairly uncommon in production and
3359 ## selser will take care of preserving formatting in those scenarios.
3361 7b. Indent-pre and category links
3366 [[Category:foo]] {{echo|b}}
3368 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3369 <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>
3373 Indent-Pre: Newlines in comments shouldn't affect sol state
3387 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3391 HTML-pre: 1. embedded newlines
3426 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3428 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3432 <pre data-parsoid='{"stx":"html"}'>
3437 <pre data-parsoid='{"stx":"html"}'>
3445 HTML-pre: big spaces
3481 <pre data-parsoid='{"stx":"html"}'>
3500 HTML-pre: 2: indented text
3513 HTML-pre: 3: other wikitext
3532 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3541 ### Definition lists
3548 <dl><dt> name </dt>
3549 <dd> Definition</dd></dl>
3554 Definition list for indentation only
3558 <dl><dd> Indented text</dd></dl>
3563 Definition list with no space
3568 <dd>Definition</dd></dl>
3573 Definition list with URL link
3575 ; http://example.com/ : definition
3577 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3578 <dd> definition</dd></dl>
3583 Definition list with bracketed URL link
3585 ;[http://www.example.com/ Example]:Something about it
3587 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3588 <dd>Something about it</dd></dl>
3593 Definition list with wikilink containing colon
3595 ; [[Help:FAQ]]: The least-read page on Wikipedia
3597 <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>
3598 <dd> The least-read page on Wikipedia</dd></dl>
3602 # At Brion's and JeLuF's insistence... :)
3604 Definition list with news link containing colon
3606 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3608 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3609 <dd> This isn't even a real newsgroup!</dd></dl>
3612 <dl><dt> <a rel="mw:ExtLink" 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>
3616 Malformed definition list with colon
3618 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3620 <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>
3625 Definition lists: colon in external link text
3627 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3629 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3630 <dd> OK, I made that up</dd></dl>
3635 Definition lists: colon in HTML attribute
3637 ;<b style="display: inline">bold</b>
3639 <dl><dt><b style="display: inline">bold</b></dt></dl>
3644 Definition lists: self-closed tag
3646 ;one<br/>two : two-line fun
3648 <dl><dt>one<br />two </dt>
3649 <dd> two-line fun</dd></dl>
3654 Bug 11748: Literal closing tags
3658 <dd>test test test test test</dd>
3660 <dd>test test test test test</dd>
3665 <dd>test test test test test</dd>
3667 <dd>test test test test test</dd>
3673 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3676 ; term : description
3681 <dl><dt> term </dt>
3682 <dd> description</dd></dl>
3683 <ul><li> unordered</li></ul>
3690 Definition list with empty definition and following paragraph
3702 Nested definition lists using html syntax
3715 Definition Lists: No nesting: Multiple dd's
3728 Definition Lists: Indentation: Regular
3736 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3741 Definition Lists: Indentation: Missing 1st level
3747 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3752 Definition Lists: Indentation: Multi-level indent
3756 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3761 Definition Lists: Hacky use to indent tables
3768 should be left alone
3770 <dl><dd><dl><dd><table>
3775 </td></tr></table></dd></dl></dd></dl>
3777 should be left alone
3782 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3790 should be left alone
3793 <dl><dd><dl><dd><table><tr>
3796 </tr></table><!-- bar --></dd></dl></dd></dl>
3798 should be left alone</p>
3802 Definition Lists: Hacky use to indent tables, with comment before table
3808 <dl><dd><dl><dd><!-- foo --><table><tr>
3810 </tr></table></dd></dl></dd></dl>
3813 # The trailing whitespace in this test is to catch a regression in
3814 # Parsoid after T54473.
3816 Definition Lists: Hacky use to indent tables (WS-insensitive)
3825 </td></tr></table></dd></dl>
3829 <tbody><tr><td>a</td></tr>
3830 </tbody></table> </dd></dl>
3833 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3834 ## as an empty dt item. It also ignores all but the last ";" when followed
3835 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3836 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3839 ## Ex: ";;t2 ::d2" is transformed into:
3851 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3852 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3863 ## All Parsoid only definition list tests have this difference.
3865 ## See also: https://phabricator.wikimedia.org/T8569
3866 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3869 Table / list interaction: indented table with lists in table contents
3884 <ul><li> b</li></ul>
3888 <ul><li> d</li></ul>
3889 </td></tr></table></dd></dl>
3894 Table / list interaction: lists nested in tables nested in indented lists
3917 </td></tr></table></dd></dl>
3924 Definition Lists: Nesting: Multi-level (Parsoid only)
3954 Definition Lists: Nesting: Test 2 (Parsoid only)
3981 Definition Lists: Nesting: Test 3 (Parsoid only)
4024 Definition Lists: Nesting: Test 4
4029 <dl><dd><dl><dd><dl><dt>t3</dt>
4030 <dd>d3</dd></dl></dd></dl></dd></dl>
4035 ## The Parsoid team believes the following three test exposes a
4036 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4037 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4038 ## It also exposes a "misfeature" in tidy, which doesn't like
4039 ## <dl> tags with a single <dt> child; it converts the <dt> into
4040 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4042 Definition Lists: Mixed Lists: Test 1
4048 <dl><dd><dl><dt><ul><li> foo</li>
4049 <li> bar</li></ul></dt></dl>
4050 <dl><dt> baz</dt></dl></dd></dl>
4085 Definition Lists: Mixed Lists: Test 2
4090 <ul><li><dl><dd> d1</dd>
4091 <dd> d2</dd></dl></li></ul>
4097 Definition Lists: Mixed Lists: Test 3
4102 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4103 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4109 Definition Lists: Mixed Lists: Test 4
4114 <ul><li><dl><dt>d1 </dt>
4117 <dd>d4</dd></dl></li></ul>
4123 Definition Lists: Mixed Lists: Test 5
4129 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4135 Definition Lists: Mixed Lists: Test 6
4140 <ol><li><ul><li><dl><dd>d1
4141 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4147 Definition Lists: Mixed Lists: Test 7
4152 <dl><dd><ul><li> d1</li>
4153 <li> d2</li></ul></dd></dl>
4159 Definition Lists: Mixed Lists: Test 8
4164 <dl><dd><ul><li> d1</li></ul>
4165 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4171 Definition Lists: Mixed Lists: Test 9
4175 <ul><li><dl><dt>foo </dt>
4176 <dd>bar</dd></dl></li></ul>
4182 Definition Lists: Mixed Lists: Test 10
4186 <ul><li><ol><li><dl><dt>foo </dt>
4187 <dd>bar</dd></dl></li></ol></li></ul>
4191 # The Parsoid team disagrees with the PHP parser's seemingly-random
4192 # rules regarding dd/dt on the next two tests. Parsoid is more
4193 # consistent, and recognizes the shared nesting and keeps the
4194 # still-open tags around until the nesting is complete.
4195 # (And tidy again converts <dt> to <dd> before 'bar'.)
4198 Definition Lists: Mixed Lists: Test 11
4203 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4204 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4205 <dl><dt>boo </dt>
4206 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4261 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4262 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4266 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4267 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4276 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4278 # * The test is wrong, there are two colons where there should be :;
4279 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4281 Definition Lists: Weird Ones: Test 1
4283 *#;*::;; foo : bar (who uses this?)
4285 <ul><li><ol><li><dl><dt> foo </dt>
4286 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4305 <dt>bar (who uses this?)</dt>
4337 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4338 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4350 Definition Lists: colons occurring in tags
4368 <dt><span>a:b</span></dt>
4395 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4397 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4398 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4399 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4400 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4402 <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>
4403 <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>
4404 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4408 Definition Lists: colons and tables 1
4420 </td></tr></table></dd></dl>
4424 </td></tr></table></dd></dl>
4428 # Parsoid's output (as documented below) differs from php's in this case.
4429 # This is probably a bug. If we fixup parsoid to match php's output, the
4430 # above test should pass and the below test case can be removed. It is
4431 # unclear which output is more desirable.
4434 Definition Lists: colons and tables 2
4446 </td></tr></table></dd>
4450 </td></tr></table></dd></dl>
4454 Definition Lists: template interaction
4456 ::{{definition_list}}
4459 ::{{definition_list}}
4464 <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">
4465 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4467 <dl><dd data-parsoid='{}'>one
4468 <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">
4469 </span><dd about="#mwt2">two
4471 <dd>three</dd></dl></dd>
4472 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4480 External links: non-bracketed
4482 Non-bracketed: http://example.com
4484 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4488 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4490 External links: numbered
4492 Numbered: [http://example.com]
4493 Numbered: [http://example.net]
4494 Numbered: [http://example.com]
4496 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4497 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4498 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4501 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4502 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4503 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4507 External links: specified text
4509 Specified text: [http://example.com link]
4511 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4516 External links: trail
4518 Linktrails should not work for external links: [http://example.com link]s
4520 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4525 External links: dollar sign in URL
4527 http://example.com/1$2345
4529 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4533 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4535 External links: dollar sign in URL (autonumber)
4537 [http://example.com/1$2345]
4539 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4542 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4546 External links: open square bracket forbidden in URL (bug 4377)
4548 parsoid=wt2html,wt2wt,html2html
4550 http://example.com/1[2345
4552 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4555 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4559 External links: open square bracket forbidden in URL (named) (bug 4377)
4561 parsoid=wt2html,html2html
4563 [http://example.com/1[2345]
4565 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4568 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4571 # parsoid adds a space before the link name
4573 External links: open square bracket forbidden in URL (named) (bug 4377)
4576 [http://example.com/1 [2345]
4578 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4583 External links: nowiki in URL link text (bug 6230)
4585 [http://example.com/ <nowiki>''example site''</nowiki>]
4587 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4592 External links: newline forbidden in text (bug 6230 regression check)
4594 [http://example.com/ first
4597 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4603 External links: Pipe char between url and text
4605 [http://example.com | link]
4607 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4612 External links: protocol-relative URL in brackets
4614 [//example.com/ Test]
4616 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4620 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4622 External links: protocol-relative URL in brackets without text
4626 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4629 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4633 External links: protocol-relative URL in free text is left alone
4637 <p>//example.com/Foo
4642 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4644 foo//example.com/Foo
4646 <p>foo//example.com/Foo
4651 External links: with no contents
4653 [http://en.wikipedia.org/wiki/Foo]
4655 [[wikipedia:Foo|Bar]]
4657 [[wikipedia:Foo|<span>Bar</span>]]
4659 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4660 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4661 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4664 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4665 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4666 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4670 External links: Free with trailing punctuation
4680 http://example.com/url_with_(brackets)
4681 (http://example.com/url_without_brackets)
4682 http://example.com/url_with_entity&
4683 http://example.com/url_with_entity&
4684 http://example.com/url_with_entity&
4685 http://example.com/url_with_entity
4686 http://example.com/url_with_entity 
4687 http://example.com/url_with_entity 
4688 http://example.com/url_with_entity<
4689 http://example.com/url_with_entity<
4690 http://example.com/url_with_entity<
4692 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4693 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4694 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4695 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4696 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4697 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4698 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4699 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4700 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4701 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4702 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4703 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4704 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4705 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4706 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4707 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4708 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4709 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4710 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4713 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4714 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4715 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4716 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4717 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4718 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4719 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4720 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4721 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4722 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4723 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4724 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4725 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4726 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4727 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4728 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4729 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4730 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4731 <a rel="mw:ExtLink" 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>
4735 External links: tricky Parsoid html2html case
4737 parsoid=wt2html,wt2wt,html2html
4739 http://example.com/url_with_entity&amp;
4741 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4744 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4748 External links: Free with trailing quotes (T113666)
4750 '''News:''' Stuff here
4754 <p><b>News:</b> Stuff here
4755 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4758 <p><b>News:</b> Stuff here</p>
4759 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4763 External links: Lone protocols are never linked (T105697)
4782 External links: No preceding word characters allowed (bug 65278)
4784 NOPEhttp://example.com
4785 N0http://example.com
4786 ok:http://example.com
4787 ok-http://example.com
4789 <p>NOPEhttp://example.com
4790 N0http://example.com
4791 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4792 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4797 External links: nofollow domain exception
4799 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4801 <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>.
4808 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4810 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4815 External image from https
4817 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4819 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4824 External image (when not allowed)
4826 wgAllowExternalImages=0
4828 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4830 <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>
4835 Link to non-http image, no img tag
4837 Link to non-http image, no img tag: ftp://example.com/test.jpg
4839 <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>
4844 External links: terminating separator
4846 Terminating separator: http://example.com/thing,
4848 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4853 External links: intervening separator
4855 Intervening separator: http://example.com/1,2,3
4857 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4862 External links: old bug with URL in query
4864 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4866 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4871 External links: old URL-in-URL bug, mixed protocols
4873 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4875 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4879 # Since Parsoid is starting to emit canonical wikitext for links,
4880 # [http://example.com http://example.com] will not RT back to that
4883 External links: URL in text
4887 URL in text: [http://example.com http://example.com]
4889 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4892 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4896 External links: Clickable images
4898 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4900 <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>
4903 <p>ja-style clickable images: <a rel="mw:ExtLink" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
4907 External links: raw ampersand
4909 Old & use: http://x&y
4911 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4916 External links: encoded ampersand
4918 Old & use: http://x&y
4920 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4923 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4927 External links: encoded equals (bug 6102)
4929 http://example.com/?foo=bar
4931 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4934 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4938 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4939 ## does it number them. As discussed in bug 53505, we can identify
4940 ## autonumbered links via CSS.
4944 External links: [raw ampersand]
4946 Old & use: [http://x&y]
4948 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4951 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4954 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4955 # mode will return the [raw ampersand] wikitext
4957 External links: [encoded ampersand]
4959 parsoid=wt2html,wt2wt,html2html
4961 Old & use: [http://x&y]
4963 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4966 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4970 External links: [raw equals]
4972 [http://example.com/?foo=bar]
4974 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4977 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4980 # note that parsoid html is identical to [raw equals] case; so html2wt
4981 # mode will return the [raw equals] wikitext
4983 External links: [encoded equals] (bug 6102)
4985 parsoid=wt2html,wt2wt,html2html
4987 [http://example.com/?foo=bar]
4989 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4992 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4995 # xxx parsoid strips the IDN character, so the round-trip tests will
4996 # obviously fail and are disabled. --cscott
4998 External links: [IDN ignored character reference in hostname; strip it right off]
5000 parsoid=wt2html,wt2wt,html2html
5002 [http://e‌xample.com/]
5004 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5007 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5010 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5011 # Where an external link could easily circumvent the sanitization of the text of
5012 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5013 # test demands a higher standard. That's a bit strange.
5017 # http://example.com -> [http://example.com|http://example.com]
5018 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5020 # The first example is sanitized, but the second is not. Any security benefits
5021 # from this production are trivial to circumvent. Either remove this test and
5022 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5023 # the test accordingly.
5027 # xxx parsoid strips the IDN character, so the round-trip tests will
5028 # obviously fail and are disabled. --cscott
5030 External links: IDN ignored character reference in hostname; strip it right off
5032 parsoid=wt2html,html2html
5034 http://e‌xample.com/
5036 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5039 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5043 External links: www.jpeg.org (bug 554)
5047 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5051 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5053 External links: URL within URL (original bug 2)
5055 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5057 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5060 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5064 BUG 361: URL inside bracketed URL
5066 [http://www.example.com/foo http://www.example.com/bar]
5068 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5073 BUG 361: URL within URL, not bracketed
5075 http://www.example.com/foo?=http://www.example.com/bar
5077 <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>
5082 BUG 289: ">"-token in URL-tail
5084 http://www.example.com/<hello>
5086 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5091 BUG 289: literal ">"-token in URL-tail
5093 http://www.example.com/<b>html</b>
5095 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5098 <p><a rel="mw:ExtLink" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5102 BUG 289: ">"-token in bracketed URL
5104 [http://www.example.com/<hello> stuff]
5106 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5111 BUG 289: literal ">"-token in bracketed URL
5113 [http://www.example.com/<b>html</b> stuff]
5115 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5120 BUG 289: literal double quote at end of URL
5122 http://www.example.com/"hello"
5124 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5129 BUG 289: literal double quote in bracketed URL
5131 [http://www.example.com/"hello" stuff]
5133 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5138 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5140 [http://www.example.com test]
5142 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5147 External links: link text with spaces
5149 [http://www.example.com a b c]
5150 [http://www.example.com ''a'' ''b'']
5152 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5153 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5158 External links: wiki links within external link (Bug 3695)
5160 parsoid=wt2html,html2html
5162 [http://example.com [[wikilink]] embedded in ext link]
5164 <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>
5167 <p><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5171 BUG 787: Links with one slash after the url protocol are invalid
5175 [http:/example.com title]
5177 <p>http:/example.com
5178 </p><p>[http:/example.com title]
5183 Bracketed external links with template-generated invalid target
5185 [{{echo|http:/example.com}} title]
5187 <p>[http:/example.com title]
5192 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5194 ''[http://example.com text'']
5195 [http://example.com '''text]'''
5196 ''Something [http://example.com in italic'']
5197 ''Something [http://example.com mixed''''', even bold]'''
5198 '''''Now [http://example.com both''''']
5200 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5201 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5202 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5203 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5204 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5210 Bug 4781: %26 in URL
5212 http://www.example.com/?title=AT%26T
5214 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5217 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5220 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5221 # % is actually legal in HTML5. Any change in output would need testing though.
5223 Bug 4781, 5267: %25 in URL
5225 http://www.example.com/?title=100%25_Bran
5227 <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>
5230 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5234 Bug 4781, 5267: %28, %29 in URL
5236 http://www.example.com/?title=Ben-Hur_%281959_film%29
5238 <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>
5241 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5246 Bug 4781: %26 in autonumber URL
5248 [http://www.example.com/?title=AT%26T]
5250 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5253 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5257 Bug 4781, 5267: %26 in autonumber URL
5259 [http://www.example.com/?title=100%25_Bran]
5261 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5264 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5268 Bug 4781, 5267: %28, %29 in autonumber URL
5270 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5272 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5275 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5280 Bug 4781: %26 in bracketed URL
5282 [http://www.example.com/?title=AT%26T link]
5284 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5287 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5291 Bug 4781, 5267: %25 in bracketed URL
5293 [http://www.example.com/?title=100%25_Bran link]
5295 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5300 Bug 4781, 5267: %28, %29 in bracketed URL
5302 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5304 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5307 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5311 External link containing a period in the anchor. (bug 63947)
5313 [//foo.org/bar#baz. bang]
5315 [//foo.org/bar. bang]
5317 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5318 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5321 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5322 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5326 External link containing a single quote. (bug 63947)
5330 [//foo.org/bar'baz bang]
5332 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5333 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5336 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5337 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5341 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5343 Some [http://example.com/ pretty ''italics'' and stuff]!
5345 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5350 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5352 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5354 <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>
5359 External link containing double-single-quotes with no space separating the url from text in italics
5361 [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]].]
5363 <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 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>.</a>
5366 <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>.</p>
5368 <p><a rel="mw:ExtLink" 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>
5372 External link with comments in link text
5374 [http://www.google.com Google <!-- comment -->]
5376 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5379 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5383 External link to bare IPv4 address
5385 [http://192.168.0.1 Link]
5387 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5390 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5394 URL-encoding in URL functions (single parameter)
5396 {{localurl:Some page|amp=&}}
5398 <p>/index.php?title=Some_page&amp=&
5403 URL-encoding in URL functions (multiple parameters)
5405 {{localurl:Some page|q=?&=&}}
5407 <p>/index.php?title=Some_page&q=?&amp=&
5414 http://example.com/index.php?foozoid%5B%5D=bar
5416 http://example.com/index.php?foozoid[]=bar
5418 <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>
5419 </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>
5422 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5424 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5428 IPv6 urls, autolink format (T23261)
5430 http://[2404:130:0:1000::187:2]/index.php
5432 Examples from RFC 2373, section 2.2:
5433 * http://[1080::8:800:200C:417A]/unicast
5434 * http://[FF01::101]/multicast
5435 * http://[::1]/loopback
5436 * http://[::]/unspecified
5437 * http://[::13.1.68.3]/ipv4compat
5438 * http://[::FFFF:129.144.52.38]/ipv4compat
5440 Examples from RFC 2732, section 2:
5441 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5442 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5443 * http://[3ffe:2a00:100:7031::1]
5444 * http://[1080::8:800:200C:417A]/foo
5445 * http://[::192.9.5.5]/ipng
5446 * http://[::FFFF:129.144.52.38]:80/index.html
5447 * http://[2010:836B:4179::836B:4179]
5450 <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>
5451 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5453 <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>
5454 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5455 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5456 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5457 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5458 <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>
5459 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5461 <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>
5462 <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>
5463 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5464 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5465 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5466 <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>
5467 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5470 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5472 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5473 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5474 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5475 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5476 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5477 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5478 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5480 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5481 <ul><li> <a rel="mw:ExtLink" 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>
5482 <li> <a rel="mw:ExtLink" 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>
5483 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5484 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5485 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5486 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5487 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5491 IPv6 urls, bracketed format (T23261)
5493 [http://[2404:130:0:1000::187:2]/index.php test]
5495 Examples from RFC 2373, section 2.2:
5496 * [http://[1080::8:800:200C:417A] unicast]
5497 * [http://[FF01::101] multicast]
5498 * [http://[::1]/ loopback]
5499 * [http://[::] unspecified]
5500 * [http://[::13.1.68.3] ipv4compat]
5501 * [http://[::FFFF:129.144.52.38] ipv4compat]
5503 Examples from RFC 2732, section 2:
5504 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5505 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5506 * [http://[3ffe:2a00:100:7031::1] 3]
5507 * [http://[1080::8:800:200C:417A]/foo 4]
5508 * [http://[::192.9.5.5]/ipng 5]
5509 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5510 * [http://[2010:836B:4179::836B:4179] 7]
5513 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5514 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5516 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5517 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5518 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5519 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5520 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5521 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5522 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5524 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5525 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5526 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5527 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5528 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5529 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5530 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5533 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5535 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5536 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5537 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5538 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5539 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5540 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5541 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5543 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5544 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5545 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5546 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5547 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5548 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5549 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5550 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5554 Non-extlinks in brackets
5563 [{{echo|foo}} ''bar'']
5564 [{{echo|foo}}l's] errand
5565 [{{echo|foo}}l's errand]
5567 [url=http://example.com]
5568 [http:// bare protocols don't count]
5581 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5582 [http:// bare protocols don't count]
5590 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5591 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5592 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5593 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5594 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5595 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5596 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5597 [http:// bare protocols don't count]</p>
5601 Percent encoding in external links
5603 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5605 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5608 <p><a rel="mw:ExtLink"
5609 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5613 Use url link syntax for links where the content is equal the link target
5617 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5620 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5624 Parenthesis in external links, especially URL links
5628 http://example.com/test)
5630 http://example.com/(test)
5632 http://example.com/((test)
5634 (http://example.com/(test))
5636 (http://example.com/(test)))))
5638 http://example.com/a)b
5640 [http://example.com) foo]
5642 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5643 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5644 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5645 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5646 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5647 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5648 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5649 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5652 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5653 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5654 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5655 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5656 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5657 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5658 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5659 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5663 Parenthesis in external links, w/ transclusion or comment
5665 (http://example.com/{{echo|hi}})
5667 (http://example.com<!-- hi -->)
5669 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5670 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5673 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" 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>
5675 <p>(<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
5679 Serialize <a> tags with invalid link targets as plain text
5681 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5683 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5684 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5685 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5686 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5689 <nowiki>*</nowiki>text
5690 <nowiki>[[foo]]</nowiki>
5691 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5695 mw:ExtLink -vs- mw:WikiLink (T94723)
5699 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5700 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5701 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5702 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5704 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5705 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5710 [[wikipedia:Foo|Bar]]
5711 [[wikipedia:Foo|Bar]]
5713 [[wikipedia:European_Robin|European Robin]]
5714 [[wikipedia:European_Robin|European Robin]]
5718 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5722 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5724 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5735 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5737 Normal text. '''''Bold italic text.''''' Normal text.
5739 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5740 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5745 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5746 # parser strips. The wikitext contains just the first half of the bold
5749 Unclosed and unmatched quotes
5751 '''''Bold italic text '''with bold deactivated''' in between.'''''
5753 '''''Bold italic text ''with italic deactivated'' in between.'''''
5757 ..spanning two paragraphs (should not work).'''
5759 '''Bold tag left open
5761 ''Italic tag left open
5765 <!-- Unmatching number of opening, closing tags: -->
5766 '''This year''''s election ''should'' beat '''last year''''s.
5768 ''Tom'''s car is bigger than ''Susan'''s.
5770 Plain ''italic'''s plain
5772 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5773 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5774 </p><p><b>Bold text..</b>
5775 </p><p>..spanning two paragraphs (should not work).
5776 </p><p><b>Bold tag left open</b>
5777 </p><p><i>Italic tag left open</i>
5779 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5780 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5781 </p><p>Plain <i>italic'</i>s plain
5784 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5785 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5786 </p><p><b>Bold text..</b>
5787 </p><p>..spanning two paragraphs (should not work).<b></b>
5788 </p><p><b>Bold tag left open</b>
5789 </p><p><i>Italic tag left open</i>
5792 <!-- Unmatching number of opening, closing tags: -->
5793 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5794 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5795 </p><p>Plain <i>italic'</i>s plain
5802 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5805 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5806 # is the bare minimum required by the spec, see:
5807 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5808 # Parsoid team replies: empty table tags are legal in HTML5
5810 A table with no data.
5823 A table with stray table end tags on start tag line (wt2html)
5827 {|style="color: red;"|}
5829 {|style="color: red;" |}
5833 {|style="color: red;"|} id="foo"
5837 {|style="color: red;" |} id="foo"
5841 <table style="color: red;"></table>
5843 <table style="color: red;">
5849 <table style="color: red;" id="foo">
5855 <table style="color: red;" id="foo">
5864 A table with no data (take 2)
5872 # A table with nothing but a caption is invalid XHTML, we might want to render
5873 # this as <p>caption</p>
5874 # Parsoid team replies: table with only a caption is legal in HTML5
5876 A table with nothing but a caption
5884 </caption><tr><td></td></tr></table>
5887 <table><caption> caption</caption></table>
5891 A table with caption with default-spaced attributes and a table row
5894 |+ style="color: red;" | caption1
5900 <caption style="color: red;"> caption1
5909 A table with captions with non-default spaced attributes and a table row
5912 |+style="color: red;"|caption2
5913 |+ style="color: red;"| caption3
5919 <caption style="color: red;">caption2
5921 <caption style="color: red;"> caption3
5930 Table td-cell syntax variations
5934 | foo bar foo || baz
5935 | style='color:red;' | baz
5936 | style='color:red;' || baz
5943 <td> foo bar foo </td>
5946 <td style="color:red;"> baz
5948 <td> style='color:red;' </td>
5976 Simple table but with multiple dashes for row wikitext
5995 Multiplication table
5997 {| border="1" cellpadding="2"
5998 |+Multiplication table
6000 ! × !! 1 !! 2 !! 3
6018 <table border="1" cellpadding="2">
6019 <caption>Multiplication table
6066 Accept "||" in table headings
6081 Accept "!!" in table data
6095 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
6100 Accept "||" in indented table headings
6110 </th></tr></table></dd></dl>
6115 Accept "!!" in templates
6129 <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>
6133 Accept "!!" in table headings after newline
6150 <p>b!!c</p></th></tr>
6155 Accept "!!" in table data of mixed wikitext / html syntax
6159 <tr><td>b!!c</td></tr>
6172 <tbody><tr><th>a</th></tr>
6173 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6178 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6195 Accept "| !" at start of line in tables (ignore !-attribute)
6199 | !style="color:red" | bar
6211 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 +/-
6215 |style='color:red;'|+1
6216 |style='color:blue;'|-1
6228 <td style="color:red;">+1
6230 <td style="color:blue;">-1
6254 |rowspan=2| Cell 2, row 1 (and 2)
6265 <td rowspan="2"> Cell 2, row 1 (and 2)
6283 {| bgcolor=#ABCDEF border=2
6288 |the original table again
6296 <table bgcolor="#ABCDEF" border="2">
6304 <td>the original table again
6310 Invalid attributes in table cell (bug 1830)
6324 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6328 | title="foo<nowiki>|</nowiki>" |bar
6329 | title="foo<nowiki>|</nowiki>" bar
6336 <td title="foo|">bar
6338 <td> title="foo|" bar
6343 <tbody><tr><td title="foo">bar</td>
6344 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6345 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6349 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6350 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6351 # *2wt modes will fail.
6353 Table security: embedded pipes
6355 parsoid=wt2html,html2html
6358 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6362 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6363 <td>]" onmouseover="alert(document.cookie)">test
6371 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6375 Element attributes with double ! should not be broken up by <th>
6378 ! hi <div class="!!">ha</div> ho
6383 <th> hi <div class="!!">ha</div> ho
6388 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6393 ! and || in element attributes should not be parsed as <th>/<td>
6396 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6401 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6406 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6410 # FIXME: The output seems broken. Filed as T110268.
6412 ! and || in td attributes should not be parsed as <th>/<td>
6417 | style="color: red !important;" data-contrived="put this here ||" | foo
6422 <td> style="color: red !important;" data-contrived="put this here </td>
6428 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx_v":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6433 Break on | in element attribute in template
6435 parsoid=wt2html,html2html
6437 {{echo|1=<div class="hi|ho">ha</div>}}
6439 <p>ho">ha</div>
6442 <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>
6445 ## We don't support roundtripping of these attributes in Parsoid.
6446 ## Selective serialization takes care of preventing dirty diffs.
6447 ## But, on edits, we dirty-diff the invalid attribute text.
6449 Invalid text in table attributes should be discarded
6453 {| <span>boo</span> style='border:1px solid black'
6454 | <span>boo</span> style='color:blue' | 1
6455 |<span>boo</span> style='color:blue'| 2
6458 <table style="border:1px solid black">
6460 <td style="color:blue"> 1
6462 <td style="color:blue"> 2
6466 <table style="border:1px solid black">
6468 <td style="color:blue"> 1</td>
6469 <td style="color:blue"> 2</td>
6475 Invalid text in table attributes should be preserved by selective serializer
6478 "modes": ["selser"],
6480 ["td:first-child", "text", "abc"],
6481 ["td + td", "text", "xyz"]
6485 {| <span>boo</span> style='border:1px solid black'
6486 | <span>boo</span> style='color:blue' | 1
6487 |<span>boo</span> style='color:blue'| 2
6490 {| <span>boo</span> style='border:1px solid black'
6491 | <span>boo</span> style='color:blue' |abc
6492 |<span>boo</span> style='color:blue'|xyz
6497 1. Template-generated table cell attributes and cell content
6502 || {{table_attribs_5}}
6503 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6504 |align=center {{table_attribs}}
6505 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6510 <td style="color:red;">Foo
6512 <td style="color:red;">Foo
6514 <td> style="color:red;"</td>
6517 <td style="color:red;">Foo
6519 <td align="center" style="color:red;">Foo
6521 <td align="center" style="color:red;">Foo
6527 2. Template-generated table cell attributes and cell content
6530 |{{table_attribs_2}}
6535 <td style="color:red;">Foo
6543 <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>
6544 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6549 3. Template-generated table cell attributes and cell content
6552 !align=center {{table_header_cells}}
6554 |align=center {{table_cells}}
6559 <th align="center" style="color:red;">Foo</th>
6560 <th style="color:red;"><i>Bar</i></th>
6561 <th style="color:brown;"><i>Foo</i> and Baz
6564 <td align="center" style="color:red;">Foo</td>
6565 <td style="color:red;"><i>Bar</i></td>
6566 <td style="color:brown;"><i>Foo</i> and Baz
6571 <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>
6572 <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>
6577 4. Template-generated table cell attributes and cell content inside a templated table
6580 !align=center {{table_header_cells}}
6582 |align=center {{table_cells}}
6587 <th align="center" style="color:red;">Foo</th>
6588 <th style="color:red;"><i>Bar</i></th>
6589 <th style="color:brown;"><i>Foo</i> and Baz
6592 <td align="center" style="color:red;">Foo</td>
6593 <td style="color:red;"><i>Bar</i></td>
6594 <td style="color:brown;"><i>Foo</i> and Baz
6598 <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}}]}'>
6599 <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>
6601 <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>
6605 ## Edge case fix to prevent future regressions
6607 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6610 |{{table_attribs_7}}
6615 <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<span class="mw-ref" id="cite_ref-1" rel="dc:references" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></td></tr>
6617 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
6621 Table with row followed by newlines and table heading
6623 parsoid=wt2html,html2html
6641 Table with empty line following the start tag
6643 parsoid=wt2html,html2html
6661 Table attributes with empty value
6663 parsoid=wt2html,html2html
6676 <tbody><tr><td style=""> hello</td></tr>
6681 Wikitext table with a lot of comments
6704 Wikitext table comments represented in parsoid dom
6706 {|<!--c1--><!--c2-->
6717 <table><!--c1--><!--c2-->
6718 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6719 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6724 Wikitext table with double-line table cell
6741 Table cell with a single comment
6758 Table-cell after a comment-only-empty-line
6775 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6777 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6783 Build table with {{!}}
6785 {{{!}} class="wikitable"
6788 {{!}}- style="color:red;"
6789 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6792 <table class="wikitable">
6798 <tr style="color:red;">
6800 <td style="color:red;"> second data
6806 Build table with pipe as data
6808 {| class="wikitable"
6811 |- style="color:red;"
6812 | data || style="color:red;" | second data
6814 | style="color:red;" | data with | || style="color:red;" | second data with |
6816 || data with | ||| second data with |
6819 <table class="wikitable">
6825 <tr style="color:red;">
6827 <td style="color:red;"> second data
6830 <td style="color:red;"> data with | </td>
6831 <td style="color:red;"> second data with |
6834 <td> data with | </td>
6835 <td> second data with |
6841 Build table with wikilink
6843 {| class="wikitable"
6844 ! header || second header
6845 |- style="color:red;"
6846 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6848 | data || second data [[Main Page|link|text with pipe]]
6851 <table class="wikitable">
6856 <tr style="color:red;">
6857 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6858 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6862 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6867 # The expected HTML structure in this test is debatable. The PHP parser does
6868 # not parse this kind of table at all. The main focus for Parsoid is on
6869 # round-tripping, so this output is ok for now. TODO: revisit!
6871 Wikitext table with html-syntax row
6881 <td>foo</td></tr></tbody></table>
6884 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6885 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6886 ## PHP parser, which tidy then compounds by fostering the content
6887 ## entirely out of the table. Parsoid recognizes the table context
6888 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6889 ## depends on PHP's treatment of broken table markup!
6891 Implicit <td> after a |-
6893 parsoid=wt2html,html2html
6913 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6915 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6917 parsoid=wt2html,html2html
6950 <tr><td><pre>a</pre></td></tr>
6951 <tr><td> b</td></tr>
6956 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6957 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6959 Lists should be recognized in an implicit <td> context
6961 parsoid=wt2html,html2html
6988 Table cells not properly parsed in an implicit-td context
6992 {{table_attribs_4}} || a || b
6997 <td style="background-color:#DC241f;" width="10px"></td>
7004 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7005 <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}}," "]}'> </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> a </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> b</td></tr>
7010 Parsoid: Round-trip tables directly followed by content (bug 51219)
7012 parsoid=wt2html,wt2wt
7037 Parsoid: Default to a newline after tables in new content (bug 51219)
7042 <tr><td>foo</td></tr></tbody></table> bar
7044 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7049 <nowiki> </nowiki>bar
7057 Parsoid: newline inducing block nodes don't suppress <nowiki>
7069 Parsoid: Row-syntax table headings followed by comment & table cells
7071 parsoid=wt2html,wt2wt
7075 <!-- foo --> || baz || quux
7089 <tbody><tr><th> foo </th><th> bar
7090 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7095 Parsoid: Recover better from broken table attributes
7115 <p>foo</p></td></tr>
7120 Tables: Digest broken attributes on table and tr tag
7136 # T137406: Whitespace in the HTML
7138 1. Generate correct wikitext for tables with thead/tbody/tfoot
7143 <caption>Test</caption>
7184 <caption>Test</caption>
7204 # T137406: No whitespace in the HTML
7206 2. Generate correct wikitext for tables with thead/tbody/tfoot
7210 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7220 Testing serialization after deletion in references
7229 hi <ref><div id="x">ho</div></ref>
7239 Testing serialization after deletion of table cells
7242 "modes": ["wt2wt", "selser"],
7250 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7260 Testing selser after addition of new row before first row (T125419)
7263 "modes": ["wt2wt", "selser"],
7265 [ "tr", "before", "<tr><td>X</td></tr>" ]
7281 Serialize new table rows in a HTML table using HTML tags
7284 "modes": ["wt2wt", "selser"],
7286 [ "tr", "before", "<tr><td>X</td></tr>" ]
7290 <table><tr><td>a</td></tr></table>
7292 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7296 Serialize new table cells in a HTML row using HTML tags
7299 "modes": ["wt2wt", "selser"],
7301 [ "td", "before", "<td>X</td>" ]
7305 <table><tr><td>a</td></tr></table>
7307 <table><tr><td>X</td><td>a</td></tr></table>
7311 Wikitext tables can be nested inside HTML tables
7315 <table data-parsoid='{"stx":"html"}'>
7318 <tr><td>foo</td></tr>
7333 Serialize wikitext list items as HTML list items when embedded in a HTML list
7337 <ul data-parsoid='{"stx": "html"}'>
7338 <li data-parsoid='{}'>a</li>
7348 # SSS FIXME: Is this actually a good thing given the
7349 # odd nested list output that is generated by MW?
7350 # <ul><li>foo<ul>..</ul></li></ul> instead of
7351 # <ul><li>foo</li><ul>..</ul></ul>
7353 Wikitext lists can be nested inside HTML lists
7357 <ul data-parsoid='{"stx": "html"}'>
7358 <li data-parsoid='{"stx": "html"}'>a
7363 <ul data-parsoid='{"stx": "html"}'>
7386 Plain link, capitalized
7390 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7395 Plain link, uncapitalized
7399 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7406 [[Main Page|The Main Page]]
7408 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7413 Piped link with comment in link text
7415 [[Main Page|The Main<!--front--> Page]]
7417 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7422 Piped link with multiple pipe characters in link text
7424 [[Main Page||The|Main|Page|]]
7426 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7429 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7433 Piped link with no link text
7435 [[Thomas Bek (bishop of St David's)|]]
7437 <p>[[Thomas Bek (bishop of St David's)|]]
7440 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7448 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7453 Broken link with fragment
7455 [[Zigzagzogzagzig#zug]]
7457 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7462 Special page link with fragment
7464 [[Special:Version#anchor]]
7466 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7471 Nonexistent special page link with fragment
7473 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7475 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7482 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7484 <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>
7491 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7493 <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>!!!
7504 Bug 43661: Piped links with identical prefixes
7506 [[prefixed article|prefixed articles with spaces]]
7508 [[prefixed article|prefixed articlesaoeu]]
7510 [[Main Page|Main Page test]]
7512 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7513 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7514 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7520 Link with HTML entity in suffix / tail
7522 [[Main Page]]", [[Main Page]]a
7524 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7527 <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>
7531 Link with 3 brackets
7542 Link with 4 brackets
7546 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7551 Piped link with 3 brackets
7553 [[[main page|the main page]]]
7555 <p>[[[main page|the main page]]]
7560 Piped link with extlink-like text
7563 [[Main Page|This is a [bar]]]
7565 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7566 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7569 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7570 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7574 Link with multiple pipes
7576 [[Main Page|The|Main|Page]]
7578 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7582 # Note that parsoid does not munge anchor text; all non-space
7583 # characters are valid in HTML5 ids.
7585 Anchor containing a #. (bug 63430)
7587 [[Main Page#And#Link]]
7589 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7592 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7598 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7600 <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>
7605 Link with space in namespace
7607 [[User talk:Foo bar]]
7609 <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>
7614 MemoryAlpha:AlphaTest
7616 This is an article in the MemoryAlpha namespace
7617 (which shadows the memoryalpha interwiki link).
7621 Namespace takes precedence over interwiki link (bug 51680)
7623 [[MemoryAlpha:AlphaTest]]
7625 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7629 # The previous test doesn't work correctly in html2*, due to not recognizing the
7630 # link as an internal one. This one checks for the correct behavior.
7632 Link to namespace preferred over interwiki with correct rel attribute
7634 parsoid=html2wt,html2html
7636 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7638 [[MemoryAlpha:AlphaTest]]
7642 Piped link to namespace
7644 [[Meta:Disclaimers|The disclaimers]]
7646 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7653 [[Usually caused by a typo (oops}]]
7655 <p>[[Usually caused by a typo (oops}]]
7662 Just a test of an article title containing a percent.
7666 Link containing % (not as a hex sequence)
7669 [[7% Solution|7%25 Solution]]
7671 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7672 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7675 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7676 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7679 # note that the parsoid HTML is identical to the previous test output,
7680 # so the previous test ensures that the html2wt mode will generate the
7681 # "not as a hex sequence" wikitext.
7683 Link containing % as a single hex sequence interpreted to char
7685 parsoid=wt2wt,wt2html,html2html
7688 [[7%25 Solution|7%25 Solution]]
7690 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7691 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7694 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7695 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7699 Link containing % as a double hex sequence interpreted to hex sequence
7703 <p>[[7%2525 Solution]]
7707 # note that parsoid does not munge anchor text; all non-space
7708 # characters are valid in HTML5 anchors.
7710 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7711 Example for such a section: == < ==
7713 [[%23%3c]][[%23%3e]]
7715 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7718 <p><a rel="mw:WikiLink" href="./Main_Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main_Page#%3E" title="Main Page">#></a></p>
7722 Link containing "<#" and ">#" as a hex sequences
7724 [[%3c%23]][[%3e%23]]
7726 <p>[[%3c%23]][[%3e%23]]
7731 Link containing an equals sign
7733 [[Special:BookSources/isbn=4-00-026157-6]]
7735 <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>
7738 <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>
7744 Just a test of an article title containing a tilde.
7747 # note that links containing signatures, like [[Foo~~~~]], are
7748 # massaged by the pre-save transform (PST) and so the tildes are never
7749 # seen by the parser.
7751 Link containing a tilde
7755 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7758 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7762 Link containing double-single-quotes '' (bug 4598)
7764 [[Lista d''e paise d''o munno]]
7766 <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>
7769 <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>
7773 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7775 Some [[Link|pretty ''italics'' and stuff]]!
7777 <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>!
7780 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7784 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7786 ''Some [[Link|pretty ''italics'' and stuff]]!''
7788 <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>
7793 Link with double quotes in title part (literal) and alternate part (interpreted)
7795 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7799 [[''Pentecoste''|Pentecoste]]
7801 [[''Pentecoste''|''Pentecoste'']]
7803 <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>
7804 </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>
7805 </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>
7806 </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>
7809 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span></p>
7810 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7811 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7812 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7816 Broken image links with HTML captions (bug 39700)
7818 [[File:Nonexistent|<script></script>]]
7819 [[File:Nonexistent|100x100px|<script></script>]]
7820 [[File:Nonexistent|<]]
7821 [[File:Nonexistent|a<i>b</i>c]]
7823 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7824 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7825 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7826 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7829 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","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></span>
7830 <span typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","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></span>
7831 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"missing-image","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></span>
7832 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"missing-image","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></span></p>
7838 [[http://www.example.com]]
7840 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7843 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7847 Plain link to URL with link text
7849 [[http://www.example.com Link text]]
7851 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7856 Plain link to protocol-relative URL
7858 [[//www.example.com]]
7860 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7863 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7867 Plain link to protocol-relative URL with link text
7869 [[//www.example.com Link text]]
7871 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7876 Plain link to page with question mark in title
7882 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7883 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7888 # I'm fairly sure the expected result here is wrong.
7889 # We want these to be URL links, not pseudo-pages with URLs for titles....
7890 # However the current output is also pretty screwy.
7893 # I'm changing it to match the current output--it arguably makes more
7894 # sense in the light of the test above. Old expected result was:
7895 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7897 # But I think this test is bordering on "garbage in, garbage out" anyway.
7902 Piped link to URL: [[http://www.example.com|an example URL]]
7904 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7907 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7911 BUG 2: [[page|http://url/]] should link to page, not http://url/
7913 [[Main Page|http://url/]]
7915 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7918 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7921 # Parsoid does not mark self-links, by design.
7923 BUG 337: Escaped self-links should be bold
7927 [[Bug462]] [[Bug462]]
7929 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7932 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7934 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7938 Self-link to section should not be bold
7942 [[Main Page#section]]
7944 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7955 Self-link to numeric title
7961 <p><strong class="selflink">0</strong>
7966 Link to numeric-equivalent title
7972 <p><a href="/wiki/00" title="00">00</a>
7977 <nowiki> inside a link
7979 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7981 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7986 Non-breaking spaces in title
7988 [[ Main Page ]]
7990 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7995 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
8001 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8006 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
8012 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8017 Internal link with en linktrail: no apostrophes (bug 27473)
8023 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8028 Internal link with ca linktrail with apostrophes (bug 27473)
8034 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8039 Internal link with kaa linktrail with apostrophes (bug 27473)
8045 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8050 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8052 [[User:Foo/Test/63636:Bar|Test]]
8054 <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>
8057 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8060 ## Mainly a sanity check for Parsoid
8062 Handle title parsing for subpages
8071 ## FIXME: Add a working php section here
8073 Link to a subpage from a namespace other than main
8079 <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>
8083 Ensure that transclusion titles are not url-decoded
8085 subpage title=[[Test]]
8088 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8090 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8093 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8097 Purely hash wikilink
8099 title=[[User:test/123]]
8103 <p><a href="#a">b</a>
8106 <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>
8110 1. Interaction of linktrail and template encapsulation
8116 <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>
8120 2. Interaction of linktrail and template encapsulation
8124 {{echo|Some [[Fool]]}}s
8126 <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>
8130 3. Interaction of linktrail and template encapsulation
8134 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8136 <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>
8146 Internal link with is link prefix
8150 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8152 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8163 Internal link with is link trail and link prefix
8167 [[mótmælendatrú|xxx]]ar
8169 mótmælenda[[söfnuður]]
8170 mótmælenda[[söfnuður|söfnuðir]]
8171 mótmælenda[[söfnuður|söfnuðir]]xxx
8173 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8174 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8175 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8176 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8177 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8182 Parsoid link trail escaping
8184 parsoid=html2wt,html2html
8186 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8192 Parsoid link prefix escaping
8195 parsoid=html2wt,html2html
8197 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8199 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8203 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8211 [http://wp.org ''foo'']
8213 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8214 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8215 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8216 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8221 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8225 [[Foo|{{echo|a}} b {{echo|c}}]]
8227 <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>
8231 Link with angle bracket after anchor
8235 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8238 <p><a rel="mw:WikiLink" href="./Foo#%3Cbar%3E" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#%3Cbar%3E"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8242 ### Interwiki links (see maintenance/interwiki.sql)
8246 Inline interwiki link
8248 parsoid=wt2html,wt2wt,html2html
8250 [[MeatBall:SoftSecurity]]
8252 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8255 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8259 Inline interwiki link with empty title (bug 2372)
8261 parsoid=wt2html,wt2wt,html2html
8265 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8268 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8272 Interwiki link encoding conversion (bug 1636)
8274 *[[Wikipedia:ro:Olteniţa]]
8275 *[[Wikipedia:ro:Olteniţa]]
8277 <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>
8278 <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>
8282 <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>
8283 <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>
8288 Interwiki link with fragment (bug 2130)
8290 [[MeatBall:SoftSecurity#foo]]
8292 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8296 # Ideally the wikipedia: prefix here should be proto-relative too
8297 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8298 # define the 'en' prefix, and originally the test used 'wikipedia',
8299 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8302 Different interwiki prefixes mapping to the same URL
8310 [[:wikipedia:Foo|Foo]]
8312 [[wikipedia:en:Foo]]
8314 [[:wikipedia:en:Foo]]
8318 <p><a rel="mw:ExtLink" 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>
8320 <p><a rel="mw:ExtLink" 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>
8322 <p><a rel="mw:ExtLink" 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>
8324 <p><a rel="mw:ExtLink" 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>
8326 <p><a rel="mw:ExtLink" 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>
8328 <p><a rel="mw:ExtLink" 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>
8330 <p><a rel="mw:ExtLink" 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>
8334 Interwiki links that cannot be represented in wiki syntax
8337 [[meatball:ok#foo|ok with fragment]]
8338 [[meatball:ok_as_well?|ok ending with ? mark]]
8339 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8340 [http://de.wikipedia.org/wiki/#foo is just fragment]
8343 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8344 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8345 <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>
8346 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8347 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8350 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8351 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8352 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8353 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8354 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8358 Interwiki links: trail
8360 [[wikipedia:Foo|Ba]]r
8362 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8365 <p><a rel="mw:ExtLink" 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>
8369 Local interwiki link
8371 parsoid=wt2html,wt2wt,html2html
8373 [[local:Template:Foo]]
8375 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8378 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8381 # Parsoid does not mark self-links, by design.
8383 Local interwiki link: self-link to current page
8386 parsoid=wt2html,wt2wt,html2html
8390 <p><strong class="selflink">local:Main Page</strong>
8393 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8397 Local interwiki link: prefix only (bug 64167)
8399 parsoid=wt2html,wt2wt,html2html
8403 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8406 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8410 Local interwiki link: with additional interwiki prefix (bug 61357)
8412 parsoid=wt2html,wt2wt,html2html
8414 [[local:meatball:Hello]]
8416 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8419 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8423 Multiple local interwiki link prefixes
8425 [[local:local:local:local:mi:local:Foo]]
8427 parsoid=wt2html,wt2wt,html2html
8429 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8432 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8436 ### Interlanguage links
8437 ### Language links (so that searching for '### language' matches..)
8449 <p>Blah blah blah</p>
8450 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8453 ## parsoid html2wt will lose the space variations
8455 Interlanguage link with spacing
8457 parsoid=wt2html,wt2wt,html2html
8465 <p>Blah blah blah</p>
8466 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8470 Double interlanguage link
8479 <p>Blah blah blah</p>
8480 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8481 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8484 ## parsoid html2wt will lose the space variations
8486 Interlanguage link variations
8488 parsoid=wt2html,wt2wt,html2html
8498 <p>Blah blah blah</p>
8499 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8500 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8501 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8504 ## parsoid html2wt will normalize the space to _
8506 Space and question mark encoding in interlanguage links (T95473)
8508 parsoid=wt2html,wt2wt,html2html
8516 <p>Blah blah blah</p>
8517 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8521 Interlanguage link, with prefix links
8531 <p>Blah blah blah</p>
8532 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8536 Double interlanguage link, with prefix links (bug 8897)
8547 <p>Blah blah blah</p>
8548 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8549 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8553 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8561 <p>Blah blah blah</p>
8562 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8565 ## PHP parser tests script needs an update
8566 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8568 Language links render as inline links if $wgInterwikiMagic=false
8570 wgInterwikiMagic=false
8571 parsoid=wt2html,wt2wt,html2html
8576 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8579 ## PHP parser tests script needs an update
8580 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8582 Language links render as inline links in the Talk namespace
8585 parsoid=wt2html,wt2wt,html2html
8590 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8594 Parsoid-specific test: Wikilinks with should RT properly
8600 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8605 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8607 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8609 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8610 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8612 He&nbsp;llo [[Foo|He&nbsp;llo]]
8614 He&nbsp;llo He&nbsp;llo
8616 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8617 </p><p>He&nbsp;llo He&nbsp;llo
8621 # html2wt will fail because of title normalization without data-parsoid
8623 Parsoid: handle constructor well
8625 parsoid=wt2html,wt2wt
8631 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8632 </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>
8635 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8637 <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>
8646 # Note that `ko` isn't a known interlanguage prefix
8648 Parsoid: recognize interlanguage links without a target page
8658 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8660 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8663 # Note that `ko` isn't a known interwiki prefix
8665 Parsoid: recognize interwiki links without a target page
8667 parsoid=wt2html,wt2wt,html2html
8673 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8674 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8677 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8678 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8682 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8686 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8689 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8693 Interlanguage link with preceding local interwiki link (bug 68085)
8695 parsoid=wt2html,wt2wt,html2html
8698 [[local:es:Spanish]]
8701 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8705 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8709 Looks like an interlanguage link, but is actually a local interwiki
8711 parsoid=wt2html,wt2wt,html2html
8717 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8721 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8725 ### Redirects, Parsoid-only
8729 1. Simple redirect to page
8731 #REDIRECT [[Main Page]]
8733 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8737 2. Other redirect variants
8739 #REDIRECT [[Main_Page]]
8741 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8744 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8745 # This tests the Parsoid bail-out code.
8747 3. Other redirect variants
8749 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8751 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8755 4. Redirect to a templated destination
8757 #REDIRECT [[{{echo|Foo}}bar]]
8759 <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"}]]}'/>
8765 parsoid=wt2html,wt2wt
8770 <li>REDIRECT [[]]</li></ol>
8774 Optional colon in #REDIRECT
8776 # the colon is archaic syntax. we support it for wt2html, but we
8777 # don't care that it roundtrips back to the modern syntax.
8778 parsoid=wt2html,html2html
8780 #REDIRECT:[[Main Page]]
8782 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8786 Whitespace in #REDIRECT with optional colon
8788 # the colon and gratuitous whitespace is archaic syntax. we support
8789 # it for wt2html, but we don't care that it roundtrips back to the
8790 # modern syntax (without extra whitespace)
8791 parsoid=wt2html,html2html
8798 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8802 Piped link in #REDIRECT
8804 # content after piped link is ignored. we support this syntax,
8805 # but don't care that the piped link is lost when we roundtrip this.
8808 #REDIRECT [[Main Page|bar]]
8810 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8814 Redirect to category (T104502)
8816 parsoid=wt2html,wt2wt
8818 #REDIRECT [[Category:Foo]]
8820 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8824 Redirect to category with URL encoding (T104502)
8828 #REDIRECT [[Category%3AFoo]]
8830 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8834 Redirect to category page
8836 #REDIRECT [[:Category:Foo]]
8838 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8842 Redirect to image page (1)
8844 #REDIRECT [[File:Wiki.png]]
8846 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8850 Redirect to image page (2)
8852 #REDIRECT [[Image:Wiki.png]]
8854 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8857 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8858 # Next test confirms this.
8860 Redirect to language (1) (T104918)
8862 parsoid=wt2html,wt2wt,html2html
8864 #REDIRECT [[en:File:Wiki.png]]
8866 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8870 Redirect to language (2) (T104918)
8872 #REDIRECT [[:en:File:Wiki.png]]
8874 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8878 Redirect to interwiki (T104918)
8880 #REDIRECT [[meatball:File:Wiki.png]]
8882 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8886 Non-English #REDIRECT
8890 #TILVÍSUN [[Main Page]]
8892 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8896 Redirect syntax under text isn't considered a redirect
8899 #redirect [[Main Page]]
8902 <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>
8905 # FIXME: Should hoist the redirect to the top of the page and ensure there
8912 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8932 Broken br tag sanitization
8940 # TODO: Fix html2html mode (bug 51055)!
8942 Parsoid: Broken br tag recognition
8955 Incorrecly removing closing slashes from correctly formed XHTML
8957 <br style="clear:both;" />
8959 <p><br style="clear:both;" />
8964 Failing to transform badly formed HTML into correct XHTML
8966 <br style="clear: left;">
8967 <br style="clear: right;">
8968 <br style="clear: both;">
8970 <p><br style="clear: left;" />
8971 <br style="clear: right;" />
8972 <br style="clear: both;" />
8976 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8977 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8979 Handling html with a div self-closing tag
8988 <p><div title />
8992 <p><div title=bar />
8993 <div title=bar/>
8995 <div title="bar/"></div>
8999 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9000 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9001 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9002 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9003 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9004 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9008 Handling html with a br self-closing tag
9035 Horizontal ruler (should it add that extra space?)
9050 Horizontal ruler -- 4+ dashes render hr
9059 Horizontal ruler -- eats additional dashes on the same line
9068 Horizontal ruler -- does not collapse dashes on consecutive lines
9079 Horizontal ruler -- <4 dashes render as plain text
9088 Horizontal ruler -- Supports content following dashes on same line
9100 ### Block-level elements
9109 <ul><li>Common list</li>
9111 <li>item 3</li></ul>
9122 <ol><li>Numbered list</li>
9124 <li> item 3</li></ol>
9138 ***#Number on level 4
9140 **#Number on level 3
9141 **#Number on level 3
9145 #** Level 3, but ordered
9148 <ol><li> with numbers</li></ol>
9149 <ul><li> and bullets</li></ul>
9150 <ol><li> and numbers</li></ol></li>
9152 <ul><li>bullet level 2
9153 <ul><li>bullet level 3
9154 <ol><li>Number on level 4</li></ol></li></ul></li>
9156 <ol><li>Number on level 3</li>
9157 <li>Number on level 3</li></ol></li></ul>
9158 <ol><li>number level 2</li></ol></li>
9160 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9161 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9166 1. Nested mixed wikitext and html list
9169 * <ul><li>ho</li></ul>
9174 <li> <ul><li>ho</li></ul></li>
9176 <ul><li> ho</li></ul></li></ul>
9180 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9182 <ul><li> ho</li></ul></li></ul>
9186 2. Nested mixed wikitext and html list (incompatible)
9189 : {{echo|<li>ho</li>}}
9192 <dd> <li>ho</li></dd></dl>
9196 <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>
9206 <ul><li>bar</li></ul></li></ul>
9216 <ul><li><ul><li>foo</li></ul></li>
9222 Nested lists 3 (first element empty)
9228 <ul><li>bar</li></ul></li></ul>
9233 Nested lists 4 (first element empty)
9238 <ul><li><ul><li></li></ul></li>
9244 Nested lists 5 (both elements empty)
9249 <ul><li><ul><li></li></ul></li>
9255 Nested lists 6 (both elements empty)
9261 <ul><li></li></ul></li></ul>
9266 Nested lists 7 (skip initial nesting levels)
9270 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9275 Nested lists 8 (multiple nesting transitions)
9283 <ul><li><ul><li> bar</li></ul></li>
9284 <li> baz</li></ul></li>
9290 Nested lists 9 (extension interaction)
9296 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9300 1. Lists with start-of-line-transparent tokens before bullets: Comments
9313 2. Lists with start-of-line-transparent tokens before bullets: Template close
9318 <ul><li>foo bar</li>
9324 List items are not parsed correctly following a <pre> block (bug 785)
9330 <ul><li> <pre>foo</pre></li>
9331 <li> <pre>bar</pre></li>
9335 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9336 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9341 List items from template
9352 * notSOL{{inner list}}
9355 <ul><li> item 1</li>
9356 <li> item 2</li></ul>
9357 <ul><li> item 0</li>
9359 <li> item 2</li></ul>
9360 <ul><li> item 0</li>
9363 <li> item 2</li></ul>
9368 List interrupted by empty line or heading
9376 <ul><li> foo</li></ul>
9377 <ul><li><ul><li> bar</li></ul></li></ul>
9378 <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>
9379 <ul><li> Another list item</li></ul>
9384 Multiple list tags generated by templates
9405 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9408 <!--This line will NOT split the list-->
9410 <!--This line will NOT split the list either-->
9412 <!--foo--> <!----> <!--This line NOT split the list either-->
9423 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9426 <!--This line will NOT split the list-->
9428 <!--This line will NOT split the list either-->
9430 <!--foo--> <!----> <!--This line NOT split the list
9443 (The PHP parser relies on Tidy for the hack)
9445 parsoid=wt2html,wt2wt
9449 * {{echo|<li>templated li-hack}}
9450 * <!--foo--> <li> unsupported li-hack with preceding comments
9453 <li><li>not a li-hack
9460 <li>templated li-hack</li>
9461 <li>unsupported li-hack with preceding comments</li>
9464 <li>not a li-hack</li>
9469 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9496 Parsoid: Test of whitespace serialization with Templated bullets
9503 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9507 # ------------------------------------------------------------------------
9508 # The next set of tests are about Parsoid's ability to handle badly nested
9509 # tags (parse, minimize scope of fixup, and roundtrip back)
9510 # ------------------------------------------------------------------------
9513 Unbalanced closing block tags break a list
9514 (php parser relies on Tidy to fix up)
9532 # Parsoid fails this test, but it might be tricky to support properly.
9535 Unbalanced closing non-block tags don't break a list
9536 (php parser relies on Tidy to fix up)
9543 <li><span>a</span></li>
9544 <li><span>b</span></li>
9558 Unclosed formatting tags that straddle lists are closed and reopened
9559 (php parser relies on Tidy to fix up)
9561 parsoid=wt2html,wt2wt,html2html
9571 <ol><li> <s> a</s></li>
9572 <li><s> b </s></li></ol>
9577 1. List embedded in a formatting tag
9584 <li><small>foo</small></li>
9594 ## Ugly Parsoid output here
9595 ## Not sure what the right output is.
9597 2. List embedded in a formatting tag
9604 <li><small>a</small></li>
9605 <li><small>b</small></li>
9612 <li><small>b</small></li>
9616 # Ugly Parsoid and PHP parser output here
9617 # Not sure if we want to make this a test!
9620 ## 3. Unclosed formatting tags in list elements
9626 ## <li><small>a</small></li>
9627 ## <li><small><small>b</small></small></li>
9631 ## <li><small>a</small></li>
9633 ## <li><small>b</small></li>
9637 # This is a bug in the PHP parser + tidy combination.
9638 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9639 # and then fostered out of the table by tidy.)
9640 # We believe the Parsoid output to be correct.
9642 Table with missing opening <tr> tag
9644 parsoid=wt2html,wt2wt
9662 # Note that the current date is hard-coded as
9663 # 1970-01-01T00:02:03Z (a Thursday)
9664 # when running parser tests. The timezone is also fixed to GMT, so
9665 # local date will be identical to current date.
9668 Magic Word: {{CURRENTDAY}}
9677 Magic Word: {{CURRENTDAY2}}
9686 Magic Word: {{CURRENTDAYNAME}}
9695 Magic Word: {{CURRENTDOW}}
9704 Magic Word: {{CURRENTMONTH}}
9713 Magic Word: {{CURRENTMONTH1}}
9722 Magic Word: {{CURRENTMONTHABBREV}}
9724 {{CURRENTMONTHABBREV}}
9731 Magic Word: {{CURRENTMONTHNAME}}
9733 {{CURRENTMONTHNAME}}
9740 Magic Word: {{CURRENTMONTHNAMEGEN}}
9742 {{CURRENTMONTHNAMEGEN}}
9749 Magic Word: {{CURRENTTIME}}
9758 Magic Word: {{CURRENTHOUR}}
9767 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9776 Magic Word: {{CURRENTYEAR}}
9785 Magic Word: {{CURRENTTIMESTAMP}}
9787 {{CURRENTTIMESTAMP}}
9794 Magic Words LOCAL (UTC)
9798 * {{LOCALMONTHNAME}}
9799 * {{LOCALMONTHNAMEGEN}}
9800 * {{LOCALMONTHABBREV}}
9809 * {{LOCALTIMESTAMP}}
9824 <li> 19700101000203</li></ul>
9829 Magic Word: {{FULLPAGENAME}}
9831 title=[[User:Ævar Arnfjörð Bjarmason]]
9835 <p>User:Ævar Arnfjörð Bjarmason
9840 Magic Word: {{FULLPAGENAMEE}}
9842 title=[[User:Ævar Arnfjörð Bjarmason]]
9846 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9851 Magic Word: {{TALKSPACE}}
9853 title=[[User:Ævar Arnfjörð Bjarmason]]
9862 Magic Word: {{TALKSPACE}}, same namespace
9864 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9873 Magic Word: {{TALKSPACE}}, main namespace
9875 title=[[Parser Test]]
9884 Magic Word: {{TALKSPACEE}}
9886 title=[[User:Ævar Arnfjörð Bjarmason]]
9895 Magic Word: {{SUBJECTSPACE}}
9897 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9906 Magic Word: {{SUBJECTSPACE}}, same namespace
9908 title=[[User:Ævar Arnfjörð Bjarmason]]
9917 Magic Word: {{SUBJECTSPACE}}, main namespace
9919 title=[[Parser Test]]
9927 Magic Word: {{SUBJECTSPACEE}}
9929 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9938 Magic Word: {{NAMESPACE}}
9940 title=[[User:Ævar Arnfjörð Bjarmason]]
9949 Magic Word: {{NAMESPACEE}}
9951 title=[[User:Ævar Arnfjörð Bjarmason]]
9960 Magic Word: {{NAMESPACENUMBER}}
9962 title=[[User:Ævar Arnfjörð Bjarmason]]
9971 Magic Word: {{SUBPAGENAME}}
9973 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9982 Magic Word: {{SUBPAGENAMEE}}
9984 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9993 Magic Word: {{ROOTPAGENAME}}
9995 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9999 <p>Ævar Arnfjörð Bjarmason
10004 Magic Word: {{ROOTPAGENAMEE}}
10006 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10010 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10015 Magic Word: {{BASEPAGENAME}}
10017 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10021 <p>Ævar Arnfjörð Bjarmason
10026 Magic Word: {{BASEPAGENAMEE}}
10028 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10032 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10037 Magic Word: {{TALKPAGENAME}}
10039 title=[[User:Ævar Arnfjörð Bjarmason]]
10043 <p>User talk:Ævar Arnfjörð Bjarmason
10048 Magic Word: {{TALKPAGENAMEE}}
10050 title=[[User:Ævar Arnfjörð Bjarmason]]
10054 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10059 Magic Word: {{SUBJECTPAGENAME}}
10061 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10063 {{SUBJECTPAGENAME}}
10065 <p>User:Ævar Arnfjörð Bjarmason
10070 Magic Word: {{SUBJECTPAGENAMEE}}
10072 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10074 {{SUBJECTPAGENAMEE}}
10076 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10081 Magic Word: {{NUMBEROFFILES}}
10090 Magic Word: {{PAGENAME}}
10092 title=[[User:Ævar Arnfjörð Bjarmason]]
10096 <p>Ævar Arnfjörð Bjarmason
10101 Magic Word: {{PAGENAME}} with metacharacters
10103 title=[['foo & bar = baz']]
10107 <p><i>'foo & bar = baz'</i>
10110 <p><i>'foo & bar = baz'</i></p>
10114 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10116 title=[[*RFC 1234 http://example.com/]]
10120 <p>*RFC 1234 http://example.com/
10123 <p>*RFC 1234 http://example.com/</p>
10127 Magic Word: {{PAGENAMEE}}
10129 title=[[User:Ævar Arnfjörð Bjarmason]]
10133 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10138 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10140 title=[[*RFC 1234 http://example.com/]]
10144 <p>*RFC_1234_http://example.com/
10147 <p>*RFC_1234_http://example.com/</p>
10151 Magic Word: {{REVISIONID}}
10160 Magic Word: {{SCRIPTPATH}}
10168 Magic Word: {{STYLEPATH}}
10177 Magic Word: {{SERVER}}
10181 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10186 Magic Word: {{SERVERNAME}}
10195 Magic Word: {{SITENAME}}
10204 Case-sensitive magic words, when cased differently, should just be template transclusions
10211 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10212 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10213 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10214 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10219 Case-insensitive magic words should still work with weird casing.
10229 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10233 # From plwiki:PLOS_ONE
10235 Parsoid: Page property magic word with magic word contents
10237 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10239 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<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>"}]]}'/>
10243 Parsoid: Template-generated DISPLAYTITLE
10245 {{{{echo|DISPLAYTITLE}}:Foo}}
10247 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
10251 Namespace 1 {{ns:1}}
10260 Namespace 1 {{ns:01}}
10269 Namespace 0 {{ns:0}} (bug 4783)
10277 Namespace 0 {{ns:00}} (bug 4783)
10285 Namespace -1 {{ns:-1}}
10294 Namespace User {{ns:User}}
10303 Namespace User talk {{ns:User_talk}}
10312 Namespace User talk {{ns:uSeR tAlK}}
10321 Namespace File {{ns:File}}
10330 Namespace File {{ns:Image}}
10339 Namespace (lang=de) Benutzer {{ns:User}}
10350 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10356 <p>Benutzer Diskussion
10364 {{urlencode:hi world?!}}
10365 {{urlencode:hi world?!|WIKI}}
10366 {{urlencode:hi world?!|PATH}}
10367 {{urlencode:hi world?!|QUERY}}
10377 Magic Word: prioritize type info over data-parsoid
10381 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10387 Magic Word: serialize on separate line (parsoid)
10389 parsoid=wt2wt,html2wt
10395 foo<meta property="mw:PageProp/notoc"/>bar
10399 Magic Word: rt non-english wikis
10406 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10410 __proto__ is treated as normal wikitext (T105997)
10422 Magic links: internal link to RFC (bug 479)
10426 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10429 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10433 Magic links: RFC (bug 479)
10437 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10440 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10444 Magic links: RFC (bug 65278)
10446 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10448 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
10451 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10455 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10457 RFC      822
10461 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10466 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">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>
10472 Magic links: ISBN (bug 1937)
10476 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10479 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10483 Magic links: ISBN (bug 65278)
10485 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10487 <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.
10490 <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>
10494 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10496 ISBN      978 0 316 09811 3
10502 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10509 <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>
10517 Magic links: PMID incorrectly converts space to underscore
10521 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10524 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10528 Magic links: PMID (bug 65278)
10530 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10532 <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.
10535 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
10539 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10541 PMID      1234
10545 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10550 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">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>
10555 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10556 # since these are ExtLinkText, not MagicLinkText
10558 Magic links: use appropriate serialization for "almost" magic links.
10560 X[[Special:BookSources/0978739256|foo]]
10562 X[//tools.ietf.org/html/rfc1234 foo]
10564 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10565 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10568 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10569 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10573 Magic links: All disabled (T47942)
10575 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10581 <p>ISBN 0-306-40615-2
10592 Nonexistent template
10594 {{thistemplatedoesnotexist}}
10596 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10601 Template with invalid target containing tags
10603 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10605 <p>{{a<b>b</b>|foo|a=b|a = b}}
10610 Template with invalid target containing unclosed tag
10612 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10614 <p>{{a<b>|foo|a=b|a = b}}</b>
10619 Template with invalid target containing wikilink
10623 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10626 <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>
10630 Template with just whitespace in it, bug #68421
10634 <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>
10640 This is a test template
10648 <p>This is a test template
10653 Template with explicit namespace
10657 <p>This is a test template
10665 This is a test template with parameter {{{param}}}
10671 {{paramtest|param=foo}}
10673 <p>This is a test template with parameter foo
10678 Template:paramtestnum
10680 [[{{{1}}}|{{{2}}}]]
10684 Template unnamed parameter
10686 {{paramtestnum|Main Page|the main page}}
10688 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10693 Template:templatesimple
10699 Template:templateredirect
10701 #redirect [[Template:templatesimple]]
10705 Template:templateasargtestnum
10711 Template:templateasargtest
10713 {{template{{{templ}}}}}
10717 Template:templateasargtest2
10723 Template with template name as unnamed argument
10725 {{templateasargtestnum|templatesimple}}
10732 Template with template name as argument
10734 {{templateasargtest|templ=simple}}
10741 Template with template name as argument (2)
10743 {{templateasargtest2|templ=templatesimple}}
10750 Template:templateasargtestdefault
10752 {{{{{templ|templatesimple}}}}}
10762 Template with default value
10764 {{templateasargtestdefault}}
10771 Template with default value (value set)
10773 {{templateasargtestdefault|templ=templa}}
10782 {{templateredirect}}
10787 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10791 Template with argument in separate line
10793 {{ templateasargtest |
10801 Template with complex template as argument
10804 param ={{ templateasargtest |
10805 templ = simple }}}}
10807 <p>This is a test template with parameter (test)
10812 Template with thumb image (with link in description)
10814 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10816 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>
10819 <p>This is a test template with parameter</p>
10820 <div class="thumb tright">
10821 <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>
10822 <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>
10826 <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":"missing-image","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>
10830 Template:complextemplate
10832 {{{1}}} {{paramtest|
10833 param ={{{param}}}}}
10837 Template with complex arguments
10840 param ={{ templateasargtest |
10841 templ = simple }}|[[Template:complextemplate|link]]}}
10843 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10848 BUG 553: link with two variables in a piped link
10851 |[[{{{1}}}|{{{2}}}]]
10856 <td>[[{{{1}}}|{{{2}}}]]
10861 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-parsoid='{"src":"{{{1}}}"}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-parsoid='{"src":"{{{2}}}"}'>{{{2}}}</span>]]</td></tr>
10866 Abort table cell attribute parsing on wikilink
10869 | testing [[one|two]] | three || four
10870 | testing one two | three || four
10871 | testing="[[one|two]]" | three || four
10876 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10882 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10888 <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_v":"row","autoInsertedEnd":true}'> four</td>
10889 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
10890 <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_v":"row","autoInsertedEnd":true}'> four</td></tr>
10895 Don't abort table cell attribute parsing if wikilink is found in template arg
10898 | Test {{#tag:ref|One two "[[three]]" four}}
10902 <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>
10907 Magic variable as template parameter
10909 {{paramtest|param={{SITENAME}}}}
10911 <p>This is a test template with parameter MediaWiki
10918 [[{{{param}}}|link]]
10922 Template parameter as link source
10924 {{linktest|param=Main Page}}
10926 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10931 Template:paramtest2
10933 including another template, {{paramtest|param={{{arg}}}}}
10937 Template passing argument to another template
10939 {{paramtest2|arg='hmm'}}
10941 <p>including another template, This is a test template with parameter 'hmm'
10952 Template as link source
10956 [[{{linktest2}}|Main Page]]
10958 [[{{linktest2}}]]Page
10960 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10961 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10962 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10980 Template infinite loop
10984 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10989 Template from main namespace
11008 BUG 529: Template with table, not included at beginning of line
11027 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11047 BUG 41: Template parameters shown as broken links
11056 Template with targets containing wikilinks
11060 {{[[{{echo|foo}}]]}}
11062 {{{{echo|[[foo}}]]}}
11064 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11065 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11077 Templates: Double quotes as template target
11084 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11088 ## This test is about making sure Parsoid's data-mw is well formed in the
11089 ## face of multiple templates with intersecting and overlapping ranges. The
11090 ## wikitext itself is wretched.
11092 Templates with intersecting and overlapping ranges
11117 <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":""}]]}'>
11119 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11121 <tbody><tr><td>hi</td></tr>
11126 Template:MSGNW test
11128 ''None'' of '''this''' should be
11130 but rather passed unmodified
11138 # hmm, fix this or just deprecate msgnw and document its behavior?
11142 {{msgnw:MSGNW test}}
11144 <p>''None'' of '''this''' should be
11146  but rather passed unmodified
11147 {{test}}
11151 <!-- comment -->
11158 {{int:youhavenewmessages|lots of money|not!}}
11160 <p>You have lots of money (not!).
11165 int keyword - non-existing message
11176 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11180 <includeonly> and <noinclude> being included
11191 <onlyinclude>Foo</onlyinclude>bar
11195 <onlyinclude> being included
11207 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11211 <onlyinclude> and <includeonly> being included
11220 <includeonly> and <noinclude> on a page
11222 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11229 Un-closed <noinclude>
11236 <onlyinclude> on a page
11238 <onlyinclude>Foo</onlyinclude>bar
11245 Un-closed <onlyinclude>
11252 Self-closed noinclude, includeonly, onlyinclude tags
11263 Unbalanced includeonly and noinclude tags
11267 |b</noinclude></noinclude>
11268 |c</noinclude></includeonly>
11269 |d</includeonly></includeonly>
11278 <td>c</includeonly>
11280 <td>d</includeonly></includeonly>
11286 Template:Includeonly section
11289 ==Includeonly section==
11295 Bug 6563: Edit link generation for section shown by <includeonly>
11297 {{includeonly section}}
11299 <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>
11300 <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>
11304 # Uses same input as the contents of [[Template:Includeonly section]]
11306 Bug 6563: Section extraction for section shown by <includeonly>
11311 ==Includeonly section==
11319 Bug 6563: Edit link generation for section suppressed by <includeonly>
11322 ==Includeonly section==
11326 <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>
11331 Bug 6563: Section extraction for section suppressed by <includeonly>
11336 ==Includeonly section==
11344 Un-closed <includeonly>
11349 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11352 ## We used to, but no longer wt2wt this test since the default serializer
11353 ## will normalize the include directives to serialize on their own line.
11354 ## Selser will take care of preserving formatting in scenarios where they
11355 ## intermingled with other wikitext.
11357 Includes and comments at SOL
11359 parsoid=wt2html,html2html
11361 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11365 </noinclude>* stuff
11368 <includeonly>can have stuff</includeonly>=== here ===
11371 <h2><span class="mw-headline" id="hu">hu</span></h2>
11374 <ul><li> stuff</li>
11375 <li> here</li></ul>
11376 <h3><span class="mw-headline" id="here">here</span></h3>
11379 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2> hu </h2>
11381 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11383 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11384 <li> here</li></ul>
11386 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3> here </h3>
11390 # TODO: test with DOM fragment reuse!
11392 Parsoid: DOM fragment reuse
11394 parsoid=wt2wt,wt2html
11396 a{{echo|b<table></table>c}}d
11408 <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>
11410 <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">
11411 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11412 </span><p about="#mwt2">cd</p>
11414 <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">
11416 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11418 </span><p about="#mwt3">b</p>
11422 Parsoid: Merge double tds (T52603)
11427 |{{echo|{{!}} foo}}
11431 <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>
11436 Parsoid: Merge double tds in nested transclusion content (T52603)
11442 |{{echo|{{!}} foo}}
11446 <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}}]}'>
11448 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11454 ### <includeonly> and <noinclude> in attributes
11457 0. includeonly around the entire attribute
11459 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11461 <p><span id="v2">bar</span>
11466 1. includeonly in html attr key
11468 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11470 <p><span id="foo">bar</span>
11475 2. includeonly in html attr value
11477 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11478 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11480 <p><span id="v1">bar</span>
11481 <span id="v1">bar</span>
11486 3. includeonly in part of an attr value
11488 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11490 <p><span style="color:red;">bar</span>
11495 4. includeonly in table attributes
11519 ### Token Stream Patcher tests
11521 ### These tests won't always pass wt2wt and other modes because
11522 ### on serialization, the table will be output on a new line.
11523 ### For now, we are blacklisting them, and using this to test selser.
11527 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11529 parsoid=wt2html,wt2wt
11531 {{echo|}}{| width = '100%'
11535 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11536 <tbody><tr><td>foo</td></tr>
11540 ## We used to, but no longer wt2wt this test since the default serializer
11541 ## will normalize the include directives to serialize on their own line.
11542 ## Selser will take care of preserving formatting in scenarios where they
11543 ## intermingled with other wikitext.
11545 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11549 <includeonly>a</includeonly>{| {{{b}}}
11553 <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='{\"dsr\":[31,38,null,null],\"src\":\"{{{b}}}\"}'>{{{b}}}</span>"},{"html":""}]]}'>
11554 <tbody><tr><td>c</td></tr>
11559 Table wikitext syntax outside wiki-tables
11563 ! not a table heading
11566 | class="foo bar" | baz
11574 ! not a table heading
11577 | class="foo bar" | baz
11586 ### Testing parsing of templates where a template arg
11587 ### has the same name as the template itself.
11593 {{{quote|{{{1}}}}}}
11597 Templates: Template Name/Arg clash: 1. Use of positional param
11606 Templates: Template Name/Arg clash: 2. Use of named param
11608 {{quote|quote=foo}}
11615 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11624 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11628 Templates: 1. Simple use
11637 Templates: 2. Inside a block tag
11639 <div>{{echo|Foo}}</div>
11640 <blockquote>{{echo|Foo}}</blockquote>
11643 <blockquote>Foo</blockquote>
11653 Templates: P-wrapping: 1a. Templates on consecutive lines
11664 Templates: P-wrapping: 1b. Templates on consecutive lines
11678 Templates: P-wrapping: 1c. Templates on consecutive lines
11681 {{echo|bar}} <div>baz</div>
11694 Templates: P-wrapping: 1d. Template preceded by comment-only line
11703 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11707 Templates: Inline Text: 1. Multiple template uses
11709 {{echo|Foo}}bar{{echo|baz}}
11716 Templates: Inline Text: 2. Back-to-back template uses
11718 {{echo|Foo}}{{echo|bar}}
11725 Templates: Block Tags: 1. Multiple template uses
11727 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11729 <div>Foo</div><div>bar</div><div>baz</div>
11734 Templates: Block Tags: 2. Back-to-back template uses
11736 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11738 <div>Foo</div><div>bar</div>
11742 # This is an edge case relating to paragraph wrapping.
11744 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11749 <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
11754 Templates: Links: 1. Simple example
11756 {{echo|[[Foo|bar]]}}
11758 <p><a href="/wiki/Foo" title="Foo">bar</a>
11763 Templates: Links: 2. Generation of link href
11765 [[{{echo|Foo}}|bar]]
11767 <p><a href="/wiki/Foo" title="Foo">bar</a>
11772 Templates: Links: 3. Generation of part of a link href
11774 [[Fo{{echo|o}}|bar]]
11776 [[Foo{{echo|bar}}]]
11778 [[Foo{{echo|bar}}baz]]
11780 [[Foo{{echo|bar}}|bar]]
11782 [[:Foo{{echo|bar}}]]
11784 [[:Foo{{echo|bar}}|bar]]
11786 <p><a href="/wiki/Foo" title="Foo">bar</a>
11787 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11788 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11789 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11790 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11791 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11796 Templates: Links: 4. Multiple templates generating link href
11798 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11800 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11805 Templates: Links: 5. Generation of link text
11807 [[Foo|{{echo|bar}}]]
11809 <p><a href="/wiki/Foo" title="Foo">bar</a>
11814 Templates: Links: 5. Nested templates (only outermost template should be marked)
11816 {{echo|[[{{echo|Foo}}|bar]]}}
11818 <p><a href="/wiki/Foo" title="Foo">bar</a>
11823 Templates: HTML Tag: 1. Generation of HTML attr. key
11825 <div {{echo|style}}="color:red;">foo</div>
11827 <div style="color:red;">foo</div>
11832 Templates: HTML Tag: 2. Generation of HTML attr. value
11834 <div style={{echo|'color:red;'}}>foo</div>
11836 <div style="color:red;">foo</div>
11841 Templates: HTML Tag: 3. Generation of HTML attr key and value
11843 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11845 <div style="color:red;">foo</div>
11850 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11852 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11854 <div title="This is a long title with just one piece templated">foo</div>
11859 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11861 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11863 <div title="This is a long title with just one piece templated">foo</div>
11868 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11870 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11872 <div title="This is a long title with just one piece templated">foo</div>
11876 # SSS FIXME: While it is great we added support for all this,
11877 # do we want to make this part of the spec? Maybe we want to
11878 # deprecate this kind of usage in the future?
11880 Templates: HTML Tag: 7. Generation of partial attribute key string
11882 <div st{{echo|yle}}="color:red;">foo</div>
11884 <div style="color:red;">foo</div>
11889 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11891 <div {{echo|1=id="v1"}}>bar</div>
11893 <div id="v1">bar</div>
11898 Templates: HTML Tag: 9. Multiple template-generated attributes
11900 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11902 <div id="v1" title="foo">bar</div>
11907 Templates: Support for templates generating attributes and content
11909 {| {{mixed_attr_content_template}}
11914 <table style="color:red;" title="T48811">
11924 <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|}"]}'>
11933 1. Entities and nowikis inside templated attributes should be handled correctly
11935 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11937 <div style="background:#f9f9f9;">foo</div>
11940 <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>
11944 2. Entities and nowikis inside templated attributes should be handled correctly
11947 |{{table_attribs_3}}
11952 <td style="background:#f9f9f9;">Foo
11957 <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>
11962 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11965 |{{table_attribs_3}}
11970 <td style="background:#f9f9f9;">Foo
11974 <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}}]}'>
11975 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11981 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11984 | {{table_attribs_6}} hi
11989 <td style="background: red;"> hi
11994 <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>
11999 Templates: HTML Tables: 1. Generating start of a HTML table
12001 {{echo|<table><tr><td>foo</td>}}</tr></table>
12003 <table><tr><td>foo</td></tr></table>
12008 Templates: HTML Tables: 2a. Generating middle of a HTML table
12010 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12012 <table><tr><td>foo</td></tr></table>
12017 Templates: HTML Tables: 2b. Generating middle of a HTML table
12019 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12021 <table><tr><td>foo</td></tr></table>
12026 Templates: HTML Tables: 3. Generating end of a HTML table
12028 <table><tr>{{echo|<td>foo</td></tr></table>}}
12030 <table><tr><td>foo</td></tr></table>
12035 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12037 {{echo|<table>}}<tr><td>foo</td></tr></table>
12039 <table><tr><td>foo</td></tr></table>
12044 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12046 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12048 <table><tr><td>foo</td></tr></table>
12053 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12055 <table><tr>{{echo|<td>}}foo</td></tr></table>
12057 <table><tr><td>foo</td></tr></table>
12062 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12064 <table><tr><td>foo{{echo|</td>}}</tr></table>
12066 <table><tr><td>foo</td></tr></table>
12071 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12073 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12075 <table><tr><td>foo</td></tr></table>
12080 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12082 <table><tr><td>foo</td></tr>{{echo|</table>}}
12084 <table><tr><td>foo</td></tr></table>
12089 Templates: HTML Tables: 5. Proper fostering of categories from inside
12091 parsoid=wt2html,wt2wt
12093 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12094 <!--Two categories (Bug 50330)-->
12095 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12097 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12098 <!--Two categories (Bug 50330)-->
12099 <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>
12103 Templates: Wiki Tables: 1a. Fostering of entire template content
12111 <tr><td></td></tr></table>
12123 Templates: Wiki Tables: 1b. Fostering of entire template content
12136 <tr><td></td></tr></table>
12150 Templates: Wiki Tables: 2. Fostering of partial template content
12160 <tr><td></td></tr></table>
12173 Templates: Wiki Tables: 3. td-content via multiple templates
12176 {{echo|{{pipe}}a}}{{echo|b}}
12187 Templates: Wiki Tables: 4. Templated tags, no content
12193 <tr><td></td></tr></table>
12198 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12212 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12225 ## This test case is very specific to Parsoid's internals
12226 ## and is hence only tested for Parsoid's code. Parsoid uses
12227 ## a <meta> marker tag for <ref> tags and they are expanded
12228 ## much later. We are verifying that this <meta> tag usage
12229 ## doesn't prevent foster parenting.
12231 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12233 {{PartialTable}}<ref>foo</ref>
12238 <span 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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span><table about="#mwt2">
12242 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
12246 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12256 <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{{!}}}"]}'>
12257 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12261 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12266 Templates: Lists: Multi-line list-items via templates
12268 *{{echo|a {{nonexistent|
12270 *{{echo|b {{nonexistent|
12273 <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>
12274 <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>
12279 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12281 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12283 <p><i>ab</i>c<i>d</i>e
12288 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12289 (PHP parser generates misnested html)
12291 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12293 <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>
12297 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12298 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12300 parsoid=wt2html,wt2wt
12302 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12304 <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>
12305 <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>
12306 <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>
12310 Templates: Ugly nesting: 4. Divs opened/closed across templates
12312 a<div>b{{echo|c</div>d}}e
12323 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12329 |{{echo|foo</table>}}
12333 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</table>"}},"i":0}},"\n|bar\n|}"]}'>
12337 <td>foo</td></tr></tbody></table><span about="#mwt1">
12338 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12343 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12353 <td>1. {{echo|foo </table>}}</td>
12355 <td>2. {{echo|baz </table>}}</td>
12368 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n <tr>\n <td>\n <table>\n <tr>\n <td>1. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo </table>"}},"i":0}},"</td>\n <td> bar </td>\n <td>2. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"baz </table>"}},"i":1}},"</td>\n </tr>\n <tr>\n <td>abc</td>\n </tr>\n </table>\n </td>\n </tr>\n <tr>\n <td>xyz</td>\n </tr>\n</table>"]}'>
12373 <td>1. foo </td></tr></tbody></table></td>
12375 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12376 </span><span about="#mwt2">
12377 </span><span about="#mwt2">
12378 </span><span about="#mwt2">abc</span><span about="#mwt2">
12379 </span><span about="#mwt2">
12380 </span><span about="#mwt2">
12381 </span><span about="#mwt2">
12382 </span><span about="#mwt2">
12383 </span><span about="#mwt2">
12384 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12385 </span><span about="#mwt2">
12390 Templates: Ugly templates: 3. newline-only template parameter
12399 # This looks like a bug: a single newline triggers p/br for some reason.
12401 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12410 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12411 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12413 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12419 <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
12420 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12424 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12425 # that are "identical" and generate nesting cycles in the algorithm
12427 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12429 {{echo|<table><tr><td><table>}}
12433 <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"}'>
12434 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12435 </table></td></tr></tbody></table>
12439 Templates: Parameters substituted at the top-level
12441 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12443 <p><i>who</i> me? <b>never!</b>
12446 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12450 Parser Functions: 1. Simple example
12459 Parser Functions: 2. Nested use (only outermost should be marked up)
12468 ### Pre-save transform tests
12471 pre-save transform: subst:
12477 This is a test template
12481 pre-save transform: normal template
12491 pre-save transform: nonexistent template
12495 {{thistemplatedoesnotexist}}
12497 {{thistemplatedoesnotexist}}
12501 pre-save transform: subst magic variables
12510 # This is bug 89, which I fixed. -- wtm
12512 pre-save transform: subst: templates with parameters
12516 {{subst:paramtest|param="something else"}}
12518 This is a test template with parameter "something else"
12522 Template:nowikitest
12524 <nowiki>'''not wiki'''</nowiki>
12528 pre-save transform: nowiki in subst (bug 1188)
12532 {{subst:nowikitest}}
12534 <nowiki>'''not wiki'''</nowiki>
12538 Template:commenttest
12540 This template has <!-- a comment --> in it.
12544 pre-save transform: comment in subst (bug 1936)
12548 {{subst:commenttest}}
12550 This template has <!-- a comment --> in it.
12554 pre-save transform: unclosed tag
12558 <nowiki>'''not wiki'''
12560 <nowiki>'''not wiki'''
12564 pre-save transform: mixed tag case
12568 <NOwiki>'''not wiki'''</noWIKI>
12570 <NOwiki>'''not wiki'''</noWIKI>
12574 pre-save transform: unclosed comment in <nowiki>
12578 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12580 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12583 # Leading @ in this template definition works around a limitation
12584 # in parsoid's parserTests which otherwise strips the <span> from the
12585 # result (confusing it for a template wrapper)
12589 @<span onmouseover="alert('crap')">Oh no</span>
12593 (confirming safety of fix for subst bug 1936)
12595 {{Template:dangerous}}
12597 <p>@<span>Oh no</span>
12602 pre-save transform: comment containing gallery (bug 5024)
12606 <!-- <gallery>data</gallery> -->
12608 <!-- <gallery>data</gallery> -->
12612 pre-save transform: comment containing extension
12616 <!-- <tag>data</tag> -->
12618 <!-- <tag>data</tag> -->
12622 pre-save transform: comment containing nowiki
12626 <!-- <nowiki>data</nowiki> -->
12628 <!-- <nowiki>data</nowiki> -->
12632 pre-save transform: <noinclude> in subst (bug 3298)
12642 pre-save transform: <onlyinclude> in subst (bug 3298)
12646 {{subst:Includes2}}
12654 {{<includeonly>subst:</includeonly>Includes}}
12658 Template:SafeSubstTest
12660 {{<includeonly>safesubst:</includeonly>Includes}}
12664 bug 22297: safesubst: works during PST
12668 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12674 bug 22297: safesubst: works during normal parse
12683 subst: does not work during normal parse
12687 <p>{{subst:Includes}}
12692 pre-save transform: context links ("pipe trick")
12696 [[Article (context)|]]
12699 [[Bar:Article (context)|]]
12700 [[:Bar:Article (context)|]]
12702 [[|Article (context)]]
12706 [[Article (context)|Article]]
12707 [[Bar:Article|Article]]
12708 [[:Bar:Article|Article]]
12709 [[Bar:Article (context)|Article]]
12710 [[:Bar:Article (context)|Article]]
12712 [[Article (context)]]
12713 [[Bar:X (Y) Z|X (Y) Z]]
12714 [[:Bar:X (Y) Z|X (Y) Z]]
12718 pre-save transform: context links ("pipe trick") with interwiki prefix
12722 [[interwiki:Article|]]
12723 [[:interwiki:Article|]]
12724 [[interwiki:Bar:Article|]]
12725 [[:interwiki:Bar:Article|]]
12727 [[interwiki:Article|Article]]
12728 [[:interwiki:Article|Article]]
12729 [[interwiki:Bar:Article|Bar:Article]]
12730 [[:interwiki:Bar:Article|Bar:Article]]
12734 pre-save transform: context links ("pipe trick") with parens in title
12736 pst title=[[Somearticle (context)]]
12740 [[Article (context)|Article]]
12744 pre-save transform: context links ("pipe trick") with comma in title
12746 pst title=[[Someplace, Somewhere]]
12749 [[Otherplace, Elsewhere|]]
12750 [[Otherplace, Elsewhere, Anywhere|]]
12752 [[Otherplace, Somewhere|Otherplace]]
12753 [[Otherplace, Elsewhere|Otherplace]]
12754 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12758 pre-save transform: context links ("pipe trick") with parens and comma
12760 pst title=[[Someplace (IGNORED), Somewhere]]
12763 [[Otherplace (place), Elsewhere|]]
12765 [[Otherplace, Somewhere|Otherplace]]
12766 [[Otherplace (place), Elsewhere|Otherplace]]
12770 pre-save transform: context links ("pipe trick") with comma and parens
12772 pst title=[[Who, me? (context)]]
12775 [[Me, Myself, and I (1937 song)|]]
12777 [[Yes, you. (context)|Yes, you.]]
12778 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12782 pre-save transform: context links ("pipe trick") with namespace
12784 pst title=[[Ns:Somearticle]]
12788 [[Ns:Article|Article]]
12792 pre-save transform: context links ("pipe trick") with namespace and parens
12794 pst title=[[Ns:Somearticle (context)]]
12798 [[Ns:Article (context)|Article]]
12802 pre-save transform: context links ("pipe trick") with namespace and comma
12804 pst title=[[Ns:Somearticle, Context, Whatever]]
12808 [[Ns:Article, Context, Whatever|Article]]
12812 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12814 pst title=[[Ns:Somearticle, Context (context)]]
12818 [[Ns:Article (context)|Article]]
12822 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12824 pst title=[[Ns:Somearticle (IGNORED), Context]]
12828 [[Ns:Article, Context|Article]]
12832 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12836 [[Article(context)|]]
12837 [[Bar:Article(context)|]]
12838 [[:Bar:Article(context)|]]
12839 [[|Article(context)]]
12843 [[Article(context)|Article]]
12844 [[Bar:Article(context)|Article]]
12845 [[:Bar:Article(context)|Article]]
12846 [[Article(context)]]
12847 [[Bar:X(Y)Z|X(Y)Z]]
12848 [[:Bar:X(Y)Z|X(Y)Z]]
12852 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12856 [[Article (context)|]]
12857 [[Bar:Article (context)|]]
12858 [[:Bar:Article (context)|]]
12859 [[|Article (context)]]
12863 [[Article (context)|Article]]
12864 [[Bar:Article (context)|Article]]
12865 [[:Bar:Article (context)|Article]]
12866 [[Article (context)]]
12867 [[Bar:X (Y) Z|X (Y) Z]]
12868 [[:Bar:X (Y) Z|X (Y) Z]]
12872 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12876 [[Article(context)|]]
12877 [[Bar:Article(context)|]]
12878 [[:Bar:Article(context)|]]
12879 [[|Article(context)]]
12883 [[Article(context)|Article]]
12884 [[Bar:Article(context)|Article]]
12885 [[:Bar:Article(context)|Article]]
12886 [[Article(context)]]
12887 [[Bar:X(Y)Z|X(Y)Z]]
12888 [[:Bar:X(Y)Z|X(Y)Z]]
12892 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12896 [[Article (context), context|]]
12897 [[Article (context),context|]]
12898 [[Bar:Article (context), context|]]
12899 [[Bar:Article (context),context|]]
12900 [[:Bar:Article (context), context|]]
12901 [[:Bar:Article (context),context|]]
12903 [[Article (context), context|Article]]
12904 [[Article (context),context|Article]]
12905 [[Bar:Article (context), context|Article]]
12906 [[Bar:Article (context),context|Article]]
12907 [[:Bar:Article (context), context|Article]]
12908 [[:Bar:Article (context),context|Article]]
12912 pre-save transform: trim trailing empty lines
12916 Empty lines are trimmed
12922 Empty lines are trimmed
12926 pre-save transform: Signature expansion
12931 * <noinclude>~~~</noinclude>
12932 * <includeonly>~~~</includeonly>
12933 * <onlyinclude>~~~</onlyinclude>
12935 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12936 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12937 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12938 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12943 pre-save transform: Signature expansion in nowiki tags (bug 93)
12949 <nowiki>~~~~</nowiki>
12951 <includeonly><nowiki>~~~~</nowiki></includeonly>
12953 <noinclude><nowiki>~~~~</nowiki></noinclude>
12955 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12957 {{subst:Foo}} shall be converted to FOO
12959 As well as inside noinclude/onlyinclude
12960 <noinclude>{{subst:Foo}}</noinclude>
12961 <onlyinclude>{{subst:Foo}}</onlyinclude>
12963 But not inside includeonly
12964 <includeonly>{{subst:Foo}}</includeonly>
12968 <nowiki>~~~~</nowiki>
12970 <includeonly><nowiki>~~~~</nowiki></includeonly>
12972 <noinclude><nowiki>~~~~</nowiki></noinclude>
12974 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12976 FOO shall be converted to FOO
12978 As well as inside noinclude/onlyinclude
12979 <noinclude>FOO</noinclude>
12980 <onlyinclude>FOO</onlyinclude>
12982 But not inside includeonly
12983 <includeonly>{{subst:Foo}}</includeonly>
12987 Parsoid: Recognize nowiki with trailing space in tags
12991 <nowiki ><div>[[foo]]</nowiki >
12999 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13006 Parsoid: Recognize nowiki with odd capitalization
13010 <noWikI ><div>[[foo]]</Nowiki >
13012 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13017 Parsoid: Escape nowiki with trailing space in tags
13021 <p><nowiki > foo </nowiki ></p>
13022 <p>a<nowiki />b</p>
13023 <p>c<nowiki/ >d</p>
13025 <nowiki > foo </nowiki >
13033 Parsoid: Escape weird noWikI capitalizations
13037 <p><noWikI > foo </NoWikI ></p>
13039 <noWikI > foo </NoWikI >
13043 ### Message transform tests
13046 message transform: magic variables
13056 message transform: should not transform wiki markup
13066 message transform: <noinclude> in transcluded template (bug 4926)
13076 message transform: <onlyinclude> in transcluded template (bug 4926)
13086 {{#special:}} page name, known
13090 {{#special:Recentchanges}}
13092 Special:RecentChanges
13096 {{#special:}} page name with subpage, known
13100 {{#special:Recentchanges/param}}
13102 Special:RecentChanges/param
13106 {{#special:}} page name, unknown
13110 {{#special:foobar nonexistent}}
13112 Special:Foobar nonexistent
13116 {{#speciale:}} page name, known
13120 {{#speciale:Recentchanges}}
13122 Special:RecentChanges
13126 {{#speciale:}} page name with subpage, known
13130 {{#speciale:Recentchanges/param}}
13132 Special:RecentChanges/param
13136 {{#speciale:}} page name, unknown
13140 {{#speciale:foobar nonexistent}}
13142 Special:Foobar_nonexistent
13148 ### For Parsoid-specific tests, see
13149 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13154 parsoid=wt2html,wt2wt,html2html
13156 [[Image:foobar.jpg]]
13158 <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>
13161 <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>
13165 Simple image (using File: namespace, now canonical)
13167 [[File:Foobar.jpg]]
13169 <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>
13172 <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>
13176 Right-aligned image
13178 [[File:Foobar.jpg|right]]
13180 <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>
13183 <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>
13189 [[File:Foobar.jpg|right|Caption text]]
13191 <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>
13194 <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>
13198 Image with caption, bug 53312 #1
13200 [[File:Foobar.jpg|right|Caption page stuff]]
13202 <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>
13205 <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>
13209 Image with caption, bug 53312 #2
13211 [[File:Foobar.jpg|right|Caption page=]]
13213 <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>
13216 <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>
13220 Image with caption, bug 53312 #3
13222 [[File:Foobar.jpg|right|Caption page=stuff]]
13224 <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>
13227 <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>
13231 Allow empty links in image captions (Bug 60753)
13235 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13240 <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>
13243 <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>
13245 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13246 </figcaption></figure>
13250 Titles in unlinked images (T23454)
13252 [[File:Foobar.jpg|link=|stuff]]
13254 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13259 Link with empty target
13268 Image with link trail
13270 Linktrails should not work for images: [[File:Foobar.jpg]]s
13272 <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
13275 <p>Linktrails should not work for images: <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>s</p>
13279 Image with empty attribute
13281 parsoid=wt2html,wt2wt,html2html
13283 [[File:Foobar.jpg|right||Caption text]]
13285 <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>
13288 <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>
13292 1. Block image with individual attributes from templates
13294 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13296 <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>
13299 <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>
13303 2. Block Image with individual attributes from templates
13305 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13307 <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>
13310 <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>
13314 3. Inline image with individual attributes from templates
13316 [[File:Foobar.jpg|{{echo|50px}}]]
13318 <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>
13321 <p><span 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></span></p>
13324 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13325 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13327 Image with multiple attributes from the same template
13329 [[File:Foobar.jpg|{{image_attribs}}]]
13331 <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>
13334 <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>
13338 Image with link tails
13342 123[[File:Foobar.jpg]]456
13343 123[[File:Foobar.jpg|right]]456
13344 123[[File:Foobar.jpg|thumb]]456
13346 <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
13348 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
13349 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
13352 <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</p>
13354 <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>
13356 <div class="thumb tright">
13357 <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>
13358 <div class="thumbcaption">
13359 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13365 <p>123<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>456</p>
13366 <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>
13367 <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>
13371 Image with multiple captions -- only last one is accepted
13373 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13375 <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>
13378 <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>
13382 Image with multiple widths -- use last
13384 [[File:Foobar.jpg|200px|300px|caption]]
13386 <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>
13389 <p><span 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></span></p>
13393 Image with multiple alignments -- use first (bug 48664)
13397 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13399 [[File:Foobar.jpg|middle|text-top|caption]]
13401 <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>
13402 <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>
13405 <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>
13406 <p><span 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></span></p>
13410 Image with width attribute at different positions
13412 [[File:Foobar.jpg|200px|right|Caption]]
13413 [[File:Foobar.jpg|right|200px|Caption]]
13414 [[File:Foobar.jpg|right|Caption|200px]]
13416 <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>
13417 <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>
13418 <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>
13421 <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>
13422 <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>
13423 <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>
13426 # a sad bit of backward-compatibility
13428 Image with size specified with pxpx (bug 13500, 51628)
13430 parsoid=wt2html,wt2wt,html2html
13432 [[File:Foobar.jpg|20pxpx]]
13433 [[File:Foobar.jpg|200x20pxpx]]
13435 <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>
13436 <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>
13439 <p><span 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></span> <span 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></span></p>
13443 Image with link parameter, wiki target
13445 [[File:Foobar.jpg|link=Main Page]]
13447 <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>
13450 <p><span 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></span></p>
13453 # parsoid bug 49293 (part 1)
13455 Image with link parameter, URL target
13457 [[File:Foobar.jpg|link=http://example.com/]]
13459 <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>
13462 <p><span 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></span></p>
13465 # parsoid bug 49293 (part 2)
13467 Image with link parameter, protocol-less URL target
13469 [[File:Foobar.jpg|link=//example.com/]]
13471 <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>
13474 <p><span 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></span></p>
13478 Escaping non-block captions (T107435)
13481 "modes": ["wt2wt"],
13483 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13487 [[Image:Foobar.jpg|caption]]
13489 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13492 # wgExternalLinkTarget not supported by Parsoid
13494 Image with link parameter, wgExternalLinkTarget
13496 [[Image:foobar.jpg|link=http://example.com/]]
13498 wgExternalLinkTarget='foobar'
13500 <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>
13505 Image with link parameter, wgNoFollowLinks set to false
13507 [[Image:foobar.jpg|link=http://example.com/]]
13509 wgNoFollowLinks=false
13511 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13516 Image with link parameter, wgNoFollowDomainExceptions
13518 [[Image:foobar.jpg|link=http://example.com/]]
13520 wgNoFollowDomainExceptions='example.com'
13522 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13526 # wgExternalLinkTarget not supported by Parsoid
13528 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13530 [[Image:foobar.jpg|link=http://example.com/|Title]]
13532 wgExternalLinkTarget='foobar'
13534 <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>
13539 Image with empty link parameter
13541 [[File:Foobar.jpg|link=]]
13543 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13546 <p><span 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></span></p>
13550 Image with link parameter (wiki target) and unnamed parameter
13552 [[File:Foobar.jpg|link=Main_Page|Title]]
13554 <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>
13557 <p><span 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></span></p>
13561 Image with link parameter (URL target) and unnamed parameter
13563 [[File:Foobar.jpg|link=http://example.com/|Title]]
13565 <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>
13568 <p><span 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></span></p>
13572 Thumbnail image with link parameter
13575 parsoid=wt2html,wt2wt,html2html
13577 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13579 <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>
13582 <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>
13586 Manually-specified thumbnail image
13590 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13592 <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>
13595 <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>
13599 Manually-specified thumbnail image with explicit link to wiki page
13602 parsoid=wt2html,wt2wt,html2html
13604 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13606 <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>
13609 <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>
13613 Manually-specified thumbnail image with explicit link to url
13616 parsoid=wt2html,wt2wt,html2html
13618 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13620 <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>
13623 <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>
13627 Manually-specified thumbnail image with explicit no link
13630 parsoid=wt2html,wt2wt,html2html
13632 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13634 <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>
13637 <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>
13641 Manually-specified thumbnail image with explicit link and alt text
13644 parsoid=wt2html,wt2wt,html2html
13646 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13648 <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>
13651 <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>
13655 Image with frame and link
13657 parsoid=wt2html,wt2wt,html2html
13659 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13661 <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>
13664 <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>
13668 Image with frame and link and explicit alt
13670 parsoid=wt2html,wt2wt,html2html
13672 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13674 <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>
13677 <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>
13681 Image with wiki markup in implicit alt
13683 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13685 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13687 <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>
13688 </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>
13691 <p><span 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></span></p>
13693 <p><span 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></span></p>
13697 Alt image option should handle most kinds of wikitext without barfing
13699 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13701 <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>
13704 <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\":\"&#39;&#39;bold template&#39;&#39;\"}},\"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>
13707 ###################
13708 # Conflicting image format options.
13709 # First option specified should 'win'.
13710 # All three cases in each test should be identical.
13713 Image with 'frameless' first.
13715 parsoid=wt2html,wt2wt,html2html
13717 [[File:Foobar.jpg|frameless|caption]]
13719 [[File:Foobar.jpg|frameless|frame|caption]]
13721 [[File:Foobar.jpg|frameless|thumb|caption]]
13723 <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>
13724 </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>
13725 </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>
13728 <p><span 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></span></p>
13729 <p><span 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></span></p>
13730 <p><span 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></span></p>
13734 Image with 'frame' first.
13736 parsoid=wt2html,wt2wt,html2html
13738 [[File:Foobar.jpg|frame|caption]]
13739 [[File:Foobar.jpg|frame|frameless|caption]]
13740 [[File:Foobar.jpg|frame|thumb|caption]]
13742 <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>
13743 <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>
13744 <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>
13747 <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>
13748 <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>
13749 <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>
13753 Image with 'thumb' first.
13755 parsoid=wt2html,wt2wt,html2html
13757 [[File:Foobar.jpg|thumb|caption]]
13758 [[File:Foobar.jpg|thumb|frameless|caption]]
13759 [[File:Foobar.jpg|thumb|frame|caption]]
13761 <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>
13762 <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>
13763 <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>
13766 <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>
13767 <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>
13768 <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>
13771 ###################
13773 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13774 # and https://phabricator.wikimedia.org/T64258
13775 # Foobar has actual size of 1941x220
13776 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13777 # a scalable format.
13778 # 2. Framed images always ignore size options; always render at default size.
13779 # 3. "Unspecified format" and border are the only types which can be
13783 Image: "unspecified format" and border enlarge
13785 parsoid=wt2html,wt2wt,html2html
13787 [[File:Foobar.jpg|2000px]]
13789 [[File:Foobar.jpg|border|2000px]]
13791 <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>
13792 </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>
13795 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
13796 <p><span 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/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
13800 Image: "unspecified format" and border reduce
13802 parsoid=wt2html,wt2wt,html2html
13804 [[File:Foobar.jpg|1000px]]
13806 [[File:Foobar.jpg|border|1000px]]
13808 <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>
13809 </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>
13812 <p><span 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></span></p>
13813 <p><span 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></span></p>
13817 Image: thumbs reduce
13819 parsoid=wt2html,wt2wt,html2html
13821 [[File:Foobar.jpg|thumb|50px]]
13823 <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>
13826 <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>
13830 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13832 parsoid=wt2html,wt2wt,html2html
13834 [[File:Foobar.jpg|thumb|2000px]]
13836 [[File:Foobar.svg|thumb|2000px]]
13838 <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>
13839 <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>
13842 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13843 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
13847 Image: frameless can reduce in size
13849 parsoid=wt2html,wt2wt,html2html
13851 [[File:Foobar.jpg|frameless|50px]]
13853 <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>
13856 <p><span 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></span></p>
13860 Image: bitmap frameless can't be enlarged past original size, but vector can
13862 parsoid=wt2html,wt2wt,html2html
13864 [[File:Foobar.jpg|frameless|2000px]]
13866 [[File:Foobar.svg|frameless|2000px]]
13868 <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>
13869 </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>
13872 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13873 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></span></p>
13877 Image: framed images are always unscaled.
13879 parsoid=wt2html,wt2wt,html2html
13881 [[File:Foobar.jpg|frame]]
13883 [[File:Foobar.jpg|frame|50px]]
13885 [[File:Foobar.jpg|frame|50x50px]]
13887 [[File:Foobar.jpg|frame|2000px]]
13889 <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>
13890 <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>
13891 <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>
13892 <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>
13895 <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>
13896 <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>
13897 <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>
13898 <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>
13901 ###################
13904 Link to image page- image page normally doesn't exists, hence edit link
13905 Add test with existing image page
13906 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13910 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13915 bug 18784 Link to non-existent image page with caption should use caption as link text
13917 [[:Image:test|caption]]
13919 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13924 Frameless image caption with a free URL
13926 [[File:Foobar.jpg|http://example.com]]
13928 <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>
13931 <p><span 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></span></p>
13935 Thumbnail image caption with a free URL
13939 [[File:Foobar.jpg|thumb|http://example.com]]
13941 <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>
13944 <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" href="http://example.com">http://example.com</a></figcaption></figure>
13948 Thumbnail image caption with a free URL and explicit alt
13951 parsoid=wt2html,wt2wt,html2html
13953 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13955 <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>
13958 <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" href="http://example.com">http://example.com</a></figcaption></figure>
13962 SVG thumbnails with no language set
13965 [[File:Foobar.svg|thumb|caption]]
13967 <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>
13970 <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" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
13974 SVG thumbnails with language de
13976 parsoid=wt2html,wt2wt,html2html
13978 [[File:Foobar.svg|thumb|caption|lang=de]]
13980 <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>
13983 <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" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
13987 SVG thumbnails with invalid language code
13989 parsoid=wt2html,wt2wt,html2html
13991 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13993 <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>
13996 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid.language.code</figcaption></figure>
14000 BUG 1887: A ISBN with a thumbnail
14002 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14004 <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>
14007 <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>
14011 BUG 1887: A RFC with a thumbnail
14013 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14015 <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="//tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
14018 <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="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
14022 BUG 1887: A mailto link with a thumbnail
14024 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14026 <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>
14029 <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" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
14032 # Pending resolution to bug 368
14034 BUG 648: Frameless image caption with a link
14036 [[File:Foobar.jpg|text with a [[link]] in it]]
14038 <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>
14041 <p><span 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></span></p>
14045 BUG 648: Frameless image caption with a link (suffix)
14047 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14049 <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>
14052 <p><span 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></span></p>
14056 BUG 648: Frameless image caption with an interwiki link
14058 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14060 <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>
14063 <p><span 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:ExtLink\" 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></span></p>
14067 BUG 648: Frameless image caption with a piped interwiki link
14069 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14071 <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>
14074 <p><span 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:ExtLink\" 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></span></p>
14078 T107474: Frameless image caption with <nowiki>
14080 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14082 <p><span 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></span></p>
14086 Escape HTML special chars in image alt text
14088 [[File:Foobar.jpg|& < > "]]
14090 <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>
14093 <p><span 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></span></p>
14097 Entities in file name and attributes
14099 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14101 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14104 <p><span 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":"missing-image","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></span></p>
14108 BUG 499: Alt text should have Ӓ, not &1234;
14110 [[File:Foobar.jpg|♀]]
14112 <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>
14115 <p><span 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></span></p>
14119 Broken image caption with link
14121 parsoid=wt2html,wt2wt,html2html
14123 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14125 <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.
14128 <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>
14132 Image caption containing another image
14134 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14136 <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>
14139 <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 <span 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></span> inside it!</figcaption></figure>
14143 Image: caption containing a newline
14145 [[File:Foobar.jpg|This
14148 <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>
14151 <p><span 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></span></p>
14155 Image: caption containing leading space
14156 (The leading space should not trigger nowiki escaping in wt2wt mode)
14158 [[File:Foobar.jpg|thumb| bar]]
14160 <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>
14163 <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>
14167 Image: caption containing a table
14169 parsoid=wt2html,wt2wt,html2html
14171 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14177 and some more text.]]
14179 <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>
14182 <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
14185 <tr><th>Foo </th><th>Bar</th></tr>
14188 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14192 Bug 3090: External links other than http: in image captions
14194 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14196 <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>
14199 <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" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
14205 parsoid=wt2html,wt2wt,html2html
14207 [[Image:foobar.jpg|a|class=b]]
14209 <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>
14212 <p><span 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></span></p>
14216 Localized image handling (1).
14218 parsoid=wt2html,wt2wt,html2html
14221 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14223 <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>
14226 <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>
14230 Localized image handling (2).
14233 parsoid=wt2html,wt2wt,html2html
14236 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14238 <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>
14241 <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>
14245 Localized image handling (3).
14250 <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>
14252 [[File:Foobar.jpg|بندانگشتی]]
14256 "border", "frameless" and "class" attributes on an image.
14259 parsoid=wt2html,wt2wt,html2html
14261 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14263 <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>
14266 <p><span 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></span></p>
14269 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14271 Invalid image attributes (bug 62500)
14274 parsoid=wt2html,wt2wt,html2html
14276 [[File:Foobar.jpg|thumb|float|left|caption]]
14278 [[File:Foobar.jpg|thumb|righ|caption]]
14280 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14282 <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>
14283 <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>
14284 <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>
14287 <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>
14288 <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>
14289 <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>
14295 #REDIRECT [[File:Barfoo.jpg]]
14298 # FIXME: Parsoid should run this test -- but we'd need to teach the
14299 # mockAPI about the redirected Barfoo.jpg image.
14303 [[Image:Barfoo.jpg]]
14305 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14310 Missing image with uploads disabled
14314 [[File:Foobaz.jpg]]
14316 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14319 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span></p>
14322 # Parsoid-specific testing for images
14323 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14324 # Currently imperfect due to a flaw in the Parsoid testrunner
14326 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14330 Parsoid-specific image handling - simple image with size and middle alignment
14332 [[File:Foobar.jpg|middle|50px]]
14334 <p><span 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></span></p>
14338 Parsoid-specific image handling - simple image with size, middle alignment,
14339 non-standard namespace alias
14341 parsoid=wt2wt,wt2html,html2html
14343 [[Image:Foobar.jpg|middle|50px]]
14345 <p><span 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></span></p>
14349 Parsoid-specific image handling - simple image with size and middle alignment
14352 [[File:Foobar.jpg|50px|middle]]
14354 <p><span 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></span></p>
14358 Parsoid-specific image handling - simple image with size and middle alignment
14359 and non-standard namespace name
14361 parsoid=wt2html,wt2wt,html2html
14363 [[Image:Foobar.jpg|50px|middle]]
14365 <p><span 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></span></p>
14369 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14371 [[File:Foobar.jpg|500x10px|baseline|caption]]
14373 <p><span 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></span></p>
14377 Parsoid-specific image handling - simple image with border and size spec
14379 [[File:Foobar.jpg|50px|border|caption]]
14381 <p><span 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></span></p>
14385 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14387 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14389 <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>
14393 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14396 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14398 <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>
14402 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14404 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14406 <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>
14410 Parsoid-specific image handling - thumbnail with specific size, halign,
14411 valign, and caption (existing content)
14413 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14415 <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>
14419 Parsoid-specific image handling - framed image with specific size and caption
14422 parsoid=wt2html,wt2wt,html2html
14424 [[File:Foobar.jpg|frame|500x50px|caption]]
14426 <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>
14430 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14433 parsoid=wt2html,wt2wt,html2html
14435 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14437 <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>
14441 Parsoid-specific image handling - frameless image with specific size, border, and caption
14443 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14445 <p><span 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></span></p>
14449 Parsoid-specific image handling - simple image with a formatted caption
14451 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14453 <p><span 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></span></p>
14457 Parsoid-specific image handling - caption with a template in it
14459 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14461 <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>
14465 Parsoid-specific image handling - caption with unbalanced tags in it
14467 parsoid=wt2html,wt2wt,html2html
14470 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14474 <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>
14479 Parsoid-specific image handling - empty caption (1)
14481 parsoid=wt2html,wt2wt
14483 [[File:Foobar.jpg|thumb|]]
14485 <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>
14488 # empty captions don't get serialized unless we're in the "round trip" case
14490 Parsoid-specific image handling - empty caption (2)
14494 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14495 <a href="./File:Foobar.jpg">
14496 <img resource="./File:Foobar.jpg"
14497 src="//example.com/images/3/3a/Foobar.jpg"
14498 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14499 height="25" width="220"/>
14501 <figcaption></figcaption>
14504 [[File:Foobar.jpg|thumb]]
14508 Parsoid-specific image handling - whitespace caption
14510 [[File:Foobar.jpg|thumb| ]]
14512 <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>
14516 Parsoid-specific image handling - lang option
14519 [[File:Foobar.svg|lang=de|caption]]
14523 <span 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></span>
14527 ## Edge case bugs in Parsoid from T93580
14529 T93580: 1. Templated <ref> inside block images
14531 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14535 <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: <span 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="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
14537 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
14541 T93580: 2. <ref> inside inline images
14543 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14547 <p><span 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: <span 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=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,78,5,6]}'/>"}'><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></span></p>
14549 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
14553 T93580: 3. Templated <ref> inside inline images
14555 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14559 <p><span 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: <span 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=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"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="./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></span></p>
14561 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
14568 Subpage test/subpage
14576 subpage title=[[Subpage test]]
14580 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14585 Subpage noslash link
14587 subpage title=[[Subpage test]]
14591 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14596 Subpage test/1/2/subpage
14602 Relative subpage noslash link
14604 parsoid=wt2wt,wt2html,html2html
14605 subpage title=[[Subpage test/1/2/3/4]]
14611 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14612 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14615 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14616 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14620 Parsoid: dot-slash prefixed wikilinks
14630 </p><p>[[././baz/]]
14635 </p><p>[[././baz/]]
14640 Render invalid page names as plain text (bug 51090)
14653 [[{{echo|./../foo}}|bar]]
14654 [[{{echo|foo/.}}|bar]]
14655 [[{{echo|foo/..}}|bar]]
14656 [[{{echo|foo~~~~bar}}]]
14657 [[{{echo|foo>bar}}]]
14658 [[{{echo|foo././bar}}]]
14659 [[{{echo|foo{bar}}]]
14660 [[{{echo|foo}bar}}]]
14661 [[{{echo|foo[bar}}]]
14662 [[{{echo|foo]bar}}]]
14663 [[{{echo|foo<bar}}]]
14665 <p>[[./../foo|bar]]
14675 </p><p>[[./../foo|bar]]
14688 <p>[[./../foo|bar]]
14699 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14700 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14701 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14702 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14703 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14704 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14705 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14706 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14707 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14708 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14709 [[<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>
14717 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14722 BUG 561: {{/Subpage}}
14724 subpage title=[[Page]]
14728 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14736 Category:MediaWiki User's Guide
14744 [[:Category:MediaWiki User's Guide]]
14746 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14755 [[Category:MediaWiki User's Guide]]
14757 cat=MediaWiki_User's_Guide sort=
14759 <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"}}'/>
14763 PAGESINCATEGORY invalid title fatal (r33546 fix)
14765 {{PAGESINCATEGORY:<bogus>}}
14772 Category with different sort key
14776 [[Category:MediaWiki User's Guide|Foo]]
14778 cat=MediaWiki_User's_Guide sort=Foo
14780 <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"}}'/>
14784 Category with identical sort key
14788 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14790 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14792 <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"}}'/>
14796 Category with empty sort key
14801 [[Category:MediaWiki User's Guide|]]
14803 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14807 Category with empty sort key and parentheses
14812 [[Category:Foo (bar)|]]
14814 [[Category:Foo (bar)|Foo]]
14818 Category with link tail
14823 123[[Category:Foo]]456
14825 123[[Category:Foo]]456
14829 Category with template
14834 [[Category:{{echo|Foo}}]]
14836 [[Category:{{echo|Foo}}]]
14840 Category with template in sort key
14845 [[Category:Foo|{{echo|Bar}}]]
14847 [[Category:Foo|{{echo|Bar}}]]
14851 Category with template in sort key and title
14856 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14858 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14861 ## We used to, but no longer wt2wt this test since the default serializer
14862 ## will normalize all categories to serialize on their own line.
14863 ## This wikitext usage is going to be fairly uncommon in production and
14864 ## selser will take care of preserving formatting in those scenarios.
14866 Category / paragraph interactions
14870 Foo [[Category:Baz]] Bar
14872 Foo [[Category:Baz]]
14880 [[Category:Baz]] Bar
14893 {{echo|[[Category:Baz]]}}
14906 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14907 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14908 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14909 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14910 <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 <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}}]}'/></p>
14911 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14914 ## We used to, but no longer wt2wt this test since the default serializer
14915 ## will normalize all categories to serialize on their own line.
14916 ## This wikitext usage is going to be fairly uncommon in production and
14917 ## selser will take care of preserving formatting in those scenarios.
14919 ## The whitespace on the empty line is part of the test. Please do not delete
14921 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14927 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14929 {{echo|[[Category:Foo]] and so should this!}}
14931 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14936 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14938 <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>
14941 ## Parsoid will not try to wt2wt this while preserving newlines because
14942 ## it suppresses excess newlines within list items -- and we don't want to
14943 ## introduce a special case just for categories, which is, in reality somewhat
14944 ## odd behavior -- categories are unlikely to be used in list items like this
14945 ## in top-level pages and are only likely to show up in template-generated
14946 ## list items where this RT-ing is a non-issue.
14948 ## The whitespace on the empty line is part of the test. Please do not delete
14950 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14956 [[Category:Foo]] and this should be part of the same list item
14959 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14961 <ul><li>This and this should be part of the same list item</li>
14962 <li>So should this and this should be part of the same list item</li></ul>
14965 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14966 <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>
14970 ## Newlines and categories that follow the last item of a list
14971 ## are treated differently because this (list followed by categories)
14972 ## is an extremely common pattern on wikis.
14974 3. Categories and newlines: newline suppression for last list item should RT properly
14987 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14989 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14990 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14994 4. Categories and newlines: newline suppression for last list item should RT properly
15002 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15004 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15007 ## only wt2html for this to make sure the algo only applies to the rightmost path
15009 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15022 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15024 <ul><li> d</li></ul></li></ul>
15025 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15028 ## We used to, but no longer wt2wt this test since the default serializer
15029 ## will normalize all categories to serialize on their own line.
15030 ## This wikitext usage is going to be fairly uncommon in production and
15031 ## selser will take care of preserving formatting in those scenarios.
15033 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15037 * a [[Category:Foo]]
15039 <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>
15042 # This test also demonstrates because of newline+category tunneling
15043 # through the list hander, template wrapping doesn't expand to the
15044 # containing list when the list item swallows the category.
15046 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15051 <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
15052 </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>
15056 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15060 {{echo|[[Category:Foo]]
15064 <ul><li> a</li></ul>
15066 <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">
15067 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15068 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15072 Category links with multiple namespaces
15074 [[Category:Project:Foo]]
15076 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15080 Parsoid: Serialize link to category page with colon escape
15086 [[:Category:Foo|Bar]]
15089 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15090 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15094 # We used to, but no longer wt2wt this test since the default serializer
15095 # will normalize all categories to serialize on their own line.
15096 # This wikitext usage is going to be fairly uncommon in production and
15097 # selser will take care of preventing whitespace insertion if this
15098 # occurs in an article.
15100 # html2html disabled for the same reason (whitespace insertion between
15103 # html2wt disabled because it localizes the "Category" namespace.
15105 Link prefix/suffixes aren't applied to category links
15115 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15119 Parsoid: Serialize link to file page with colon escape
15125 [[:File:Foo.png|Bar]]
15128 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15129 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15134 Parsoid: Serialize a genuine category link without colon escape
15139 [[Category:Foo|Bar]]
15141 <link rel="mw:PageProp/Category" href="./Category:Foo">
15142 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15146 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15150 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15152 [[Category:Toxine bactérienne]]
15156 Parsoid: Defaultsort
15158 {{DEFAULTSORT:Foo}}
15160 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15164 Parsoid: Defaultsort (template-generated)
15166 {{{{echo|DEFAULTSORT}}:Foo}}
15168 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
15172 ### Inter-language links
15175 Interlanguage links
15183 es:Alimento fr:Nourriture zh:食品
15185 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15186 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15187 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15191 Duplicate interlanguage links (bug 24502)
15202 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15203 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15204 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15205 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15212 Basic section headings
15219 ===Smaller headline===
15222 <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>
15225 <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>
15228 <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>
15234 Section headings with TOC
15237 === Subheadline 1 ===
15238 ===== Skipping a level =====
15239 ====== Skipping a level ======
15243 ===Another headline===
15245 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15247 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15249 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15251 <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>
15253 <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>
15260 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15262 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15268 <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>
15269 <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>
15270 <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>
15271 <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>
15272 <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>
15275 <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>
15280 TOC anchors don't collide
15288 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15290 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15291 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15292 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15293 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15297 <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>
15298 <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>
15299 <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>
15300 <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>
15304 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15306 Handling of sections up to level 6 and beyond
15309 == Level 2 Heading==
15310 === Level 3 Heading===
15311 ==== Level 4 Heading====
15312 ===== Level 5 Heading=====
15313 ====== Level 6 Heading======
15314 ======= Level 7 Heading=======
15315 ======== Level 8 Heading========
15316 ========= Level 9 Heading=========
15317 ========== Level 10 Heading==========
15319 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15321 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15323 <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>
15325 <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>
15327 <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>
15329 <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>
15331 <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>
15332 <li class="toclevel-6 tocsection-7"><a href="#.3D_Level_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">= Level 7 Heading=</span></a></li>
15333 <li class="toclevel-6 tocsection-8"><a href="#.3D.3D_Level_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">== Level 8 Heading==</span></a></li>
15334 <li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">=== Level 9 Heading===</span></a></li>
15335 <li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3D_Level_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>
15349 <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>
15350 <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>
15351 <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>
15352 <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>
15353 <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>
15354 <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>
15355 <h6><span class="mw-headline" id=".3D_Level_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>
15356 <h6><span class="mw-headline" id=".3D.3D_Level_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>
15357 <h6><span class="mw-headline" id=".3D.3D.3D_Level_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>
15358 <h6><span class="mw-headline" id=".3D.3D.3D.3D_Level_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>
15363 TOC regression (T11764)
15367 ==== title 1.1.1 ====
15372 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15374 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15376 <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>
15378 <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>
15381 <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>
15384 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15386 <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>
15392 <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>
15393 <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>
15394 <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>
15395 <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>
15396 <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>
15397 <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>
15402 TOC for heading containing <span id="..."></span> (T96153)
15405 ==<span id="old-anchor"></span>New title==
15407 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15409 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15413 <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>
15418 TOC with wgMaxTocLevel=3 (bug 6204)
15424 ==== title 1.1.1 ====
15429 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15431 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15433 <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>
15434 <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>
15437 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15439 <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>
15445 <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>
15446 <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>
15447 <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>
15448 <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>
15449 <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>
15450 <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>
15455 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15461 ====Section 1.1.1====
15462 ====Section 1.1.1.1====
15465 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15467 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15469 <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>
15472 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15476 <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>
15477 <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>
15478 <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>
15479 <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>
15480 <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>
15486 Resolving duplicate section names
15491 <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>
15492 <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>
15497 Resolving duplicate section names with differing case (bug 10721)
15502 <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>
15503 <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>
15515 Template with sections, __NOTOC__
15522 <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>
15523 <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>
15524 <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>
15525 <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>
15530 __NOEDITSECTION__ keyword
15536 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15537 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15542 Link inside a section heading
15544 ==Section with a [[Main Page|link]] in it==
15546 <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>
15551 TOC regression (T14077)
15558 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15560 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15562 <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>
15565 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15569 <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>
15570 <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>
15571 <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>
15576 BUG 1219 URL next to image (good)
15578 http://example.com [[File:Foobar.jpg]]
15580 <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>
15583 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> <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>
15587 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15590 The line above must have a trailing space!
15593 But just in case it doesn't...
15595 <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>
15596 <p>The line above must have a trailing space!
15598 <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>
15599 <p>But just in case it doesn't...
15604 Header with special characters (bug 25462)
15606 The tooltips shall not show entities to the user (ie. be double escaped)
15623 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15625 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15627 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15628 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15629 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15630 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15631 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15635 <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>
15638 <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>
15641 <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>
15644 <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>
15647 <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>
15653 Header with space, plus and underscore as entity
15655 Id should not contain + for spaces
15657 == Space between Text ==
15660 == Space-Entity between Text ==
15663 == Plus+between+Text ==
15666 == Plus-Entity+between+Text ==
15669 == Underscore_between_Text ==
15672 == Underscore-Entity_between_Text ==
15675 [[#Space between Text]]
15676 [[#Space-Entity between Text]]
15677 [[#Plus+between+Text]]
15678 [[#Plus-Entity+between+Text]]
15679 [[#Underscore_between_Text]]
15680 [[#Underscore-Entity_between_Text]]
15682 <p>Id should not contain + for spaces
15684 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15686 <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>
15687 <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>
15688 <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>
15689 <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>
15690 <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>
15691 <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>
15695 <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>
15698 <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>
15701 <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>
15704 <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>
15707 <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>
15710 <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>
15712 </p><p><a href="#Space_between_Text">#Space between Text</a>
15713 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15714 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15715 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15716 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15717 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15722 Headers with excess '=' characters
15723 (Are similar tests necessary beyond the 1st level?)
15727 =''italic'' heading==
15728 ==''italic'' heading=
15730 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15732 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15733 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15734 <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>
15735 <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>
15739 <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>
15740 <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>
15741 <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>
15742 <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>
15747 HTML headers vs TOC (bug 23393)
15748 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15760 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15762 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15764 <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>
15765 <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>
15768 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15770 <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>
15771 <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>
15777 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15778 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15779 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15780 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15781 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15782 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15787 Single-line or multiline-comments can follow headings
15789 parsoid=wt2html,wt2wt
15797 <h2><span class="mw-headline" id="foo">foo</span></h2>
15798 <h2><span class="mw-headline" id="bar">bar</span></h2>
15799 <h2><span class="mw-headline" id="baz">baz</span></h2>
15804 BUG 1219 URL next to image (broken)
15806 http://example.com[[File:Foobar.jpg]]
15808 <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>
15811 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a><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>
15815 Bug 1186 news: in the middle of text
15817 http://en.wikinews.org/wiki/Wikinews:Workplace
15819 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15825 Namespaced link must have a title
15834 Namespaced link must have a title (bad fragment version)
15836 [[Project:#fragment]]
15838 <p>[[Project:#fragment]]
15844 ### HTML tags and HTML attributes
15848 div with no attributes
15850 <div>HTML rocks</div>
15852 <div>HTML rocks</div>
15857 div with double-quoted attribute
15859 <div id="rock">HTML rocks</div>
15861 <div id="rock">HTML rocks</div>
15866 div with single-quoted attribute
15868 <div id='rock'>HTML rocks</div>
15870 <div id="rock">HTML rocks</div>
15875 div with unquoted attribute
15877 <div id=rock>HTML rocks</div>
15879 <div id="rock">HTML rocks</div>
15884 div with illegal double attributes
15886 <div id="a" id="b">HTML rocks</div>
15888 <div id="b">HTML rocks</div>
15893 div with empty attribute value, space before equals
15895 parsoid=wt2html,html2html
15897 <div class =>HTML rocks</div>
15899 <div class="">HTML rocks</div>
15902 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15906 div with multiple empty attribute values
15908 parsoid=wt2html,html2html
15910 <div id= title=>HTML rocks</div>
15912 <div id="title.3D">HTML rocks</div>
15915 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15919 table with multiple empty attribute values
15921 parsoid=wt2html,html2html
15927 <table title="id=">
15933 <table title="id=">
15934 <tbody><tr><td> hi</td></tr>
15939 div with braces in attribute value
15941 <div title="{}">Foo</div>
15943 <div title="{}">Foo</div>
15946 <div title="{}">Foo</div>
15950 div with empty attribute value, no space before equals
15952 parsoid=wt2html,html2html
15954 <div class=>HTML rocks</div>
15956 <div class="">HTML rocks</div>
15959 <div class="">HTML rocks</div>
15963 HTML multiple attributes correction
15965 <p class="error" class="awesome">Awesome!</p>
15967 <p class="awesome">Awesome!</p>
15972 Table multiple attributes correction
15975 !+ class="error" class="awesome"| status
15980 <th class="awesome"> status
15988 <DIV ID="x">HTML ROCKS</DIV>
15990 <div id="x">HTML ROCKS</div>
15995 Non-ASCII pseudo-tags are rendered as text
16004 Pseudo-tag with URL 'name' renders as url link
16006 <http://example.com/>
16008 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16013 text with amp in the middle of nowhere
16017 <p>Remember AT&T?
16022 text with character entity: eacute
16024 I always thought é was a cute letter.
16026 <p>I always thought é was a cute letter.
16029 <p>I always thought é was a cute letter.</p>
16033 text with entity-escaped character entity-like string: eacute
16035 I always thought &eacute; was a cute letter.
16037 <p>I always thought &eacute; was a cute letter.
16042 text with undefined character entity: xacute
16044 I always thought &xacute; was a cute letter.
16046 <p>I always thought &xacute; was a cute letter.
16053 <data value="5">five</data>
16054 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16055 <mark>This highlighted text</mark>
16057 <p><data value="5">five</data>
16058 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16059 <mark>This highlighted text</mark>
16064 HTML tag with leading space is parsed as text
16068 <p>< div>foo< /div>
16073 ### Nesting tests (see bug 41545, 50604, 51081)
16076 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16077 # Note that html2wt is considerably more difficult if we use <b> in
16078 # the test case, instead of <big>
16080 Ensure that HTML adoption agency algorithm is properly implemented.
16082 <big>X<big>Y</big>Z</big>
16084 <p><big>X<big>Y</big>Z</big>
16088 # This was bug 41545 in the PHP parser.
16089 # Note that tidy doesn't handle this correctly.
16093 <kbd>X<kbd>Y</kbd>Z</kbd>
16095 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16099 # The following cases were bug 51081 in the PHP parser.
16100 # Note that there are some other nestable tags (b, i, etc) which are
16101 # not covered; see bug 51081 for discussion.
16103 # Note that tidy doesn't handle this correctly.
16107 <em>X<em>Y</em>Z</em>
16109 <p><em>X<em>Y</em>Z</em>
16113 # Note that tidy doesn't handle this correctly.
16115 Nesting of <strong>
16117 <strong>X<strong>Y</strong>Z</strong>
16119 <p><strong>X<strong>Y</strong>Z</strong>
16128 <p><q>X<q>Y</q>Z</q></p>
16131 # Note that tidy doesn't handle this correctly.
16135 <ruby>X<ruby>Y</ruby>Z</ruby>
16137 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16141 # Note that tidy doesn't handle this correctly.
16145 <bdo>X<bdo>Y</bdo>Z</bdo>
16147 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16159 [[Media:Foobar.jpg]]
16161 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16166 Media link with text
16168 [[Media:Foobar.jpg|A neat file to look at]]
16170 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16174 # FIXME: this is still bad HTML tag nesting
16175 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16177 Media link with nasty text
16179 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16181 <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>
16184 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16185 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16189 Media link to nonexistent file (bug 1702)
16191 [[Media:No such.jpg]]
16193 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16198 Image link to nonexistent file (bug 1850 - good)
16200 [[File:No_such.jpg]]
16202 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16205 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span></p>
16209 :Image link to nonexistent file (bug 1850 - bad)
16211 [[:Image:No such.jpg]]
16213 <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>
16216 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16222 Character reference normalization in link text (bug 1938)
16224 [[Main Page|this&that]]
16226 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16233 Test for unicode normalization
16235 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16239 (bug 19451) Links should refer to the normalized form.
16247 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16248 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16249 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16250 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16251 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16256 Empty attribute crash test (bug 2067)
16258 <font color="">foo</font>
16260 <p><font color="">foo</font>
16265 Empty attribute crash test single-quotes (bug 2067)
16267 <font color=''>foo</font>
16269 <p><font color="">foo</font>
16274 Attribute test: equals, then nothing
16276 parsoid=wt2html,html2html
16278 <font color=>foo</font>
16280 <p><font color="">foo</font>
16283 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16287 Attribute test: unquoted value
16289 parsoid=wt2html,html2html
16291 <font color=x>foo</font>
16293 <p><font color="x">foo</font>
16296 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16300 Attribute test: unquoted but illegal value (hash)
16302 <font color=#x>foo</font>
16304 <p><font color="#x">foo</font>
16308 # Parsoid does not serialize to empty attribute syntax,
16309 # so wt2wt and html2wt cases are skipped
16311 Attribute test: no value (T54330)
16313 parsoid=wt2html,html2html
16315 <font color>foo</font>
16317 <p><font color="">foo</font>
16320 <p><font color="">foo</font></p>
16324 Bug 2095: link with three closing brackets
16328 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16331 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16335 Bug 2095: link with pipe and three closing brackets
16337 [[Main Page|link]]]
16339 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16342 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16346 Bug 2095: link with pipe and three closing brackets, version 2
16348 [[Main Page|[http://example.com/]]]
16350 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16353 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16362 Template:Dangerous attribute
16364 " onmouseover="alert(document.cookie)
16368 Template:Dangerous style attribute
16370 border-size: expression(alert(document.cookie))
16376 <div style="float: right; {{{1}}}">Magic div</div>
16380 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16382 <div title="{{test}}"></div>
16384 <div title="This is a test template"></div>
16388 # Parsoid has enough context to handle this case
16390 Bug 2304: HTML attribute safety (dangerous template; 2309)
16392 <div title="{{dangerous attribute}}"></div>
16394 <div title=""></div>
16397 <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>
16401 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16403 <div style="{{dangerous style attribute}}"></div>
16405 <div style="/* insecure input */"></div>
16410 Bug 2304: HTML attribute safety (safe parameter; 2309)
16412 {{div style|width: 200px}}
16414 <div style="float: right; width: 200px">Magic div</div>
16419 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16421 {{div style|width: expression(alert(document.cookie))}}
16423 <div style="/* insecure input */">Magic div</div>
16428 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16430 {{div style|"><script>alert(document.cookie)</script>}}
16432 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16437 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16439 {{div style|" ><script>alert(document.cookie)</script>}}
16441 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16446 Bug 2304: HTML attribute safety (link)
16448 <div title="[[Main Page]]"></div>
16450 <div title="[[Main Page]]"></div>
16455 Bug 2304: HTML attribute safety (italics)
16457 <div title="''foobar''"></div>
16459 <div title="''foobar''"></div>
16464 Bug 2304: HTML attribute safety (bold)
16466 <div title="'''foobar'''"></div>
16468 <div title="'''foobar'''"></div>
16474 Bug 2304: HTML attribute safety (ISBN)
16476 <div title="ISBN 1234567890"></div>
16478 <div title="ISBN 1234567890"></div>
16483 Bug 2304: HTML attribute safety (RFC)
16485 <div title="RFC 1234"></div>
16487 <div title="RFC 1234"></div>
16492 Bug 2304: HTML attribute safety (PMID)
16494 <div title="PMID 1234567890"></div>
16496 <div title="PMID 1234567890"></div>
16501 Bug 2304: HTML attribute safety (web link)
16503 <div title="http://example.com/"></div>
16505 <div title="http://example.com/"></div>
16510 Bug 2304: HTML attribute safety (named web link)
16512 <div title="[http://example.com/ link]"></div>
16514 <div title="[http://example.com/ link]"></div>
16519 Bug 3244: HTML attribute safety (extension; safe)
16521 <div style="<nowiki>background:blue</nowiki>"></div>
16523 <div style="background:blue"></div>
16528 Bug 3244: HTML attribute safety (extension; unsafe)
16530 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16532 <div style="/* insecure input */"></div>
16536 # More MSIE fun discovered by Tom Gilder
16539 MSIE CSS safety test: spurious slash
16541 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16543 <div style="/* insecure input */">evil</div>
16548 MSIE CSS safety test: hex code
16550 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16552 <div style="/* insecure input */">evil</div>
16557 MSIE CSS safety test: comment in url
16559 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16561 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16566 MSIE CSS safety test: comment in expression
16568 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16570 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16575 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16577 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16579 <p style="/* invalid control char */">A</p>
16584 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16586 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16587 <div style="top:EXPRESSION(alert())">B</div>
16589 <p style="/* insecure input */">A</p>
16590 <div style="/* insecure input */">B</div>
16595 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16597 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16598 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16600 <div style="/* insecure input */">A</div>
16601 <p style="/* insecure input */">B</p>
16606 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16608 <div style="background-image:url⁽javascript:alert())">A</div>
16609 <div style="background-image:url₍javascript:alert())">B</div>
16610 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16612 <div style="/* insecure input */">A</div>
16613 <div style="/* insecure input */">B</div>
16614 <p style="/* insecure input */">C</p>
16618 # FIXME: Parsoid fails to sanitize this! See T58846.
16623 title="data:text/html,<img src=1 onerror=alert(1)>"
16624 style="-o-link:attr(title);-o-link-source:current">X</div>
16626 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16631 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16633 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16634 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16635 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16636 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16637 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16638 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16639 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16641 <p style="/* insecure input */">A</p>
16642 <p style="/* insecure input */">B</p>
16643 <p style="/* insecure input */">C</p>
16644 <p style="/* insecure input */">D</p>
16645 <p style="/* insecure input */">E</p>
16646 <p style="/* insecure input */">F</p>
16647 <p style="/* insecure input */">G</p>
16652 Table attribute legitimate extension
16655 !+ style="<nowiki>color:blue</nowiki>"| status
16660 <th style="color:blue"> status
16666 Table attribute safety
16669 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16674 <th style="/* insecure input */"> status
16680 CSS line continuation 1
16682 <div style="background-image: u\ rl(test.jpg);"></div>
16684 <div style="/* insecure input */"></div>
16689 CSS line continuation 2
16691 <div style="background-image: u\ rl(test.jpg); "></div>
16693 <div style="/* invalid control char */"></div>
16704 Expansion of multi-line templates in attribute values (bug 6255)
16706 <div style="background: {{identity|#00FF00}}">-</div>
16708 <div style="background: #00FF00">-</div>
16714 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16716 <div style="background:
16719 <div style="background: #00FF00">-</div>
16722 <div style="background:
16727 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16729 <div style="background: #00FF00">-</div>
16731 <div style="background: #00FF00">-</div>
16736 Tags which are hidden from Tidy cannot pass through the Sanitizer
16738 <mw:toc><script>alert();</script></mw:toc>
16740 <p><mw:toc><script>alert();</script></mw:toc></p>
16744 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16747 Parser hook: empty input
16758 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16761 ## Don't expect parsoid to rt this form.
16763 Parser hook: empty input using terminated empty elements
16765 parsoid=wt2html,html2html
16776 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16780 Parser hook: empty input using terminated empty elements (space before)
16791 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16795 Parser hook: basic input
16806 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16809 ## Don't expect parsoid to rt this form.
16811 Parser hook: case insensitive
16813 parsoid=wt2html,html2html
16824 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16827 ## Don't expect parsoid to rt this form.
16829 Parser hook: case insensitive, redux
16831 parsoid=wt2html,html2html
16842 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16846 Parser hook: nested tags
16848 <tag><tag></tag></tag>
16857 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16861 Parser hook: basic arguments
16863 <tag width="200" height="100" depth="50" square=""></tag>
16876 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16879 ## Don't expect parsoid to rt this form.
16881 Parser hook: basic arguments, variations
16883 parsoid=wt2html,html2html
16885 <tag width=200 height = "100" depth = '50' square></tag>
16898 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16902 Parser hook: argument containing a forward slash (bug 5344)
16904 <tag filename="/tmp/bla"></tag>
16909 'filename' => '/tmp/bla',
16914 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16917 ## Don't expect parsoid to rt this form.
16919 Parser hook: empty input using terminated empty elements (bug 2374)
16921 parsoid=wt2html,html2html
16933 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16936 ## </tag> should be output literally since there is no matching tag that begins it
16937 ## Don't expect parsoid to rt this form.
16939 Parser hook: basic arguments using terminated empty elements (bug 2374)
16943 <tag width=200 height = "100" depth = '50' square/>
16960 <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
16964 ## Don't expect parsoid to rt this form.
16966 Parser hook: Don't allow unclosed extension tags
16972 this is a '''test'''
16974 <p>test <tag>123
16975 </p><p>this is a <b>test</b>
16978 <p>test <tag>123</p>
16980 <p>this is a <b>test</b></p>
16984 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16988 Parser hook: static parser hook not inside a comment
16990 <statictag>hello, world</statictag>
16992 <statictag action="flush" />
16998 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16999 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17003 Parser hook: static parser hook inside a comment
17005 <!-- <statictag>hello, world</statictag> -->
17006 <statictag action="flush" />
17011 <!-- <statictag>hello, world</statictag> -->
17012 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17015 # Nested template calls; this case was broken by Parser.php rev 1.506,
17019 Template:One-parameter
17021 (My parameter is: {{{1}}})
17025 Template:Map-one-parameter
17027 {{{{{1}}}|{{{2}}}}}
17031 Nested template calls
17033 {{Map-one-parameter|One-parameter|param}}
17035 <p>(My parameter is: param)
17044 # HTML+Tidy effectively strips out the empty tags completely
17045 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17046 # which Tidy would have done for the PHP parser had there been content inside it.
17048 Sanitizer: Closing of open tags
17050 <s></s><table></table>
17052 <s></s><table></table>
17055 <p><s></s></p><table></table>
17059 Sanitizer: Closing of open but not closed tags
17068 Sanitizer: Closing of closed but not open tags
17078 Sanitizer: Closing of closed but not open table tags
17082 Table not started</td></tr></table>
17084 <p>Table not started</p>
17086 <p>Table not started</p>
17090 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17092 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17094 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17098 # In HTML5, the restrictions are that id must contain at least one character,
17099 # and must not contain any space characters.
17101 Sanitizer: Validating the contents of the id attribute (bug 4515)
17105 <br id="" /><br id="a space" />
17110 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17112 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17116 <br id="foo" /><br id="foo" />
17118 Something need to be done. foo-2 ?
17122 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17125 <meta itemprop="hello" content="world">
17126 <meta http-equiv="refresh" content="5">
17127 <meta itemprop="hello" http-equiv="refresh" content="5">
17128 <link itemprop="hello" href="{{SERVER}}">
17129 <link rel="stylesheet" href="{{SERVER}}">
17130 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17134 <p> <meta itemprop="hello" content="world" />
17135 <meta http-equiv="refresh" content="5">
17136 <meta itemprop="hello" content="5" />
17138 <link itemprop="hello" href="http://example.org" />
17139 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17140 <link itemprop="hello" href="http://example.org" />
17146 Language converter: output gets cut off unexpectedly (bug 5757)
17150 this bit is safe: }-
17152 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17154 then we get cut off here: }-
17156 all additional text is vanished
17158 <p>this bit is safe: }-
17159 </p><p>but if we add a conversion instance: xxx
17160 </p><p>then we get cut off here: }-
17161 </p><p>all additional text is vanished
17166 Self closed html pairs (bug 5487)
17169 <center><font id="bug" />Centered text</center>
17170 <div><font id="bug2" />In div text</div>
17172 <center><font id="bug" />Centered text</center>
17173 <div><font id="bug2" />In div text</div>
17182 Punctuation: nbsp before exclamation
17186 <p>C'est grave !
17191 Punctuation: CSS !important (bug 11874)
17193 <div style="width:50% !important">important</div>
17195 <div style="width:50% !important">important</div>
17200 Punctuation: CSS ! important (bug 11874; with space after)
17202 <div style="width:50% ! important">important</div>
17204 <div style="width:50% ! important">important</div>
17209 HTML bullet list, closed tags (bug 5497)
17222 <ul data-parsoid='{"stx":"html"}'>
17223 <li data-parsoid='{"stx":"html"}'>One</li>
17224 <li data-parsoid='{"stx":"html"}'>Two</li>
17230 HTML bullet list, unclosed tags (bug 5497)
17242 <ul data-parsoid='{"stx":"html"}'>
17243 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17244 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17250 HTML ordered list, closed tags (bug 5497)
17263 <ol data-parsoid='{"stx":"html"}'>
17264 <li data-parsoid='{"stx":"html"}'>One</li>
17265 <li data-parsoid='{"stx":"html"}'>Two</li>
17271 HTML ordered list, unclosed tags (bug 5497)
17284 <ol data-parsoid='{"stx":"html"}'>
17285 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17286 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17292 HTML nested bullet list, closed tags (bug 5497)
17315 <ul data-parsoid='{"stx":"html"}'>
17316 <li data-parsoid='{"stx":"html"}'>One</li>
17317 <li data-parsoid='{"stx":"html"}'>Two:
17318 <ul data-parsoid='{"stx":"html"}'>
17319 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17320 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17327 HTML nested bullet list, open tags (bug 5497)
17364 HTML nested ordered list, closed tags (bug 5497)
17389 HTML nested ordered list, open tags (bug 5497)
17426 HTML ordered list item with parameters oddity
17428 <ol><li id="fragment">One</li>
17431 <ol><li id="fragment">One</li>
17436 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17438 bug 5918: autonumbering
17440 [http://first/] [http://second] [ftp://ftp]
17444 [mailto:enclosed@mail.tld With target]
17446 [mailto:enclosed@mail.tld]
17448 mailto:inline@mail.tld
17450 <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>
17451 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17452 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17453 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17454 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17457 <p><a rel="mw:ExtLink" href="http://first/"></a> <a rel="mw:ExtLink" href="http://second"></a> <a rel="mw:ExtLink" href="ftp://ftp"></a></p>
17458 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17459 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17460 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17461 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17466 # Security and HTML correctness
17467 # From Nick Jenkins' fuzz testing
17471 Fuzz testing: Parser13
17486 Fuzz testing: Parser14
17491 <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>
17492 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17494 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17500 <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>
17502 <div id="toc" class="toc">
17503 <div id="toctitle">
17507 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17514 Fuzz testing: Parser14-table
17516 parsoid=wt2html,html2html
17521 <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>
17522 <table style="__TOC__">
17527 <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>
17528 <table style="__TOC__">
17535 <table style="__TOC__"></table>
17538 # Known to produce bogus xml (extra </td>)
17540 Fuzz testing: Parser16
17567 Fuzz testing: Parser21
17570 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17575 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17585 Fuzz testing: Parser22
17587 http://===r:::https://b
17591 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17599 # Known to produce bad XML for now
17601 Fuzz testing: Parser24
17606 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17607 <br style="onmouseover='alert(document.cookie);' " />
17609 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17614 <u class="|">}}}} >
17615 <br style="onmouseover='alert(document.cookie);'" />
17617 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17626 # Note: the current result listed for this is not what the original one was,
17627 # but the original bug was JavaScript injection, which is fixed in any case.
17628 # It's not clear that the original result listed was any more correct than the
17629 # current one. Original result:
17632 # <li class="||">
17633 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17635 Fuzz testing: Parser25 (bug 6055)
17641 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17643 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17648 Fuzz testing: URL adjacent extension (with space, clean)
17650 http://example.com <nowiki>junk</nowiki>
17652 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17655 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17659 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17661 http://example.com<nowiki>junk</nowiki>
17663 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17666 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17670 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17672 http://example.com<pre>junk</pre>
17674 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17677 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17682 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre data-parsoid='{"stx":"html"}'>junk</pre>
17686 Fuzz testing: image with bogus manual thumbnail
17688 [[Image:foobar.jpg|thumbnail= ]]
17690 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17693 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"missing-thumbnail","message":"This thumbnail does not exist.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
17697 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17699 <pre dir=" "></pre>
17701 <pre dir=" "></pre>
17706 Parsing optional HTML elements (Bug 6171)
17711 <td> Some tabular data</td>
17712 <td> More tabular data ...
17713 <td> And yet som tabular data</td>
17719 <td> Some tabular data</td>
17720 <td> More tabular data ...
17721 </td><td> And yet som tabular data</td>
17728 Correct handling of <td>, <tr> (Bug 6171)
17733 <td> Some tabular data</td>
17734 <td> More tabular data ...</td>
17735 <td> And yet som tabular data</td>
17741 <td> Some tabular data</td>
17742 <td> More tabular data ...</td>
17743 <td> And yet som tabular data</td>
17751 Parsing crashing regression (fr:JavaScript)
17755 <p></body></x>
17760 Inline wiki vs wiki block nesting
17766 <p><b>Bold paragraph</b>
17767 </p><p>New wiki paragraph
17771 # FIXME: The current php output is documented
17772 # and desired output is the parsoid target.
17774 Inline HTML vs wiki block nesting
17780 <p><b>Bold paragraph
17781 </p><p>New wiki paragraph</b>
17784 <p><b>Bold paragraph</b>
17785 </p><p>New wiki paragraph
17789 # Original result was this:
17790 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17792 # While that might be marginally more intuitive, maybe, the six-apostrophe
17793 # construct is clearly pathological and the result stated here (which is what
17794 # the parser actually does) is about as reasonable as anything.
17796 Mixing markup for italics and bold
17799 '''bold''''''bold''bolditalics'''''
17801 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17809 Article for special page transclusion test
17813 Special page transclusion
17816 {{Special:Prefixindex/Xyzzyx}}
17818 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17824 Special page transclusion twice (bug 5021)
17827 {{Special:Prefixindex/Xyzzyx}}
17828 {{Special:Prefixindex/Xyzzyx}}
17830 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17832 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17838 Transclusion of default MediaWiki message
17840 {{MediaWiki:Mainpage}}
17847 Transclusion of nonexistent MediaWiki message
17849 {{MediaWiki:Mainpagexxx}}
17851 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17856 Transclusion of MediaWiki message with underscore
17858 {{MediaWiki:history_short}}
17865 Transclusion of MediaWiki message with space
17867 {{MediaWiki:history short}}
17874 Invalid header with following text
17884 Section extraction test (section 0)
17904 Section extraction test (section 1)
17926 Section extraction test (section 2)
17947 Section extraction test (section 3)
17967 Section extraction test (section 4)
17991 Section extraction test (section 5)
18011 Section extraction test (section 6)
18032 Section extraction test (section 7)
18052 Section extraction test (section 8)
18072 Section extraction test (section 9)
18093 Section extraction test (section 10)
18113 Section extraction test (nonexistent section 11)
18132 Section extraction test with bogus heading (section 1)
18137 ==bogus== not a legal section
18141 ==bogus== not a legal section
18145 Section extraction test with bogus heading (section 2)
18150 ==bogus== not a legal section
18157 Section extraction test with comment after heading (section 1)
18169 Section extraction test with comment after heading (section 2)
18181 Section extraction test with bogus <nowiki> heading (section 1)
18186 ==bogus== <nowiki>not a legal section</nowiki>
18190 ==bogus== <nowiki>not a legal section</nowiki>
18194 Section extraction test with bogus <nowiki> heading (section 2)
18199 ==bogus== <nowiki>not a legal section</nowiki>
18205 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18206 # instead of respecting commented sections
18208 Section extraction prefixed by comment (section 1)
18219 Section extraction prefixed by comment (section 2)
18229 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18230 # instead of respecting HTML-style headings
18232 Section extraction, mixed wiki and html (section 1)
18248 Section extraction, mixed wiki and html (section 2)
18264 # Formerly testing for bug 3342
18266 Section extraction, heading surrounded by <noinclude>
18270 <noinclude>==unmarked==</noinclude>
18276 # Test behavior of bug 19910
18278 Sectiion with all-equals
18283 The line above must have a trailing space
18286 But just in case it doesn't...
18290 But just in case it doesn't...
18294 Section replacement test (section 0)
18325 Section replacement test (section 1)
18354 Section replacement test (section 2)
18384 Section replacement test (section 3)
18415 Section replacement test (section 4)
18442 Section replacement test (section 5)
18473 Section replacement test (section 6)
18503 Section replacement test (section 7)
18534 Section replacement test (section 8)
18565 Section replacement test (section 9)
18594 Section replacement test (section 10)
18624 Section replacement test with initial whitespace (bug 13728)
18628 Preformatted initial line
18632 Preformatted initial line
18639 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18651 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18664 Section extraction, <pre> around bogus header (bug 10309)
18681 Section replacement, <pre> around bogus header (bug 10309)
18703 Handling of 
 in URLs
18707 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18710 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18712 a</a></li></ul></li></ul>
18716 Handling of %0A in URLs
18720 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18723 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18727 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18729 5 quotes, code coverage +1 line
18736 <p><b><i></i></b></p>
18739 # same html as previous, but wikitext adjusted to match parsoid html2wt
18740 # note that wt2html and html2html will put the <i> before the <b>
18742 5 quotes, code coverage +1 line w/ nowiki (1)
18744 parsoid=wt2wt,html2wt
18746 '''''<nowiki/>'''''
18751 <p><b><i></i></b></p>
18754 # same as previous, just swapping the <i> and <b>
18756 5 quotes, code coverage +1 line w/ nowiki (2)
18758 '''''<nowiki/>'''''
18763 <p><i><b></b></i></p>
18767 Special:Search page linking.
18771 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18776 {{!}} is a magic word
18778 {{!}} is a magic word there and {{!}} is still a magic word here
18779 | is not a magic word here but {{!}} is still a magic word here
18781 <p>| is a magic word there and | is still a magic word here
18782 | is not a magic word here but | is still a magic word here
18785 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"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":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
18786 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
18793 title=[[Parser test]]
18798 * {{FULLPAGENAMEE}}
18800 * {{BASEPAGENAMEE}}
18804 * {{ROOTPAGENAMEE}}
18806 * {{TALKPAGENAMEE}}
18807 * {{SUBJECTPAGENAME}}
18808 * {{SUBJECTPAGENAMEE}}
18811 * {{NAMESPACENUMBER}}
18815 * {{SUBJECTSPACEE}}
18816 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18818 <ul><li> Parser test</li>
18819 <li> Parser_test</li>
18820 <li> Parser test</li>
18821 <li> Parser_test</li>
18822 <li> Parser test</li>
18823 <li> Parser_test</li>
18824 <li> Parser test</li>
18825 <li> Parser_test</li>
18826 <li> Parser test</li>
18827 <li> Parser_test</li>
18828 <li> Talk:Parser test</li>
18829 <li> Talk:Parser_test</li>
18830 <li> Parser test</li>
18831 <li> Parser_test</li>
18839 <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>
18842 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18852 image4 |300px| centre
18853 image5.svg| http://///////
18858 <ul class="gallery mw-gallery-traditional">
18859 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18860 <div class="thumb" style="height: 150px;">Image1.png</div>
18861 <div class="gallerytext">
18864 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18865 <div class="thumb" style="height: 150px;">Image2.gif</div>
18866 <div class="gallerytext">
18869 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18870 <div class="thumb" style="height: 150px;">Image3</div>
18871 <div class="gallerytext">
18874 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18875 <div class="thumb" style="height: 150px;">Image4</div>
18876 <div class="gallerytext">
18881 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18882 <div class="thumb" style="height: 150px;">Image5.svg</div>
18883 <div class="gallerytext">
18884 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18888 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18889 <div class="thumb" style="height: 150px;">* image6</div>
18890 <div class="gallerytext">
18898 Gallery (with options)
18900 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18901 File:Nonexistent.jpg|caption
18902 File:Nonexistent.jpg
18903 image:foobar.jpg|some '''caption''' [[Main Page]]
18905 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18908 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18909 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18910 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18911 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18912 <div class="gallerytext">
18917 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18918 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18919 <div class="gallerytext">
18922 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18923 <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>
18924 <div class="gallerytext">
18925 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18929 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18930 <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>
18931 <div class="gallerytext">
18934 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18935 <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>
18936 <div class="gallerytext">
18946 Gallery with link that has fragment
18949 image:foobar.jpg|link=Main_Page
18950 image:foobar.jpg|link=Main_Page#section
18951 image:foobar.jpg|link=Main Page#section|caption
18954 <ul class="gallery mw-gallery-traditional">
18955 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18956 <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>
18957 <div class="gallerytext">
18960 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18961 <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>
18962 <div class="gallerytext">
18965 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18966 <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>
18967 <div class="gallerytext">
18977 Gallery with wikitext inside caption
18980 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18981 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18984 <ul class="gallery mw-gallery-traditional">
18985 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18986 <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>
18987 <div class="gallerytext">
18988 <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>
18992 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18993 <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>
18994 <div class="gallerytext">
18995 <p>This is a test template
19004 gallery (with showfilename option)
19006 <gallery showfilename>
19007 File:Nonexistent.jpg|caption
19008 File:Nonexistent.jpg
19009 image:foobar.jpg|some '''caption''' [[Main Page]]
19013 <ul class="gallery mw-gallery-traditional">
19014 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19015 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19016 <div class="gallerytext">
19017 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19022 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19023 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19024 <div class="gallerytext">
19025 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19029 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19030 <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>
19031 <div class="gallerytext">
19032 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19033 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19037 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19038 <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>
19039 <div class="gallerytext">
19040 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19049 Gallery (with namespace-less filenames)
19052 File:Nonexistent.jpg
19058 <ul class="gallery mw-gallery-traditional">
19059 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19060 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19061 <div class="gallerytext">
19064 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19065 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19066 <div class="gallerytext">
19069 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19070 <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>
19071 <div class="gallerytext">
19074 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19075 <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>
19076 <div class="gallerytext">
19084 HTML Hex character encoding (spells the word "JavaScript")
19086 parsoid=wt2html,wt2wt,html2html
19088 JavaScript
19090 <p>JavaScript
19095 <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>
19099 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19103 <p>&#xsee;&#XSEE;
19106 <p>&#xsee;&#XSEE;</p>
19110 HTML Hex character encoding mixed case
19112 parsoid=wt2html,wt2wt,html2html
19121 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19124 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19125 # Note that U+000C (form feed) is not a valid XML character, so
19126 # it is banned even though allowed in HTML5.
19128 Illegal character references (T106578)
19133 ; Control (low): 
19134 ; Control (high):  Ÿ
19135 ; Surrogate: ��
19136 ; This is an okay astral character: 💩
19145 <dt>Control (low)</dt>
19147 <dt>Control (high)</dt>
19148 <dd>&#x7F; &#x9F;</dd>
19150 <dd>&#xD83D;&#xDCA9;</dd>
19151 <dt>This is an okay astral character</dt>
19157 __FORCETOC__ override
19169 ISBN 978-0-1234-56 789
19171 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19174 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19176 <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>
19180 ISBN followed by 5 spaces
19191 ISBN ISBN 1234567890
19193 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19196 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19199 # Uppercase X and lowercase x as well
19210 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19211 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19212 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19213 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19214 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19215 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19218 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19219 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19220 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19221 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19222 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19223 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19227 ISBN with empty prefix (parsoid test)
19231 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19234 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19238 Bug 22905: <abbr> followed by ISBN followed by </a>
19240 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19242 <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>
19245 <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" href="http://www.example.com">example.com</a></p>
19253 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19258 Double RFC with a wiki link
19262 <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>
19271 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19274 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19278 Centre-aligned image
19280 [[Image:foobar.jpg|centre]]
19282 <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>
19289 [[Image:foobar.jpg|none]]
19291 <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>
19296 Width + Height sized image (using px) (height is ignored)
19298 [[Image:foobar.jpg|640x480px]]
19300 <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>
19305 Width-sized image (using px, no following whitespace)
19307 [[Image:foobar.jpg|640px]]
19309 <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>
19314 Width-sized image (using px, with following whitespace - test regression from r39467)
19316 [[Image:foobar.jpg|640px ]]
19318 <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>
19323 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19325 [[Image:foobar.jpg| 640px]]
19327 <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>
19332 Image with page parameter
19336 [[File:LoremIpsum.djvu|page=2]]
19338 <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>
19341 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{}}'><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></span></p>
19345 Another italics / bold test
19353 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19359 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19362 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19367 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19369 Images with the "|" character in the comment
19371 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19373 <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>
19376 <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" href="http://test/?param1=|left|&param2=|x">external</a> URL</figcaption></figure>
19380 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19382 <html><script>alert(1);</script></html>
19384 <p><html><script>alert(1);</script></html>
19389 HTML with raw HTML ($wgRawHtml==true)
19393 <html><script>alert(1);</script></html>
19395 <p><script>alert(1);</script>
19400 Parents of subpages, one level up
19402 subpage title=[[Subpage test/L1/L2/L3]]
19406 <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>
19412 Parents of subpages, one level up, not named
19414 subpage title=[[Subpage test/L1/L2/L3]]
19418 <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>
19425 Parents of subpages, two levels up
19427 subpage title=[[Subpage test/L1/L2/L3]]
19433 <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
19434 </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>
19439 Parents of subpages, two levels up, without trailing slash or name.
19441 subpage title=[[Subpage test/L1/L2/L3]]
19450 Parents of subpages, two levels up, with lots of extra trailing slashes.
19452 subpage title=[[Subpage test/L1/L2/L3]]
19456 <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>
19461 Subpage test/L1/L2/L3Sibling
19467 Transclusion of a sibling page (one level up)
19469 subpage title=[[Subpage test/L1/L2/L3]]
19478 Transclusion of a child page
19480 subpage title=[[Subpage test/L1/L2]]
19488 # This is wt2html only in Parsoid because we add <nowiki>
19489 # because of {{..}} and we don't expect to fix that to
19490 # eliminate the nowikis selective for {{..}} markup.
19492 Non-transclusion because of too many up levels
19494 subpage title=[[Subpage test/L1/L2/L3]]
19497 {{../../../../More than parent}}
19499 <p>{{../../../../More than parent}}
19502 <p>{{../../../../More than parent}}</p>
19506 Definition list code coverage
19512 <dl><dt> title  </dt>
19514 <dt> title </dt>
19520 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19521 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19522 <dt>title</dt><dd> def</dd></dl>
19526 Don't fall for the self-closing div
19528 <div>hello world</div/>
19530 <div>hello world</div>
19539 <p>[[:Template:Msg]]
19548 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19552 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19554 Always escape literal '>' in output, not just after '<'
19568 <p>This is a test template
19569 This is a test template
19581 Inclusion of !userCanEdit() content
19585 <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>
19591 Out-of-order TOC heading levels
19600 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19602 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19604 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19605 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19608 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19610 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19611 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19617 <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>
19618 <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>
19619 <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>
19620 <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>
19621 <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>
19622 <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>
19628 ISBN with a dummy number
19638 ISBN with space-delimited number
19642 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19648 ISBN with multiple spaces, no number
19667 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19668 </p><p>ISBN 12345678901
19674 ISBN with trailing year (bug 8110)
19676 ISBN 1-234-56789-0 - 2006
19678 ISBN 1 234 56789 0 - 2006
19680 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19681 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19689 {{anchorencode:foo bar©#%n}}
19691 <p>foo_bar.C2.A9.23.25n
19696 anchorencode trims spaces
19698 {{anchorencode: __pretty__please__}}
19705 anchorencode deals with links
19707 {{anchorencode: [[hello|world]] [[hi]]}}
19714 anchorencode deals with templates
19716 {{anchorencode: {{Foo}} }}
19723 anchorencode encodes like the TOC generator: (bug 18431)
19725 === _ +:.3A%3A&&]] ===
19726 {{anchorencode: _ +:.3A%3A&&]] }}
19729 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19730 <p>.2B:.3A.253A.26.26.5D.5D
19735 Bug 6200: blockquotes and paragraph formatting
19756 Bug 8293: Use of center tag ruins paragraph formatting
19777 Parsing of overlapping (improperly nested) inline html tags
19779 <span><s>x</span></s>
19781 <p><span><s>x</span></s></span>
19784 <p><span><s>x</s></span>
19789 ### Language variants related tests
19792 Self-link in language variants
19794 title=[[Dunav]] language=sr
19796 Both [[Dunav]] and [[Дунав]] are names for this river.
19798 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19809 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19811 title=[[Duna]] language=sr
19813 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19815 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <strong class="selflink">Duna</strong> and <strong class="selflink">Dуна</strong> are still self-links.
19820 Link to a section of a variant of this title shouldn't be parsed as self-link
19822 title=[[Duna]] language=sr
19824 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19826 <p><strong class="selflink">Dуна</strong> 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.
19831 Link to pages in language variants
19835 Main Page can be written as [[Маин Паге]]
19837 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19843 Multiple links to pages in language variants
19847 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19849 <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>.
19855 Simple template in language variants
19861 <p>This is a test template
19867 Template with explicit namespace in language variants
19873 <p>This is a test template
19879 Basic test for template parameter in language variants
19883 {{парамтест|param=foo}}
19885 <p>This is a test template with parameter foo
19890 Simple category in language variants
19894 [[Category:МедиаWики Усер'с Гуиде]]
19896 cat=МедиаWики_Усер'с_Гуиде sort=
19898 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
19913 ## We used to, but no longer wt2wt this test since the default serializer
19914 ## will normalize all categories to serialize on their own line.
19915 ## This wikitext usage is going to be fairly uncommon in production and
19916 ## selser will take care of preserving formatting in those scenarios.
19918 Don't convert blue categorylinks to another variant (bug 33210)
19924 [[A]][[Category:分类]]
19928 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19929 <link rel="mw:PageProp/Category" href="Category:分类"/>
19933 Stripping -{}- tags (language variants)
19937 Latin proverb: -{Ne nuntium necare}-
19939 <p>Latin proverb: Ne nuntium necare
19945 Prevent conversion with -{}- tags (language variants)
19947 language=sr variant=sr-ec
19949 Latinski: -{Ne nuntium necare}-
19951 <p>Латински: Ne nuntium necare
19957 Prevent conversion of text with -{}- tags (language variants)
19959 language=sr variant=sr-ec
19961 Latinski: -{Ne nuntium necare}-
19963 <p>Латински: Ne nuntium necare
19969 Prevent conversion of links with -{}- tags (language variants)
19971 language=sr variant=sr-ec
19975 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19981 -{}- tags within headlines (within html for parserConvert())
19983 language=sr variant=sr-ec
19987 <h2><span class="mw-headline" id="-.7BNaslov.7D-">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>
19993 Explicit definition of language variant alternatives
19995 language=zh variant=zh-tw
19997 -{zh:China;zh-tw:Taiwan}-, not China
19999 <p>Taiwan, not China
20005 Conversion around HTML tags
20007 language=sr variant=sr-ec
20009 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20010 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20013 <span title="ЛаCтин">ски</span>
20019 Explicit session-wise language variant mapping (A flag and - flag)
20021 language=zh variant=zh-tw
20023 Taiwan is not China.
20024 But -{A|zh:China;zh-tw:Taiwan}- is China,
20025 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20026 and -{China}- is China.
20028 <p>Taiwan is not China.
20029 But Taiwan is Taiwan,
20030 (This should be stripped!)
20031 and China is China.
20036 Explicit session-wise language variant mapping (H flag for hide)
20038 language=zh variant=zh-tw
20040 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20043 <p>(This should be stripped!)
20049 Adding explicit conversion rule for title (T flag)
20051 language=zh variant=zh-tw showtitle
20053 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20056 <p>Should be stripped!
20061 Testing that changing the language variant here in the tests actually works
20063 language=zh variant=zh showtitle
20065 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20068 <p>Should be stripped!
20073 Recursive conversion of alt and title attrs shouldn't clear converter state
20075 language=zh variant=zh-cn showtitle
20077 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20078 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20082 Should be stripped<span title="Exclamation">!</span>
20087 Bug 24072: more test on conversion rule for title
20089 language=zh variant=zh-tw showtitle
20091 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20092 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20095 <p>This should be stripped!
20096 This won't take interferes with the title rule.
20101 Partly disable title conversion if variant == main language code
20103 language=zh variant=zh title=[[ZH]] showtitle
20105 -{T|zh-cn:CN;zh-tw:TW}-
20113 Partly disable title conversion if variant == main language code, more
20115 language=zh variant=zh title=[[ZH]] showtitle
20125 Raw output of variant escape tags (R flag)
20127 language=zh variant=zh-tw
20129 Raw: -{R|zh:China;zh-tw:Taiwan}-
20131 <p>Raw: zh:China;zh-tw:Taiwan
20136 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20138 language=zh variant=zh-cn
20140 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20147 Conversion rules from [numeric-only string] to [something else] (T48634)
20149 language=zh variant=zh-cn
20151 -{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
20158 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20160 language=zh variant=zh-cn
20162 -{H|zh-cn:foo;zh-tw:;}-foobar
20169 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20171 language=zh variant=zh-cn
20173 -{H|=>zh-cn:foo;}-foobar
20180 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20182 language=zh variant=zh-cn
20191 Nested using of manual convert syntax
20193 language=zh variant=zh-hk
20195 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20197 <p>Nested: Hello Hong Kong!
20201 # Since Parsoid is starting to emit canonical wikitext for links,
20202 # [http://example.com http://example.com] will not RT back to that
20205 Proper conversion of text in external links
20207 language=sr variant=sr-ec
20210 http://www.google.com
20211 gopher://www.google.com
20212 [http://www.google.com http://www.google.com]
20213 [gopher://www.google.com gopher://www.google.com]
20214 [https://www.google.com irc://www.google.com]
20215 [ftp://www.google.com www.google.com/ftp://dir]
20216 [//www.google.com www.google.com]
20218 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20219 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20220 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20221 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20222 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20223 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20224 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20227 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20228 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20229 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20230 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20231 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20232 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20233 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20237 Do not convert roman numbers to language variants
20239 language=sr variant=sr-ec
20243 <p>Фридрих IV је цар.
20248 Unclosed language converter markup "-{"
20259 Don't convert raw rule "-{R|=>}-" to "=>"
20270 Don't break link parsing if language converter markup is in the caption.
20272 language=sr variant=sr-ec
20274 [[Main Page|-{R|main page}-]]
20276 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20280 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20282 Don't break image parsing if language converter markup is in the caption.
20286 [[File:Foobar.jpg|-{R|caption}-]]
20288 <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" /></a>
20292 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20294 Don't break list handling if language converter markup is in the item.
20296 language=zh variant=zh-cn
20298 ;-{zh-cn:AAA;zh-tw:BBB}-
20300 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20307 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20309 Don't break table handling if language converter markup is in the cell.
20311 language=sr variant=sr-ec
20334 Bug 529: Uncovered bullet
20343 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20344 # Templates in Wikipedia rely on this behavior, as tidy has always been
20345 # enabled there. These tests are normally run *without* tidy, so specify the
20346 # full output here.
20347 # To test realistic parsing behavior, apply a tidy-like transformation to both
20348 # the expected output and your parser's output.
20350 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20352 ******* Foo {{bullet}}
20354 <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>
20360 Bug 529: Uncovered table already at line-start
20383 Bug 529: Uncovered bullet in parser function result
20385 * Foo {{lc:{{bullet}} }}
20393 Bug 5678: Double-parsed template argument
20395 {{lc:{{{1}}}|hello}}
20402 Bug 5678: Double-parsed template invocation
20404 {{lc:{{paramtest {{!}} param = hello }} }}
20406 <p>{{paramtest | param = hello }}
20411 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20414 title=[[Main Page]]
20416 {{PRVNÍVELKÉ:ěščř}}
20417 {{prvnívelké:ěščř}}
20437 Morwen/13: Unclosed link followed by heading
20444 <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>
20449 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20456 <h1><span class="mw-headline" id="heading">heading</span></h1>
20461 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20468 <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>
20483 Paragraphs inside divs (no extra line breaks)
20495 Paragraphs inside divs (extra line break on open)
20510 Paragraphs inside divs (extra line break on close)
20525 Paragraphs inside divs (extra line break on open and close)
20542 Nesting tags, paragraphs on lines which begin with <div>
20544 <div></div><strong>A
20547 <p><strong>A</strong></p>
20548 <p><strong>B</strong></p>
20556 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20558 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20560 <blockquote>Line one
20562 Line two</blockquote>
20564 <blockquote>Line one
20565 Line two</blockquote>
20569 <p>Line one Line two</p>
20574 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20579 Line two</blockquote>
20584 Line two</blockquote>
20589 Line two</blockquote>
20593 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20595 <blockquote>Line one
20600 <blockquote>Line one
20613 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20635 Paragraphs inside blockquotes/divs (no extra line breaks)
20637 <blockquote><div>Line one
20639 Line two</div></blockquote>
20641 <blockquote><div>Line one
20642 Line two</div></blockquote>
20647 Paragraphs inside blockquotes/divs (extra line break on open)
20652 Line two</div></blockquote>
20657 Line two</div></blockquote>
20662 Paragraphs inside blockquotes/divs (extra line break on close)
20664 <blockquote><div>Line one
20667 </div></blockquote>
20669 <blockquote><div>Line one
20672 </div></blockquote>
20677 Paragraphs inside blockquotes/divs (extra line break on open and close)
20683 </div></blockquote>
20689 </div></blockquote>
20694 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20696 wgLinkHolderBatchSize=0
20702 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20703 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20704 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20709 Free external link invading image caption
20711 [[Image:Foobar.jpg|thumb|http://x|hello]]
20713 <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>
20718 Bug 15196: localised external link numbers
20722 [http://en.wikipedia.org/]
20724 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20727 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20731 Multibyte character in padleft
20733 {{padleft:-Hello|7|Æ}}
20740 Multibyte character in padright
20742 {{padright:Hello-|7|Æ}}
20749 formatdate parser function
20751 {{#formatdate:2009-03-24}}
20753 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20758 formatdate parser function, with default format
20760 {{#formatdate:2009-03-24|mdy}}
20762 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20767 Spacing of numbers in formatted dates
20769 {{#formatdate:January 15}}
20771 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20776 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
20778 language=nl title=[[MediaWiki:Common.css]]
20780 {{#formatdate:2009-03-24|dmy}}
20782 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20795 Edit comment with link
20799 I like the [[Main Page]] a lot
20801 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20805 Edit comment with link and link text
20809 I like the [[Main Page|best pages]] a lot
20811 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20815 Edit comment with link and link text with suffix
20819 I like the [[Main Page|best page]]s a lot
20821 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20825 Edit comment with section link (non-local, eg in history list)
20827 comment title=[[Main Page]]
20829 /* External links */ removed bogus entries
20831 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20835 Edit comment with section link and text before it (non-local, eg in history list)
20837 comment title=[[Main Page]]
20839 pre-comment text /* External links */ removed bogus entries
20841 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>
20845 Edit comment with section link (local, eg in diff view)
20847 comment local title=[[Main Page]]
20849 /* External links */ removed bogus entries
20851 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20855 Edit comment with subpage link (bug 14080)
20859 title=[[Subpage test]]
20861 Poked at a [[/subpage]] here...
20863 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20867 Edit comment with subpage link and link text (bug 14080)
20871 title=[[Subpage test]]
20873 Poked at a [[/subpage|neat little page]] here...
20875 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20879 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20882 title=[[Subpage test]]
20884 Poked at a [[/subpage]] here...
20886 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20890 Edit comment with bare anchor link (local, as on diff)
20894 title=[[Main Page]]
20898 <a href="#section">#section</a>
20902 Edit comment with bare anchor link (non-local, as on history)
20905 title=[[Main Page]]
20909 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20913 Anchor starting with underscore
20919 <p><a href="#_ref">One</a>
20922 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20926 Id starting with underscore
20928 <div id="_ref"></div>
20930 <div id="_ref"></div>
20935 Edit comment with link with more than one pipe (T99346)
20939 [[Main Page|Many|pipes]]
20941 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
20945 Complex edit comment with link with more than one pipe (T99346)
20949 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
20951 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..."
20955 Space normalisation on autocomment (bug 22784)
20958 title=[[Main Page]]
20960 /* __hello__world__ */
20962 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20966 percent-encoding and + signs in comments (Bug 26410)
20970 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20972 <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>
20975 # Parsoid doesn't support this yet: see bug 73581
20976 # but it *should* omit the 'src' attribute if the image is bad.
20977 # PHP side of tests was disabled in
20978 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20979 # because of issues in the PHP parserTests infrastructure
20980 # (but the output below is indeed what the PHP side emits)
20982 Bad images - basic functionality
20985 !! DISABLED/html/php
20987 <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>
20991 Bad images - bug 16039: text after bad image disappears
20996 !! DISABLED/html/php
21002 <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>
21007 Verify that displaytitle works (bug #22501) no displaytitle
21011 wgAllowDisplayTitle=true
21012 wgRestrictDisplayTitle=false
21014 this is not the the title
21017 <p>this is not the the title
21022 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21027 wgAllowDisplayTitle=true
21028 wgRestrictDisplayTitle=false
21030 this is not the the title
21031 {{DISPLAYTITLE:whatever}}
21034 <p>this is not the the title
21039 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21044 wgAllowDisplayTitle=true
21045 wgRestrictDisplayTitle=true
21047 this is not the the title
21048 {{DISPLAYTITLE:whatever}}
21051 <p>this is not the the title
21056 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21061 wgAllowDisplayTitle=true
21062 wgRestrictDisplayTitle=true
21064 this is not the the title
21065 {{DISPLAYTITLE:screen}}
21068 <p>this is not the the title
21073 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21078 wgAllowDisplayTitle=false
21080 this is not the the title
21081 {{DISPLAYTITLE:screen}}
21084 <p>this is not the the title
21085 <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>
21090 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21095 wgAllowDisplayTitle=false
21097 this is not the the title
21100 <p>this is not the the title
21105 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21110 wgAllowDisplayTitle=true
21111 wgRestrictDisplayTitle=true
21113 this is not the the title
21114 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21116 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21117 <p>this is not the the title
21122 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21127 wgAllowDisplayTitle=true
21128 wgRestrictDisplayTitle=true
21130 this is not the the title
21131 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21133 <span style="color: red;">s</span>creen
21134 <p>this is not the the title
21139 Page status indicators: Empty name is invalid
21143 <indicator name=" "></indicator>
21144 <indicator></indicator>
21146 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21147 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21152 Page status indicators: Weird syntaxes that are okay
21156 <indicator name="empty" />
21157 <indicator name="name"></indicator>
21166 Page status indicators: Torture test
21170 <indicator name="01">hello world</indicator>
21171 <indicator name="02">[[Main Page]]</indicator>
21172 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21173 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21174 <indicator name="05">* foo
21176 <indicator name="06"><nowiki>foo</nowiki></indicator>
21177 <indicator name="07"> Preformatted</indicator>
21178 <indicator name="08"><div>Broken tag</indicator>
21179 <indicator name="09">{| class=wikitable
21182 <indicator name="10">Two
21184 paragraphs</indicator>
21187 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21188 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" />
21189 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>
21190 05=<ul><li> foo</li>
21194 07=<pre>Preformatted
21196 08=<div>Broken tag</div>
21198 09=<table class="wikitable">
21215 preload: check <noinclude> and <includeonly>
21219 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21225 preload: check <onlyinclude>
21229 Goodbye <onlyinclude>Hello world</onlyinclude>
21235 preload: can pass tags through if we want to
21239 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21241 <includeonly>Hello world</includeonly>
21245 preload: check that it doesn't try to do tricks
21249 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21251 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21255 Play a bit with r67090 and bug 3158
21257 <div style="width:50% !important"> </div>
21258 <div style="width:50% !important"> </div>
21259 <div style="width:50% !important"> </div>
21260 <div style="border : solid;"> </div>
21262 <div style="width:50% !important"> </div>
21263 <div style="width:50% !important"> </div>
21264 <div style="width:50% !important"> </div>
21265 <div style="border : solid;"> </div>
21268 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21269 <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>
21270 <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>
21271 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21276 HTML5 data attributes
21278 <span data-foo="bar">Baz</span>
21279 <p data-abc-def_hij="">Quuz</p>
21281 <p><span data-foo="bar">Baz</span>
21283 <p data-abc-def_hij="">Quuz</p>
21286 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21287 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21291 Strip reserved data attributes
21293 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21295 <div data-ok="fred">d</div>
21298 <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>
21302 percent-encoding and + signs in internal links (Bug 26410)
21304 [[User:+%]] [[Page+title%]]
21305 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21306 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21307 [[%33%45]] [[%33%45+]]
21309 <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>
21310 <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>
21311 <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>
21312 <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>
21315 <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>
21316 <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>
21317 <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> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"missing-image","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></span>
21318 <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>
21322 Special characters in embedded file links (bug 27679)
21324 [[File:Contains & ampersand.jpg]]
21325 [[File:Does not exist.jpg|Title with & ampersand]]
21327 <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>
21328 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21331 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span>
21332 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span></p>
21336 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21338 Text's been normalized?
21340 <p>Text's been normalized?
21345 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21347 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21349 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21354 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21356 [http://www.example.org/ ideograms]
21358 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21363 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21365 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21367 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21391 Bug 31098 Template which includes system messages which includes the template
21395 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21396 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21401 Bug31490 Turkish: ucfirst 'blah'
21412 Bug31490 Turkish: ucfirst 'ix'
21423 Bug31490 Turkish: lcfirst 'BLAH'
21434 Bug31490 Turkish: ucfırst (with a dotless i)
21440 <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>
21445 Bug31490 ucfırst (with a dotless i) with English language
21451 <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>
21456 Bug 26375: TOC with italics
21458 title=[[Main Page]]
21461 == ''Lost'' episodes ==
21463 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21465 <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>
21469 <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>
21474 Bug 26375: TOC with bold
21476 title=[[Main Page]]
21479 == '''should be bold''' then normal text ==
21481 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21483 <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>
21487 <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>
21492 Bug 33845: Headings become cursive in TOC when they contain an image
21494 title=[[Main Page]]
21497 == Image [[Image:foobar.jpg]] ==
21499 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21501 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21505 <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>
21510 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21512 title=[[Main Page]]
21515 == <blockquote>Quote</blockquote> ==
21517 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21519 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21523 <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>
21527 <div id="toc" class="toc">
21528 <div id="toctitle">
21532 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21536 <h2><span class="mw-headline" id="Quote"></span></h2>
21538 <p><span class="mw-headline" id="Quote">Quote</span></p>
21540 <p><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></p>
21544 Unclosed tags in TOC
21546 title=[[Main Page]]
21550 <small>Hanc marginis exiguitas non caperet.</small>
21553 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21555 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_.3C_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
21559 <h2><span class="mw-headline" id="Proof:_2_.3C_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>
21560 <p><small>Hanc marginis exiguitas non caperet.</small>
21566 Multiple tags in TOC
21569 == <i>Foo</i> <b>Bar</b> ==
21571 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21573 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21575 <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>
21576 <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>
21580 <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>
21581 <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>
21585 <div id="toc" class="toc">
21586 <div id="toctitle">
21590 <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>
21591 <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>
21595 <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>
21596 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21598 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21600 <p><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></p>
21603 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21604 # html5 tag parsing.
21606 Tags with parameters in TOC
21611 == <sup class="in-h2">Hello</sup> ==
21613 == <sup class="a > b">Evilbye</sup> ==
21615 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21617 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21618 <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>
21622 <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>
21623 <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>
21626 <meta property="mw:PageProp/toc" />
21627 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21629 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21633 span tags with directionality in TOC
21636 == <span dir="ltr">C++</span> ==
21638 == <span dir="rtl">זבנג!</span> ==
21640 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21642 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21644 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21646 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21648 <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>
21649 <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>
21650 <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>
21651 <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>
21652 <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>
21656 <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>
21657 <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>
21658 <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>
21659 <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>
21660 <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>
21665 Bug 72884: bdi element in ToC
21668 == <bdi>test</bdi> ==
21670 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21672 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21676 <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>
21681 T35715: s/strike element in ToC
21684 == <s>test</s> test <strike>test</strike> ==
21686 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21688 <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>
21692 <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>
21696 # Note that the html output does not have the <p></p>, but the
21697 # html+tidy output *does*. This is because the empty <p></p> is
21698 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21700 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21705 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21707 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21711 <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>
21715 <div id="toc" class="toc">
21716 <div id="toctitle">
21720 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21724 <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>
21730 == {{int:headline_sample}} ==
21734 Bug 32057: Title needed when expanding <h> nodes.
21736 title=[[Main Page]]
21740 <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>
21745 Strip marker in urlencode
21747 {{urlencode:x<nowiki/>y}}
21748 {{urlencode:x<nowiki/>y|wiki}}
21749 {{urlencode:x<nowiki/>y|path}}
21750 {{urlencode:x<pre id="one">two</pre>y}}
21778 Strip marker in formatNum
21780 {{formatnum:1<nowiki/>2}}
21781 {{formatnum:1<nowiki/>2|R}}
21789 Check noCommafy in formatNum
21793 {{formatnum:123456.78}}
21794 {{formatnum:123456.78|NOSEP}}
21802 Wrong option for formatNum (bug 56199)
21804 {{formatnum:1,234.56|Random}}
21805 {{formatnum:1,234.56|EVERYTHING}}
21806 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21815 Strip marker in grammar
21819 {{grammar:elative|foo<nowiki/>bar}}
21826 Strip marker in padleft
21828 {{padleft:|2|x<nowiki/>y}}
21835 Strip marker in padright
21837 {{padright:|2|x<nowiki/>y}}
21844 Strip marker in anchorencode
21846 {{anchorencode:x<nowiki/>y}}
21853 nowiki inside link inside heading (bug 18295)
21855 ==[[foo|x<nowiki>y</nowiki>z]]==
21857 <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>
21862 new support for bdi element (bug 31817)
21864 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21866 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21871 Ignore pipe between table row attributes
21875 |- id=foo | style='color: red'
21883 <tr id="foo" style="color: red">
21890 Gallery override link with WikiLink (bug 34852)
21893 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21896 <ul class="gallery mw-gallery-traditional">
21897 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21898 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><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>
21899 <div class="gallerytext">
21909 Gallery override link with absolute external link (bug 34852)
21912 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21915 <ul class="gallery mw-gallery-traditional">
21916 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21917 <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>
21918 <div class="gallerytext">
21928 Gallery override link with malicious javascript (bug 34852)
21931 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21934 <ul class="gallery mw-gallery-traditional">
21935 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21936 <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>
21937 <div class="gallerytext">
21947 Gallery with invalid title as link (bug 43964)
21950 File:foobar.jpg|link=<
21953 <ul class="gallery mw-gallery-traditional">
21954 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21955 <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>
21956 <div class="gallerytext">
21964 Language parser function
21973 Padleft and padright as substr
21975 {{padleft:|3|abcde}}
21976 {{padright:|3|abcde}}
21984 Special parser function
21986 {{#special:RandomPage}}
21987 {{#special:BaDtItLe}}
21988 {{#special:Foobar}}
21997 Bug 34939 - Case insensitive link parsing ([HttP://])
21999 [HttP://MediaWiki.Org/]
22001 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22004 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22008 Bug 34939 - Case insensitive link parsing ([HttP:// title])
22010 [HttP://MediaWiki.Org/ MediaWiki]
22012 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22017 Bug 34939 - Case insensitive link parsing (HttP://)
22019 HttP://MediaWiki.Org/
22021 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22024 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22042 <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>
22043 <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>
22044 <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>
22045 <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>
22046 <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>
22052 ### Parsoid-specific tests
22053 ### Parsoid-PHP parser incompatibilities
22056 1. SOL-sensitive wikitext tokens as template-args
22058 parsoid=wt2html,wt2wt
22064 <span about="#mwt1" typeof="mw:Transclusion">
22065 </span><ul about="#mwt1"><li>a</li>
22067 <span about="#mwt2" typeof="mw:Transclusion">
22068 </span><ol about="#mwt2"><li>a</li>
22070 <span about="#mwt3" typeof="mw:Transclusion">
22071 </span><dl about="#mwt3"><dd>a</dd>
22075 #### -----------------------------------------------------------------
22076 #### Parsoid-specific functionality tests
22077 #### -----------------------------------------------------------------
22079 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22080 # We know wt2wt will fail, but we expect selser to pass.
22081 # Due to the nature of our testing, wt2wt and selser tests will enter the
22082 # blacklist and we'll catch selser regressions based on changes to the
22083 # blacklist entries for selser tests.
22085 1. Bad treebuilder fixup of formatting elt is cleaned up
22087 parsoid=wt2html,wt2wt
22092 [[Image:Foobar.jpg|right|Test]]
22099 <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>
22106 2. Bad treebuilder fixup of formatting elt is cleaned up
22108 parsoid=wt2html,wt2wt
22110 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22112 <small>[[Image:Foobar.jpg|right|300px]]</small>
22116 <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>
22118 <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>
22122 3. Bad treebuilder fixup of formatting elt is cleaned up
22124 parsoid=wt2html,wt2wt
22126 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22128 <p><small><b>foo</b></small></p>
22129 <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>
22130 <p><small><b>bar</b></small></p>
22134 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22136 parsoid=wt2html,wt2wt
22138 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22140 <p><b><small></small></b></p>
22141 <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>
22145 #### ----------------------------------------------------------------
22146 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22147 #### tags. Parsoid's output for these tags differs from that of the
22149 #### ----------------------------------------------------------------
22152 Ref: 1. ref-location should be replaced with an index span
22155 B <ref name="x">foo</ref>
22159 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22160 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-2"},"attrs":{"name":"x"}}'><a href="#cite_note-x-2"><span class="mw-reflink-text">[2]</span></a></span>
22161 C <span about="#mwt6" class="mw-ref" id="cite_ref-y_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"y"}}'><a href="#cite_note-y-3"><span class="mw-reflink-text">[3]</span></a></span></p>
22162 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22163 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22164 <li about="#cite_note-x-2" id="cite_note-x-2"><a href="#cite_ref-x_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-x-2" class="mw-reference-text">foo</span></li>
22165 <li about="#cite_note-y-3" id="cite_note-y-3"><a href="#cite_ref-y_3-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-y-3" class="mw-reference-text"></span></li>
22170 Ref: 2. ref-tags with identical names should all get the same index
22172 A <ref name="x">foo</ref>
22176 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22177 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22178 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22179 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22184 Ref: 3. spaces in ref-names should be ignored
22186 A <ref name="x">foo</ref>
22187 B <ref name=" x " />
22191 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22192 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22193 C <span about="#mwt6" class="mw-ref" id="cite_ref-x_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22194 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22195 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a><a href="#cite_ref-x_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22199 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22201 Ref: 4. 'constructor' should be accepted as a valid ref-name
22203 A <ref name="constructor">foo</ref>
22206 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-constructor_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-constructor-1"},"attrs":{"name":"constructor"}}'><a href="#cite_note-constructor-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22207 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22208 <li about="#cite_note-constructor-1" id="cite_note-constructor-1"><a href="#cite_ref-constructor_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-constructor-1" class="mw-reference-text">foo</span></li>
22213 Ref: 5. body should accept generic wikitext
22216 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22221 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22223 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22224 <li about="#cite_note-1" id="cite_note-1"><a href="#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">This is a <b><a rel="mw:WikiLink" href="Bolded_link" title="Bolded link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
22230 Ref: 6. indent-pres should not be output in ref-body
22240 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22242 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22243 <li about="#cite_note-1" id="cite_note-1"><a href="#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
22251 Ref: 7. No p-wrapping in ref-body
22268 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22270 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22271 <li about="#cite_note-1" id="cite_note-1"><a href="#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
22286 Ref: 8. transclusion wikitext has lower precedence
22288 A <ref> foo {{echo|</ref> B C}}
22292 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C}}</p>
22293 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22294 <li about="#cite_note-1" id="cite_note-1"><a href="#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 {{echo|</span></li>
22299 Ref: 9. unclosed comments should not leak out of ref-body
22301 A <ref> foo <!--</ref> B C
22304 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22305 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22306 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22311 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22313 A <ref> <b> foo </ref> B C
22317 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22320 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22321 <li about="#cite_note-1" id="cite_note-1"><a href="#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"><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></span></li>
22326 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22332 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B
22333 C <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> D</p>
22334 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22335 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22336 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22341 Ref: 12. ref-tags act as trailing newline migration barrier
22343 <!--the newline at the end of this line moves out of the p tag-->a
22345 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22351 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22354 <p>b<!--the newline at the end of this line stays inside the p tag--> <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22355 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22358 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22359 <li about="#cite_note-1" id="cite_note-1"><a href="#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"></span></li>
22360 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"></span></li></ol>
22364 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22371 <p><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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> A
22372 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> B</p>
22373 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22374 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22375 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar
22381 Ref: 14. A nested ref-tag should be emitted as plain text
22383 <ref>foo <ref>bar</ref> baz</ref>
22387 <p><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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22389 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22390 <li about="#cite_note-1" id="cite_note-1"><a href="#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 <ref>bar</ref> baz</span></li>
22395 Ref: 15. ref-tags with identical names should get identical indexes
22397 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22398 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22402 <p>A1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a-1"},"attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span> A2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22403 B1 <span about="#mwt7" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span> B2 <span about="#mwt8" class="mw-ref" id="cite_ref-b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22405 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-a_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-b_2-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22409 ## We don't bother wt2wt-ing non-standard whitespace
22411 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22419 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22420 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22421 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22425 Ref: 17. Generate valid HTML5 id/about attributes
22427 <ref name="a b">foo</ref>
22431 <p><span class="mw-ref" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_b-1"},"attrs":{"name":"a b"}}'><a href="#cite_note-a_b-1"><span class="mw-reflink-text">[1]</span></a></span>
22434 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22435 <li about="#cite_note-a_b-1" id="cite_note-a_b-1"><a href="#cite_ref-a_b_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">foo</span></li>
22440 Ref: 18. T58916: Extension attributes should be parsed as plain text
22442 <ref name="{{echo|a}}">foo</ref>
22446 <p><span class="mw-ref" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1"},"attrs":{"name":"{{echo|a}}"}}'><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1"><span class="mw-reflink-text">[1]</span></a></span>
22449 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22450 <li about="#cite_note-.7B.7Becho.7Ca.7D.7D-1" id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><a href="#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1" class="mw-reference-text">foo</span></li>
22455 Ref: 19. ref-tags with identical name encodings should get identical indexes
22457 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22461 <p>1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_.26_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_.26_b-1"},"attrs":{"name":"a & b"}}'><a href="#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span> 2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp; b"}}'><a href="#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span>
22463 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22464 <li about="#cite_note-a_.26_b-1" id="cite_note-a_.26_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_.26_b_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-a_.26_b_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_.26_b-1" class="mw-reference-text">foo</span></li>
22469 Ref: 20. ref-tags with identical names but different content should keep it
22471 A <ref name="foo">Foo one</ref>
22472 B <ref name="foo">Foo two</ref>
22473 C <ref name="foo" />
22477 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-foo_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-foo-1"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22478 B <span about="#mwt4" class="mw-ref" id="cite_ref-foo_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo two"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22479 C <span about="#mwt6" class="mw-ref" id="cite_ref-foo_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22481 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-foo-1" id="cite_note-foo-1"><span rel="mw:referencedBy"><a href="#cite_ref-foo_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-foo_1-1"><span class="mw-linkback-text">2 </span></a><a href="#cite_ref-foo_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-foo-1" class="mw-reference-text">Foo one</span></li>
22486 References: 1. references tag without any refs should be handled properly
22490 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22494 References: 2. references tag with group only outputs references from that group
22496 A <ref group="a">foo</ref>
22497 B <ref group="b">bar</ref>
22500 <references group="a" />
22502 <references group="b" />
22504 <p>A <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":{"group":"a"}}'><a href="#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22505 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"b"}}'><a href="#cite_note-2" data-mw-group="b"><span class="mw-reflink-text">[b 1]</span></a></span>
22506 C <span class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="#cite_note-3"><span class="mw-reflink-text">[1]</span></a></span></p>
22508 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22509 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" data-mw-group="a" 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>
22511 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22512 <li about="#cite_note-3" id="cite_note-3"><a href="#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">baz</span></li>
22514 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22515 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" data-mw-group="b" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22520 References: 3. ref list should be cleared after processing references
22530 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22532 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
22535 <p>B <span about="#mwt6" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22537 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22538 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22543 References: 4. only referenced group should be cleared after processing references
22545 A <ref group="a">afoo</ref>
22548 <references group="a" />
22554 <p>A <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":{"group":"a"}}'><a href="#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22555 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22557 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">afoo</span></li>
22560 <p>C <span about="#mwt8" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="#cite_note-3"><span class="mw-reflink-text">[2]</span></a></span></p>
22562 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bfoo</span></li><li about="#cite_note-3" id="cite_note-3"><a href="#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">cfoo</span></li>
22566 ## Don't expect this to rt since we're dropping content
22568 References: 5. ref tags in references should be processed while ignoring all other content
22570 parsoid=wt2html,html2html
22573 B <ref name="b">bar</ref>
22576 <ref name="a">foo</ref>
22577 This should just get lost.
22580 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22581 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22584 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{},"body":{"html":"\n<span about=\"#mwt8\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-a-1\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>\n"}}'><li about="#cite_note-a-1" id="cite_note-a-1"><a href="#cite_ref-a_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><a href="#cite_ref-b_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22589 References: 6. <references /> from a transclusion
22591 <ref>Foo</ref> {{echo|<references />}}
22593 <p><span about="#mwt3" 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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p> <ol class="mw-references" typeof="mw:Extension/references mw:Transclusion" about="#mwt4" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
22598 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22600 A <ref>foo bar for a</ref>
22601 B <ref group="X" name="b" />
22605 <references group="X">
22606 <ref name="b">foo</ref>
22609 <p>A <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22610 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}'><a href="#cite_note-b-2" data-mw-group="X"><span class="mw-reflink-text">[X 1]</span></a></span>
22613 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22614 <li about="#cite_note-1" id="cite_note-1"><a href="#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 bar for a</span></li>
22617 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","attrs":{"group":"X"},"body":{"html":"\n<span about=\"#mwt10\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-b-2\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"#cite_note-b-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"X\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[X 1]</span></a></span>\n"}}'>
22618 <li about="#cite_note-b-2" id="cite_note-b-2"><a href="#cite_ref-b_2-0" data-mw-group="X" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">foo</span></li>
22623 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22625 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22628 <p>X<span about="#mwt2" 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 {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>"}},"i":0}}]}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22629 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt7" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#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 <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</span></li>
22633 # This test only works in wt2html now as the <references /> are always generated
22634 # unless selser is active. Once T72722 is fixed, we should add a changes test
22635 # here to ensure that unrelated changes don't add the new <references />
22636 # when selser is active.
22638 References: 9. Generate missing references list at the end
22641 B <ref group="inexistent">bar</ref>
22643 <p>A <span 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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B <span class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"inexistent"}}'><a href="#cite_note-2" data-mw-group="inexistent"><span class="mw-reflink-text">[inexistent 1]</span></a></span></p>
22644 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22645 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22647 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22648 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" data-mw-group="inexistent" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22653 References: 10. New <references/> shouldn't be added for unrelated edits.
22656 "modes": ["selser"],
22657 "changes": [["#x", "remove"]],
22661 Unrelated text<span id="x"> that's going to disappear</span>.
22669 Entities in ref name
22671 <ref name="test & me">hi</ref>
22674 <p><span about="#mwt2" class="mw-ref" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-test_.26_me-1"},"attrs":{"name":"test &amp; me"}}'><a href="#cite_note-test_.26_me-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22675 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22676 <li about="#cite_note-test_.26_me-1" id="cite_note-test_.26_me-1"><a href="#cite_ref-test_.26_me_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-test_.26_me-1" class="mw-reference-text">hi</span></li>
22680 ## The output here may look funny, but it's what the php parser will do. The
22681 ## unclosed references tag becomes escaped text, and then a new references
22682 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22683 ## nowiki tags, and the auto-generated references tag is only dropped in
22686 Generate references for unclosed references tag
22694 <p>a<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="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
22696 <p><references></p>
22697 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
22701 New reference serializes on its own line
22703 parsoid=wt2wt,html2wt
22708 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22711 #### ----------------------------------------------------------------
22712 #### Parsoid-only testing of Parsoid's impl of LST
22713 #### Not implemented yet, see
22714 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22715 #### ----------------------------------------------------------------
22718 LST Sections: 1. Simple section start and end
22720 parsoid={ "suppressErrors": true }
22722 <section begin="2011-05-16" />
22723 <section end="2014-04-10 (MW 1.23wmf22)" />
22725 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22726 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22729 #--------- Test stripping of empty nodes in template content ----------
22731 Empty LI and TR nodes should be stripped from template content
22736 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22740 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22753 Empty LI and TR nodes should not be stripped from top-level content
22780 Empty TR nodes should not be stripped if they have any attributes set
22782 {{EmptyTRWithHTMLAttrTest}}
22784 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22785 <tr align="center"></tr>
22786 <tr><td>foo</td></tr>
22787 <tr align="center"></tr>
22788 <tr><td>bar</td></tr>
22792 #### ----------------------------------------------------------------
22793 #### The following section of tests are primarily to test
22794 #### wikitext escaping capabilities of Parsoid. Given that
22795 #### escaping can be done any number of ways, the wikitext (input)
22796 #### is always adjusted to reflect how Parsoid adds nowiki
22799 #### We are marking several tests as parsoid-only since the
22800 #### HTML in the result section is different from what the
22801 #### PHP parser generates for it.
22802 #### ----------------------------------------------------------------
22805 #### --------------- Headings ---------------
22807 #### 1. Nested inside html <h1>=foo=</h1>
22808 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22809 #### 3. Nested inside html with wikitext split by html tags
22810 #### 4. No escape needed
22811 #### 5. Empty headings <h1></h1>
22812 #### 6. Heading chars in SOL context
22813 #### ----------------------------------------
22815 Headings: 0. Unnested
22825 <p>=foo<i>a</i>=</p>
22827 <nowiki>=foo=</nowiki>
22829 <nowiki> </nowiki>=foo=
22831 <nowiki>=foo=</nowiki>
22833 =foo''a''<nowiki>=</nowiki>
22836 # New headings and existing headings are handled differently
22838 Headings: 1. Nested inside html
22846 <h1 data-parsoid=''>=foo=</h1>
22847 <h2 data-parsoid=''>=foo=</h2>
22848 <h3 data-parsoid=''>=foo=</h3>
22849 <h4 data-parsoid=''>=foo=</h4>
22850 <h5 data-parsoid=''>=foo=</h5>
22851 <h6 data-parsoid=''>=foo=</h6>
22859 =<nowiki>=foo=</nowiki>=
22860 ==<nowiki>=foo=</nowiki>==
22861 ===<nowiki>=foo=</nowiki>===
22862 ====<nowiki>=foo=</nowiki>====
22863 =====<nowiki>=foo=</nowiki>=====
22864 ======<nowiki>=foo=</nowiki>======
22869 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22878 <nowiki>*</nowiki>bar
22884 <nowiki>=bar=</nowiki>
22888 Headings: 3. Nested inside html with wikitext split by html tags
22892 <h1>=<b>bold</b>foo=</h1>
22894 = ='''bold'''foo= =
22898 Headings: 4a. No escaping needed (testing just h1 and h2)
22909 <h1><i>=</i>foo=</h1>
22929 Headings: 4b. No escaping needed (inside p-tags)
22944 Headings: 5. Empty headings
22948 <h1 data-parsoid='{}'></h1>
22950 <h2 data-parsoid='{}'></h2>
22952 <h3 data-parsoid='{}'></h3>
22954 <h4 data-parsoid='{}'></h4>
22956 <h5 data-parsoid='{}'></h5>
22958 <h6 data-parsoid='{}'></h6>
22968 =====<nowiki/>=====
22970 ======<nowiki/>======
22974 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22984 <nowiki>=a=</nowiki>
22986 <nowiki>=a=</nowiki>
22988 <nowiki>=a=</nowiki>
22992 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23005 <nowiki>=a=</nowiki>
23008 <nowiki>=a=</nowiki>
23011 <nowiki>=a=</nowiki>
23016 Headings: 6c. Heading chars in SOL context (leading newline break)
23024 <nowiki>=b=</nowiki>
23028 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23032 <!--c0--><p>=a=</p>
23034 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23036 <!--c0--><nowiki>=a=</nowiki>
23038 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23042 Headings: 6d. Heading chars in SOL context (No escaping needed)
23052 Headings: 7. Insert a newline between new content and headings
23058 <h2 data-parsoid='{}'>A</h2>
23059 <p data-parsoid='{}'>a</p>
23069 #### --------------- Lists ---------------
23070 #### 0. Outside nests (*foo, etc.)
23071 #### 1. Nested inside html <ul><li>*foo</li></ul>
23072 #### 2. Inside definition lists
23073 #### 3. Only bullets at start should be escaped
23074 #### 4. No escapes needed
23075 #### 5. No unnecessary escapes
23076 #### 6. Escape bullets in SOL position
23077 #### 7. Escape bullets in a multi-line context
23078 #### ----------------------------------------
23081 Lists: 0. Outside nests
23091 <nowiki>*</nowiki>foo
23093 <nowiki>#</nowiki>foo
23095 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23098 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23099 ## to test wikitext escaping, and insignificant whitespace diffs
23100 ## cause PHP parser tests to barf
23102 Lists: 1. Nested inside html (No unnecessary escapes)
23111 <li data-parsoid='{}'>*foo</li>
23112 <li data-parsoid='{}'>#foo</li>
23113 <li data-parsoid='{}'>:foo</li>
23114 <li data-parsoid='{}'>;foo</li>
23122 <li data-parsoid='{}'>*foo</li>
23123 <li data-parsoid='{}'>#foo</li>
23124 <li data-parsoid='{}'>:foo</li>
23125 <li data-parsoid='{}'>;foo</li>
23132 *<nowiki>*foo</nowiki>
23133 *<nowiki>#foo</nowiki>
23134 *<nowiki>:foo</nowiki>
23135 *<nowiki>;foo</nowiki>
23141 #<nowiki>*foo</nowiki>
23142 #<nowiki>#foo</nowiki>
23143 #<nowiki>:foo</nowiki>
23144 #<nowiki>;foo</nowiki>
23148 Lists: 2. Inside definition lists
23152 <dl><dt>;foo</dt></dl>
23153 <dl><dt>:foo</dt></dl>
23156 <dl><dd>:foo</dd></dl>
23160 ; <nowiki>:foo</nowiki>
23162 ; <nowiki>:foo</nowiki>
23169 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23175 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23179 *<nowiki>*foo</nowiki>''it''*bar
23183 Lists: 4. No escapes needed
23196 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23200 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23214 Lists: 5. No unnecessary escapes
23218 <ul><li> bar <span>[[foo]]</span></li></ul>
23219 <ul><li> =bar <span>[[foo]]</span></li></ul>
23220 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23221 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23222 <ul><li> =bar <span>foo]]</span>=</li></ul>
23223 <ul><li> <s></s>: a</li></ul>
23224 <ul><li> <i>* foo</i></li></ul>
23227 * bar <span><nowiki>[[foo]]</nowiki></span>
23229 * =bar <span><nowiki>[[foo]]</nowiki></span>
23231 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23233 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23235 * =bar <span>foo]]</span>=
23243 Lists: 6. Escape bullets in SOL position
23247 <p><!--cmt-->*foo</p>
23249 <!--cmt--><nowiki>*</nowiki>foo
23253 Lists: 7. Escape bullets in a multi-line context
23262 <nowiki>*</nowiki>b
23266 Lists: 8. Escape colons only if not present in tags
23270 <dl><dt>a:b<i>c:d</i></dt></dl>
23272 ; <nowiki>a:b</nowiki>''c:d''
23275 #### --------------- HRs ---------------
23276 #### 1. Single line
23277 #### -----------------------------------
23280 HRs: 1. Single line
23288 ----<nowiki>----</nowiki>
23293 #### --------------- Tables ---------------
23294 #### 1a. Simple example
23295 #### 1b. No escaping needed (!foo)
23296 #### 1c. No escaping needed (|foo)
23297 #### 1d. No escaping needed (|}foo)
23299 #### 2a. Nested in td (<td>foo|bar</td>)
23300 #### 2b. Nested in td (<td>foo||bar</td>)
23301 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23303 #### 3a. Nested in th (<th>foo!bar</th>)
23304 #### 3b. Nested in th (<th>foo!!bar</th>)
23305 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23309 #### 4c. No escaping needed
23310 #### --------------------------------------
23313 Tables: 1a. Simple example
23321 <nowiki>{|</nowiki>
23326 Tables: 1b. No escaping needed
23337 Tables: 1c. No escaping needed
23348 Tables: 1d. No escaping needed
23359 Tables: 2a. Nested in td
23364 <td>foo|bar</td></tr>
23365 <tr><td>x<div>a|b</div></td>
23369 |<nowiki>foo|bar</nowiki>
23371 |x<div><nowiki>a|b</nowiki></div>
23387 Tables: 2b. Nested in td
23393 <td>a<i>b||c</i></td>
23394 <td>a<i><div>b||c</div></i></td>
23395 </tr></tbody></table>
23398 |<nowiki>foo||bar</nowiki>
23399 |a''<nowiki>b||c</nowiki>''
23400 |a''<div><nowiki>b||c</nowiki></div>''
23409 <td>a<i><div>b||c</div></i>
23415 Tables: 2c. Nested in td -- no escaping needed
23431 Tables: 3a. Nested in th
23447 Tables: 3b. Nested in th
23452 <tr><th>foo!!bar</th>
23453 <th><i>foo|bar</i></th>
23454 <th><i>foo!!bar</i></th>
23455 <th><i><span>foo!!bar</span></i></th>
23456 </tr></tbody></table>
23459 !<nowiki>foo!!bar</nowiki>
23460 !''<nowiki>foo|bar</nowiki>''
23461 !''<nowiki>foo!!bar</nowiki>''
23462 !''<span><nowiki>foo!!bar</nowiki></span>''
23471 <th><i>foo!!bar</i>
23473 <th><i><span>foo!!bar</span></i>
23479 Tables: 3c. Nested in th
23484 <tr><th>foo||bar</th>
23485 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23486 </tr></tbody></table>
23489 !<nowiki>foo||bar</nowiki>
23490 !<nowiki>foo||bar</nowiki>
23503 Tables: 4a. Escape -
23519 |<nowiki>-bar</nowiki>
23524 Tables: 4b. Escape +
23540 |<nowiki>+bar</nowiki>
23545 Tables: 4c. No escaping needed
23550 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23551 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23557 <div>a|b</div></td>
23602 Tables: 4d. No escaping needed
23607 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23608 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23609 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23620 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23630 T97430: Don't emit empty nowiki pairs around marker meta tags
23634 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23635 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23637 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23638 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23642 Unclosed xmlish element in table line shouldn't eat end delimiters
23647 <tbody><tr><td> <foo</td>
23648 <td> bar></td></tr>
23665 #### --------------- Links ----------------
23666 #### 1. Quote marks in link text
23667 #### 2. Wikilinks: Escapes needed
23668 #### 3. Wikilinks: No escapes needed
23669 #### 4. Extlinks: Escapes needed
23670 #### 5. Extlinks: No escapes needed
23671 #### --------------------------------------
23673 Links 1. WikiLinks: No escapes needed
23677 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23678 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23679 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23683 [[Foo|x [Foobar] x]]
23685 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23686 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23687 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23692 Links 2. WikiLinks: Escapes needed
23696 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23697 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23698 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23699 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23700 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23701 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23702 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23703 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23704 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23705 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23707 [[Foo|<nowiki>Foobar]</nowiki>]]
23708 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23709 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23710 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23711 [[Foo|<nowiki>|Bar</nowiki>]]
23712 [[Foo|<nowiki>]]bar</nowiki>]]
23713 [[Foo|<nowiki>[[bar</nowiki>]]
23714 [[Foo|<nowiki>x [[ y</nowiki>]]
23715 [[Foo|<nowiki>x ]] y</nowiki>]]
23716 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23718 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23719 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23720 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23721 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23722 <a href="/wiki/Foo" title="Foo">|Bar</a>
23723 <a href="/wiki/Foo" title="Foo">]]bar</a>
23724 <a href="/wiki/Foo" title="Foo">[[bar</a>
23725 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23726 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23727 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23732 Links 3. WikiLinks: No escapes needed
23736 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23737 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23742 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23743 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23748 Links 4. ExtLinks: Escapes needed
23752 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23753 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23754 <p>[http://google.com]</p>
23755 <p>[http://google.com google]</p>
23756 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23757 <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>
23759 [http://google.com <nowiki>[google]</nowiki>]
23760 [http://google.com <nowiki>google]</nowiki>]
23762 <nowiki>[http://google.com]</nowiki>
23764 <nowiki>[http://google.com google]</nowiki>
23766 [http://google.com<nowiki>]</nowiki>
23768 [{{echo|http://google.com}}<nowiki>]</nowiki>
23770 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23771 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23772 </p><p>[http://google.com]
23773 </p><p>[http://google.com google]
23774 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23775 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23780 Links 5. ExtLinks: No escapes needed
23784 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23785 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23787 [http://google.com [google]
23789 [[http://google.com]]
23791 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23792 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23797 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23801 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23802 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23803 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23804 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23805 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23806 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23807 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23808 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23809 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23810 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23811 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23812 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23813 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23816 x<nowiki/>http://example.com<nowiki/>y
23817 http://example.com<nowiki/>?x
23818 http://example.com<nowiki/>&x
23819 http://example.com<nowiki/>'x
23820 http://example.com<nowiki/>,x
23821 http://example.com<nowiki/>.x
23822 http://example.com<nowiki/>;x
23823 http://example.com<nowiki/>:x
23824 http://example.com<nowiki/>;x
23825 http://example.com<nowiki/>!x
23826 http://example.com<nowiki/>=x
23827 http://example.com<nowiki/>(x)
23828 http://example.com(x<nowiki/>)
23832 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23837 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23839 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23840 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23841 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23842 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23843 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23849 "http://example.com"
23850 (http://example.com)
23851 (http://example.com) foo
23852 http://example.com,
23853 http://example.com, foo
23856 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23858 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23859 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23860 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23861 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23862 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23867 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23871 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23872 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23874 http://example.com.,;:!?\
23875 -http://example.com:
23877 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23878 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23883 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23887 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23888 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23889 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23893 X<nowiki/>RFC 123<nowiki/>y
23897 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23901 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23902 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23903 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23910 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23911 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23912 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23917 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23921 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23922 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23923 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23927 X<nowiki/>PMID 123<nowiki/>y
23931 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23935 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23936 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23937 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23944 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23945 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23946 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23951 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23955 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23956 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23957 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23960 ISBN 1234567890<nowiki/>1
23961 ISBN 1234567890<nowiki/>x
23962 a<nowiki/>ISBN 1234567890<nowiki/>b
23966 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23970 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23974 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23979 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23983 <p>this is not a link: http://example.com
23986 this is not a link: <nowiki>http://example.com</nowiki>
23990 Links 15. Link trails can't become link prefixes.
23995 <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>
23997 [[Söfnuður]]-[[00]]
23999 <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>
24003 #### --------------- Quotes ---------------
24004 #### 1. Quotes inside <b> and <i>
24005 #### 2. Link fragments separated by <i> and <b> tags
24006 #### 3. Link fragments inside <i> and <b>
24007 #### 4. No escaping needed
24008 #### --------------------------------------
24010 1a. Quotes inside <b> and <i>
24021 <b>foo'<i>bar'</i>baz</b>
24030 <i>fools'<span> errand</span></i>
24031 <i><span>fool</span>'s errand</i>
24032 '<i>foo</i> bar '<i>baz</i>
24033 a|!*#-:;+-~[]{}b'<i>x</i>
24037 ''<nowiki>''foo''</nowiki>''
24038 ''<nowiki>'''foo'''</nowiki>''
24040 '''<nowiki/>'foo''''
24041 '''<nowiki>''foo''</nowiki>'''
24042 '''<nowiki>'''foo'''</nowiki>'''
24043 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24044 '''foo'''<nowiki/>'s
24050 '''foo'''<nowiki/>'
24051 ''''foo'''<nowiki/>'
24052 ''fools'<span> errand</span>''
24053 ''<span>fool</span>'s errand''
24054 '<nowiki/>''foo'' bar '''baz''
24055 a|!*#-:;+-~[]{}b'''x''
24059 1b. Quotes inside <b> and <i> with other tags on same line
24063 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24064 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24065 <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>
24066 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24067 '<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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
24068 '<i>foo</i> <div title="name">test</div>
24069 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24070 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24071 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
24074 '''a'' foo ''[[bar]]''
24075 ''a''' foo ''[[bar]]''
24076 ''a''' foo '''{{echo|[[bar]]}}'''
24077 [[foo]] x'''[[bar]]''
24078 '''foo'' <ref>test</ref>
24079 '''foo'' <div title="name">test</div>
24080 '''foo'' and <br> bar
24085 2. Link fragments separated by <i> and <b> tags
24089 <p>[[<i>foo</i>hello]]</p>
24090 <p>[[<b>foo</b>hello]]</p>
24092 [[''foo''<nowiki>hello]]</nowiki>
24094 [['''foo'''<nowiki>hello]]</nowiki>
24097 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24098 # this is one of the shortcomings of this format
24100 3. Link fragments inside <i> and <b>
24104 <p><i>[[foo</i>]]</p>
24105 <p><b>[[foo</b>]]</p>
24107 ''[[foo''<nowiki>]]</nowiki>
24109 '''[[foo'''<nowiki>]]</nowiki>
24113 4. No escaping needed
24117 <p>'<span><i>bar</i></span>'
24118 '<span><b>bar</b></span>'
24122 '<span>''bar''</span>'
24123 '<span>'''bar'''</span>'
24127 #### ----------- Paragraphs ---------------
24128 #### 1. No unnecessary escapes
24129 #### --------------------------------------
24132 1. No unnecessary escapes
24136 <p>bar <span>[[foo]]</span>
24137 </p><p>=bar <span>[[foo]]</span>
24138 </p><p>[[bar <span>[[foo]]</span>
24139 </p><p>]]bar <span>[[foo]]</span>
24140 </p><p>=bar <span>foo]]</span>=
24143 bar <span><nowiki>[[foo]]</nowiki></span>
24145 =bar <span><nowiki>[[foo]]</nowiki></span>
24147 [[bar <span><nowiki>[[foo]]</nowiki></span>
24149 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24151 =bar <span>foo]]</span><nowiki>=</nowiki>
24154 #### ----------------------- PRE --------------------------
24155 #### 1. Leading whitespace in SOL context should be escaped
24156 #### ------------------------------------------------------
24158 1. Leading whitespace in SOL context should be escaped
24181 <nowiki> </nowiki>a
24183 <nowiki> </nowiki> a
24187 <nowiki> </nowiki> a
24189 <nowiki> </nowiki>a
24192 <nowiki> </nowiki>b
24215 2. Leading whitespace in non-indent-pre contexts should not be escaped
24219 <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
24220 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24221 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
24231 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24250 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24254 <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>
24256 [[File:Foobar.jpg|thumb|caption]]
24260 5. Nowiki escaping should account for indent-pres
24270 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24283 #### --------------- Behavior Switches --------------------
24286 1. Valid behavior switches should be escaped
24293 <nowiki>__TOC__</nowiki>
24294 ''<nowiki>__TOC__</nowiki>''
24298 2. Invalid behavior switches should not be escaped
24309 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24311 Behavior switches should be SOL-transparent
24315 <meta property="mw:PageProp/toc" />
24317 <!-- this one's bogus -->
24320 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24322 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24326 <!-- this one's bogus -->
24335 #### --------------- HTML tags ---------------
24338 #### 3. multi-line html tag
24339 #### 4. extension tags
24340 #### -----------------------------------------
24346 <a href="http://google.com">google</a>
24348 <a href="http://google.com">google</a>
24356 <ul><li> <div>foo</div></li>
24357 <li> <div style="color:red">foo</div></li>
24358 <li> <td></li></ul>
24361 * <nowiki><div>foo</div></nowiki>
24362 * <nowiki><div style="color:red">foo</div></nowiki>
24363 * <nowiki><td></nowiki>
24367 3. multi-line html tag
24386 <p><ref>foo</ref>
24387 </p><p><ref>bar
24388 </p><p>baz</ref>
24391 <nowiki><ref>foo</ref></nowiki>
24393 <nowiki><ref>bar</nowiki>
24395 baz<nowiki></ref></nowiki>
24398 #### --------------- Others ---------------
24404 <p><nowiki>foo</nowiki>
24407 <nowiki>foo</nowiki>
24410 ## The quote-char in the input is necessary for triggering the bug
24412 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24421 #----------- End of wikitext escaping tests --------------
24425 Tag-like HTML structures are passed through as text
24447 </p><p>1<d e>f
24452 HTML tag with necessary entities in attributes
24454 <span title="&amp;">foo</span>
24456 <p><span title="&amp;">foo</span>
24461 HTML tag with 'unnecessary' entity encoding in attributes
24463 <span title="&">foo</span>
24465 <p><span title="&">foo</span>
24470 HTML tag with broken attribute value quoting
24472 parsoid=wt2html,html2html
24474 <span title="Hello world>Foo</span>
24476 <p><span title="Hello world">Foo</span>
24479 <p><span title="Hello world">Foo</span></p>
24483 Self-closed tag with broken attribute value quoting
24485 parsoid=wt2html,html2html
24487 <div title="Hello world />Foo
24489 <div title="Hello world"></div>
24492 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24496 Table with broken attribute value quoting
24498 parsoid=wt2html,html2html
24501 | title="Hello world|Foo
24506 <td title="Hello world">Foo
24512 <td title="Hello world">Foo
24518 Table with broken attribute value quoting on consecutive lines
24520 parsoid=wt2html,html2html
24523 | title="Hello world|Foo
24524 | style="color:red|Bar
24529 <td title="Hello world">Foo
24531 <td style="color:red">Bar
24537 <td title="Hello world">Foo
24538 </td><td style="color: red">Bar
24539 </td></tr></tbody></table>
24544 Accept empty td cell attribute
24547 | align="center" | foo || |
24552 <td align="center"> foo </td>
24559 Non-empty attributes in th-cells
24562 ! Foo !! style="color: red" | Bar
24568 <th style="color: red"> Bar
24574 Accept empty attributes in th-cells
24589 Empty table rows go away
24610 ### Parsoid-centric tests for testing RTing of inter-element separators
24611 ### Edge cases not tested by existing parser tests and specific to
24612 ### Parsoid-specific serialization strategies.
24616 RT-ed inter-element separators should be valid separators
24628 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24632 # Parsoid-only since PHP parser relies on Tidy for correct output
24634 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24648 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24649 <p>bar</p></small></td></tr>
24653 <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>
24657 # Note that the "style" attribute is really a template parameter here.
24658 # The = would have to be {{=}} if you wanted the literal.
24660 Empty TD followed by TD with tpl-generated attribute
24665 |{{echo|style='color:red'}}|foo
24679 Indented table with an empty td
24697 ## We have some newline diffs RT-ing this edge case
24698 ## and it is not important enough -- we seem to be emitting
24699 ## at most 2 newlines after a </tr> and this is unrelated to
24700 ## the issue from T85627 that this is testing.
24702 Indented table with blank lines in between (T85627)
24721 Indented block & table
24735 <div data-parsoid='{"stx":"html"}'>foo</div>
24737 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24742 Indent and comment before table row
24757 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24758 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24762 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24764 Empty TR followed by a template-generated TR
24770 {{echo|<tr><td>foo</td></tr>}}
24776 <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}}]}'>
24781 ## PHP and parsoid output differ for this, and since this is primarily
24782 ## for testing Parsoid's serializer, marking this Parsoid only
24784 Empty TR followed by mixed-ws-comment line should RT correctly
24800 <!--c--> </tr><!--d-->
24806 Multi-line image caption generated by templates with/without trailing newlines
24808 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24809 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24811 <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>
24812 <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>
24816 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24820 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24822 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24824 <includeonly>foo</includeonly>
24832 ## PHP emits broken html for this, and since this is primarily
24833 ## a Parsoid serializer test, marking this Parsoid only
24835 Improperly nested inline or quotes tags with whitespace in between
24837 <span> <s>x</span> </s>
24840 <p><span> <s>x</s></span><s> </s>
24841 <b> <i>x</i></b><i> </i>
24846 Encapsulate protected attributes from wt
24848 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24850 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
24854 <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>
24856 <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">
24857 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
24861 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24862 ## Having nested or stray pre tags results in the attempt to add duplicates,
24863 ## causing an assertion fail. This test tries to prevent that situation.
24865 Ensure ParagraphWrapper can deal with stray closing pre tags
24875 1. Ensure fostered text content is wrapped in element nodes
24879 <table>hi</table><table>ho</table>
24888 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24890 parsoid=wt2html,wt2wt
24899 <tbody><tr><td> a</td></tr>
24904 Encapsulation properly handles null DSR information from foster box
24906 parsoid=wt2html,wt2wt
24908 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24910 <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>
24914 1. Encapsulate foster-parented transclusion content
24916 parsoid=wt2wt,wt2html
24918 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24920 <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>
24930 2. Encapsulate foster-parented transclusion content
24932 parsoid=wt2wt,wt2html
24934 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24936 <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>
24947 3. Encapsulate foster-parented transclusion content
24949 parsoid=wt2wt,wt2html
24951 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24953 <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>"]}">
24966 4. Encapsulate foster-parented transclusion content
24968 parsoid=wt2wt,wt2html
24970 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24972 <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>"]}">
24985 5. Encapsulate foster-parented transclusion content
24987 parsoid=wt2wt,wt2html
24989 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24991 <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>
25006 6. Encapsulate foster-parented transclusion content
25008 parsoid=wt2wt,wt2html
25010 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25012 <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>
25028 7. Encapsulate foster-parented transclusion content
25030 parsoid=wt2wt,wt2html
25032 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25034 <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>
25044 # Note that the wt is broken on purpose: the = should be {{=}} if you
25045 # don't want it to be a template parameter key.
25047 8. Encapsulate foster-parented transclusion content
25049 parsoid=wt2wt,wt2html
25052 }}{|{{echo|style='color:red'}}
25057 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25059 <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>
25070 9. Encapsulate foster-parented transclusion content
25072 parsoid=wt2wt,wt2html
25074 <table>{{echo|hi</table>hello}}
25076 <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>
25080 Table in fosterable position
25091 <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">
25093 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25099 # Parsoid only for bug 64747
25101 Properly encapsulate empty-content transclusions in fosterable positions
25109 <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"}]]}'>
25115 Always encapsulate foster box when template range is expanded to table
25128 T115289: Unclosed table
25130 {{echo|<table>}}<!--c-->[[Category:Two]]
25132 <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>
25136 T115289: Don't migrate newlines out of tables with fostered content
25138 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25140 <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>
25144 T73074: More fostering fun
25146 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25148 <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>
25152 Support <object> element with .data attribute
25156 <object data="test.swf"></object>
25158 <object data="test.swf"></object>
25162 Don't block XML namespace declaration
25164 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25166 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25169 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25172 # -----------------------------------------------------------------
25173 # The following section of tests are primarily to spec requirements
25174 # around Parsoid's serialization (old, new, edited content)
25176 # All these tests are marked Parsoid html2wt and html2html only
25177 # ----------------------------------------------------------------
25180 Ignore rel attribute in a-tags during serialization to url-links
25184 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25185 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25186 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25188 http://en.wikipedia.org/wiki/Foobar
25189 http://en.wikipedia.org/wiki/Foobar
25190 http://en.wikipedia.org/wiki/Foobar
25193 # 'mi' is a localinterwiki prefix as well as a language
25195 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25199 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25206 New wikilinks should be serialized properly
25210 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25211 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25212 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25213 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25214 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25218 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25219 http://en.wikipedia.org/wiki/Foo
25220 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25224 New wiki links (href variations)
25228 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25229 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25230 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25231 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25236 [[Toxine bactérienne]]
25240 New wiki links (content string variations)
25244 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25245 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25246 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25250 [[Foo_bar|./Foo_bar]]
25254 New category links (href variations)
25258 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25259 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25260 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25262 [[Category:Toxine bactérienne]]
25263 [[Category:Toxine bactérienne]]
25264 [[Category:Toxine bactérienne]]
25268 New sol transparent links don't need indent-pre nowiki protection
25273 <link rel="mw:PageProp/redirect" href="./Main_Page">
25274 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25275 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25277 #WEITERLEITUNG [[Main Page]]
25278 <!-- this is good --> [[Category:Good]]
25279 <!-- this is great --> [[Kategorie:Great]]
25283 New interlanguage links (href variations)
25287 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25288 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25289 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25291 [[es:Toxine bactérienne]]
25292 [[es:Toxine_bactérienne]]
25293 [[es:Toxine_bactérienne]]
25297 Image: Modifying size of an image (1)
25300 "modes": ["wt2wt"],
25302 ["img[height]", "attr", "height", "22"],
25303 ["img[width]", "attr", "width", "200"]
25307 [[Image:Foobar.jpg|230x230px]]
25309 [[Image:Foobar.jpg|200x200px]]
25313 Image: Modifying size of an image (2)
25316 "modes": ["wt2wt"],
25318 ["img[height]", "attr", "height", "100"],
25319 ["img[width]", "attr", "width", "500"]
25323 [[Image:Foobar.jpg|230x230px]]
25325 [[Image:Foobar.jpg|500x500px]]
25328 # Change in size is ignored so long as class='mw-default-size'
25330 Image: Modifying size of an image (3)
25333 "modes": ["wt2wt"],
25335 ["figure[class]", "removeClass", "mw-default-size"],
25336 ["figure img", "attr", "height", "19"],
25337 ["figure img", "attr", "width", "170"]
25341 [[Image:Foobar.jpg|thumb]]
25343 [[Image:Foobar.jpg|thumb|170x170px]]
25347 Image: Modifying alignment of an image (bug 48665)
25350 "modes": ["wt2wt"],
25352 ["figure[class]", "removeClass", "mw-halign-right"],
25353 ["figure[class]", "addClass", "mw-halign-left"]
25357 [[Image:Foobar.jpg|thumb|caption|right]]
25359 [[Image:Foobar.jpg|thumb|caption|left]]
25363 Image: Modifying mw-default-size of an frameless image (bug 62805)
25366 "modes": ["wt2wt"],
25368 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25372 [[Image:Foobar.jpg|frameless|right]]
25374 [[Image:Foobar.jpg|frameless|right|220x220px]]
25378 Image: Modifying valign of an image (bug 49221)
25381 "modes": ["wt2wt"],
25383 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25384 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25388 [[File:Foobar.jpg|20px|middle]]
25390 [[File:Foobar.jpg|20px|text-top]]
25394 Image: Modifying alt attribute of an image (bug 56400)
25397 "modes": ["wt2wt"],
25399 ["img[alt]", "attr", "alt", "some alternate edited text"]
25403 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25405 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25409 Image: Modifying caption of an image
25412 "modes": ["wt2wt"],
25414 ["figcaption", "text", "new caption"]
25418 [[Image:Foobar.jpg|thumb|original caption]]
25420 [[Image:Foobar.jpg|thumb|new caption]]
25424 Image: empty alt attribute (bug 48924)
25428 [[File:Foobar.jpg|thumb|alt=|bar]]
25430 <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>
25434 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25440 <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>
25442 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25446 Image: Block level image should have \n before and after
25449 [[File:Foobar.jpg|right|thumb|150x150px]]
25453 <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>
25458 Image: New block level image should have \n before and after (existing content)
25461 [[File:Foobar.jpg|right|thumb|150x150px]]
25465 <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>
25470 Image: upright option (parsoid)
25472 [[File:Foobar.jpg|thumb|upright|caption]]
25473 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25474 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25476 <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>
25477 <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>
25478 <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>
25482 Image: upright option is ignored on inline and frame images (parsoid)
25484 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25486 <p><span 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></span></p>
25490 Image: from basic HTML (1)
25494 <span typeof="mw:Image">
25495 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25498 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25502 Image: from basic HTML (2)
25506 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25508 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25512 Image: from basic HTML (3)
25516 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25518 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25522 Image: from basic HTML (4)
25526 <img src="./File:Foobar.jpg">
25528 [[File:Foobar.jpg|link=]]
25532 Image: Invalid title as link
25534 [[File:Foobar.jpg|link=<]]
25536 <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>
25539 <p><span 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></span></p>
25543 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25548 <li><p>foo</p></li>
25555 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25559 <ul> <li>foo</li></ul>
25565 Don't strip leading whitespace when handling indent-pre suppressing tags
25570 <tr><td> indented row</td></tr>
25573 <b>This is very bold of you!</b>
25576 indented cell (no pre-wrapping!)
25586 '''This is very bold of you!'''
25590 indented cell (no pre-wrapping!)
25598 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25620 <nowiki> </nowiki></span>bar2
25623 <nowiki> </nowiki><span>bar</span>
25626 <nowiki> </nowiki><span>foo</span>
25631 Lists: Dont insert newlines in a serialized list item.
25635 <ul><li>a<br>b</li><li>c</li></ul>
25642 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25645 "modes": ["html2wt"],
25646 "scrubWikitext": false
25649 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25650 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25652 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25653 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25655 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25657 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25659 == hello there [[Category:A1]] ==
25661 == [[Category:A2]] hi pal ==
25663 == <!--foo--> [[Category:A3]] how goes it ==
25665 == it goes well [[Category:A4]] <!--bar--> ==
25667 ==howdy [[Category:A5]]==
25673 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25676 "modes": ["html2wt"],
25677 "scrubWikitext": true
25680 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25681 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25683 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25684 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25686 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25694 <!--foo--> [[Category:A3]]
25699 [[Category:A4]] <!--bar-->
25707 Headings: Don't hoist metas that come from templates
25710 "modes": ["html2wt"],
25711 "scrubWikitext": true
25714 <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>
25716 == {{echo|foo [[Category:Foo]]}} ==
25720 Headings: Category in ref isn't hoisted
25723 "modes": ["html2wt"],
25724 "scrubWikitext": true
25727 <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
25729 <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="#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>
25732 [[Category:Baz]] </ref> ==
25738 Parsoid: Serialize positional parameters with = in them as named parameter
25742 <p about="#mwt1" typeof="mw:Transclusion"
25743 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25745 <p about="#mwt1" typeof="mw:Transclusion"
25746 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25748 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25749 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25750 <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>
25754 {{echo|1=f=oo|2=bar}}
25756 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25757 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25758 {{echo|<nowiki>f=oo</nowiki>|bar}}
25762 Parsoid: Serialize positional parameters with = in extlink as named parameter
25766 <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>
25768 {{echo|1=http://stuff?is=ok}}
25772 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25776 <div>a<p>b</p></div>
25797 Substrings resembling wikitext in hrefs should not get nowiki escapes
25801 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25807 Enforce single-line context in the serializer
25814 <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">
25815 </span><span about="#mwt1">you</span> </h2>
25817 <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
25819 <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="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">hello
25820 there</span></li></ol>
25832 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25839 </tbody></table></dd></dl>
25843 == hi {{bogus|there
25854 * foo '''bar''' baz
25866 Serialize new placeholder space without spans
25870 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25872 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25874 <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>
25880 <ref>foo : bar</ref>ok
25884 #-----------------------
25885 # Tag minimization tests
25886 #-----------------------
25889 1. I/B quote minimization: wikitext-only tags should be combined
25893 <p><i>A</i><i>B</i></p>
25894 <p><b>A</b><b>B</b></p>
25895 <p><i>A</i><b><i>B</i></b></p>
25896 <p><b>A</b><i><b>B</b></i></p>
25897 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25898 <p><i><b>A</b></i><i><b>B</b></i></p>
25899 <p><i><b>A</b></i><b><i>B</i></b></p>
25900 <p><b><i>A</i></b><i><b>B</b></i></p>
25920 2. I/B quote minimization: wikitext and html tags should not be combined
25924 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25925 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25929 ''A''<nowiki/>'''<i>B</i>'''
25933 3. I/B quote minimization: templated content stops minimization
25937 <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>
25938 <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>
25940 ''A''{{echo|''B''}}
25942 ''A''{{echo|'''''B'''''}}
25946 4. I/B quote minimization: new content should be mimimized with adjacent old content
25950 <p><i>A</i><i>B</i></p>
25951 <p><b>A</b><b>B</b></p>
25952 <p><i>A</i><b><i>B</i></b></p>
25962 5a. Merge adjacent quote nodes if they've been edited
25965 "modes": ["wt2wt", "selser"],
25967 ["p", "contents", "remove", ":contains('b')"]
25977 5b. Merge adjacent quote nodes if they've been edited
25980 "modes": ["wt2wt", "selser"],
25986 ''a''<span id="x">b</span>''c''
25992 1. Merge adjacent link nodes as long as at least one element is new
25995 "modes": ["html2wt"],
25996 "scrubWikitext": true
25999 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26000 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26001 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26005 [[Football|Foot]][[Football|ball]]
26009 2. Merge adjacent link nodes and enable additional normalizations
26012 "modes": ["html2wt"],
26013 "scrubWikitext": true
26016 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26018 [[Football|''Football'']]
26022 3. Don't merge adjacent link nodes if scrubWikitext is false
26025 "modes": ["html2wt"],
26026 "scrubWikitext": false
26029 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26031 [[Football|Foot]][[Football|ball]]
26034 #------------------------------
26035 # End of tag minimization tests
26036 #------------------------------
26039 Bug 54262: New entities
26043 <span typeof="mw:Entity"> </span>
26048 ## Note that there is no wikitext output for 'unknownproperty' ##
26049 ## Unknown magic words are silently dropped ##
26056 <meta property='mw:PageProp/toc' />
26057 <meta property='mw:PageProp/notoc' />
26058 <meta property='mw:PageProp/forcetoc' />
26059 <meta property='mw:PageProp/index' />
26060 <meta property='mw:PageProp/noindex' />
26061 <meta property='mw:PageProp/nogallery' />
26062 <meta property='mw:PageProp/noeditsection' />
26063 <meta property='mw:PageProp/notitleconvert' />
26064 <meta property='mw:PageProp/nocontentconvert' />
26065 <meta property='mw:PageProp/unknownproperty' />
26075 __NOCONTENTCONVERT__
26079 Consecutive <pre>s should not get merged
26081 parsoid=html2wt,html2html
26083 <pre>a</pre><pre>b</pre>
26111 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26115 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26117 [[Special:BookSources/1234567890|ISBN 1234567895]]
26121 Edited RFC links not serializable as RFC links should serialize as extlinks
26125 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26127 [//tools.ietf.org/html/rfc123 New RFC]
26131 Edited PMID links not serializable as PMID links should serialize as extlinks
26135 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26137 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26141 WTS of autolinks with trailing/surrounding context
26145 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26146 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26147 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26148 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26149 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26150 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26152 http://cscott.net'''foo'''
26154 http://cscott.net<b>foo</b>
26156 '''http://cscott.net'''
26158 '''http://cscott.net '''
26160 '''http://cscott.net<nowiki/>x'''
26162 http://cscott.net<nowiki/>x
26166 WTS of autolinks with nowikis (round-trip)
26168 x<nowiki/>http://cscott.net<nowiki/>x
26170 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26173 # this is the "easy" test because it leaves in place all the
26174 # data-parsoid information indicating this is an autolink
26176 WTS of autolinks with escapes (editing)
26179 "modes": ["wt2wt"],
26181 [ "meta", "remove" ]
26185 x<nowiki/>http://cscott.net<nowiki/>x
26187 x<nowiki/>http://cscott.net<nowiki/>x
26191 WTS of edited autolink-like text (T103364)
26194 "modes": ["wt2wt"],
26196 [ "span[typeof]", "removeAttr", "typeof" ]
26200 Not a link: <nowiki>http://example.com</nowiki>.
26202 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26206 WTS of newly-authored autolink-like text (T103364)
26210 <p>http://example.com is not a link.</p>
26212 <nowiki>http://example.com</nowiki> is not a link.
26216 WTS of autolink-like text after an autolink (T108563)
26220 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26222 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26226 Magic links inside links (not autolinked)
26228 [[Foo|http://example.com]]
26231 [[Foo|ISBN 123456789x]]
26233 [http://foo.com http://example.com]
26234 [http://foo.com RFC 1234]
26235 [http://foo.com PMID 1234]
26236 [http://foo.com ISBN 123456789x]
26238 <p><a href="/wiki/Foo" title="Foo">http://example.com</a> <a href="/wiki/Foo" title="Foo">RFC 1234</a> <a href="/wiki/Foo" title="Foo">PMID 1234</a> <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a></p>
26239 <p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a> <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
26241 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26242 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26243 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26244 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26246 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26247 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26248 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26249 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26253 Magic links inside image captions (autolinked)
26255 [[File:Foobar.jpg|thumb|http://example.com]]
26256 [[File:Foobar.jpg|thumb|RFC 1234]]
26257 [[File:Foobar.jpg|thumb|PMID 1234]]
26258 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26260 <div class="thumb tright">
26261 <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>
26262 <div class="thumbcaption">
26263 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26264 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26267 <div class="thumb tright">
26268 <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>
26269 <div class="thumbcaption">
26270 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26271 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26274 <div class="thumb tright">
26275 <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>
26276 <div class="thumbcaption">
26277 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26278 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26281 <div class="thumb tright">
26282 <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>
26283 <div class="thumbcaption">
26284 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26285 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26289 <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" href="http://example.com">http://example.com</a></figcaption></figure>
26290 <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="//tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
26291 <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">PMID 1234</a></figcaption></figure>
26292 <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>
26296 WTS of magic word text (T109371)
26301 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26302 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26304 <nowiki>RFC 1234</nowiki>
26306 [http://foo.com RFC 1234]
26312 Edited Redirect link should emit a non-piped wikitext link
26316 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26322 T75121: Infer extension name from typeOf if data-mw is not present
26324 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26326 <div typeOf="mw:Extension/foo"></div>
26331 # Note that the <p> wrapping isn't present in PHP parser output
26332 # The important thing for this test is that P-wrapping doesn't
26333 # interfere with the <nowiki> protection for leading - in <td>
26334 # (which isn't necessary for <th>).
26336 T88318: p-wrapped dash in table.
26338 parsoid=html2wt,wt2wt
26341 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26342 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26343 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26350 |<nowiki>-</nowiki>
26351 |<nowiki>- </nowiki>
26370 <td><small>-</small></td>
26382 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26387 <td id='mwAc'>foo</td>
26388 <td id='serialize-this'>bar</td>
26393 | id="serialize-this" |bar
26398 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26402 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26404 <div id="hello">ok</div>
26411 "modes": ["wt2wt"],
26413 [ "#xyz", "before", "<b>before</b> stuff " ],
26414 [ "#xyz", "after", " stuff <i>after</i>" ],
26415 [ "#xyz", "html", "x <b>y</b> z" ]
26419 <span id="xyz">hello</span>
26421 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26425 Never serialize a-tag as html, regardless of what data-parsoid has to say
26427 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26429 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26434 ## SSS FIXME: This is broken output nevertheless.
26435 ## What might be a reasonable non-broken output for this?
26436 ## This is an edge case unlikely to be seen in production
26437 ## that I am not wasting more time on this right now.
26439 Never serialize a-tag as html, no matter what attributes it has
26441 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26443 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26445 [http://boo.org http://boohoo.org]
26448 # Misnested is an indication that selser can reuse the source but these have
26449 # shown to sneak through on occasion. See T101768.
26450 # The original wikitext here is: [http://test.com [[one]] two three]
26452 Strip span tags added to mark misnested links
26456 <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>
26458 [http://test.com][[one]] two three
26462 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26466 <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|}"]}'>
26478 ## This test verifies the presence and computation of this attribute indirectly
26479 ## by making an edit and ensuring that the serialization is correct (which it would be
26480 ## only if firstWikitextNode is properly set).
26482 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26485 "modes": ["wt2wt"],
26487 [ "div#x", "remove" ],
26488 [ "div", "before", "<div>new</div>" ]
26492 <div id="x">foo</div>
26494 {{echo|<div>boo</div>
26502 {{echo|<div>boo</div>
26508 # --------------------------------------------
26509 # Tests spec'ing wikitext serialization norms |
26510 # --------------------------------------------
26513 1. Categories should always be serialized on their own line
26517 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26525 2. Categories that are part of templates should not introduce a line break
26527 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26529 <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>
26532 # Careful while editing these next 2 tests. There are \u200f characters
26533 # before and after the <link> tags in the HTML and following some
26534 # of the categories in wikitext
26535 # Do not remove these characters in edits.
26537 # As part of the serialization, these bidi characters will get stripped.
26539 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26542 "modes": ["html2wt"],
26543 "scrubWikitext": true
26546 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26547 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26550 [[קטגוריה: שיטות משפט]]
26554 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26557 "modes": ["html2wt"],
26558 "scrubWikitext": true
26561 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26568 Lists: Add space after bullets
26575 <li><span> baz</span></li>
26580 * <span> baz</span>
26584 1. Headings: Add space before/after == (T53744)
26591 <h2><span> baz</span></h2>
26599 == <span> baz</span> ==
26603 2. Headings: Add space before/after == even after hoisted content
26606 "modes": ["html2wt"],
26607 "scrubWikitext": true
26610 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26618 1. Headings: suppress newly created empty headings
26621 "modes": ["html2wt"],
26622 "scrubWikitext": true
26630 2. Headings: don't suppress empty headings if scrubWikitext is false
26640 3. Headings: suppress empty headings on edits
26643 "modes": ["selser"],
26644 "scrubWikitext": true,
26650 ==<span id="x">foo</span>==
26655 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26658 "modes": ["html2wt"],
26659 "scrubWikitext": true
26662 <h2>foo<br/>bar</h2>
26663 <h2>foo <span><br/>bar</span> baz</h2>
26667 == foo <span> bar</span> baz ==
26671 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26674 "modes": ["html2wt"],
26675 "scrubWikitext": false
26678 <h2>foo<br/>bar</h2>
26684 1. WT Quote Tags: suppress newly created empty style tags
26687 "modes": ["html2wt"],
26688 "scrubWikitext": true
26696 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26702 ''<nowiki/>'''''<nowiki/>'''
26706 3. WT Quote Tags: suppress empty style tags on edits
26709 "modes": ["selser"],
26710 "scrubWikitext": true,
26716 '''<span id="x">foo</span>'''
26721 1. Anchors: suppress newly created empty anchors
26724 "modes": ["html2wt"],
26725 "scrubWikitext": true
26728 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26733 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26736 "modes": ["html2wt"],
26737 "scrubWikitext": false
26740 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26746 3. Anchors: suppress empty anchors on edits
26749 "modes": ["selser"],
26750 "scrubWikitext": true,
26756 [[Test|<span id="x">foo</span>]]
26761 3a. Anchors: do not suppress numbered extlinks
26764 "modes": ["wt2wt"],
26765 "scrubWikitext": true
26770 <a rel="mw:ExtLink" href="http://foo.com"></a>
26774 3b. Anchors: do not suppress numbered extlinks
26777 "modes": ["wt2wt"],
26778 "scrubWikitext": true,
26784 [http://foo.com <span id="x">foo</span>]
26790 Normalizations should be restricted to edited content
26793 "modes": ["selser"],
26794 "scrubWikitext": true,
26796 [ "h1", "before", "<i></i>"]
26810 1. Multiple normalizations (html2wt)
26813 "modes": ["html2wt"],
26814 "scrubWikitext": true
26818 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26819 </a><b><i></i></b>x</p>
26828 2. Multiple normalizations (selser)
26831 "modes": ["selser"],
26832 "scrubWikitext": true,
26834 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26838 <span id="x">foo</span>
26840 <span id="x">foo</span>
26846 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26849 "modes": ["html2wt"],
26850 "scrubWikitext": true
26862 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26869 <nowiki> </nowiki>hi
26871 <nowiki> </nowiki> hello
26875 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26878 "modes": ["html2wt"],
26879 "scrubWikitext": true
26888 baz bang</td></tr></table>
26894 bar<span>boo</span></p>
26910 bar<span>boo</span>
26914 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26917 "modes": ["selser"],
26918 "scrubWikitext": true,
26920 [ "p", "html", " a\n b" ]
26931 1. New links that end in spaces
26934 "modes": ["html2wt"],
26935 "scrubWikitext": false
26938 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26939 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26940 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26942 [[Berlin ]]<nowiki/>is the capital of Germany.
26946 [[Boston ]] is a city.
26950 2. New links that end in spaces
26953 "modes": ["html2wt"],
26954 "scrubWikitext": true
26957 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26958 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26959 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26961 [[Berlin]] is the capital of Germany.
26965 [[Boston]] is a city.
26969 1. Table cells with escapable prefixes
26972 "modes": ["html2wt"],
26973 "scrubWikitext": false
26977 <tr><td>a</td></tr>
26978 <tr><td>-</td></tr>
26979 <tr><td>+</td></tr>
26985 |<nowiki>-</nowiki>
26987 |<nowiki>+</nowiki>
26992 2. Table cells with escapable prefixes
26995 "modes": ["html2wt"],
26996 "scrubWikitext": true
27000 <tr><td>a</td></tr>
27001 <tr><td>-</td></tr>
27002 <tr><td>+</td></tr>
27015 3a. Table cells with escapable prefixes after edits
27018 "modes": ["selser"],
27019 "scrubWikitext": true,
27021 [ "table tbody tr:first-child td:first-child", "remove"]
27035 3b. Table cells with escapable prefixes after edits
27038 "modes": ["selser"],
27039 "scrubWikitext": true,
27041 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27048 |<span id="x">foo</span>+
27057 # FIXME: This test will fail because
27058 # normalization doesn't realize that the id attribute
27059 # will eliminate the escapable scenario
27061 4a. Table cells without escapable prefixes after edits
27064 "modes": ["selser"],
27065 "scrubWikitext": true,
27067 [ "#x", "html", "-" ]
27080 ## This tests normalizer's ability to discriminate between
27081 ## cells having identical content.
27083 4b. Table cells without escapable prefixes after edits
27086 "modes": ["selser"],
27087 "scrubWikitext": true,
27089 [ "td", "html", "-" ]
27102 ## This tests normalizer's ability to not be tripped by
27103 ## comments (and whitespace)
27105 4c. Table cells without escapable prefixes after edits
27108 "modes": ["selser"],
27109 "scrubWikitext": true,
27111 [ "table tbody tr td:first-child", "remove" ]
27126 ## This tests normalizer's ability to handle HTML cells
27128 4d. Table cells without escapable prefixes after edits
27131 "modes": ["selser"],
27132 "scrubWikitext": true,
27134 [ "td", "html", "-" ]
27139 <tr><td>a</td></tr>
27143 <tr><td>-</td></tr>
27147 ## T111151 Remove font elements without attributes
27149 5a. font tags without attributes should be dropped in scrubWikitext mode
27152 "modes": ["html2wt"],
27153 "scrubWikitext": true
27157 <font><font>bar</font></font>
27158 <font class="x">boo</font>
27162 <font class="x">boo</font>
27166 5b. font tags should not be dropped without scrubWikitext being enabled
27169 "modes": ["html2wt"],
27170 "scrubWikitext": false
27179 Escape nowiki DOM elements
27183 <nowiki><i>foo</i></nowiki>
27185 <nowiki>''foo''</nowiki>
27188 # This is meant to be an interim fix while we go about figuring out
27189 # how to not introduce these trailing <nowiki/>s in the first place.
27191 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27195 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27197 <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>
27198 <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>
27211 # ---------------------------------------------------
27212 # End of tests spec'ing wikitext serialization norms |
27213 # ---------------------------------------------------
27217 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27225 <td><b>c</b><p>d</p></td>
27243 # -----------------------------------------------------------------
27244 # End of section for Parsoid-only html2wt tests for serialization
27246 # -----------------------------------------------------------------
27248 # -----------------------------------------------------------------
27249 # The following section of tests are primarily to spec behavior of
27250 # the selective serializer. All these tests have manual selser
27251 # changes. The automated selser changes for all tests handle the
27252 # wide variation of changes, but these tests here capture specs
27253 # deterministically.
27254 # ----------------------------------------------------------------
27258 Selser: New comments should not be lost
27261 "modes": ["selser"],
27263 [ "#a", "after", "<!--c1-->" ],
27264 [ "#b", "before", "<!--c2-->" ]
27268 <span id="a">a</span>
27270 <span id="b">b</span>
27272 <span id="a">a</span><!--c1-->
27274 <!--c2--><span id="b">b</span>
27279 Selser: Check for validity of DSR before using it
27282 "modes": ["selser"],
27284 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27288 <span id="a">a</span>
27290 {{DISPLAYTITLE:foo}}
27291 <span id="a">a</span>
27295 1. DOMDiff: Changes to <ref> content should be looked up using id
27298 "modes": ["selser"],
27300 ["#X", "after", "bar"],
27301 ["#Y", "after", "baz"]
27305 X <ref><span id="X">foo</span></ref>
27308 <ref name="a"><span id="Y">foo</span></ref>
27311 X <ref><span id="X">foo</span>bar</ref>
27314 <ref name="a"><span id="Y">foo</span>baz</ref>
27319 2. DOMDiff: Changes to <ref> content should be looked up using id
27322 "modes": ["selser"],
27324 ["#Z", "after", "bar"]
27328 A <ref>foo bar for a</ref>
27329 B <ref group="X" name="b" />
27333 <references group="X">
27334 <ref name="b"><span id="Z">foo</span></ref>
27337 A <ref>foo bar for a</ref>
27338 B <ref group="X" name="b" />
27342 <references group="X">
27343 <ref name="b"><span id="Z">foo</span>bar</ref>
27348 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27351 "modes": ["selser"],
27353 [ "div:first-child", "text", "bar" ]
27357 <div style="{{1x|color:red;}}%">foo</div>
27359 <div style="{{1x|color:red;}}%">bar</div>
27372 <li class="mw-empty-elt"></li>
27373 <li class="mw-empty-elt"></li>
27381 [[File:Thumb.png|thumb]]
27383 <div class="thumb tright">
27384 <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>
27385 <div class="thumbcaption">
27386 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27393 unclosed internal link XSS (T137264)
27395 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27397 <p>[[#<script>alert(1)</script>|
27400 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>