1 # MediaWiki Parser test cases
2 # Some taken from http://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>
517 Heading with line break in nowiki
522 <h2><span class="mw-headline" id="A_B.0AC">A B
523 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
530 http://fr.wikipedia.org/wiki/🍺
531 <!-- EasterEgg we love beer, better be able be able to link to it -->
533 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
537 # Note that the html+tidy output removes the spaces after the <li>,
538 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
539 # This is an issue for all tests with lists. We intentionally do
540 # *not* add html+tidy clauses for these, as we don't want to
541 # document/test the broken behavior. (Parsoid matches the non-tidy
542 # output in these cases.)
551 <li> Item 2</li></ul>
559 * plain''italic''plain
560 * plain''italic''plain''italic''plain
561 * plain'''bold'''plain
562 * plain'''bold'''plain'''bold'''plain
563 * plain''italic''plain'''bold'''plain
564 * plain'''bold'''plain''italic''plain
565 * plain''italic'''bold-italic'''italic''plain
566 * plain'''bold''bold-italic''bold'''plain
567 * plain'''''bold-italic'''italic''plain
568 * plain'''''bold-italic''bold'''plain
569 * plain''italic'''bold-italic'''''plain
570 * plain'''bold''bold-italic'''''plain
571 * plain l'''italic''plain
572 * plain l''''bold''' plain
575 <li> plain<i>italic</i>plain</li>
576 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
577 <li> plain<b>bold</b>plain</li>
578 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
579 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
580 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
581 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
582 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
583 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
584 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
585 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
586 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
587 <li> plain l'<i>italic</i>plain</li>
588 <li> plain l'<b>bold</b> plain</li></ul>
592 # this example taken from the [[simple:Moon]] article (bug 47326)
594 Italics and possessives (1)
596 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
598 <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
602 # this example taken from [[en:Flaming Pie]] (bug 49926)
604 Italics and possessives (2)
606 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
608 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
612 # this example taken from [[en:Dictionary]] (bug 49926)
614 Italics and possessives (3)
616 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''.
618 <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>.
624 ### 2-quote opening sequence tests
627 Italics and bold: 2-quote opening sequence: (2,2)
636 Italics and bold: 2-quote opening sequence: (2,3)
645 Italics and bold: 2-quote opening sequence: (2,4)
655 # same html as previous, but wikitext adjusted to match parsoid html2wt
657 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
659 ''foo<nowiki>''</nowiki>''
665 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
667 Italics and bold: 2-quote opening sequence: (2,5)
680 # same html as previous, but wikitext adjusted to match parsoid html2wt
682 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
684 ''foo'''''<nowiki/>'''
695 ### 3-quote opening sequence tests
699 Italics and bold: 3-quote opening sequence: (3,2)
708 Italics and bold: 3-quote opening sequence: (3,3)
717 Italics and bold: 3-quote opening sequence: (3,4)
725 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
727 Italics and bold: 3-quote opening sequence: (3,5)
740 # same html as previous, but wikitext adjusted to match parsoid html2wt
742 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
744 '''foo'''''<nowiki/>''
755 ### 4-quote opening sequence tests
759 Italics and bold: 4-quote opening sequence: (4,2)
769 # same html as previous, but wikitext adjusted to match parsoid html2wt
771 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
773 <nowiki>''</nowiki>''foo''
780 Italics and bold: 4-quote opening sequence: (4,3)
789 Italics and bold: 4-quote opening sequence: (4,4)
799 # same html as previous, but wikitext adjusted to match parsoid html2wt
801 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
809 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
811 Italics and bold: 4-quote opening sequence: (4,5)
820 <p>'<b>foo</b><i></i>
824 # same html as previous, but wikitext adjusted to match parsoid html2wt
826 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
828 '<nowiki/>'''foo'''''<nowiki/>''
833 <p>'<b>foo</b><i></i>
839 ### 5-quote opening sequence tests
843 Italics and bold: 5-quote opening sequence: (5,2)
853 # same html as previous, but wikitext adjusted to match parsoid html2wt
855 Italics and bold: 5-quote opening sequence: (5,2+3)
864 Italics and bold: 5-quote opening sequence: (5,3)
874 # same html as previous, but wikitext adjusted to match parsoid html2wt
876 Italics and bold: 5-quote opening sequence: (5,3+2)
885 Italics and bold: 5-quote opening sequence: (5,4)
891 <p><i><b>foo'</b></i>
896 Italics and bold: 5-quote opening sequence: (5,5)
905 Italics and bold: 5-quote opening sequence: (5,6)
909 <p><i><b>foo'</b></i>
914 ### multiple quote sequences in a line
917 Italics and bold: multiple quote sequences: (2,4,2)
923 <p><i>foo'<b>bar</b></i>
928 # same html as previous, but wikitext adjusted to match parsoid html2wt
930 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
932 ''foo'<nowiki/>'''bar'''''
934 <p><i>foo'<b>bar</b></i>
940 Italics and bold: multiple quote sequences: (2,4,3)
946 <p><i>foo'<b>bar</b></i>
951 # same html as previous, but wikitext adjusted to match parsoid html2wt
953 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
955 ''foo'<nowiki/>'''bar'''''
957 <p><i>foo'<b>bar</b></i>
963 Italics and bold: multiple quote sequences: (2,4,4)
969 <p><i>foo'<b>bar'</b></i>
974 # same html as previous, but wikitext adjusted to match parsoid html2wt
976 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
978 ''foo'<nowiki/>'''bar'<nowiki/>'''''
980 <p><i>foo'<b>bar'</b></i>
985 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
987 Italics and bold: multiple quote sequences: (3,4,2)
996 <p><b>foo'</b>bar<i></i>
1000 # same html as previous, but wikitext adjusted to match parsoid html2wt
1002 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1006 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
1011 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1016 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1018 Italics and bold: multiple quote sequences: (3,4,3)
1027 <p><b>foo'</b>bar<b></b>
1031 # same html as previous, but wikitext adjusted to match parsoid html2wt
1033 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1035 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1040 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1045 ### other quote tests
1048 Italics and bold: other quote tests: (2,3,5)
1050 ''this is about '''foo's family'''''
1052 <p><i>this is about <b>foo's family</b></i>
1058 Italics and bold: other quote tests: (2,(3,3),2)
1060 ''this is about '''foo's''' family''
1062 <p><i>this is about <b>foo's</b> family</i>
1068 Italics and bold: other quote tests: (3,2,3,2)
1072 '''this is about ''foo'''s family''
1074 <p><b>this is about <i>foo</i></b><i>s family</i>
1079 # same html as previous, but wikitext adjusted to match parsoid html2wt
1081 Italics and bold: other quote tests: (3,2,3+2+2,2)
1083 '''this is about ''foo'''''<nowiki/>''s family''
1085 <p><b>this is about <i>foo</i></b><i>s family</i>
1091 Italics and bold: other quote tests: (3,2,3,3)
1093 '''this is about ''foo'''s family'''
1095 <p>'<i>this is about </i>foo<b>s family</b>
1101 Italics and bold: other quote tests: (3,(2,2),3)
1103 '''this is about ''foo's'' family'''
1105 <p><b>this is about <i>foo's</i> family</b>
1111 Italicized possessive
1113 The ''[[Main Page]]'''s talk page.
1115 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1118 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1122 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1123 (Requires tidy for PHP parser output to be fixed up)
1125 parsoid=wt2html,wt2wt
1142 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1143 <td><i>a</i></td><td><i>b</i></td></tr>
1152 Non-html5 tags should be accepted
1154 <center>''foo''</center>
1156 <font>''foo''</font>
1157 <strike>''foo''</strike>
1160 <center><i>foo</i></center>
1161 <p><big><i>foo</i></big>
1162 <font><i>foo</i></font>
1163 <strike><i>foo</i></strike>
1169 <wbr> is valid wikitext (bug 52468)
1177 # <strike> is HTML4, <s> is HTML4/5.
1179 <s> or <strike> for strikethrough
1181 <strike>strike</strike>
1185 <p><strike>strike</strike>
1193 Text-level semantic html elements in wikitext
1196 <strong>text</strong>
1212 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1219 <strong>text</strong>
1235 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1243 # test cases taken from
1244 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1246 Ruby markup (W3C-style)
1248 ; Mono-ruby for individual base characters
1249 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1251 : <ruby>今日<rt>きょう</rt></ruby>
1253 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1255 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1257 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1259 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1260 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1261 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1264 <dl><dt> Mono-ruby for individual base characters</dt>
1265 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1266 <dt> Group ruby</dt>
1267 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1268 <dt> Jukugo ruby</dt>
1269 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1270 <dt> Inline ruby</dt>
1271 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1272 <dt> Double-sided ruby</dt>
1273 <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>
1275 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1276 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1277 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1282 # The next two test different paths in the sanitizer.
1284 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1286 <blockquote|>a</blockquote>
1288 <b→> doesn't terminate </b→>
1290 <bä> doesn't terminate </bä>
1292 <boo> doesn't terminate </boo>
1294 <s.foo> doesn't terminate </s.foo>
1298 <p><blockquote|>a</blockquote>
1299 </p><p><b→> doesn't terminate </b→>
1300 </p><p><bä> doesn't terminate </bä>
1301 </p><p><boo> doesn't terminate </boo>
1302 </p><p><s.foo> doesn't terminate </s.foo>
1303 </p><p><sub-ID#1>
1307 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1308 # If the non-word-character tag made it through the sanitizer, tidy
1309 # would munge it up.
1311 Non-word characters don't terminate tag names + tidy
1313 <blockquote|>a</blockquote>
1315 <b→> doesn't terminate </b→>
1317 <bä> doesn't terminate </bä>
1319 <boo> doesn't terminate </boo>
1321 <s.foo> doesn't terminate </s.foo>
1325 <p><blockquote|>a</p>
1326 <p><b→> doesn't terminate </b→></p>
1327 <p><bä> doesn't terminate </bä></p>
1328 <p><boo> doesn't terminate </boo></p>
1329 <p><s.foo> doesn't terminate </s.foo></p>
1330 <p><sub-ID#1></p>
1334 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1335 ### This checks that HTML5 tags (with non-word characters in the tag
1336 ### name) make it safely through the parser -- the Sanitizer will
1337 ### munge them later, as it should.
1340 Non-word characters are valid in extension tags (T19663)
1351 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1355 Isolated close tags should be treated as literal text (bug 52760)
1363 <p><s.foo>s</p>
1365 <p><s.foo>s</p>
1369 ### Special characters
1373 Bare pipe character (bug 52363)
1382 Bare pipe character from a template (bug 52363)
1391 ### <nowiki> test cases
1395 <nowiki> unordered list
1397 <nowiki>* This is not an unordered list item.</nowiki>
1399 <p>* This is not an unordered list item.
1402 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1408 <nowiki>Lorem ipsum dolor
1416 <p>Lorem ipsum dolor
1425 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1437 :There is not nowiki.
1438 :There is <nowiki>nowiki</nowiki>.
1440 #There is not nowiki.
1441 #There is <nowiki>nowiki</nowiki>.
1443 *There is not nowiki.
1444 *There is <nowiki>nowiki</nowiki>.
1446 <dl><dd>There is not nowiki.</dd>
1447 <dd>There is nowiki.</dd></dl>
1448 <ol><li>There is not nowiki.</li>
1449 <li>There is nowiki.</li></ol>
1450 <ul><li>There is not nowiki.</li>
1451 <li>There is nowiki.</li></ul>
1454 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1455 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1457 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1458 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1460 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1461 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1465 Entities inside <nowiki>
1467 <nowiki><</nowiki>
1474 Entities inside template parameters
1480 <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>
1484 Properly escape nowiki when combined with other wiki markup
1488 <p>* </nowiki> tag</p>
1490 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1494 T93824: Put escaped HTML tags inside nowiki
1498 <p><h2>foo</h2></p>
1500 <nowiki><h2>foo</h2></nowiki>
1504 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1508 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1509 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1510 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1512 This text: L'[[Foo]]
1513 This text: L<nowiki>''</nowiki>[[Foo]]
1514 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1517 # This test fails because wikitext whitespace is not normalized before comparing.
1519 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1523 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1526 This text : L<nowiki>''</nowiki>[[Foo]]
1529 # This test and the next one are html2wt only as they test that incorrect wikitext
1530 # passed in template arguments gets escaped or wrapped in nowikis where required.
1532 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1536 <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>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1539 {{echo|foo{{!}}bar}}
1540 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1544 T53961: Output correct nowikis in template arguments
1548 <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>
1549 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1550 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1551 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1552 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1555 {{echo|<nowiki>a }} b</nowiki>}}
1556 {{echo|<nowiki>a [[ b</nowiki>}}
1557 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1558 {{echo|a <nowiki>}</nowiki>}}
1562 Cases where "!!" needs nowiki protection
1567 <tr><th>this needs protection !! here</th></tr>
1571 <tr><th>this does not need
1572 protection !! here</th></tr>
1576 !<nowiki>this needs protection !! here</nowiki>
1589 Comments and Indent-Pre
1591 <!-- comment 1 --> asdf
1593 <!-- comment 1 --> asdf
1596 <!-- comment 1 --> asdf
1597 <!-- comment 2 -->xyz
1599 <!-- comment 1 --> asdf
1600 <!-- comment 2 --> xyz
1656 asdf<!-- comment 1 -->jkl
1666 <!-- foo --> b <!-- bar -->
1680 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1686 Comment semantics and delimiters
1688 <!-- --><!----><!-----><!------>
1692 <!-- --><!----><!-----><!------>
1696 Comment semantics and delimiters, redux
1698 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1699 -- foo -- funky huh? ... -->
1703 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1704 -- foo -- funky huh? ... -->
1708 Comment semantics and delimiters: directors cut
1710 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1711 everything starting with < followed by !-- until the first -- and > we see,
1712 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1718 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1719 everything starting with < followed by !-- until the first -- and > we see,
1720 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1725 Comment semantics: nesting
1727 <!--<!-- no, we're not going to do anything fancy here -->-->
1732 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1735 # Parsoid closes the unclosed comment, even if it means a slight
1738 Comment semantics: unclosed comment at end
1740 parsoid=wt2html,html2html
1742 <!--This comment will run out to the end of the document
1746 <!--This comment will run out to the end of the document-->
1750 Comment semantics: normalize comments to play nice with XML and browsers
1752 <!-- Browsers --!> think this is closed -->
1753 <!--> This would normally be text -->
1754 <!---> As would this -->
1755 <!-- XML doesn't like trailing dashes -------->
1756 <!-- Nor doubled hyphens -- anywhere in the data -->
1757 But this is not a comment.
1759 <p>But this is not a comment.
1762 <!-- Browsers --!> think this is closed -->
1763 <!--> This would normally be text -->
1764 <!---> As would this -->
1765 <!-- XML doesn't like trailing dashes -------->
1766 <!-- Nor doubled hyphens -- anywhere in the data -->
1767 <p>But this is not a comment.</p>
1771 Comment semantics: round-trip even text which contains encoded -->
1773 <!-- hello & goodbye - > --> --&gt; --&xx -->
1775 <!-- hello & goodbye - > --> --&gt; --&xx -->
1779 Comment in template title
1788 Comment on its own line post-expand
1800 Comment on its own line post-expand with non-significant whitespace
1812 Multiple comments should still parse as SOL-transparent
1814 parsoid=wt2html,wt2wt
1817 <!--c2--><!--c3--><!--c4-->*b
1826 <!--c2--><!--c3--><!--c4-->
1833 ### paragraph wrapping tests
1848 Block tag on one line (<div>)
1864 Block tag on one line (<blockquote>)
1866 a <blockquote>foo</blockquote>
1870 a <blockquote>foo</blockquote>
1882 Block tag on both lines (<div>)
1899 Block tag on both lines (<blockquote>)
1901 a <blockquote>foo</blockquote>
1903 b <blockquote>foo</blockquote>
1905 a <blockquote>foo</blockquote>
1906 b <blockquote>foo</blockquote>
1920 Multiple lines without block tags
1944 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1945 # So, we have a separate section for Parsoid. We don't want
1946 # to mimic this stripping behavior in Parsoid. It affects
1947 # editing experience and also requires us to maintain additional
1950 Empty lines between lines with block tags
1988 <div data-parsoid='{"stx":"html"}'></div>
1991 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1994 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1996 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1999 <div data-parsoid='{"stx":"html"}'>e</div>
2002 ## PHP parser emits output which is broken
2004 Unclosed HTML p-tags should be handled properly
2017 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2022 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2023 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2026 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2030 a [[Category:A1]] [[Category:A2]]
2035 <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"/>
2039 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2045 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2049 ### Preformatted text
2058 And a [[Main Page|link]]
2064 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2069 Tabs don't trigger preformatted text
2073 This is preformatted text.
2079 <pre>This is preformatted text.
2084 preformatted text.</p>
2085 <pre>This is preformatted text.
2090 Space before tab needs nowiki pre protection
2096 <nowiki> </nowiki> a
2100 Ident preformatting with inline content
2111 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2128 Regression with preformatted in <center>
2142 Bug 52763: Preformatted in <blockquote>
2148 indented cell (no pre-wrapping!)
2158 <p> indented cell (no pre-wrapping!)
2166 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2183 Bug 15491: <ins>/<del> in blockquote
2186 Foo <del>bar</del> <ins>baz</ins> quux
2190 <p>Foo <del>bar</del> <ins>baz</ins> quux
2196 # Note that the p-wrapping is newline sensitive, which could be
2197 # considered a bug: tidy will wrap only the 'Foo' in the example
2198 # below in a <p> tag. (see comment 23-25 of bug #6200)
2200 Bug 15491: <ins>/<del> in blockquote (2)
2202 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2205 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2211 <del>bar</del> <ins>baz</ins> quux</blockquote>
2215 <pre> with attributes (bug 3202)
2217 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2219 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2224 <pre> with width attribute (bug 3202)
2226 <pre width="8">Narrow screen goodies</pre>
2228 <pre width="8">Narrow screen goodies</pre>
2233 <pre> with forbidden attribute (bug 3202)
2235 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2237 <pre width="8">Narrow screen goodies</pre>
2242 Entities inside <pre>
2251 <pre> with forbidden attribute values (bug 3202)
2253 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2255 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2260 <nowiki> inside <pre> (bug 13238)
2268 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2276 <pre><nowiki>Foo</nowiki></pre>
2281 <nowiki> inside of #tag:pre
2283 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2285 <pre>Foo →bar</pre>
2288 <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>
2292 <nowiki> and <pre> preference (first one wins)
2321 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2323 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2326 <p><span typeof="mw:Nowiki">
2335 </pre> inside nowiki
2337 <nowiki></pre></nowiki>
2343 # Parsoid doesn't strip empty tags, like Tidy does.
2345 Empty pre; pre inside other HTML tags (bug 54946)
2347 parsoid=wt2html,wt2wt
2378 HTML pre followed by indent-pre
2388 # Note that tidy removes the empty <p> tags from the start and end.
2389 # Parsoid does not, by design.
2393 <p><pre>foo</pre></p>
2399 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2403 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2411 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2421 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2433 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2454 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2458 {{echo| foo}}{{echo| bar}}
2463 {{echo|<!--cmt--> foo}}
2465 <!--cmt-->{{echo| foo}}
2467 {{echo|{{echo| }}bar}}
2485 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2522 Pres with newline attributes
2527 <pre class="one two">hi</pre>
2531 two" data-parsoid='{"stx":"html"}'>hi</pre>
2535 Things that look like <pre> tags aren't treated as such
2537 Barack Obama <President> of the United States
2538 <President></President>
2540 <p>Barack Obama <President> of the United States
2541 <President></President>
2546 Handle broken pre-like tags (bug 64025)
2550 {{echo|<pre <pre>x</pre>}}
2552 <table><pre </table>
2555 <table><pre </table>
2563 <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>
2572 Parsoid: handle pre with space after attribute
2576 <pre style="width:50%;" >{{echo|foo}}</pre>
2578 <pre style="width:50%;">{{echo|foo}}</pre>
2581 <pre style="width:50%;">{{echo|foo}}</pre>
2584 # TODO / maybe: fix wt2wt for this
2586 Parsoid: Don't paragraph-wrap fosterable content
2612 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2640 #--------------------------------------------------------------------
2641 # Transclusion parameter whitespace stripping tests
2642 # Behavior is different for positional and named parameters
2643 #--------------------------------------------------------------------
2645 Templates: Strip leading and trailing whitespace from named-param values
2649 {{echo|1= {{echo|b}} }}
2662 <ul><li> d</li></ul>
2667 Templates: Don't strip whitespace from positional-param values
2671 {{echo|{{echo|b}} }}
2703 <ul><li> f</li></ul>
2711 Templates: Handle empty comment-and-ws-only lines correctly
2714 <!--should be ignored-->
2715 <!--should be ignored as well-->
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}}
2737 <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>
2739 <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>
2741 <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>
2743 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2747 Templates: Handle comments in parameter names (bug 67657)
2750 <!-- should be ignored -->
2754 <!-- should be ignored -->
2757 {{echo|1<!-- should be ignored -->=foo}}
2759 {{echo|<!-- should be ignored -->1=foo}}
2761 <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>
2763 <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>
2765 <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>
2767 <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>
2771 Templates: Other wikitext in parameter names (bug 67657)
2775 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2781 #--------------------------------------------------------------------
2782 # Transclusion parameter escaping tests
2783 #--------------------------------------------------------------------
2785 Templates: Parsoid parameter escaping test 1
2787 {{echo|[foo]|{{echo|[bar]}}}}
2791 <p about="#mwt1" typeof="mw:Transclusion"
2792 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2796 Parsoid: Pipes in external links in template parameter
2798 {{echo|[{{echo|http://example.com}} link]}}
2800 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2802 <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>
2806 Parsoid: pipe in transclusion parameter
2808 {{echo|http://foo.com/a|b}}
2810 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2812 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2813 typeof="mw:Transclusion"
2814 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>
2818 Parsoid: Pipe in external link target and content in template parameter
2820 parsoid=html2wt,wt2wt
2822 {{echo|[http://foo.com/a|b a|b]}}
2824 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2826 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2827 typeof="mw:Transclusion"
2828 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2829 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2833 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2837 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2839 <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>
2843 Templates: Don't escape already nowiki-escaped text in template parameters
2845 parsoid=html2wt,wt2wt
2847 {{echo|foo<nowiki>|</nowiki>bar}}
2848 {{echo|<nowiki><div></nowiki>}}
2849 {{echo|<nowiki></nowiki>}}
2851 <p>foo|bar <div></p>
2853 <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>
2854 <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>
2855 <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>
2861 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2863 parsoid=html2wt,wt2wt
2865 {{echo|{{echo|1=bar}}}}
2869 <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>
2874 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2880 <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>
2885 Templates: Preserve blank parameter names
2891 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2895 Templates: Preserve blank parameter names in other positions
2897 {{blank_param|bar|=foo}}
2901 <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
2906 ### Parsoid-centric tests for testing RT edge cases for pre
2910 1a. Indent-Pre and Comments
2923 1b. Indent-Pre and Comments
2936 1c. Indent-Pre and Comments
2949 1d. Indent-Pre and Comments
2950 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2963 2a. Indent-Pre and tables
2984 2b. Indent-Pre and tables
3000 2c. Indent-Pre and tables (bug 42252)
3017 2d. Indent-Pre and tables
3034 <tbody><tr><td> b</td></tr>
3039 2e. Indent-Pre and table-line syntax
3052 2f. Indent-pre started by table-line syntax
3071 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3076 Text that should be rendered preformatted
3084 <pre>Text that should be rendered preformatted
3093 3a. Indent-Pre and block tags (single-line html)
3097 c <blockquote> foo </blockquote>
3102 c <blockquote> foo </blockquote>
3103 <pre><span> foo </span>
3106 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3107 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3108 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3109 <pre><span> foo </span>
3126 3b. Indent-Pre and block tags (multi-line html)
3131 <pre>a <span>foo</span>
3136 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3137 b <div data-parsoid='{"stx":"html"}'> foo </div>
3147 3c. Indent-Pre and block tags (pre-content on separate line)
3211 4. Indent-Pre and extension tags
3222 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3226 Render paragraphs when indent-pre is suppressed in blocklevels
3243 4. Multiple spaces at start-of-line
3261 ## NOTE: the leading white-space chars on empty line are significant
3263 5a. White-space in indent-pre
3275 ## NOTE: the leading white-space chars on empty line are significant
3277 5b. White-space in indent-pre
3296 5c. White-space in indent-pre
3309 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3332 7a. Indent-pre and category links
3334 parsoid=wt2html,wt2wt
3336 [[Category:foo]] <!-- No pre-wrapping -->
3337 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3340 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3341 <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 -->
3344 ## We used to, but no longer wt2wt this test since the default serializer
3345 ## will normalize all categories to serialize on their own line.
3346 ## This wikitext usage is going to be fairly uncommon in production and
3347 ## selser will take care of preserving formatting in those scenarios.
3349 7b. Indent-pre and category links
3354 [[Category:foo]] {{echo|b}}
3356 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3357 <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>
3361 Indent-Pre: Newlines in comments shouldn't affect sol state
3375 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3379 HTML-pre: 1. embedded newlines
3414 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3416 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3420 <pre data-parsoid='{"stx":"html"}'>
3425 <pre data-parsoid='{"stx":"html"}'>
3433 HTML-pre: big spaces
3469 <pre data-parsoid='{"stx":"html"}'>
3488 HTML-pre: 2: indented text
3501 HTML-pre: 3: other wikitext
3520 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3529 ### Definition lists
3536 <dl><dt> name </dt>
3537 <dd> Definition</dd></dl>
3542 Definition list for indentation only
3546 <dl><dd> Indented text</dd></dl>
3551 Definition list with no space
3556 <dd>Definition</dd></dl>
3561 Definition list with URL link
3563 ; http://example.com/ : definition
3565 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3566 <dd> definition</dd></dl>
3571 Definition list with bracketed URL link
3573 ;[http://www.example.com/ Example]:Something about it
3575 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3576 <dd>Something about it</dd></dl>
3581 Definition list with wikilink containing colon
3583 ; [[Help:FAQ]]: The least-read page on Wikipedia
3585 <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>
3586 <dd> The least-read page on Wikipedia</dd></dl>
3590 # At Brion's and JeLuF's insistence... :)
3592 Definition list with news link containing colon
3594 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3596 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3597 <dd> This isn't even a real newsgroup!</dd></dl>
3600 <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>
3604 Malformed definition list with colon
3606 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3608 <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>
3613 Definition lists: colon in external link text
3615 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3617 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3618 <dd> OK, I made that up</dd></dl>
3623 Definition lists: colon in HTML attribute
3625 ;<b style="display: inline">bold</b>
3627 <dl><dt><b style="display: inline">bold</b></dt></dl>
3632 Definition lists: self-closed tag
3634 ;one<br/>two : two-line fun
3636 <dl><dt>one<br />two </dt>
3637 <dd> two-line fun</dd></dl>
3642 Bug 11748: Literal closing tags
3646 <dd>test test test test test</dd>
3648 <dd>test test test test test</dd>
3653 <dd>test test test test test</dd>
3655 <dd>test test test test test</dd>
3661 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3664 ; term : description
3669 <dl><dt> term </dt>
3670 <dd> description</dd></dl>
3671 <ul><li> unordered</li></ul>
3678 Definition list with empty definition and following paragraph
3690 Nested definition lists using html syntax
3703 Definition Lists: No nesting: Multiple dd's
3716 Definition Lists: Indentation: Regular
3724 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3729 Definition Lists: Indentation: Missing 1st level
3735 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3740 Definition Lists: Indentation: Multi-level indent
3744 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3749 Definition Lists: Hacky use to indent tables
3756 should be left alone
3758 <dl><dd><dl><dd><table>
3763 </td></tr></table></dd></dl></dd></dl>
3765 should be left alone
3770 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3778 should be left alone
3781 <dl><dd><dl><dd><table><tr>
3784 </tr></table><!-- bar --></dd></dl></dd></dl>
3786 should be left alone</p>
3790 Definition Lists: Hacky use to indent tables, with comment before table
3796 <dl><dd><dl><dd><!-- foo --><table><tr>
3798 </tr></table></dd></dl></dd></dl>
3801 # The trailing whitespace in this test is to catch a regression in
3802 # Parsoid after T54473.
3804 Definition Lists: Hacky use to indent tables (WS-insensitive)
3813 </td></tr></table></dd></dl>
3817 <tbody><tr><td>a</td></tr>
3818 </tbody></table> </dd></dl>
3821 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3822 ## as an empty dt item. It also ignores all but the last ";" when followed
3823 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3824 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3827 ## Ex: ";;t2 ::d2" is transformed into:
3839 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3840 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3851 ## All Parsoid only definition list tests have this difference.
3853 ## See also: https://phabricator.wikimedia.org/T8569
3854 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3857 Table / list interaction: indented table with lists in table contents
3872 <ul><li> b</li></ul>
3876 <ul><li> d</li></ul>
3877 </td></tr></table></dd></dl>
3882 Table / list interaction: lists nested in tables nested in indented lists
3905 </td></tr></table></dd></dl>
3912 Definition Lists: Nesting: Multi-level (Parsoid only)
3942 Definition Lists: Nesting: Test 2 (Parsoid only)
3969 Definition Lists: Nesting: Test 3 (Parsoid only)
4012 Definition Lists: Nesting: Test 4
4017 <dl><dd><dl><dd><dl><dt>t3</dt>
4018 <dd>d3</dd></dl></dd></dl></dd></dl>
4023 ## The Parsoid team believes the following three test exposes a
4024 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4025 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4026 ## It also exposes a "misfeature" in tidy, which doesn't like
4027 ## <dl> tags with a single <dt> child; it converts the <dt> into
4028 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4030 Definition Lists: Mixed Lists: Test 1
4036 <dl><dd><dl><dt><ul><li> foo</li>
4037 <li> bar</li></ul></dt></dl>
4038 <dl><dt> baz</dt></dl></dd></dl>
4073 Definition Lists: Mixed Lists: Test 2
4078 <ul><li><dl><dd> d1</dd>
4079 <dd> d2</dd></dl></li></ul>
4085 Definition Lists: Mixed Lists: Test 3
4090 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4091 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4097 Definition Lists: Mixed Lists: Test 4
4102 <ul><li><dl><dt>d1 </dt>
4105 <dd>d4</dd></dl></li></ul>
4111 Definition Lists: Mixed Lists: Test 5
4117 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4123 Definition Lists: Mixed Lists: Test 6
4128 <ol><li><ul><li><dl><dd>d1
4129 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4135 Definition Lists: Mixed Lists: Test 7
4140 <dl><dd><ul><li> d1</li>
4141 <li> d2</li></ul></dd></dl>
4147 Definition Lists: Mixed Lists: Test 8
4152 <dl><dd><ul><li> d1</li></ul>
4153 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4159 Definition Lists: Mixed Lists: Test 9
4163 <ul><li><dl><dt>foo </dt>
4164 <dd>bar</dd></dl></li></ul>
4170 Definition Lists: Mixed Lists: Test 10
4174 <ul><li><ol><li><dl><dt>foo </dt>
4175 <dd>bar</dd></dl></li></ol></li></ul>
4179 # The Parsoid team disagrees with the PHP parser's seemingly-random
4180 # rules regarding dd/dt on the next two tests. Parsoid is more
4181 # consistent, and recognizes the shared nesting and keeps the
4182 # still-open tags around until the nesting is complete.
4183 # (And tidy again converts <dt> to <dd> before 'bar'.)
4186 Definition Lists: Mixed Lists: Test 11
4191 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4192 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4193 <dl><dt>boo </dt>
4194 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4249 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4250 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4254 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4255 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4264 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4266 # * The test is wrong, there are two colons where there should be :;
4267 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4269 Definition Lists: Weird Ones: Test 1
4271 *#;*::;; foo : bar (who uses this?)
4273 <ul><li><ol><li><dl><dt> foo </dt>
4274 <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>
4293 <dt>bar (who uses this?)</dt>
4325 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4326 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4338 Definition Lists: colons occurring in tags
4356 <dt><span>a:b</span></dt>
4383 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4385 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4386 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4387 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4388 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4390 <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>
4391 <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>
4392 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4396 Definition Lists: colons and tables 1
4408 </td></tr></table></dd></dl>
4412 </td></tr></table></dd></dl>
4416 # Parsoid's output (as documented below) differs from php's in this case.
4417 # This is probably a bug. If we fixup parsoid to match php's output, the
4418 # above test should pass and the below test case can be removed. It is
4419 # unclear which output is more desirable.
4422 Definition Lists: colons and tables 2
4434 </td></tr></table></dd>
4438 </td></tr></table></dd></dl>
4442 Definition Lists: template interaction
4444 ::{{definition_list}}
4447 ::{{definition_list}}
4452 <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">
4453 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4455 <dl><dd data-parsoid='{}'>one
4456 <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">
4457 </span><dd about="#mwt2">two
4459 <dd>three</dd></dl></dd>
4460 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4468 External links: non-bracketed
4470 Non-bracketed: http://example.com
4472 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4476 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4478 External links: numbered
4480 Numbered: [http://example.com]
4481 Numbered: [http://example.net]
4482 Numbered: [http://example.com]
4484 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4485 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4486 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4489 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4490 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4491 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4495 External links: specified text
4497 Specified text: [http://example.com link]
4499 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4504 External links: trail
4506 Linktrails should not work for external links: [http://example.com link]s
4508 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4513 External links: dollar sign in URL
4515 http://example.com/1$2345
4517 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4521 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4523 External links: dollar sign in URL (autonumber)
4525 [http://example.com/1$2345]
4527 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4530 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4534 External links: open square bracket forbidden in URL (bug 4377)
4536 parsoid=wt2html,wt2wt,html2html
4538 http://example.com/1[2345
4540 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4543 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4547 External links: open square bracket forbidden in URL (named) (bug 4377)
4549 parsoid=wt2html,html2html
4551 [http://example.com/1[2345]
4553 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4556 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4559 # parsoid adds a space before the link name
4561 External links: open square bracket forbidden in URL (named) (bug 4377)
4564 [http://example.com/1 [2345]
4566 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4571 External links: nowiki in URL link text (bug 6230)
4573 [http://example.com/ <nowiki>''example site''</nowiki>]
4575 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4580 External links: newline forbidden in text (bug 6230 regression check)
4582 [http://example.com/ first
4585 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4591 External links: Pipe char between url and text
4593 [http://example.com | link]
4595 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4600 External links: protocol-relative URL in brackets
4602 [//example.com/ Test]
4604 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4608 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4610 External links: protocol-relative URL in brackets without text
4614 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4617 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4621 External links: protocol-relative URL in free text is left alone
4625 <p>//example.com/Foo
4630 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4632 foo//example.com/Foo
4634 <p>foo//example.com/Foo
4639 External links: with no contents
4641 [http://en.wikipedia.org/wiki/Foo]
4643 [[wikipedia:Foo|Bar]]
4645 [[wikipedia:Foo|<span>Bar</span>]]
4647 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4648 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4649 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4652 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4653 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4654 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4658 External links: Free with trailing punctuation
4668 http://example.com/url_with_(brackets)
4669 (http://example.com/url_without_brackets)
4670 http://example.com/url_with_entity&
4671 http://example.com/url_with_entity&
4672 http://example.com/url_with_entity&
4673 http://example.com/url_with_entity
4674 http://example.com/url_with_entity 
4675 http://example.com/url_with_entity 
4676 http://example.com/url_with_entity<
4677 http://example.com/url_with_entity<
4678 http://example.com/url_with_entity<
4680 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4681 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4682 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4683 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4684 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4685 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4686 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4687 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4688 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4689 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4690 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4691 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4692 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4693 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4694 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4695 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4696 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4697 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4698 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4701 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4702 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4703 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4704 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4705 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4706 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4707 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4708 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4709 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4710 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4711 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4712 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4713 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4714 <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>
4715 <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>
4716 <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>
4717 <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>
4718 <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>
4719 <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>
4723 External links: tricky Parsoid html2html case
4725 parsoid=wt2html,wt2wt,html2html
4727 http://example.com/url_with_entity&amp;
4729 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4732 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4736 External links: Free with trailing quotes (T113666)
4738 '''News:''' Stuff here
4742 <p><b>News:</b> Stuff here
4743 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4746 <p><b>News:</b> Stuff here</p>
4747 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4751 External links: Lone protocols are never linked (T105697)
4770 External links: No preceding word characters allowed (bug 65278)
4772 NOPEhttp://example.com
4773 N0http://example.com
4774 ok:http://example.com
4775 ok-http://example.com
4777 <p>NOPEhttp://example.com
4778 N0http://example.com
4779 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4780 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4785 External links: nofollow domain exception
4787 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4789 <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>.
4796 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4798 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4803 External image from https
4805 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4807 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4812 External image (when not allowed)
4814 wgAllowExternalImages=0
4816 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4818 <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>
4823 Link to non-http image, no img tag
4825 Link to non-http image, no img tag: ftp://example.com/test.jpg
4827 <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>
4832 External links: terminating separator
4834 Terminating separator: http://example.com/thing,
4836 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4841 External links: intervening separator
4843 Intervening separator: http://example.com/1,2,3
4845 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4850 External links: old bug with URL in query
4852 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4854 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4859 External links: old URL-in-URL bug, mixed protocols
4861 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4863 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4867 # Since Parsoid is starting to emit canonical wikitext for links,
4868 # [http://example.com http://example.com] will not RT back to that
4871 External links: URL in text
4875 URL in text: [http://example.com http://example.com]
4877 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4880 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4884 External links: Clickable images
4886 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4888 <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>
4891 <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>
4895 External links: raw ampersand
4897 Old & use: http://x&y
4899 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4904 External links: encoded ampersand
4906 Old & use: http://x&y
4908 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4911 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4915 External links: encoded equals (bug 6102)
4917 http://example.com/?foo=bar
4919 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4922 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4926 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4927 ## does it number them. As discussed in bug 53505, we can identify
4928 ## autonumbered links via CSS.
4932 External links: [raw ampersand]
4934 Old & use: [http://x&y]
4936 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4939 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4942 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4943 # mode will return the [raw ampersand] wikitext
4945 External links: [encoded ampersand]
4947 parsoid=wt2html,wt2wt,html2html
4949 Old & use: [http://x&y]
4951 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4954 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4958 External links: [raw equals]
4960 [http://example.com/?foo=bar]
4962 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4965 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4968 # note that parsoid html is identical to [raw equals] case; so html2wt
4969 # mode will return the [raw equals] wikitext
4971 External links: [encoded equals] (bug 6102)
4973 parsoid=wt2html,wt2wt,html2html
4975 [http://example.com/?foo=bar]
4977 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4980 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4983 # xxx parsoid strips the IDN character, so the round-trip tests will
4984 # obviously fail and are disabled. --cscott
4986 External links: [IDN ignored character reference in hostname; strip it right off]
4988 parsoid=wt2html,wt2wt,html2html
4990 [http://e‌xample.com/]
4992 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4995 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4998 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4999 # Where an external link could easily circumvent the sanitization of the text of
5000 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5001 # test demands a higher standard. That's a bit strange.
5005 # http://example.com -> [http://example.com|http://example.com]
5006 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5008 # The first example is sanitized, but the second is not. Any security benefits
5009 # from this production are trivial to circumvent. Either remove this test and
5010 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5011 # the test accordingly.
5015 # xxx parsoid strips the IDN character, so the round-trip tests will
5016 # obviously fail and are disabled. --cscott
5018 External links: IDN ignored character reference in hostname; strip it right off
5020 parsoid=wt2html,html2html
5022 http://e‌xample.com/
5024 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5027 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5031 External links: www.jpeg.org (bug 554)
5035 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5039 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5041 External links: URL within URL (original bug 2)
5043 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5045 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5048 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5052 BUG 361: URL inside bracketed URL
5054 [http://www.example.com/foo http://www.example.com/bar]
5056 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5061 BUG 361: URL within URL, not bracketed
5063 http://www.example.com/foo?=http://www.example.com/bar
5065 <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>
5070 BUG 289: ">"-token in URL-tail
5072 http://www.example.com/<hello>
5074 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5079 BUG 289: literal ">"-token in URL-tail
5081 http://www.example.com/<b>html</b>
5083 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5086 <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>
5090 BUG 289: ">"-token in bracketed URL
5092 [http://www.example.com/<hello> stuff]
5094 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5099 BUG 289: literal ">"-token in bracketed URL
5101 [http://www.example.com/<b>html</b> stuff]
5103 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5108 BUG 289: literal double quote at end of URL
5110 http://www.example.com/"hello"
5112 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5117 BUG 289: literal double quote in bracketed URL
5119 [http://www.example.com/"hello" stuff]
5121 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5126 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5128 [http://www.example.com test]
5130 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5135 External links: link text with spaces
5137 [http://www.example.com a b c]
5138 [http://www.example.com ''a'' ''b'']
5140 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5141 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5146 External links: wiki links within external link (Bug 3695)
5148 parsoid=wt2html,html2html
5150 [http://example.com [[wikilink]] embedded in ext link]
5152 <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>
5155 <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>
5159 BUG 787: Links with one slash after the url protocol are invalid
5163 [http:/example.com title]
5165 <p>http:/example.com
5166 </p><p>[http:/example.com title]
5171 Bracketed external links with template-generated invalid target
5173 [{{echo|http:/example.com}} title]
5175 <p>[http:/example.com title]
5180 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5182 ''[http://example.com text'']
5183 [http://example.com '''text]'''
5184 ''Something [http://example.com in italic'']
5185 ''Something [http://example.com mixed''''', even bold]'''
5186 '''''Now [http://example.com both''''']
5188 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5189 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5190 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5191 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5192 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5198 Bug 4781: %26 in URL
5200 http://www.example.com/?title=AT%26T
5202 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5205 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5208 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5209 # % is actually legal in HTML5. Any change in output would need testing though.
5211 Bug 4781, 5267: %25 in URL
5213 http://www.example.com/?title=100%25_Bran
5215 <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>
5218 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5222 Bug 4781, 5267: %28, %29 in URL
5224 http://www.example.com/?title=Ben-Hur_%281959_film%29
5226 <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>
5229 <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>
5234 Bug 4781: %26 in autonumber URL
5236 [http://www.example.com/?title=AT%26T]
5238 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5241 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5245 Bug 4781, 5267: %26 in autonumber URL
5247 [http://www.example.com/?title=100%25_Bran]
5249 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5252 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5256 Bug 4781, 5267: %28, %29 in autonumber URL
5258 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5260 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5263 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5268 Bug 4781: %26 in bracketed URL
5270 [http://www.example.com/?title=AT%26T link]
5272 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5275 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5279 Bug 4781, 5267: %25 in bracketed URL
5281 [http://www.example.com/?title=100%25_Bran link]
5283 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5288 Bug 4781, 5267: %28, %29 in bracketed URL
5290 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5292 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5295 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5299 External link containing a period in the anchor. (bug 63947)
5301 [//foo.org/bar#baz. bang]
5303 [//foo.org/bar. bang]
5305 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5306 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5309 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5310 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5314 External link containing a single quote. (bug 63947)
5318 [//foo.org/bar'baz bang]
5320 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5321 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5324 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5325 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5329 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5331 Some [http://example.com/ pretty ''italics'' and stuff]!
5333 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5338 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5340 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5342 <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>
5347 External link containing double-single-quotes with no space separating the url from text in italics
5349 [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]].]
5351 <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>
5354 <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>
5356 <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>
5360 External link with comments in link text
5362 [http://www.google.com Google <!-- comment -->]
5364 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5367 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5371 External link to bare IPv4 address
5373 [http://192.168.0.1 Link]
5375 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5378 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5382 URL-encoding in URL functions (single parameter)
5384 {{localurl:Some page|amp=&}}
5386 <p>/index.php?title=Some_page&amp=&
5391 URL-encoding in URL functions (multiple parameters)
5393 {{localurl:Some page|q=?&=&}}
5395 <p>/index.php?title=Some_page&q=?&amp=&
5402 http://example.com/index.php?foozoid%5B%5D=bar
5404 http://example.com/index.php?foozoid[]=bar
5406 <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>
5407 </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>
5410 <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>
5412 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5416 IPv6 urls, autolink format (T23261)
5418 http://[2404:130:0:1000::187:2]/index.php
5420 Examples from RFC 2373, section 2.2:
5421 * http://[1080::8:800:200C:417A]/unicast
5422 * http://[FF01::101]/multicast
5423 * http://[::1]/loopback
5424 * http://[::]/unspecified
5425 * http://[::13.1.68.3]/ipv4compat
5426 * http://[::FFFF:129.144.52.38]/ipv4compat
5428 Examples from RFC 2732, section 2:
5429 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5430 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5431 * http://[3ffe:2a00:100:7031::1]
5432 * http://[1080::8:800:200C:417A]/foo
5433 * http://[::192.9.5.5]/ipng
5434 * http://[::FFFF:129.144.52.38]:80/index.html
5435 * http://[2010:836B:4179::836B:4179]
5438 <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>
5439 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5441 <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>
5442 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5443 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5444 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5445 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5446 <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>
5447 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5449 <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>
5450 <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>
5451 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5452 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5453 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5454 <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>
5455 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5458 <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>
5460 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5461 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5462 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5463 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5464 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5465 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5466 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5468 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5469 <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>
5470 <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>
5471 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5472 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5473 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5474 <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>
5475 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5479 IPv6 urls, bracketed format (T23261)
5481 [http://[2404:130:0:1000::187:2]/index.php test]
5483 Examples from RFC 2373, section 2.2:
5484 * [http://[1080::8:800:200C:417A] unicast]
5485 * [http://[FF01::101] multicast]
5486 * [http://[::1]/ loopback]
5487 * [http://[::] unspecified]
5488 * [http://[::13.1.68.3] ipv4compat]
5489 * [http://[::FFFF:129.144.52.38] ipv4compat]
5491 Examples from RFC 2732, section 2:
5492 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5493 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5494 * [http://[3ffe:2a00:100:7031::1] 3]
5495 * [http://[1080::8:800:200C:417A]/foo 4]
5496 * [http://[::192.9.5.5]/ipng 5]
5497 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5498 * [http://[2010:836B:4179::836B:4179] 7]
5501 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5502 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5504 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5505 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5506 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5507 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5508 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5509 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5510 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5512 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5513 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5514 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5515 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5516 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5517 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5518 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5521 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5523 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5524 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5525 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5526 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5527 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5528 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5529 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5531 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5532 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5533 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5534 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5535 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5536 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5537 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5538 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5542 Non-extlinks in brackets
5551 [{{echo|foo}} ''bar'']
5552 [{{echo|foo}}l's] errand
5553 [{{echo|foo}}l's errand]
5555 [url=http://example.com]
5556 [http:// bare protocols don't count]
5569 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5570 [http:// bare protocols don't count]
5578 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5579 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5580 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5581 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5582 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5583 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5584 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5585 [http:// bare protocols don't count]</p>
5589 Percent encoding in external links
5591 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5593 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5596 <p><a rel="mw:ExtLink"
5597 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5601 Use url link syntax for links where the content is equal the link target
5605 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5608 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5612 Parenthesis in external links, especially URL links
5616 http://example.com/test)
5618 http://example.com/(test)
5620 http://example.com/((test)
5622 (http://example.com/(test))
5624 (http://example.com/(test)))))
5626 http://example.com/a)b
5628 [http://example.com) foo]
5630 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5631 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5632 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5633 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5634 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5635 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5636 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5637 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5640 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5641 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5642 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5643 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5644 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5645 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5646 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5647 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5651 Parenthesis in external links, w/ transclusion or comment
5653 (http://example.com/{{echo|hi}})
5655 (http://example.com<!-- hi -->)
5657 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5658 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5661 <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>
5663 <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>
5667 Serialize <a> tags with invalid link targets as plain text
5669 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5671 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5672 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5673 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5674 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5677 <nowiki>*</nowiki>text
5678 <nowiki>[[foo]]</nowiki>
5679 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5683 mw:ExtLink -vs- mw:WikiLink (T94723)
5687 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5688 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5689 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5690 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5692 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5693 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5698 [[wikipedia:Foo|Bar]]
5699 [[wikipedia:Foo|Bar]]
5701 [[wikipedia:European_Robin|European Robin]]
5702 [[wikipedia:European_Robin|European Robin]]
5706 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5710 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5712 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5723 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5725 Normal text. '''''Bold italic text.''''' Normal text.
5727 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5728 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5733 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5734 # parser strips. The wikitext contains just the first half of the bold
5737 Unclosed and unmatched quotes
5739 '''''Bold italic text '''with bold deactivated''' in between.'''''
5741 '''''Bold italic text ''with italic deactivated'' in between.'''''
5745 ..spanning two paragraphs (should not work).'''
5747 '''Bold tag left open
5749 ''Italic tag left open
5753 <!-- Unmatching number of opening, closing tags: -->
5754 '''This year''''s election ''should'' beat '''last year''''s.
5756 ''Tom'''s car is bigger than ''Susan'''s.
5758 Plain ''italic'''s plain
5760 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5761 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5762 </p><p><b>Bold text..</b>
5763 </p><p>..spanning two paragraphs (should not work).
5764 </p><p><b>Bold tag left open</b>
5765 </p><p><i>Italic tag left open</i>
5767 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5768 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5769 </p><p>Plain <i>italic'</i>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).<b></b>
5776 </p><p><b>Bold tag left open</b>
5777 </p><p><i>Italic tag left open</i>
5780 <!-- Unmatching number of opening, closing tags: -->
5781 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5782 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5783 </p><p>Plain <i>italic'</i>s plain
5790 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5793 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5794 # is the bare minimum required by the spec, see:
5795 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5796 # Parsoid team replies: empty table tags are legal in HTML5
5798 A table with no data.
5811 A table with stray table end tags on start tag line (wt2html)
5815 {|style="color: red;"|}
5817 {|style="color: red;" |}
5821 {|style="color: red;"|} id="foo"
5825 {|style="color: red;" |} id="foo"
5829 <table style="color: red;"></table>
5831 <table style="color: red;">
5837 <table style="color: red;" id="foo">
5843 <table style="color: red;" id="foo">
5852 A table with no data (take 2)
5860 # A table with nothing but a caption is invalid XHTML, we might want to render
5861 # this as <p>caption</p>
5862 # Parsoid team replies: table with only a caption is legal in HTML5
5864 A table with nothing but a caption
5872 </caption><tr><td></td></tr></table>
5875 <table><caption> caption</caption></table>
5879 A table with caption with default-spaced attributes and a table row
5882 |+ style="color: red;" | caption1
5888 <caption style="color: red;"> caption1
5897 A table with captions with non-default spaced attributes and a table row
5900 |+style="color: red;"|caption2
5901 |+ style="color: red;"| caption3
5907 <caption style="color: red;">caption2
5909 <caption style="color: red;"> caption3
5918 Table td-cell syntax variations
5922 | foo bar foo || baz
5923 | style='color:red;' | baz
5924 | style='color:red;' || baz
5931 <td> foo bar foo </td>
5934 <td style="color:red;"> baz
5936 <td> style='color:red;' </td>
5964 Simple table but with multiple dashes for row wikitext
5983 Multiplication table
5985 {| border="1" cellpadding="2"
5986 |+Multiplication table
5988 ! × !! 1 !! 2 !! 3
6006 <table border="1" cellpadding="2">
6007 <caption>Multiplication table
6054 Accept "||" in table headings
6069 Accept "!!" in table data
6083 <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>
6088 Accept "||" in indented table headings
6098 </th></tr></table></dd></dl>
6103 Accept "!!" in templates
6117 <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>
6121 Accept "!!" in table headings after newline
6138 <p>b!!c</p></th></tr>
6143 Accept "!!" in table data of mixed wikitext / html syntax
6147 <tr><td>b!!c</td></tr>
6160 <tbody><tr><th>a</th></tr>
6161 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6166 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6183 Accept "| !" at start of line in tables (ignore !-attribute)
6187 | !style="color:red" | bar
6199 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 +/-
6203 |style='color:red;'|+1
6204 |style='color:blue;'|-1
6216 <td style="color:red;">+1
6218 <td style="color:blue;">-1
6242 |rowspan=2| Cell 2, row 1 (and 2)
6253 <td rowspan="2"> Cell 2, row 1 (and 2)
6271 {| bgcolor=#ABCDEF border=2
6276 |the original table again
6284 <table bgcolor="#ABCDEF" border="2">
6292 <td>the original table again
6298 Invalid attributes in table cell (bug 1830)
6312 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6316 | title="foo<nowiki>|</nowiki>" |bar
6317 | title="foo<nowiki>|</nowiki>" bar
6324 <td title="foo|">bar
6326 <td> title="foo|" bar
6331 <tbody><tr><td title="foo">bar</td>
6332 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6333 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6337 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6338 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6339 # *2wt modes will fail.
6341 Table security: embedded pipes
6343 parsoid=wt2html,html2html
6346 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6350 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6351 <td>]" onmouseover="alert(document.cookie)">test
6359 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6363 Element attributes with double ! should not be broken up by <th>
6366 ! hi <div class="!!">ha</div> ho
6371 <th> hi <div class="!!">ha</div> ho
6376 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6381 ! and || in element attributes should not be parsed as <th>/<td>
6384 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6389 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6394 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6398 # FIXME: The output seems broken. Filed as T110268.
6400 ! and || in td attributes should not be parsed as <th>/<td>
6405 | style="color: red !important;" data-contrived="put this here ||" | foo
6410 <td> style="color: red !important;" data-contrived="put this here </td>
6416 <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>
6421 Break on | in element attribute in template
6423 parsoid=wt2html,html2html
6425 {{echo|1=<div class="hi|ho">ha</div>}}
6427 <p>ho">ha</div>
6430 <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>
6433 ## We don't support roundtripping of these attributes in Parsoid.
6434 ## Selective serialization takes care of preventing dirty diffs.
6435 ## But, on edits, we dirty-diff the invalid attribute text.
6437 Invalid text in table attributes should be discarded
6441 {| <span>boo</span> style='border:1px solid black'
6442 | <span>boo</span> style='color:blue' | 1
6443 |<span>boo</span> style='color:blue'| 2
6446 <table style="border:1px solid black">
6448 <td style="color:blue"> 1
6450 <td style="color:blue"> 2
6454 <table style="border:1px solid black">
6456 <td style="color:blue"> 1</td>
6457 <td style="color:blue"> 2</td>
6463 Invalid text in table attributes should be preserved by selective serializer
6466 "modes": ["selser"],
6468 ["td:first-child", "text", "abc"],
6469 ["td + td", "text", "xyz"]
6473 {| <span>boo</span> style='border:1px solid black'
6474 | <span>boo</span> style='color:blue' | 1
6475 |<span>boo</span> style='color:blue'| 2
6478 {| <span>boo</span> style='border:1px solid black'
6479 | <span>boo</span> style='color:blue' |abc
6480 |<span>boo</span> style='color:blue'|xyz
6485 1. Template-generated table cell attributes and cell content
6490 || {{table_attribs_5}}
6491 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6492 |align=center {{table_attribs}}
6493 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6498 <td style="color:red;">Foo
6500 <td style="color:red;">Foo
6502 <td> style="color:red;"</td>
6505 <td style="color:red;">Foo
6507 <td align="center" style="color:red;">Foo
6509 <td align="center" style="color:red;">Foo
6515 2. Template-generated table cell attributes and cell content
6518 |{{table_attribs_2}}
6523 <td style="color:red;">Foo
6531 <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>
6532 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6537 3. Template-generated table cell attributes and cell content
6540 !align=center {{table_header_cells}}
6542 |align=center {{table_cells}}
6547 <th align="center" style="color:red;">Foo</th>
6548 <th style="color:red;"><i>Bar</i></th>
6549 <th style="color:brown;"><i>Foo</i> and Baz
6552 <td align="center" style="color:red;">Foo</td>
6553 <td style="color:red;"><i>Bar</i></td>
6554 <td style="color:brown;"><i>Foo</i> and Baz
6559 <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>
6560 <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>
6565 4. Template-generated table cell attributes and cell content inside a templated table
6568 !align=center {{table_header_cells}}
6570 |align=center {{table_cells}}
6575 <th align="center" style="color:red;">Foo</th>
6576 <th style="color:red;"><i>Bar</i></th>
6577 <th style="color:brown;"><i>Foo</i> and Baz
6580 <td align="center" style="color:red;">Foo</td>
6581 <td style="color:red;"><i>Bar</i></td>
6582 <td style="color:brown;"><i>Foo</i> and Baz
6586 <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}}]}'>
6587 <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>
6589 <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>
6593 ## Edge case fix to prevent future regressions
6595 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6598 |{{table_attribs_7}}
6603 <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>
6605 <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>
6609 Table with row followed by newlines and table heading
6611 parsoid=wt2html,html2html
6629 Table with empty line following the start tag
6631 parsoid=wt2html,html2html
6649 Table attributes with empty value
6651 parsoid=wt2html,html2html
6664 <tbody><tr><td style=""> hello</td></tr>
6669 Wikitext table with a lot of comments
6692 Wikitext table comments represented in parsoid dom
6694 {|<!--c1--><!--c2-->
6705 <table><!--c1--><!--c2-->
6706 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6707 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6712 Wikitext table with double-line table cell
6729 Table cell with a single comment
6746 Table-cell after a comment-only-empty-line
6763 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6765 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6771 Build table with {{!}}
6773 {{{!}} class="wikitable"
6776 {{!}}- style="color:red;"
6777 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6780 <table class="wikitable">
6786 <tr style="color:red;">
6788 <td style="color:red;"> second data
6794 Build table with pipe as data
6796 {| class="wikitable"
6799 |- style="color:red;"
6800 | data || style="color:red;" | second data
6802 | style="color:red;" | data with | || style="color:red;" | second data with |
6804 || data with | ||| second data with |
6807 <table class="wikitable">
6813 <tr style="color:red;">
6815 <td style="color:red;"> second data
6818 <td style="color:red;"> data with | </td>
6819 <td style="color:red;"> second data with |
6822 <td> data with | </td>
6823 <td> second data with |
6829 Build table with wikilink
6831 {| class="wikitable"
6832 ! header || second header
6833 |- style="color:red;"
6834 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6836 | data || second data [[Main Page|link|text with pipe]]
6839 <table class="wikitable">
6844 <tr style="color:red;">
6845 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6846 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6850 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6855 # The expected HTML structure in this test is debatable. The PHP parser does
6856 # not parse this kind of table at all. The main focus for Parsoid is on
6857 # round-tripping, so this output is ok for now. TODO: revisit!
6859 Wikitext table with html-syntax row
6869 <td>foo</td></tr></tbody></table>
6872 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6873 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6874 ## PHP parser, which tidy then compounds by fostering the content
6875 ## entirely out of the table. Parsoid recognizes the table context
6876 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6877 ## depends on PHP's treatment of broken table markup!
6879 Implicit <td> after a |-
6881 parsoid=wt2html,html2html
6901 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6903 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6905 parsoid=wt2html,html2html
6938 <tr><td><pre>a</pre></td></tr>
6939 <tr><td> b</td></tr>
6944 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6945 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6947 Lists should be recognized in an implicit <td> context
6949 parsoid=wt2html,html2html
6976 Table cells not properly parsed in an implicit-td context
6980 {{table_attribs_4}} || a || b
6985 <td style="background-color:#DC241f;" width="10px"></td>
6992 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6993 <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>
6998 Parsoid: Round-trip tables directly followed by content (bug 51219)
7000 parsoid=wt2html,wt2wt
7025 Parsoid: Default to a newline after tables in new content (bug 51219)
7030 <tr><td>foo</td></tr></tbody></table> bar
7032 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7037 <nowiki> </nowiki>bar
7045 Parsoid: newline inducing block nodes don't suppress <nowiki>
7057 Parsoid: Row-syntax table headings followed by comment & table cells
7059 parsoid=wt2html,wt2wt
7063 <!-- foo --> || baz || quux
7077 <tbody><tr><th> foo </th><th> bar
7078 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7083 Parsoid: Recover better from broken table attributes
7103 <p>foo</p></td></tr>
7108 Tables: Digest broken attributes on table and tr tag
7124 # T137406: Whitespace in the HTML
7126 1. Generate correct wikitext for tables with thead/tbody/tfoot
7131 <caption>Test</caption>
7172 <caption>Test</caption>
7192 # T137406: No whitespace in the HTML
7194 2. Generate correct wikitext for tables with thead/tbody/tfoot
7198 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7208 Testing serialization after deletion in references
7217 hi <ref><div id="x">ho</div></ref>
7227 Testing serialization after deletion of table cells
7230 "modes": ["wt2wt", "selser"],
7238 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7248 Testing selser after addition of new row before first row (T125419)
7251 "modes": ["wt2wt", "selser"],
7253 [ "tr", "before", "<tr><td>X</td></tr>" ]
7269 Serialize new table rows in a HTML table using HTML tags
7272 "modes": ["wt2wt", "selser"],
7274 [ "tr", "before", "<tr><td>X</td></tr>" ]
7278 <table><tr><td>a</td></tr></table>
7280 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7284 Serialize new table cells in a HTML row using HTML tags
7287 "modes": ["wt2wt", "selser"],
7289 [ "td", "before", "<td>X</td>" ]
7293 <table><tr><td>a</td></tr></table>
7295 <table><tr><td>X</td><td>a</td></tr></table>
7299 Wikitext tables can be nested inside HTML tables
7303 <table data-parsoid='{"stx":"html"}'>
7306 <tr><td>foo</td></tr>
7321 Serialize wikitext list items as HTML list items when embedded in a HTML list
7325 <ul data-parsoid='{"stx": "html"}'>
7326 <li data-parsoid='{}'>a</li>
7336 # SSS FIXME: Is this actually a good thing given the
7337 # odd nested list output that is generated by MW?
7338 # <ul><li>foo<ul>..</ul></li></ul> instead of
7339 # <ul><li>foo</li><ul>..</ul></ul>
7341 Wikitext lists can be nested inside HTML lists
7345 <ul data-parsoid='{"stx": "html"}'>
7346 <li data-parsoid='{"stx": "html"}'>a
7351 <ul data-parsoid='{"stx": "html"}'>
7374 Plain link, capitalized
7378 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7383 Plain link, uncapitalized
7387 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7394 [[Main Page|The Main Page]]
7396 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7401 Piped link with comment in link text
7403 [[Main Page|The Main<!--front--> Page]]
7405 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7410 Piped link with multiple pipe characters in link text
7412 [[Main Page||The|Main|Page|]]
7414 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7417 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7421 Piped link with no link text
7423 [[Thomas Bek (bishop of St David's)|]]
7425 <p>[[Thomas Bek (bishop of St David's)|]]
7428 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7436 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7441 Broken link with fragment
7443 [[Zigzagzogzagzig#zug]]
7445 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7450 Special page link with fragment
7452 [[Special:Version#anchor]]
7454 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7459 Nonexistent special page link with fragment
7461 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7463 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7470 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7472 <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>
7479 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7481 <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>!!!
7492 Bug 43661: Piped links with identical prefixes
7494 [[prefixed article|prefixed articles with spaces]]
7496 [[prefixed article|prefixed articlesaoeu]]
7498 [[Main Page|Main Page test]]
7500 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7501 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7502 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7508 Link with HTML entity in suffix / tail
7510 [[Main Page]]", [[Main Page]]a
7512 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7515 <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>
7519 Link with 3 brackets
7530 Link with 4 brackets
7534 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7539 Piped link with 3 brackets
7541 [[[main page|the main page]]]
7543 <p>[[[main page|the main page]]]
7548 Piped link with extlink-like text
7551 [[Main Page|This is a [bar]]]
7553 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7554 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7557 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7558 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7562 Link with multiple pipes
7564 [[Main Page|The|Main|Page]]
7566 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7570 # Note that parsoid does not munge anchor text; all non-space
7571 # characters are valid in HTML5 ids.
7573 Anchor containing a #. (bug 63430)
7575 [[Main Page#And#Link]]
7577 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7580 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7586 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7588 <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>
7593 Link with space in namespace
7595 [[User talk:Foo bar]]
7597 <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>
7602 MemoryAlpha:AlphaTest
7604 This is an article in the MemoryAlpha namespace
7605 (which shadows the memoryalpha interwiki link).
7609 Namespace takes precedence over interwiki link (bug 51680)
7611 [[MemoryAlpha:AlphaTest]]
7613 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7617 # The previous test doesn't work correctly in html2*, due to not recognizing the
7618 # link as an internal one. This one checks for the correct behavior.
7620 Link to namespace preferred over interwiki with correct rel attribute
7622 parsoid=html2wt,html2html
7624 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7626 [[MemoryAlpha:AlphaTest]]
7630 Piped link to namespace
7632 [[Meta:Disclaimers|The disclaimers]]
7634 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7641 [[Usually caused by a typo (oops}]]
7643 <p>[[Usually caused by a typo (oops}]]
7650 Just a test of an article title containing a percent.
7654 Link containing % (not as a hex sequence)
7657 [[7% Solution|7%25 Solution]]
7659 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7660 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7663 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7664 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7667 # note that the parsoid HTML is identical to the previous test output,
7668 # so the previous test ensures that the html2wt mode will generate the
7669 # "not as a hex sequence" wikitext.
7671 Link containing % as a single hex sequence interpreted to char
7673 parsoid=wt2wt,wt2html,html2html
7676 [[7%25 Solution|7%25 Solution]]
7678 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7679 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7682 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7683 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7687 Link containing % as a double hex sequence interpreted to hex sequence
7691 <p>[[7%2525 Solution]]
7695 # note that parsoid does not munge anchor text; all non-space
7696 # characters are valid in HTML5 anchors.
7698 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7699 Example for such a section: == < ==
7701 [[%23%3c]][[%23%3e]]
7703 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7706 <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>
7710 Link containing "<#" and ">#" as a hex sequences
7712 [[%3c%23]][[%3e%23]]
7714 <p>[[%3c%23]][[%3e%23]]
7719 Link containing an equals sign
7721 [[Special:BookSources/isbn=4-00-026157-6]]
7723 <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>
7726 <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>
7732 Just a test of an article title containing a tilde.
7735 # note that links containing signatures, like [[Foo~~~~]], are
7736 # massaged by the pre-save transform (PST) and so the tildes are never
7737 # seen by the parser.
7739 Link containing a tilde
7743 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7746 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7750 Link containing double-single-quotes '' (bug 4598)
7752 [[Lista d''e paise d''o munno]]
7754 <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>
7757 <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>
7761 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7763 Some [[Link|pretty ''italics'' and stuff]]!
7765 <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>!
7768 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7772 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7774 ''Some [[Link|pretty ''italics'' and stuff]]!''
7776 <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>
7781 Link with double quotes in title part (literal) and alternate part (interpreted)
7783 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7787 [[''Pentecoste''|Pentecoste]]
7789 [[''Pentecoste''|''Pentecoste'']]
7791 <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>
7792 </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>
7793 </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>
7794 </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>
7797 <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>
7798 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7799 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7800 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7804 Broken image links with HTML captions (bug 39700)
7806 [[File:Nonexistent|<script></script>]]
7807 [[File:Nonexistent|100x100px|<script></script>]]
7808 [[File:Nonexistent|<]]
7809 [[File:Nonexistent|a<i>b</i>c]]
7811 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7812 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7813 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7814 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7817 <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>
7818 <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>
7819 <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>
7820 <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>
7826 [[http://www.example.com]]
7828 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7831 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7835 Plain link to URL with link text
7837 [[http://www.example.com Link text]]
7839 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7844 Plain link to protocol-relative URL
7846 [[//www.example.com]]
7848 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7851 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7855 Plain link to protocol-relative URL with link text
7857 [[//www.example.com Link text]]
7859 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7864 Plain link to page with question mark in title
7870 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7871 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7876 # I'm fairly sure the expected result here is wrong.
7877 # We want these to be URL links, not pseudo-pages with URLs for titles....
7878 # However the current output is also pretty screwy.
7881 # I'm changing it to match the current output--it arguably makes more
7882 # sense in the light of the test above. Old expected result was:
7883 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7885 # But I think this test is bordering on "garbage in, garbage out" anyway.
7890 Piped link to URL: [[http://www.example.com|an example URL]]
7892 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7895 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7899 BUG 2: [[page|http://url/]] should link to page, not http://url/
7901 [[Main Page|http://url/]]
7903 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7906 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7909 # Parsoid does not mark self-links, by design.
7911 BUG 337: Escaped self-links should be bold
7915 [[Bug462]] [[Bug462]]
7917 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7920 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7922 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7926 Self-link to section should not be bold
7930 [[Main Page#section]]
7932 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7943 Self-link to numeric title
7949 <p><strong class="selflink">0</strong>
7954 Link to numeric-equivalent title
7960 <p><a href="/wiki/00" title="00">00</a>
7965 <nowiki> inside a link
7967 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7969 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7974 Non-breaking spaces in title
7976 [[ Main Page ]]
7978 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7983 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7989 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7994 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
8000 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8005 Internal link with en linktrail: no apostrophes (bug 27473)
8011 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8016 Internal link with ca linktrail with apostrophes (bug 27473)
8022 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8027 Internal link with kaa linktrail with apostrophes (bug 27473)
8033 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8038 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8040 [[User:Foo/Test/63636:Bar|Test]]
8042 <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>
8045 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8048 ## Mainly a sanity check for Parsoid
8050 Handle title parsing for subpages
8059 ## FIXME: Add a working php section here
8061 Link to a subpage from a namespace other than main
8067 <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>
8071 Ensure that transclusion titles are not url-decoded
8073 subpage title=[[Test]]
8076 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8078 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8081 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8085 Purely hash wikilink
8087 title=[[User:test/123]]
8091 <p><a href="#a">b</a>
8094 <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>
8098 1. Interaction of linktrail and template encapsulation
8104 <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>
8108 2. Interaction of linktrail and template encapsulation
8112 {{echo|Some [[Fool]]}}s
8114 <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>
8118 3. Interaction of linktrail and template encapsulation
8122 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8124 <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>
8134 Internal link with is link prefix
8138 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8140 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8151 Internal link with is link trail and link prefix
8155 [[mótmælendatrú|xxx]]ar
8157 mótmælenda[[söfnuður]]
8158 mótmælenda[[söfnuður|söfnuðir]]
8159 mótmælenda[[söfnuður|söfnuðir]]xxx
8161 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8162 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8163 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8164 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8165 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8170 Parsoid link trail escaping
8172 parsoid=html2wt,html2html
8174 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8180 Parsoid link prefix escaping
8183 parsoid=html2wt,html2html
8185 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8187 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8191 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8199 [http://wp.org ''foo'']
8201 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8202 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8203 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8204 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8209 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8213 [[Foo|{{echo|a}} b {{echo|c}}]]
8215 <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>
8219 Link with angle bracket after anchor
8223 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8226 <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>
8230 ### Interwiki links (see maintenance/interwiki.sql)
8234 Inline interwiki link
8236 parsoid=wt2html,wt2wt,html2html
8238 [[MeatBall:SoftSecurity]]
8240 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8243 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8247 Inline interwiki link with empty title (bug 2372)
8249 parsoid=wt2html,wt2wt,html2html
8253 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8256 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8260 Interwiki link encoding conversion (bug 1636)
8262 *[[Wikipedia:ro:Olteniţa]]
8263 *[[Wikipedia:ro:Olteniţa]]
8265 <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>
8266 <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>
8270 <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>
8271 <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>
8276 Interwiki link with fragment (bug 2130)
8278 [[MeatBall:SoftSecurity#foo]]
8280 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8284 # Ideally the wikipedia: prefix here should be proto-relative too
8285 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8286 # define the 'en' prefix, and originally the test used 'wikipedia',
8287 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8290 Different interwiki prefixes mapping to the same URL
8298 [[:wikipedia:Foo|Foo]]
8300 [[wikipedia:en:Foo]]
8302 [[:wikipedia:en:Foo]]
8306 <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>
8308 <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>
8310 <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>
8312 <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>
8314 <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>
8316 <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>
8318 <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>
8322 Interwiki links that cannot be represented in wiki syntax
8325 [[meatball:ok#foo|ok with fragment]]
8326 [[meatball:ok_as_well?|ok ending with ? mark]]
8327 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8328 [http://de.wikipedia.org/wiki/#foo is just fragment]
8331 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8332 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8333 <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>
8334 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8335 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8338 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8339 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8340 <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>
8341 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8342 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8346 Interwiki links: trail
8348 [[wikipedia:Foo|Ba]]r
8350 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8353 <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>
8357 Local interwiki link
8359 parsoid=wt2html,wt2wt,html2html
8361 [[local:Template:Foo]]
8363 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8366 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8369 # Parsoid does not mark self-links, by design.
8371 Local interwiki link: self-link to current page
8374 parsoid=wt2html,wt2wt,html2html
8378 <p><strong class="selflink">local:Main Page</strong>
8381 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8385 Local interwiki link: prefix only (bug 64167)
8387 parsoid=wt2html,wt2wt,html2html
8391 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8394 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8398 Local interwiki link: with additional interwiki prefix (bug 61357)
8400 parsoid=wt2html,wt2wt,html2html
8402 [[local:meatball:Hello]]
8404 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8407 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8411 Multiple local interwiki link prefixes
8413 [[local:local:local:local:mi:local:Foo]]
8415 parsoid=wt2html,wt2wt,html2html
8417 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8420 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8424 ### Interlanguage links
8425 ### Language links (so that searching for '### language' matches..)
8437 <p>Blah blah blah</p>
8438 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8441 ## parsoid html2wt will lose the space variations
8443 Interlanguage link with spacing
8445 parsoid=wt2html,wt2wt,html2html
8453 <p>Blah blah blah</p>
8454 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8458 Double interlanguage link
8467 <p>Blah blah blah</p>
8468 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8469 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8472 ## parsoid html2wt will lose the space variations
8474 Interlanguage link variations
8476 parsoid=wt2html,wt2wt,html2html
8486 <p>Blah blah blah</p>
8487 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8488 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8489 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8492 ## parsoid html2wt will normalize the space to _
8494 Space and question mark encoding in interlanguage links (T95473)
8496 parsoid=wt2html,wt2wt,html2html
8504 <p>Blah blah blah</p>
8505 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8509 Interlanguage link, with prefix links
8519 <p>Blah blah blah</p>
8520 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8524 Double interlanguage link, with prefix links (bug 8897)
8535 <p>Blah blah blah</p>
8536 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8537 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8541 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8549 <p>Blah blah blah</p>
8550 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8553 ## PHP parser tests script needs an update
8554 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8556 Language links render as inline links if $wgInterwikiMagic=false
8558 wgInterwikiMagic=false
8559 parsoid=wt2html,wt2wt,html2html
8564 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8567 ## PHP parser tests script needs an update
8568 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8570 Language links render as inline links in the Talk namespace
8573 parsoid=wt2html,wt2wt,html2html
8578 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8582 Parsoid-specific test: Wikilinks with should RT properly
8588 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8593 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8595 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8597 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8598 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8600 He&nbsp;llo [[Foo|He&nbsp;llo]]
8602 He&nbsp;llo He&nbsp;llo
8604 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8605 </p><p>He&nbsp;llo He&nbsp;llo
8609 # html2wt will fail because of title normalization without data-parsoid
8611 Parsoid: handle constructor well
8613 parsoid=wt2html,wt2wt
8619 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8620 </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>
8623 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8625 <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>
8634 # Note that `ko` isn't a known interlanguage prefix
8636 Parsoid: recognize interlanguage links without a target page
8646 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8648 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8651 # Note that `ko` isn't a known interwiki prefix
8653 Parsoid: recognize interwiki links without a target page
8655 parsoid=wt2html,wt2wt,html2html
8661 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8662 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8665 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8666 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8670 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8674 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8677 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8681 Interlanguage link with preceding local interwiki link (bug 68085)
8683 parsoid=wt2html,wt2wt,html2html
8686 [[local:es:Spanish]]
8689 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8693 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8697 Looks like an interlanguage link, but is actually a local interwiki
8699 parsoid=wt2html,wt2wt,html2html
8705 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8709 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8713 ### Redirects, Parsoid-only
8717 1. Simple redirect to page
8719 #REDIRECT [[Main Page]]
8721 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8725 2. Other redirect variants
8727 #REDIRECT [[Main_Page]]
8729 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8732 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8733 # This tests the Parsoid bail-out code.
8735 3. Other redirect variants
8737 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8739 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8743 4. Redirect to a templated destination
8745 #REDIRECT [[{{echo|Foo}}bar]]
8747 <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"}]]}'/>
8753 parsoid=wt2html,wt2wt
8758 <li>REDIRECT [[]]</li></ol>
8762 Optional colon in #REDIRECT
8764 # the colon is archaic syntax. we support it for wt2html, but we
8765 # don't care that it roundtrips back to the modern syntax.
8766 parsoid=wt2html,html2html
8768 #REDIRECT:[[Main Page]]
8770 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8774 Whitespace in #REDIRECT with optional colon
8776 # the colon and gratuitous whitespace is archaic syntax. we support
8777 # it for wt2html, but we don't care that it roundtrips back to the
8778 # modern syntax (without extra whitespace)
8779 parsoid=wt2html,html2html
8786 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8790 Piped link in #REDIRECT
8792 # content after piped link is ignored. we support this syntax,
8793 # but don't care that the piped link is lost when we roundtrip this.
8796 #REDIRECT [[Main Page|bar]]
8798 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8802 Redirect to category (T104502)
8804 parsoid=wt2html,wt2wt
8806 #REDIRECT [[Category:Foo]]
8808 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8812 Redirect to category with URL encoding (T104502)
8816 #REDIRECT [[Category%3AFoo]]
8818 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8822 Redirect to category page
8824 #REDIRECT [[:Category:Foo]]
8826 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8830 Redirect to image page (1)
8832 #REDIRECT [[File:Wiki.png]]
8834 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8838 Redirect to image page (2)
8840 #REDIRECT [[Image:Wiki.png]]
8842 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8845 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8846 # Next test confirms this.
8848 Redirect to language (1) (T104918)
8850 parsoid=wt2html,wt2wt,html2html
8852 #REDIRECT [[en:File:Wiki.png]]
8854 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8858 Redirect to language (2) (T104918)
8860 #REDIRECT [[:en:File:Wiki.png]]
8862 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8866 Redirect to interwiki (T104918)
8868 #REDIRECT [[meatball:File:Wiki.png]]
8870 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8874 Non-English #REDIRECT
8878 #TILVÍSUN [[Main Page]]
8880 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8884 Redirect syntax under text isn't considered a redirect
8887 #redirect [[Main Page]]
8890 <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>
8893 # FIXME: Should hoist the redirect to the top of the page and ensure there
8900 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8920 Broken br tag sanitization
8928 # TODO: Fix html2html mode (bug 51055)!
8930 Parsoid: Broken br tag recognition
8943 Incorrecly removing closing slashes from correctly formed XHTML
8945 <br style="clear:both;" />
8947 <p><br style="clear:both;" />
8952 Failing to transform badly formed HTML into correct XHTML
8954 <br style="clear: left;">
8955 <br style="clear: right;">
8956 <br style="clear: both;">
8958 <p><br style="clear: left;" />
8959 <br style="clear: right;" />
8960 <br style="clear: both;" />
8964 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8965 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8967 Handling html with a div self-closing tag
8976 <p><div title />
8980 <p><div title=bar />
8981 <div title=bar/>
8983 <div title="bar/"></div>
8987 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8988 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8989 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8990 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8991 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8992 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8996 Handling html with a br self-closing tag
9023 Horizontal ruler (should it add that extra space?)
9038 Horizontal ruler -- 4+ dashes render hr
9047 Horizontal ruler -- eats additional dashes on the same line
9056 Horizontal ruler -- does not collapse dashes on consecutive lines
9067 Horizontal ruler -- <4 dashes render as plain text
9076 Horizontal ruler -- Supports content following dashes on same line
9088 ### Block-level elements
9097 <ul><li>Common list</li>
9099 <li>item 3</li></ul>
9110 <ol><li>Numbered list</li>
9112 <li> item 3</li></ol>
9126 ***#Number on level 4
9128 **#Number on level 3
9129 **#Number on level 3
9133 #** Level 3, but ordered
9136 <ol><li> with numbers</li></ol>
9137 <ul><li> and bullets</li></ul>
9138 <ol><li> and numbers</li></ol></li>
9140 <ul><li>bullet level 2
9141 <ul><li>bullet level 3
9142 <ol><li>Number on level 4</li></ol></li></ul></li>
9144 <ol><li>Number on level 3</li>
9145 <li>Number on level 3</li></ol></li></ul>
9146 <ol><li>number level 2</li></ol></li>
9148 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9149 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9154 1. Nested mixed wikitext and html list
9157 * <ul><li>ho</li></ul>
9162 <li> <ul><li>ho</li></ul></li>
9164 <ul><li> ho</li></ul></li></ul>
9168 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9170 <ul><li> ho</li></ul></li></ul>
9174 2. Nested mixed wikitext and html list (incompatible)
9177 : {{echo|<li>ho</li>}}
9180 <dd> <li>ho</li></dd></dl>
9184 <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>
9194 <ul><li>bar</li></ul></li></ul>
9204 <ul><li><ul><li>foo</li></ul></li>
9210 Nested lists 3 (first element empty)
9216 <ul><li>bar</li></ul></li></ul>
9221 Nested lists 4 (first element empty)
9226 <ul><li><ul><li></li></ul></li>
9232 Nested lists 5 (both elements empty)
9237 <ul><li><ul><li></li></ul></li>
9243 Nested lists 6 (both elements empty)
9249 <ul><li></li></ul></li></ul>
9254 Nested lists 7 (skip initial nesting levels)
9258 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9263 Nested lists 8 (multiple nesting transitions)
9271 <ul><li><ul><li> bar</li></ul></li>
9272 <li> baz</li></ul></li>
9278 Nested lists 9 (extension interaction)
9284 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9288 1. Lists with start-of-line-transparent tokens before bullets: Comments
9301 2. Lists with start-of-line-transparent tokens before bullets: Template close
9306 <ul><li>foo bar</li>
9312 List items are not parsed correctly following a <pre> block (bug 785)
9318 <ul><li> <pre>foo</pre></li>
9319 <li> <pre>bar</pre></li>
9323 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9324 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9329 List items from template
9340 * notSOL{{inner list}}
9343 <ul><li> item 1</li>
9344 <li> item 2</li></ul>
9345 <ul><li> item 0</li>
9347 <li> item 2</li></ul>
9348 <ul><li> item 0</li>
9351 <li> item 2</li></ul>
9356 List interrupted by empty line or heading
9364 <ul><li> foo</li></ul>
9365 <ul><li><ul><li> bar</li></ul></li></ul>
9366 <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>
9367 <ul><li> Another list item</li></ul>
9372 Multiple list tags generated by templates
9393 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9396 <!--This line will NOT split the list-->
9398 <!--This line will NOT split the list either-->
9400 <!--foo--> <!----> <!--This line NOT split the list either-->
9411 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9414 <!--This line will NOT split the list-->
9416 <!--This line will NOT split the list either-->
9418 <!--foo--> <!----> <!--This line NOT split the list
9431 (The PHP parser relies on Tidy for the hack)
9433 parsoid=wt2html,wt2wt
9437 * {{echo|<li>templated li-hack}}
9438 * <!--foo--> <li> unsupported li-hack with preceding comments
9441 <li><li>not a li-hack
9448 <li>templated li-hack</li>
9449 <li>unsupported li-hack with preceding comments</li>
9452 <li>not a li-hack</li>
9457 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9484 Parsoid: Test of whitespace serialization with Templated bullets
9491 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9495 # ------------------------------------------------------------------------
9496 # The next set of tests are about Parsoid's ability to handle badly nested
9497 # tags (parse, minimize scope of fixup, and roundtrip back)
9498 # ------------------------------------------------------------------------
9501 Unbalanced closing block tags break a list
9502 (php parser relies on Tidy to fix up)
9520 # Parsoid fails this test, but it might be tricky to support properly.
9523 Unbalanced closing non-block tags don't break a list
9524 (php parser relies on Tidy to fix up)
9531 <li><span>a</span></li>
9532 <li><span>b</span></li>
9546 Unclosed formatting tags that straddle lists are closed and reopened
9547 (php parser relies on Tidy to fix up)
9549 parsoid=wt2html,wt2wt,html2html
9559 <ol><li> <s> a</s></li>
9560 <li><s> b </s></li></ol>
9565 1. List embedded in a formatting tag
9572 <li><small>foo</small></li>
9582 ## Ugly Parsoid output here
9583 ## Not sure what the right output is.
9585 2. List embedded in a formatting tag
9592 <li><small>a</small></li>
9593 <li><small>b</small></li>
9600 <li><small>b</small></li>
9604 # Ugly Parsoid and PHP parser output here
9605 # Not sure if we want to make this a test!
9608 ## 3. Unclosed formatting tags in list elements
9614 ## <li><small>a</small></li>
9615 ## <li><small><small>b</small></small></li>
9619 ## <li><small>a</small></li>
9621 ## <li><small>b</small></li>
9625 # This is a bug in the PHP parser + tidy combination.
9626 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9627 # and then fostered out of the table by tidy.)
9628 # We believe the Parsoid output to be correct.
9630 Table with missing opening <tr> tag
9632 parsoid=wt2html,wt2wt
9650 # Note that the current date is hard-coded as
9651 # 1970-01-01T00:02:03Z (a Thursday)
9652 # when running parser tests. The timezone is also fixed to GMT, so
9653 # local date will be identical to current date.
9656 Magic Word: {{CURRENTDAY}}
9665 Magic Word: {{CURRENTDAY2}}
9674 Magic Word: {{CURRENTDAYNAME}}
9683 Magic Word: {{CURRENTDOW}}
9692 Magic Word: {{CURRENTMONTH}}
9701 Magic Word: {{CURRENTMONTH1}}
9710 Magic Word: {{CURRENTMONTHABBREV}}
9712 {{CURRENTMONTHABBREV}}
9719 Magic Word: {{CURRENTMONTHNAME}}
9721 {{CURRENTMONTHNAME}}
9728 Magic Word: {{CURRENTMONTHNAMEGEN}}
9730 {{CURRENTMONTHNAMEGEN}}
9737 Magic Word: {{CURRENTTIME}}
9746 Magic Word: {{CURRENTHOUR}}
9755 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9764 Magic Word: {{CURRENTYEAR}}
9773 Magic Word: {{CURRENTTIMESTAMP}}
9775 {{CURRENTTIMESTAMP}}
9782 Magic Words LOCAL (UTC)
9786 * {{LOCALMONTHNAME}}
9787 * {{LOCALMONTHNAMEGEN}}
9788 * {{LOCALMONTHABBREV}}
9797 * {{LOCALTIMESTAMP}}
9812 <li> 19700101000203</li></ul>
9817 Magic Word: {{FULLPAGENAME}}
9819 title=[[User:Ævar Arnfjörð Bjarmason]]
9823 <p>User:Ævar Arnfjörð Bjarmason
9828 Magic Word: {{FULLPAGENAMEE}}
9830 title=[[User:Ævar Arnfjörð Bjarmason]]
9834 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9839 Magic Word: {{TALKSPACE}}
9841 title=[[User:Ævar Arnfjörð Bjarmason]]
9850 Magic Word: {{TALKSPACE}}, same namespace
9852 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9861 Magic Word: {{TALKSPACE}}, main namespace
9863 title=[[Parser Test]]
9872 Magic Word: {{TALKSPACEE}}
9874 title=[[User:Ævar Arnfjörð Bjarmason]]
9883 Magic Word: {{SUBJECTSPACE}}
9885 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9894 Magic Word: {{SUBJECTSPACE}}, same namespace
9896 title=[[User:Ævar Arnfjörð Bjarmason]]
9905 Magic Word: {{SUBJECTSPACE}}, main namespace
9907 title=[[Parser Test]]
9915 Magic Word: {{SUBJECTSPACEE}}
9917 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9926 Magic Word: {{NAMESPACE}}
9928 title=[[User:Ævar Arnfjörð Bjarmason]]
9937 Magic Word: {{NAMESPACEE}}
9939 title=[[User:Ævar Arnfjörð Bjarmason]]
9948 Magic Word: {{NAMESPACENUMBER}}
9950 title=[[User:Ævar Arnfjörð Bjarmason]]
9959 Magic Word: {{SUBPAGENAME}}
9961 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9970 Magic Word: {{SUBPAGENAMEE}}
9972 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9981 Magic Word: {{ROOTPAGENAME}}
9983 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9987 <p>Ævar Arnfjörð Bjarmason
9992 Magic Word: {{ROOTPAGENAMEE}}
9994 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9998 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10003 Magic Word: {{BASEPAGENAME}}
10005 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10009 <p>Ævar Arnfjörð Bjarmason
10014 Magic Word: {{BASEPAGENAMEE}}
10016 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10020 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10025 Magic Word: {{TALKPAGENAME}}
10027 title=[[User:Ævar Arnfjörð Bjarmason]]
10031 <p>User talk:Ævar Arnfjörð Bjarmason
10036 Magic Word: {{TALKPAGENAMEE}}
10038 title=[[User:Ævar Arnfjörð Bjarmason]]
10042 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10047 Magic Word: {{SUBJECTPAGENAME}}
10049 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10051 {{SUBJECTPAGENAME}}
10053 <p>User:Ævar Arnfjörð Bjarmason
10058 Magic Word: {{SUBJECTPAGENAMEE}}
10060 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10062 {{SUBJECTPAGENAMEE}}
10064 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10069 Magic Word: {{NUMBEROFFILES}}
10078 Magic Word: {{PAGENAME}}
10080 title=[[User:Ævar Arnfjörð Bjarmason]]
10084 <p>Ævar Arnfjörð Bjarmason
10089 Magic Word: {{PAGENAME}} with metacharacters
10091 title=[['foo & bar = baz']]
10095 <p><i>'foo & bar = baz'</i>
10098 <p><i>'foo & bar = baz'</i></p>
10102 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10104 title=[[*RFC 1234 http://example.com/]]
10108 <p>*RFC 1234 http://example.com/
10111 <p>*RFC 1234 http://example.com/</p>
10115 Magic Word: {{PAGENAMEE}}
10117 title=[[User:Ævar Arnfjörð Bjarmason]]
10121 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10126 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10128 title=[[*RFC 1234 http://example.com/]]
10132 <p>*RFC_1234_http://example.com/
10135 <p>*RFC_1234_http://example.com/</p>
10139 Magic Word: {{REVISIONID}}
10148 Magic Word: {{SCRIPTPATH}}
10156 Magic Word: {{STYLEPATH}}
10165 Magic Word: {{SERVER}}
10169 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10174 Magic Word: {{SERVERNAME}}
10183 Magic Word: {{SITENAME}}
10192 Case-sensitive magic words, when cased differently, should just be template transclusions
10199 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10200 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10201 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10202 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10207 Case-insensitive magic words should still work with weird casing.
10217 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10221 # From plwiki:PLOS_ONE
10223 Parsoid: Page property magic word with magic word contents
10225 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10227 <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>"}]]}'/>
10231 Parsoid: Template-generated DISPLAYTITLE
10233 {{{{echo|DISPLAYTITLE}}:Foo}}
10235 <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}}]}'/>
10239 Namespace 1 {{ns:1}}
10248 Namespace 1 {{ns:01}}
10257 Namespace 0 {{ns:0}} (bug 4783)
10265 Namespace 0 {{ns:00}} (bug 4783)
10273 Namespace -1 {{ns:-1}}
10282 Namespace User {{ns:User}}
10291 Namespace User talk {{ns:User_talk}}
10300 Namespace User talk {{ns:uSeR tAlK}}
10309 Namespace File {{ns:File}}
10318 Namespace File {{ns:Image}}
10327 Namespace (lang=de) Benutzer {{ns:User}}
10338 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10344 <p>Benutzer Diskussion
10352 {{urlencode:hi world?!}}
10353 {{urlencode:hi world?!|WIKI}}
10354 {{urlencode:hi world?!|PATH}}
10355 {{urlencode:hi world?!|QUERY}}
10365 Magic Word: prioritize type info over data-parsoid
10369 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10375 Magic Word: serialize on separate line (parsoid)
10377 parsoid=wt2wt,html2wt
10383 foo<meta property="mw:PageProp/notoc"/>bar
10387 Magic Word: rt non-english wikis
10394 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10398 __proto__ is treated as normal wikitext (T105997)
10410 Magic links: internal link to RFC (bug 479)
10414 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10417 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10421 Magic links: RFC (bug 479)
10425 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10428 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10432 Magic links: RFC (bug 65278)
10434 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10436 <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.
10439 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10443 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10445 RFC      822
10449 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10454 <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>
10460 Magic links: ISBN (bug 1937)
10464 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10467 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10471 Magic links: ISBN (bug 65278)
10473 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10475 <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.
10478 <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>
10482 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10484 ISBN      978 0 316 09811 3
10490 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10497 <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>
10505 Magic links: PMID incorrectly converts space to underscore
10509 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10512 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10516 Magic links: PMID (bug 65278)
10518 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10520 <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.
10523 <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>
10527 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10529 PMID      1234
10533 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10538 <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>
10543 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10544 # since these are ExtLinkText, not MagicLinkText
10546 Magic links: use appropriate serialization for "almost" magic links.
10548 X[[Special:BookSources/0978739256|foo]]
10550 X[//tools.ietf.org/html/rfc1234 foo]
10552 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10553 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10556 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10557 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10561 Magic links: All disabled (T47942)
10563 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10569 <p>ISBN 0-306-40615-2
10580 Nonexistent template
10582 {{thistemplatedoesnotexist}}
10584 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10589 Template with invalid target containing tags
10591 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10593 <p>{{a<b>b</b>|foo|a=b|a = b}}
10598 Template with invalid target containing unclosed tag
10600 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10602 <p>{{a<b>|foo|a=b|a = b}}</b>
10607 Template with invalid target containing wikilink
10611 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10614 <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>
10618 Template with just whitespace in it, bug #68421
10622 <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>
10628 This is a test template
10636 <p>This is a test template
10641 Template with explicit namespace
10645 <p>This is a test template
10653 This is a test template with parameter {{{param}}}
10659 {{paramtest|param=foo}}
10661 <p>This is a test template with parameter foo
10666 Template:paramtestnum
10668 [[{{{1}}}|{{{2}}}]]
10672 Template unnamed parameter
10674 {{paramtestnum|Main Page|the main page}}
10676 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10681 Template:templatesimple
10687 Template:templateredirect
10689 #redirect [[Template:templatesimple]]
10693 Template:templateasargtestnum
10699 Template:templateasargtest
10701 {{template{{{templ}}}}}
10705 Template:templateasargtest2
10711 Template with template name as unnamed argument
10713 {{templateasargtestnum|templatesimple}}
10720 Template with template name as argument
10722 {{templateasargtest|templ=simple}}
10729 Template with template name as argument (2)
10731 {{templateasargtest2|templ=templatesimple}}
10738 Template:templateasargtestdefault
10740 {{{{{templ|templatesimple}}}}}
10750 Template with default value
10752 {{templateasargtestdefault}}
10759 Template with default value (value set)
10761 {{templateasargtestdefault|templ=templa}}
10770 {{templateredirect}}
10775 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10779 Template with argument in separate line
10781 {{ templateasargtest |
10789 Template with complex template as argument
10792 param ={{ templateasargtest |
10793 templ = simple }}}}
10795 <p>This is a test template with parameter (test)
10800 Template with thumb image (with link in description)
10802 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10804 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>
10807 <p>This is a test template with parameter</p>
10808 <div class="thumb tright">
10809 <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>
10810 <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>
10814 <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>
10818 Template:complextemplate
10820 {{{1}}} {{paramtest|
10821 param ={{{param}}}}}
10825 Template with complex arguments
10828 param ={{ templateasargtest |
10829 templ = simple }}|[[Template:complextemplate|link]]}}
10831 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10836 BUG 553: link with two variables in a piped link
10839 |[[{{{1}}}|{{{2}}}]]
10844 <td>[[{{{1}}}|{{{2}}}]]
10849 <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>
10854 Abort table cell attribute parsing on wikilink
10857 | testing [[one|two]] | three || four
10858 | testing one two | three || four
10859 | testing="[[one|two]]" | three || four
10864 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10870 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10876 <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>
10877 <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>
10878 <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>
10883 Don't abort table cell attribute parsing if wikilink is found in template arg
10886 | Test {{#tag:ref|One two "[[three]]" four}}
10890 <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>
10895 Magic variable as template parameter
10897 {{paramtest|param={{SITENAME}}}}
10899 <p>This is a test template with parameter MediaWiki
10906 [[{{{param}}}|link]]
10910 Template parameter as link source
10912 {{linktest|param=Main Page}}
10914 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10919 Template:paramtest2
10921 including another template, {{paramtest|param={{{arg}}}}}
10925 Template passing argument to another template
10927 {{paramtest2|arg='hmm'}}
10929 <p>including another template, This is a test template with parameter 'hmm'
10940 Template as link source
10944 [[{{linktest2}}|Main Page]]
10946 [[{{linktest2}}]]Page
10948 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10949 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10950 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10968 Template infinite loop
10972 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10977 Template from main namespace
10996 BUG 529: Template with table, not included at beginning of line
11015 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11035 BUG 41: Template parameters shown as broken links
11044 Template with targets containing wikilinks
11048 {{[[{{echo|foo}}]]}}
11050 {{{{echo|[[foo}}]]}}
11052 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11053 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11065 Templates: Double quotes as template target
11072 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11076 ## This test is about making sure Parsoid's data-mw is well formed in the
11077 ## face of multiple templates with intersecting and overlapping ranges. The
11078 ## wikitext itself is wretched.
11080 Templates with intersecting and overlapping ranges
11105 <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":""}]]}'>
11107 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11109 <tbody><tr><td>hi</td></tr>
11114 Template:MSGNW test
11116 ''None'' of '''this''' should be
11118 but rather passed unmodified
11126 # hmm, fix this or just deprecate msgnw and document its behavior?
11130 {{msgnw:MSGNW test}}
11132 <p>''None'' of '''this''' should be
11134  but rather passed unmodified
11135 {{test}}
11139 <!-- comment -->
11146 {{int:youhavenewmessages|lots of money|not!}}
11148 <p>You have lots of money (not!).
11153 int keyword - non-existing message
11164 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11168 <includeonly> and <noinclude> being included
11179 <onlyinclude>Foo</onlyinclude>bar
11183 <onlyinclude> being included
11195 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11199 <onlyinclude> and <includeonly> being included
11208 <includeonly> and <noinclude> on a page
11210 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11217 Un-closed <noinclude>
11224 <onlyinclude> on a page
11226 <onlyinclude>Foo</onlyinclude>bar
11233 Un-closed <onlyinclude>
11240 Self-closed noinclude, includeonly, onlyinclude tags
11251 Unbalanced includeonly and noinclude tags
11255 |b</noinclude></noinclude>
11256 |c</noinclude></includeonly>
11257 |d</includeonly></includeonly>
11266 <td>c</includeonly>
11268 <td>d</includeonly></includeonly>
11274 Template:Includeonly section
11277 ==Includeonly section==
11283 Bug 6563: Edit link generation for section shown by <includeonly>
11285 {{includeonly section}}
11287 <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>
11288 <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>
11292 # Uses same input as the contents of [[Template:Includeonly section]]
11294 Bug 6563: Section extraction for section shown by <includeonly>
11299 ==Includeonly section==
11307 Bug 6563: Edit link generation for section suppressed by <includeonly>
11310 ==Includeonly section==
11314 <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>
11319 Bug 6563: Section extraction for section suppressed by <includeonly>
11324 ==Includeonly section==
11332 Un-closed <includeonly>
11337 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11340 ## We used to, but no longer wt2wt this test since the default serializer
11341 ## will normalize the include directives to serialize on their own line.
11342 ## Selser will take care of preserving formatting in scenarios where they
11343 ## intermingled with other wikitext.
11345 Includes and comments at SOL
11347 parsoid=wt2html,html2html
11349 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11353 </noinclude>* stuff
11356 <includeonly>can have stuff</includeonly>=== here ===
11359 <h2><span class="mw-headline" id="hu">hu</span></h2>
11362 <ul><li> stuff</li>
11363 <li> here</li></ul>
11364 <h3><span class="mw-headline" id="here">here</span></h3>
11367 <!-- 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>
11369 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11371 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11372 <li> here</li></ul>
11374 <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>
11378 # TODO: test with DOM fragment reuse!
11380 Parsoid: DOM fragment reuse
11382 parsoid=wt2wt,wt2html
11384 a{{echo|b<table></table>c}}d
11396 <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>
11398 <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">
11399 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11400 </span><p about="#mwt2">cd</p>
11402 <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">
11404 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11406 </span><p about="#mwt3">b</p>
11410 Parsoid: Merge double tds (T52603)
11415 |{{echo|{{!}} foo}}
11419 <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>
11424 Parsoid: Merge double tds in nested transclusion content (T52603)
11430 |{{echo|{{!}} foo}}
11434 <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}}]}'>
11436 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11442 ### <includeonly> and <noinclude> in attributes
11445 0. includeonly around the entire attribute
11447 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11449 <p><span id="v2">bar</span>
11454 1. includeonly in html attr key
11456 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11458 <p><span id="foo">bar</span>
11463 2. includeonly in html attr value
11465 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11466 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11468 <p><span id="v1">bar</span>
11469 <span id="v1">bar</span>
11474 3. includeonly in part of an attr value
11476 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11478 <p><span style="color:red;">bar</span>
11483 4. includeonly in table attributes
11507 ### Token Stream Patcher tests
11509 ### These tests won't always pass wt2wt and other modes because
11510 ### on serialization, the table will be output on a new line.
11511 ### For now, we are blacklisting them, and using this to test selser.
11515 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11517 parsoid=wt2html,wt2wt
11519 {{echo|}}{| width = '100%'
11523 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11524 <tbody><tr><td>foo</td></tr>
11528 ## We used to, but no longer wt2wt this test since the default serializer
11529 ## will normalize the include directives to serialize on their own line.
11530 ## Selser will take care of preserving formatting in scenarios where they
11531 ## intermingled with other wikitext.
11533 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11537 <includeonly>a</includeonly>{| {{{b}}}
11541 <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":""}]]}'>
11542 <tbody><tr><td>c</td></tr>
11547 Table wikitext syntax outside wiki-tables
11551 ! not a table heading
11554 | class="foo bar" | baz
11562 ! not a table heading
11565 | class="foo bar" | baz
11574 ### Testing parsing of templates where a template arg
11575 ### has the same name as the template itself.
11581 {{{quote|{{{1}}}}}}
11585 Templates: Template Name/Arg clash: 1. Use of positional param
11594 Templates: Template Name/Arg clash: 2. Use of named param
11596 {{quote|quote=foo}}
11603 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11612 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11616 Templates: 1. Simple use
11625 Templates: 2. Inside a block tag
11627 <div>{{echo|Foo}}</div>
11628 <blockquote>{{echo|Foo}}</blockquote>
11631 <blockquote>Foo</blockquote>
11641 Templates: P-wrapping: 1a. Templates on consecutive lines
11652 Templates: P-wrapping: 1b. Templates on consecutive lines
11666 Templates: P-wrapping: 1c. Templates on consecutive lines
11669 {{echo|bar}} <div>baz</div>
11682 Templates: P-wrapping: 1d. Template preceded by comment-only line
11691 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11695 Templates: Inline Text: 1. Multiple template uses
11697 {{echo|Foo}}bar{{echo|baz}}
11704 Templates: Inline Text: 2. Back-to-back template uses
11706 {{echo|Foo}}{{echo|bar}}
11713 Templates: Block Tags: 1. Multiple template uses
11715 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11717 <div>Foo</div><div>bar</div><div>baz</div>
11722 Templates: Block Tags: 2. Back-to-back template uses
11724 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11726 <div>Foo</div><div>bar</div>
11730 # This is an edge case relating to paragraph wrapping.
11732 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11737 <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
11742 Templates: Links: 1. Simple example
11744 {{echo|[[Foo|bar]]}}
11746 <p><a href="/wiki/Foo" title="Foo">bar</a>
11751 Templates: Links: 2. Generation of link href
11753 [[{{echo|Foo}}|bar]]
11755 <p><a href="/wiki/Foo" title="Foo">bar</a>
11760 Templates: Links: 3. Generation of part of a link href
11762 [[Fo{{echo|o}}|bar]]
11764 [[Foo{{echo|bar}}]]
11766 [[Foo{{echo|bar}}baz]]
11768 [[Foo{{echo|bar}}|bar]]
11770 [[:Foo{{echo|bar}}]]
11772 [[:Foo{{echo|bar}}|bar]]
11774 <p><a href="/wiki/Foo" title="Foo">bar</a>
11775 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11776 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11777 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11778 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11779 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11784 Templates: Links: 4. Multiple templates generating link href
11786 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11788 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11793 Templates: Links: 5. Generation of link text
11795 [[Foo|{{echo|bar}}]]
11797 <p><a href="/wiki/Foo" title="Foo">bar</a>
11802 Templates: Links: 5. Nested templates (only outermost template should be marked)
11804 {{echo|[[{{echo|Foo}}|bar]]}}
11806 <p><a href="/wiki/Foo" title="Foo">bar</a>
11811 Templates: HTML Tag: 1. Generation of HTML attr. key
11813 <div {{echo|style}}="color:red;">foo</div>
11815 <div style="color:red;">foo</div>
11820 Templates: HTML Tag: 2. Generation of HTML attr. value
11822 <div style={{echo|'color:red;'}}>foo</div>
11824 <div style="color:red;">foo</div>
11829 Templates: HTML Tag: 3. Generation of HTML attr key and value
11831 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11833 <div style="color:red;">foo</div>
11838 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11840 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11842 <div title="This is a long title with just one piece templated">foo</div>
11847 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11849 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11851 <div title="This is a long title with just one piece templated">foo</div>
11856 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11858 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11860 <div title="This is a long title with just one piece templated">foo</div>
11864 # SSS FIXME: While it is great we added support for all this,
11865 # do we want to make this part of the spec? Maybe we want to
11866 # deprecate this kind of usage in the future?
11868 Templates: HTML Tag: 7. Generation of partial attribute key string
11870 <div st{{echo|yle}}="color:red;">foo</div>
11872 <div style="color:red;">foo</div>
11877 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11879 <div {{echo|1=id="v1"}}>bar</div>
11881 <div id="v1">bar</div>
11886 Templates: HTML Tag: 9. Multiple template-generated attributes
11888 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11890 <div id="v1" title="foo">bar</div>
11895 Templates: Support for templates generating attributes and content
11897 {| {{mixed_attr_content_template}}
11902 <table style="color:red;" title="T48811">
11912 <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|}"]}'>
11921 1. Entities and nowikis inside templated attributes should be handled correctly
11923 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11925 <div style="background:#f9f9f9;">foo</div>
11928 <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>
11932 2. Entities and nowikis inside templated attributes should be handled correctly
11935 |{{table_attribs_3}}
11940 <td style="background:#f9f9f9;">Foo
11945 <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>
11950 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11953 |{{table_attribs_3}}
11958 <td style="background:#f9f9f9;">Foo
11962 <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}}]}'>
11963 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11969 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11972 | {{table_attribs_6}} hi
11977 <td style="background: red;"> hi
11982 <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>
11987 Templates: HTML Tables: 1. Generating start of a HTML table
11989 {{echo|<table><tr><td>foo</td>}}</tr></table>
11991 <table><tr><td>foo</td></tr></table>
11996 Templates: HTML Tables: 2a. Generating middle of a HTML table
11998 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12000 <table><tr><td>foo</td></tr></table>
12005 Templates: HTML Tables: 2b. Generating middle of a HTML table
12007 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12009 <table><tr><td>foo</td></tr></table>
12014 Templates: HTML Tables: 3. Generating end of a HTML table
12016 <table><tr>{{echo|<td>foo</td></tr></table>}}
12018 <table><tr><td>foo</td></tr></table>
12023 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12025 {{echo|<table>}}<tr><td>foo</td></tr></table>
12027 <table><tr><td>foo</td></tr></table>
12032 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12034 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12036 <table><tr><td>foo</td></tr></table>
12041 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12043 <table><tr>{{echo|<td>}}foo</td></tr></table>
12045 <table><tr><td>foo</td></tr></table>
12050 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12052 <table><tr><td>foo{{echo|</td>}}</tr></table>
12054 <table><tr><td>foo</td></tr></table>
12059 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12061 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12063 <table><tr><td>foo</td></tr></table>
12068 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12070 <table><tr><td>foo</td></tr>{{echo|</table>}}
12072 <table><tr><td>foo</td></tr></table>
12077 Templates: HTML Tables: 5. Proper fostering of categories from inside
12079 parsoid=wt2html,wt2wt
12081 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12082 <!--Two categories (Bug 50330)-->
12083 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12085 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12086 <!--Two categories (Bug 50330)-->
12087 <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>
12091 Templates: Wiki Tables: 1a. Fostering of entire template content
12099 <tr><td></td></tr></table>
12111 Templates: Wiki Tables: 1b. Fostering of entire template content
12124 <tr><td></td></tr></table>
12138 Templates: Wiki Tables: 2. Fostering of partial template content
12148 <tr><td></td></tr></table>
12161 Templates: Wiki Tables: 3. td-content via multiple templates
12164 {{echo|{{pipe}}a}}{{echo|b}}
12175 Templates: Wiki Tables: 4. Templated tags, no content
12181 <tr><td></td></tr></table>
12186 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12200 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12213 ## This test case is very specific to Parsoid's internals
12214 ## and is hence only tested for Parsoid's code. Parsoid uses
12215 ## a <meta> marker tag for <ref> tags and they are expanded
12216 ## much later. We are verifying that this <meta> tag usage
12217 ## doesn't prevent foster parenting.
12219 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12221 {{PartialTable}}<ref>foo</ref>
12226 <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">
12230 <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>
12234 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12244 <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{{!}}}"]}'>
12245 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12249 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12254 Templates: Lists: Multi-line list-items via templates
12256 *{{echo|a {{nonexistent|
12258 *{{echo|b {{nonexistent|
12261 <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>
12262 <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>
12267 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12269 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12271 <p><i>ab</i>c<i>d</i>e
12276 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12277 (PHP parser generates misnested html)
12279 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12281 <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>
12285 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12286 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12288 parsoid=wt2html,wt2wt
12290 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12292 <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>
12293 <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>
12294 <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>
12298 Templates: Ugly nesting: 4. Divs opened/closed across templates
12300 a<div>b{{echo|c</div>d}}e
12311 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12317 |{{echo|foo</table>}}
12321 <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|}"]}'>
12325 <td>foo</td></tr></tbody></table><span about="#mwt1">
12326 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12331 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12341 <td>1. {{echo|foo </table>}}</td>
12343 <td>2. {{echo|baz </table>}}</td>
12356 <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>"]}'>
12361 <td>1. foo </td></tr></tbody></table></td>
12363 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12364 </span><span about="#mwt2">
12365 </span><span about="#mwt2">
12366 </span><span about="#mwt2">abc</span><span about="#mwt2">
12367 </span><span about="#mwt2">
12368 </span><span about="#mwt2">
12369 </span><span about="#mwt2">
12370 </span><span about="#mwt2">
12371 </span><span about="#mwt2">
12372 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12373 </span><span about="#mwt2">
12378 Templates: Ugly templates: 3. newline-only template parameter
12387 # This looks like a bug: a single newline triggers p/br for some reason.
12389 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12398 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12399 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12401 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12407 <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
12408 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12412 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12413 # that are "identical" and generate nesting cycles in the algorithm
12415 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12417 {{echo|<table><tr><td><table>}}
12421 <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"}'>
12422 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12423 </table></td></tr></tbody></table>
12427 Templates: Parameters substituted at the top-level
12429 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12431 <p><i>who</i> me? <b>never!</b>
12434 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12438 Parser Functions: 1. Simple example
12447 Parser Functions: 2. Nested use (only outermost should be marked up)
12456 ### Pre-save transform tests
12459 pre-save transform: subst:
12465 This is a test template
12469 pre-save transform: normal template
12479 pre-save transform: nonexistent template
12483 {{thistemplatedoesnotexist}}
12485 {{thistemplatedoesnotexist}}
12489 pre-save transform: subst magic variables
12498 # This is bug 89, which I fixed. -- wtm
12500 pre-save transform: subst: templates with parameters
12504 {{subst:paramtest|param="something else"}}
12506 This is a test template with parameter "something else"
12510 Template:nowikitest
12512 <nowiki>'''not wiki'''</nowiki>
12516 pre-save transform: nowiki in subst (bug 1188)
12520 {{subst:nowikitest}}
12522 <nowiki>'''not wiki'''</nowiki>
12526 Template:commenttest
12528 This template has <!-- a comment --> in it.
12532 pre-save transform: comment in subst (bug 1936)
12536 {{subst:commenttest}}
12538 This template has <!-- a comment --> in it.
12542 pre-save transform: unclosed tag
12546 <nowiki>'''not wiki'''
12548 <nowiki>'''not wiki'''
12552 pre-save transform: mixed tag case
12556 <NOwiki>'''not wiki'''</noWIKI>
12558 <NOwiki>'''not wiki'''</noWIKI>
12562 pre-save transform: unclosed comment in <nowiki>
12566 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12568 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12571 # Leading @ in this template definition works around a limitation
12572 # in parsoid's parserTests which otherwise strips the <span> from the
12573 # result (confusing it for a template wrapper)
12577 @<span onmouseover="alert('crap')">Oh no</span>
12581 (confirming safety of fix for subst bug 1936)
12583 {{Template:dangerous}}
12585 <p>@<span>Oh no</span>
12590 pre-save transform: comment containing gallery (bug 5024)
12594 <!-- <gallery>data</gallery> -->
12596 <!-- <gallery>data</gallery> -->
12600 pre-save transform: comment containing extension
12604 <!-- <tag>data</tag> -->
12606 <!-- <tag>data</tag> -->
12610 pre-save transform: comment containing nowiki
12614 <!-- <nowiki>data</nowiki> -->
12616 <!-- <nowiki>data</nowiki> -->
12620 pre-save transform: <noinclude> in subst (bug 3298)
12630 pre-save transform: <onlyinclude> in subst (bug 3298)
12634 {{subst:Includes2}}
12642 {{<includeonly>subst:</includeonly>Includes}}
12646 Template:SafeSubstTest
12648 {{<includeonly>safesubst:</includeonly>Includes}}
12652 bug 22297: safesubst: works during PST
12656 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12662 bug 22297: safesubst: works during normal parse
12671 subst: does not work during normal parse
12675 <p>{{subst:Includes}}
12680 pre-save transform: context links ("pipe trick")
12684 [[Article (context)|]]
12687 [[Bar:Article (context)|]]
12688 [[:Bar:Article (context)|]]
12690 [[|Article (context)]]
12694 [[Article (context)|Article]]
12695 [[Bar:Article|Article]]
12696 [[:Bar:Article|Article]]
12697 [[Bar:Article (context)|Article]]
12698 [[:Bar:Article (context)|Article]]
12700 [[Article (context)]]
12701 [[Bar:X (Y) Z|X (Y) Z]]
12702 [[:Bar:X (Y) Z|X (Y) Z]]
12706 pre-save transform: context links ("pipe trick") with interwiki prefix
12710 [[interwiki:Article|]]
12711 [[:interwiki:Article|]]
12712 [[interwiki:Bar:Article|]]
12713 [[:interwiki:Bar:Article|]]
12715 [[interwiki:Article|Article]]
12716 [[:interwiki:Article|Article]]
12717 [[interwiki:Bar:Article|Bar:Article]]
12718 [[:interwiki:Bar:Article|Bar:Article]]
12722 pre-save transform: context links ("pipe trick") with parens in title
12724 pst title=[[Somearticle (context)]]
12728 [[Article (context)|Article]]
12732 pre-save transform: context links ("pipe trick") with comma in title
12734 pst title=[[Someplace, Somewhere]]
12737 [[Otherplace, Elsewhere|]]
12738 [[Otherplace, Elsewhere, Anywhere|]]
12740 [[Otherplace, Somewhere|Otherplace]]
12741 [[Otherplace, Elsewhere|Otherplace]]
12742 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12746 pre-save transform: context links ("pipe trick") with parens and comma
12748 pst title=[[Someplace (IGNORED), Somewhere]]
12751 [[Otherplace (place), Elsewhere|]]
12753 [[Otherplace, Somewhere|Otherplace]]
12754 [[Otherplace (place), Elsewhere|Otherplace]]
12758 pre-save transform: context links ("pipe trick") with comma and parens
12760 pst title=[[Who, me? (context)]]
12763 [[Me, Myself, and I (1937 song)|]]
12765 [[Yes, you. (context)|Yes, you.]]
12766 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12770 pre-save transform: context links ("pipe trick") with namespace
12772 pst title=[[Ns:Somearticle]]
12776 [[Ns:Article|Article]]
12780 pre-save transform: context links ("pipe trick") with namespace and parens
12782 pst title=[[Ns:Somearticle (context)]]
12786 [[Ns:Article (context)|Article]]
12790 pre-save transform: context links ("pipe trick") with namespace and comma
12792 pst title=[[Ns:Somearticle, Context, Whatever]]
12796 [[Ns:Article, Context, Whatever|Article]]
12800 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12802 pst title=[[Ns:Somearticle, Context (context)]]
12806 [[Ns:Article (context)|Article]]
12810 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12812 pst title=[[Ns:Somearticle (IGNORED), Context]]
12816 [[Ns:Article, Context|Article]]
12820 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12824 [[Article(context)|]]
12825 [[Bar:Article(context)|]]
12826 [[:Bar:Article(context)|]]
12827 [[|Article(context)]]
12831 [[Article(context)|Article]]
12832 [[Bar:Article(context)|Article]]
12833 [[:Bar:Article(context)|Article]]
12834 [[Article(context)]]
12835 [[Bar:X(Y)Z|X(Y)Z]]
12836 [[:Bar:X(Y)Z|X(Y)Z]]
12840 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12844 [[Article (context)|]]
12845 [[Bar:Article (context)|]]
12846 [[:Bar:Article (context)|]]
12847 [[|Article (context)]]
12851 [[Article (context)|Article]]
12852 [[Bar:Article (context)|Article]]
12853 [[:Bar:Article (context)|Article]]
12854 [[Article (context)]]
12855 [[Bar:X (Y) Z|X (Y) Z]]
12856 [[:Bar:X (Y) Z|X (Y) Z]]
12860 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12864 [[Article(context)|]]
12865 [[Bar:Article(context)|]]
12866 [[:Bar:Article(context)|]]
12867 [[|Article(context)]]
12871 [[Article(context)|Article]]
12872 [[Bar:Article(context)|Article]]
12873 [[:Bar:Article(context)|Article]]
12874 [[Article(context)]]
12875 [[Bar:X(Y)Z|X(Y)Z]]
12876 [[:Bar:X(Y)Z|X(Y)Z]]
12880 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12884 [[Article (context), context|]]
12885 [[Article (context),context|]]
12886 [[Bar:Article (context), context|]]
12887 [[Bar:Article (context),context|]]
12888 [[:Bar:Article (context), context|]]
12889 [[:Bar:Article (context),context|]]
12891 [[Article (context), context|Article]]
12892 [[Article (context),context|Article]]
12893 [[Bar:Article (context), context|Article]]
12894 [[Bar:Article (context),context|Article]]
12895 [[:Bar:Article (context), context|Article]]
12896 [[:Bar:Article (context),context|Article]]
12900 pre-save transform: trim trailing empty lines
12904 Empty lines are trimmed
12910 Empty lines are trimmed
12914 pre-save transform: Signature expansion
12919 * <noinclude>~~~</noinclude>
12920 * <includeonly>~~~</includeonly>
12921 * <onlyinclude>~~~</onlyinclude>
12923 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12924 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12925 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12926 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12931 pre-save transform: Signature expansion in nowiki tags (bug 93)
12937 <nowiki>~~~~</nowiki>
12939 <includeonly><nowiki>~~~~</nowiki></includeonly>
12941 <noinclude><nowiki>~~~~</nowiki></noinclude>
12943 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12945 {{subst:Foo}} shall be converted to FOO
12947 As well as inside noinclude/onlyinclude
12948 <noinclude>{{subst:Foo}}</noinclude>
12949 <onlyinclude>{{subst:Foo}}</onlyinclude>
12951 But not inside includeonly
12952 <includeonly>{{subst:Foo}}</includeonly>
12956 <nowiki>~~~~</nowiki>
12958 <includeonly><nowiki>~~~~</nowiki></includeonly>
12960 <noinclude><nowiki>~~~~</nowiki></noinclude>
12962 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12964 FOO shall be converted to FOO
12966 As well as inside noinclude/onlyinclude
12967 <noinclude>FOO</noinclude>
12968 <onlyinclude>FOO</onlyinclude>
12970 But not inside includeonly
12971 <includeonly>{{subst:Foo}}</includeonly>
12975 Parsoid: Recognize nowiki with trailing space in tags
12979 <nowiki ><div>[[foo]]</nowiki >
12987 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12994 Parsoid: Recognize nowiki with odd capitalization
12998 <noWikI ><div>[[foo]]</Nowiki >
13000 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13005 Parsoid: Escape nowiki with trailing space in tags
13009 <p><nowiki > foo </nowiki ></p>
13010 <p>a<nowiki />b</p>
13011 <p>c<nowiki/ >d</p>
13013 <nowiki > foo </nowiki >
13021 Parsoid: Escape weird noWikI capitalizations
13025 <p><noWikI > foo </NoWikI ></p>
13027 <noWikI > foo </NoWikI >
13031 ### Message transform tests
13034 message transform: magic variables
13044 message transform: should not transform wiki markup
13054 message transform: <noinclude> in transcluded template (bug 4926)
13064 message transform: <onlyinclude> in transcluded template (bug 4926)
13074 {{#special:}} page name, known
13078 {{#special:Recentchanges}}
13080 Special:RecentChanges
13084 {{#special:}} page name with subpage, known
13088 {{#special:Recentchanges/param}}
13090 Special:RecentChanges/param
13094 {{#special:}} page name, unknown
13098 {{#special:foobar nonexistent}}
13100 Special:Foobar nonexistent
13104 {{#speciale:}} page name, known
13108 {{#speciale:Recentchanges}}
13110 Special:RecentChanges
13114 {{#speciale:}} page name with subpage, known
13118 {{#speciale:Recentchanges/param}}
13120 Special:RecentChanges/param
13124 {{#speciale:}} page name, unknown
13128 {{#speciale:foobar nonexistent}}
13130 Special:Foobar_nonexistent
13136 ### For Parsoid-specific tests, see
13137 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13142 parsoid=wt2html,wt2wt,html2html
13144 [[Image:foobar.jpg]]
13146 <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>
13149 <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>
13153 Simple image (using File: namespace, now canonical)
13155 [[File:Foobar.jpg]]
13157 <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>
13160 <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>
13164 Right-aligned image
13166 [[File:Foobar.jpg|right]]
13168 <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>
13171 <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>
13177 [[File:Foobar.jpg|right|Caption text]]
13179 <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>
13182 <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>
13186 Image with caption, bug 53312 #1
13188 [[File:Foobar.jpg|right|Caption page stuff]]
13190 <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>
13193 <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>
13197 Image with caption, bug 53312 #2
13199 [[File:Foobar.jpg|right|Caption page=]]
13201 <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>
13204 <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>
13208 Image with caption, bug 53312 #3
13210 [[File:Foobar.jpg|right|Caption page=stuff]]
13212 <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>
13215 <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>
13219 Allow empty links in image captions (Bug 60753)
13223 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13228 <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>
13231 <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>
13233 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13234 </figcaption></figure>
13238 Titles in unlinked images (T23454)
13240 [[File:Foobar.jpg|link=|stuff]]
13242 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13247 Link with empty target
13256 Image with link trail
13258 Linktrails should not work for images: [[File:Foobar.jpg]]s
13260 <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
13263 <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>
13267 Image with empty attribute
13269 parsoid=wt2html,wt2wt,html2html
13271 [[File:Foobar.jpg|right||Caption text]]
13273 <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>
13276 <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>
13280 1. Block image with individual attributes from templates
13282 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13284 <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>
13287 <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>
13291 2. Block Image with individual attributes from templates
13293 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13295 <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>
13298 <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>
13302 3. Inline image with individual attributes from templates
13304 [[File:Foobar.jpg|{{echo|50px}}]]
13306 <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>
13309 <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>
13312 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13313 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13315 Image with multiple attributes from the same template
13317 [[File:Foobar.jpg|{{image_attribs}}]]
13319 <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>
13322 <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>
13326 Image with link tails
13330 123[[File:Foobar.jpg]]456
13331 123[[File:Foobar.jpg|right]]456
13332 123[[File:Foobar.jpg|thumb]]456
13334 <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
13336 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
13337 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
13340 <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>
13342 <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>
13344 <div class="thumb tright">
13345 <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>
13346 <div class="thumbcaption">
13347 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13353 <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>
13354 <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>
13355 <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>
13359 Image with multiple captions -- only last one is accepted
13361 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13363 <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>
13366 <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>
13370 Image with multiple widths -- use last
13372 [[File:Foobar.jpg|200px|300px|caption]]
13374 <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>
13377 <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>
13381 Image with multiple alignments -- use first (bug 48664)
13385 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13387 [[File:Foobar.jpg|middle|text-top|caption]]
13389 <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>
13390 <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>
13393 <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>
13394 <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>
13398 Image with width attribute at different positions
13400 [[File:Foobar.jpg|200px|right|Caption]]
13401 [[File:Foobar.jpg|right|200px|Caption]]
13402 [[File:Foobar.jpg|right|Caption|200px]]
13404 <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>
13405 <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>
13406 <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>
13409 <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>
13410 <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>
13411 <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>
13414 # a sad bit of backward-compatibility
13416 Image with size specified with pxpx (bug 13500, 51628)
13418 parsoid=wt2html,wt2wt,html2html
13420 [[File:Foobar.jpg|20pxpx]]
13421 [[File:Foobar.jpg|200x20pxpx]]
13423 <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>
13424 <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>
13427 <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>
13431 Image with link parameter, wiki target
13433 [[File:Foobar.jpg|link=Main Page]]
13435 <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>
13438 <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>
13441 # parsoid bug 49293 (part 1)
13443 Image with link parameter, URL target
13445 [[File:Foobar.jpg|link=http://example.com/]]
13447 <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>
13450 <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>
13453 # parsoid bug 49293 (part 2)
13455 Image with link parameter, protocol-less URL target
13457 [[File:Foobar.jpg|link=//example.com/]]
13459 <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>
13462 <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>
13466 Escaping non-block captions (T107435)
13469 "modes": ["wt2wt"],
13471 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13475 [[Image:Foobar.jpg|caption]]
13477 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13480 # wgExternalLinkTarget not supported by Parsoid
13482 Image with link parameter, wgExternalLinkTarget
13484 [[Image:foobar.jpg|link=http://example.com/]]
13486 wgExternalLinkTarget='foobar'
13488 <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>
13493 Image with link parameter, wgNoFollowLinks set to false
13495 [[Image:foobar.jpg|link=http://example.com/]]
13497 wgNoFollowLinks=false
13499 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13504 Image with link parameter, wgNoFollowDomainExceptions
13506 [[Image:foobar.jpg|link=http://example.com/]]
13508 wgNoFollowDomainExceptions='example.com'
13510 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13514 # wgExternalLinkTarget not supported by Parsoid
13516 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13518 [[Image:foobar.jpg|link=http://example.com/|Title]]
13520 wgExternalLinkTarget='foobar'
13522 <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>
13527 Image with empty link parameter
13529 [[File:Foobar.jpg|link=]]
13531 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13534 <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>
13538 Image with link parameter (wiki target) and unnamed parameter
13540 [[File:Foobar.jpg|link=Main_Page|Title]]
13542 <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>
13545 <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>
13549 Image with link parameter (URL target) and unnamed parameter
13551 [[File:Foobar.jpg|link=http://example.com/|Title]]
13553 <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>
13556 <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>
13560 Thumbnail image with link parameter
13563 parsoid=wt2html,wt2wt,html2html
13565 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13567 <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>
13570 <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>
13574 Manually-specified thumbnail image
13578 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13580 <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>
13583 <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>
13587 Manually-specified thumbnail image with explicit link to wiki page
13590 parsoid=wt2html,wt2wt,html2html
13592 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13594 <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>
13597 <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>
13601 Manually-specified thumbnail image with explicit link to url
13604 parsoid=wt2html,wt2wt,html2html
13606 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13608 <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>
13611 <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>
13615 Manually-specified thumbnail image with explicit no link
13618 parsoid=wt2html,wt2wt,html2html
13620 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13622 <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>
13625 <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>
13629 Manually-specified thumbnail image with explicit link and alt text
13632 parsoid=wt2html,wt2wt,html2html
13634 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13636 <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>
13639 <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>
13643 Image with frame and link
13645 parsoid=wt2html,wt2wt,html2html
13647 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13649 <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>
13652 <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>
13656 Image with frame and link and explicit alt
13658 parsoid=wt2html,wt2wt,html2html
13660 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13662 <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>
13665 <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>
13669 Image with wiki markup in implicit alt
13671 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13673 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13675 <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>
13676 </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>
13679 <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>
13681 <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>
13685 Alt image option should handle most kinds of wikitext without barfing
13687 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13689 <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>
13692 <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>
13695 ###################
13696 # Conflicting image format options.
13697 # First option specified should 'win'.
13698 # All three cases in each test should be identical.
13701 Image with 'frameless' first.
13703 parsoid=wt2html,wt2wt,html2html
13705 [[File:Foobar.jpg|frameless|caption]]
13707 [[File:Foobar.jpg|frameless|frame|caption]]
13709 [[File:Foobar.jpg|frameless|thumb|caption]]
13711 <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>
13712 </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>
13713 </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>
13716 <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>
13717 <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>
13718 <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>
13722 Image with 'frame' first.
13724 parsoid=wt2html,wt2wt,html2html
13726 [[File:Foobar.jpg|frame|caption]]
13727 [[File:Foobar.jpg|frame|frameless|caption]]
13728 [[File:Foobar.jpg|frame|thumb|caption]]
13730 <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>
13731 <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>
13732 <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>
13735 <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>
13736 <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>
13737 <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>
13741 Image with 'thumb' first.
13743 parsoid=wt2html,wt2wt,html2html
13745 [[File:Foobar.jpg|thumb|caption]]
13746 [[File:Foobar.jpg|thumb|frameless|caption]]
13747 [[File:Foobar.jpg|thumb|frame|caption]]
13749 <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>
13750 <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>
13751 <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>
13754 <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>
13755 <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>
13756 <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>
13759 ###################
13761 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13762 # and https://phabricator.wikimedia.org/T64258
13763 # Foobar has actual size of 1941x220
13764 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13765 # a scalable format.
13766 # 2. Framed images always ignore size options; always render at default size.
13767 # 3. "Unspecified format" and border are the only types which can be
13771 Image: "unspecified format" and border enlarge
13773 parsoid=wt2html,wt2wt,html2html
13775 [[File:Foobar.jpg|2000px]]
13777 [[File:Foobar.jpg|border|2000px]]
13779 <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>
13780 </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>
13783 <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>
13784 <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>
13788 Image: "unspecified format" and border reduce
13790 parsoid=wt2html,wt2wt,html2html
13792 [[File:Foobar.jpg|1000px]]
13794 [[File:Foobar.jpg|border|1000px]]
13796 <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>
13797 </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>
13800 <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>
13801 <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>
13805 Image: thumbs reduce
13807 parsoid=wt2html,wt2wt,html2html
13809 [[File:Foobar.jpg|thumb|50px]]
13811 <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>
13814 <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>
13818 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13820 parsoid=wt2html,wt2wt,html2html
13822 [[File:Foobar.jpg|thumb|2000px]]
13824 [[File:Foobar.svg|thumb|2000px]]
13826 <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>
13827 <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>
13830 <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>
13831 <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>
13835 Image: frameless can reduce in size
13837 parsoid=wt2html,wt2wt,html2html
13839 [[File:Foobar.jpg|frameless|50px]]
13841 <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>
13844 <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>
13848 Image: bitmap frameless can't be enlarged past original size, but vector can
13850 parsoid=wt2html,wt2wt,html2html
13852 [[File:Foobar.jpg|frameless|2000px]]
13854 [[File:Foobar.svg|frameless|2000px]]
13856 <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>
13857 </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>
13860 <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>
13861 <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>
13865 Image: framed images are always unscaled.
13867 parsoid=wt2html,wt2wt,html2html
13869 [[File:Foobar.jpg|frame]]
13871 [[File:Foobar.jpg|frame|50px]]
13873 [[File:Foobar.jpg|frame|50x50px]]
13875 [[File:Foobar.jpg|frame|2000px]]
13877 <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>
13878 <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>
13879 <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>
13880 <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>
13883 <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>
13884 <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>
13885 <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>
13886 <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>
13889 ###################
13892 Link to image page- image page normally doesn't exists, hence edit link
13893 Add test with existing image page
13894 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13898 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13903 bug 18784 Link to non-existent image page with caption should use caption as link text
13905 [[:Image:test|caption]]
13907 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13912 Frameless image caption with a free URL
13914 [[File:Foobar.jpg|http://example.com]]
13916 <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>
13919 <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>
13923 Thumbnail image caption with a free URL
13927 [[File:Foobar.jpg|thumb|http://example.com]]
13929 <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>
13932 <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>
13936 Thumbnail image caption with a free URL and explicit alt
13939 parsoid=wt2html,wt2wt,html2html
13941 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13943 <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>
13946 <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>
13950 SVG thumbnails with no language set
13953 [[File:Foobar.svg|thumb|caption]]
13955 <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>
13958 <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>
13962 SVG thumbnails with language de
13964 parsoid=wt2html,wt2wt,html2html
13966 [[File:Foobar.svg|thumb|caption|lang=de]]
13968 <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>
13971 <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>
13975 SVG thumbnails with invalid language code
13977 parsoid=wt2html,wt2wt,html2html
13979 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13981 <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>
13984 <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>
13988 BUG 1887: A ISBN with a thumbnail
13990 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13992 <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>
13995 <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>
13999 BUG 1887: A RFC with a thumbnail
14001 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14003 <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>
14006 <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>
14010 BUG 1887: A mailto link with a thumbnail
14012 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14014 <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>
14017 <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>
14020 # Pending resolution to bug 368
14022 BUG 648: Frameless image caption with a link
14024 [[File:Foobar.jpg|text with a [[link]] in it]]
14026 <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>
14029 <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>
14033 BUG 648: Frameless image caption with a link (suffix)
14035 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14037 <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>
14040 <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>
14044 BUG 648: Frameless image caption with an interwiki link
14046 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14048 <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>
14051 <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>
14055 BUG 648: Frameless image caption with a piped interwiki link
14057 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14059 <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>
14062 <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>
14066 T107474: Frameless image caption with <nowiki>
14068 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14070 <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>
14074 Escape HTML special chars in image alt text
14076 [[File:Foobar.jpg|& < > "]]
14078 <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>
14081 <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>
14085 Entities in file name and attributes
14087 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14089 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14092 <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>
14096 BUG 499: Alt text should have Ӓ, not &1234;
14098 [[File:Foobar.jpg|♀]]
14100 <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>
14103 <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>
14107 Broken image caption with link
14109 parsoid=wt2html,wt2wt,html2html
14111 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14113 <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.
14116 <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>
14120 Image caption containing another image
14122 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14124 <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>
14127 <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>
14131 Image: caption containing a newline
14133 [[File:Foobar.jpg|This
14136 <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>
14139 <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>
14143 Image: caption containing leading space
14144 (The leading space should not trigger nowiki escaping in wt2wt mode)
14146 [[File:Foobar.jpg|thumb| bar]]
14148 <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>
14151 <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>
14155 Image: caption containing a table
14157 parsoid=wt2html,wt2wt,html2html
14159 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14165 and some more text.]]
14167 <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>
14170 <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
14173 <tr><th>Foo </th><th>Bar</th></tr>
14176 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14180 Bug 3090: External links other than http: in image captions
14182 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14184 <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>
14187 <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>
14193 parsoid=wt2html,wt2wt,html2html
14195 [[Image:foobar.jpg|a|class=b]]
14197 <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>
14200 <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>
14204 Localized image handling (1).
14206 parsoid=wt2html,wt2wt,html2html
14209 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14211 <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>
14214 <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>
14218 Localized image handling (2).
14221 parsoid=wt2html,wt2wt,html2html
14224 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14226 <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>
14229 <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>
14233 Localized image handling (3).
14238 <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>
14240 [[File:Foobar.jpg|بندانگشتی]]
14244 "border", "frameless" and "class" attributes on an image.
14247 parsoid=wt2html,wt2wt,html2html
14249 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14251 <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>
14254 <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>
14257 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14259 Invalid image attributes (bug 62500)
14262 parsoid=wt2html,wt2wt,html2html
14264 [[File:Foobar.jpg|thumb|float|left|caption]]
14266 [[File:Foobar.jpg|thumb|righ|caption]]
14268 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14270 <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>
14271 <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>
14272 <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>
14275 <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>
14276 <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>
14277 <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>
14283 #REDIRECT [[File:Barfoo.jpg]]
14286 # FIXME: Parsoid should run this test -- but we'd need to teach the
14287 # mockAPI about the redirected Barfoo.jpg image.
14291 [[Image:Barfoo.jpg]]
14293 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14298 Missing image with uploads disabled
14302 [[File:Foobaz.jpg]]
14304 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14307 <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>
14310 # Parsoid-specific testing for images
14311 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14312 # Currently imperfect due to a flaw in the Parsoid testrunner
14314 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14318 Parsoid-specific image handling - simple image with size and middle alignment
14320 [[File:Foobar.jpg|middle|50px]]
14322 <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>
14326 Parsoid-specific image handling - simple image with size, middle alignment,
14327 non-standard namespace alias
14329 parsoid=wt2wt,wt2html,html2html
14331 [[Image:Foobar.jpg|middle|50px]]
14333 <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>
14337 Parsoid-specific image handling - simple image with size and middle alignment
14340 [[File:Foobar.jpg|50px|middle]]
14342 <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>
14346 Parsoid-specific image handling - simple image with size and middle alignment
14347 and non-standard namespace name
14349 parsoid=wt2html,wt2wt,html2html
14351 [[Image:Foobar.jpg|50px|middle]]
14353 <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>
14357 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14359 [[File:Foobar.jpg|500x10px|baseline|caption]]
14361 <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>
14365 Parsoid-specific image handling - simple image with border and size spec
14367 [[File:Foobar.jpg|50px|border|caption]]
14369 <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>
14373 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14375 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14377 <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>
14381 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14384 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14386 <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>
14390 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14392 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14394 <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>
14398 Parsoid-specific image handling - thumbnail with specific size, halign,
14399 valign, and caption (existing content)
14401 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14403 <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>
14407 Parsoid-specific image handling - framed image with specific size and caption
14410 parsoid=wt2html,wt2wt,html2html
14412 [[File:Foobar.jpg|frame|500x50px|caption]]
14414 <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>
14418 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14421 parsoid=wt2html,wt2wt,html2html
14423 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14425 <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>
14429 Parsoid-specific image handling - frameless image with specific size, border, and caption
14431 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14433 <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>
14437 Parsoid-specific image handling - simple image with a formatted caption
14439 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14441 <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>
14445 Parsoid-specific image handling - caption with a template in it
14447 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14449 <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>
14453 Parsoid-specific image handling - caption with unbalanced tags in it
14455 parsoid=wt2html,wt2wt,html2html
14458 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14462 <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>
14467 Parsoid-specific image handling - empty caption (1)
14469 parsoid=wt2html,wt2wt
14471 [[File:Foobar.jpg|thumb|]]
14473 <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>
14476 # empty captions don't get serialized unless we're in the "round trip" case
14478 Parsoid-specific image handling - empty caption (2)
14482 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14483 <a href="./File:Foobar.jpg">
14484 <img resource="./File:Foobar.jpg"
14485 src="//example.com/images/3/3a/Foobar.jpg"
14486 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14487 height="25" width="220"/>
14489 <figcaption></figcaption>
14492 [[File:Foobar.jpg|thumb]]
14496 Parsoid-specific image handling - whitespace caption
14498 [[File:Foobar.jpg|thumb| ]]
14500 <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>
14504 Parsoid-specific image handling - lang option
14507 [[File:Foobar.svg|lang=de|caption]]
14511 <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>
14515 ## Edge case bugs in Parsoid from T93580
14517 T93580: 1. Templated <ref> inside block images
14519 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14523 <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>
14525 <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>
14529 T93580: 2. <ref> inside inline images
14531 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14535 <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>
14537 <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>
14541 T93580: 3. Templated <ref> inside inline images
14543 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|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: {{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>
14549 <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>
14556 Subpage test/subpage
14564 subpage title=[[Subpage test]]
14568 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14573 Subpage noslash link
14575 subpage title=[[Subpage test]]
14579 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14584 Subpage test/1/2/subpage
14590 Relative subpage noslash link
14592 parsoid=wt2wt,wt2html,html2html
14593 subpage title=[[Subpage test/1/2/3/4]]
14599 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14600 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14603 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14604 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14608 Parsoid: dot-slash prefixed wikilinks
14618 </p><p>[[././baz/]]
14623 </p><p>[[././baz/]]
14628 Render invalid page names as plain text (bug 51090)
14641 [[{{echo|./../foo}}|bar]]
14642 [[{{echo|foo/.}}|bar]]
14643 [[{{echo|foo/..}}|bar]]
14644 [[{{echo|foo~~~~bar}}]]
14645 [[{{echo|foo>bar}}]]
14646 [[{{echo|foo././bar}}]]
14647 [[{{echo|foo{bar}}]]
14648 [[{{echo|foo}bar}}]]
14649 [[{{echo|foo[bar}}]]
14650 [[{{echo|foo]bar}}]]
14651 [[{{echo|foo<bar}}]]
14653 <p>[[./../foo|bar]]
14663 </p><p>[[./../foo|bar]]
14676 <p>[[./../foo|bar]]
14687 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14688 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14689 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14690 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14691 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14692 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14693 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14694 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14695 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14696 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14697 [[<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>
14705 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14710 BUG 561: {{/Subpage}}
14712 subpage title=[[Page]]
14716 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14724 Category:MediaWiki User's Guide
14732 [[:Category:MediaWiki User's Guide]]
14734 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14743 [[Category:MediaWiki User's Guide]]
14745 cat=MediaWiki_User's_Guide sort=
14747 <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"}}'/>
14751 PAGESINCATEGORY invalid title fatal (r33546 fix)
14753 {{PAGESINCATEGORY:<bogus>}}
14760 Category with different sort key
14764 [[Category:MediaWiki User's Guide|Foo]]
14766 cat=MediaWiki_User's_Guide sort=Foo
14768 <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"}}'/>
14772 Category with identical sort key
14776 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14778 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14780 <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"}}'/>
14784 Category with empty sort key
14789 [[Category:MediaWiki User's Guide|]]
14791 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14795 Category with empty sort key and parentheses
14800 [[Category:Foo (bar)|]]
14802 [[Category:Foo (bar)|Foo]]
14806 Category with link tail
14811 123[[Category:Foo]]456
14813 123[[Category:Foo]]456
14817 Category with template
14822 [[Category:{{echo|Foo}}]]
14824 [[Category:{{echo|Foo}}]]
14828 Category with template in sort key
14833 [[Category:Foo|{{echo|Bar}}]]
14835 [[Category:Foo|{{echo|Bar}}]]
14839 Category with template in sort key and title
14844 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14846 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14849 ## We used to, but no longer wt2wt this test since the default serializer
14850 ## will normalize all categories to serialize on their own line.
14851 ## This wikitext usage is going to be fairly uncommon in production and
14852 ## selser will take care of preserving formatting in those scenarios.
14854 Category / paragraph interactions
14858 Foo [[Category:Baz]] Bar
14860 Foo [[Category:Baz]]
14868 [[Category:Baz]] Bar
14881 {{echo|[[Category:Baz]]}}
14894 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14895 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14896 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14897 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14898 <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>
14899 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14902 ## We used to, but no longer wt2wt this test since the default serializer
14903 ## will normalize all categories to serialize on their own line.
14904 ## This wikitext usage is going to be fairly uncommon in production and
14905 ## selser will take care of preserving formatting in those scenarios.
14907 ## The whitespace on the empty line is part of the test. Please do not delete
14909 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14915 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14917 {{echo|[[Category:Foo]] and so should this!}}
14919 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14924 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14926 <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>
14929 ## Parsoid will not try to wt2wt this while preserving newlines because
14930 ## it suppresses excess newlines within list items -- and we don't want to
14931 ## introduce a special case just for categories, which is, in reality somewhat
14932 ## odd behavior -- categories are unlikely to be used in list items like this
14933 ## in top-level pages and are only likely to show up in template-generated
14934 ## list items where this RT-ing is a non-issue.
14936 ## The whitespace on the empty line is part of the test. Please do not delete
14938 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14944 [[Category:Foo]] and this should be part of the same list item
14947 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14949 <ul><li>This and this should be part of the same list item</li>
14950 <li>So should this and this should be part of the same list item</li></ul>
14953 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14954 <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>
14958 ## Newlines and categories that follow the last item of a list
14959 ## are treated differently because this (list followed by categories)
14960 ## is an extremely common pattern on wikis.
14962 3. Categories and newlines: newline suppression for last list item should RT properly
14975 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14977 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14978 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14982 4. Categories and newlines: newline suppression for last list item should RT properly
14990 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14992 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14995 ## only wt2html for this to make sure the algo only applies to the rightmost path
14997 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15010 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15012 <ul><li> d</li></ul></li></ul>
15013 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15016 ## We used to, but no longer wt2wt this test since the default serializer
15017 ## will normalize all categories to serialize on their own line.
15018 ## This wikitext usage is going to be fairly uncommon in production and
15019 ## selser will take care of preserving formatting in those scenarios.
15021 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15025 * a [[Category:Foo]]
15027 <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>
15030 # This test also demonstrates because of newline+category tunneling
15031 # through the list hander, template wrapping doesn't expand to the
15032 # containing list when the list item swallows the category.
15034 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15039 <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
15040 </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>
15044 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15048 {{echo|[[Category:Foo]]
15052 <ul><li> a</li></ul>
15054 <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">
15055 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15056 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15060 Category links with multiple namespaces
15062 [[Category:Project:Foo]]
15064 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15068 Parsoid: Serialize link to category page with colon escape
15074 [[:Category:Foo|Bar]]
15077 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15078 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15082 # We used to, but no longer wt2wt this test since the default serializer
15083 # will normalize all categories to serialize on their own line.
15084 # This wikitext usage is going to be fairly uncommon in production and
15085 # selser will take care of preventing whitespace insertion if this
15086 # occurs in an article.
15088 # html2html disabled for the same reason (whitespace insertion between
15091 # html2wt disabled because it localizes the "Category" namespace.
15093 Link prefix/suffixes aren't applied to category links
15103 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15107 Parsoid: Serialize link to file page with colon escape
15113 [[:File:Foo.png|Bar]]
15116 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15117 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15122 Parsoid: Serialize a genuine category link without colon escape
15127 [[Category:Foo|Bar]]
15129 <link rel="mw:PageProp/Category" href="./Category:Foo">
15130 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15134 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15138 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15140 [[Category:Toxine bactérienne]]
15144 Parsoid: Defaultsort
15146 {{DEFAULTSORT:Foo}}
15148 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15152 Parsoid: Defaultsort (template-generated)
15154 {{{{echo|DEFAULTSORT}}:Foo}}
15156 <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}}]}'/>
15160 ### Inter-language links
15163 Interlanguage links
15171 es:Alimento fr:Nourriture zh:食品
15173 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15174 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15175 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15179 Duplicate interlanguage links (bug 24502)
15190 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15191 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15192 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15193 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15200 Basic section headings
15207 ===Smaller headline===
15210 <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>
15213 <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>
15216 <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>
15222 Section headings with TOC
15225 === Subheadline 1 ===
15226 ===== Skipping a level =====
15227 ====== Skipping a level ======
15231 ===Another headline===
15233 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15235 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15237 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15239 <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>
15241 <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>
15248 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15250 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15256 <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>
15257 <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>
15258 <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>
15259 <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>
15260 <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>
15263 <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>
15268 TOC anchors don't collide
15276 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15278 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15279 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15280 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15281 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15285 <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>
15286 <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>
15287 <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>
15288 <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>
15292 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15294 Handling of sections up to level 6 and beyond
15297 == Level 2 Heading==
15298 === Level 3 Heading===
15299 ==== Level 4 Heading====
15300 ===== Level 5 Heading=====
15301 ====== Level 6 Heading======
15302 ======= Level 7 Heading=======
15303 ======== Level 8 Heading========
15304 ========= Level 9 Heading=========
15305 ========== Level 10 Heading==========
15307 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15309 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15311 <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>
15313 <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>
15315 <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>
15317 <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>
15319 <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>
15320 <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>
15321 <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>
15322 <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>
15323 <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>
15337 <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>
15338 <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>
15339 <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>
15340 <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>
15341 <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>
15342 <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>
15343 <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>
15344 <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>
15345 <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>
15346 <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>
15351 TOC regression (T11764)
15355 ==== title 1.1.1 ====
15360 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15362 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15364 <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>
15366 <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>
15369 <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>
15372 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15374 <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>
15380 <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>
15381 <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>
15382 <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>
15383 <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>
15384 <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>
15385 <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>
15390 TOC for heading containing <span id="..."></span> (T96153)
15393 ==<span id="old-anchor"></span>New title==
15395 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15397 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15401 <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>
15406 TOC with wgMaxTocLevel=3 (bug 6204)
15412 ==== title 1.1.1 ====
15417 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15419 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15421 <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>
15422 <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>
15425 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15427 <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>
15433 <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>
15434 <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>
15435 <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>
15436 <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>
15437 <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>
15438 <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>
15443 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15449 ====Section 1.1.1====
15450 ====Section 1.1.1.1====
15453 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15455 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15457 <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>
15460 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15464 <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>
15465 <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>
15466 <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>
15467 <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>
15468 <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>
15474 Resolving duplicate section names
15479 <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>
15480 <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>
15485 Resolving duplicate section names with differing case (bug 10721)
15490 <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>
15491 <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>
15503 Template with sections, __NOTOC__
15510 <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>
15511 <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>
15512 <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>
15513 <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>
15518 __NOEDITSECTION__ keyword
15524 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15525 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15530 Link inside a section heading
15532 ==Section with a [[Main Page|link]] in it==
15534 <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>
15539 TOC regression (T14077)
15546 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15548 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15550 <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>
15553 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15557 <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>
15558 <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>
15559 <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>
15564 BUG 1219 URL next to image (good)
15566 http://example.com [[File:Foobar.jpg]]
15568 <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>
15571 <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>
15575 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15578 The line above must have a trailing space!
15581 But just in case it doesn't...
15583 <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>
15584 <p>The line above must have a trailing space!
15586 <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>
15587 <p>But just in case it doesn't...
15592 Header with special characters (bug 25462)
15594 The tooltips shall not show entities to the user (ie. be double escaped)
15611 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15613 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15615 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15616 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15617 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15618 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15619 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15623 <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>
15626 <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>
15629 <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>
15632 <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>
15635 <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>
15641 Header with space, plus and underscore as entity
15643 Id should not contain + for spaces
15645 == Space between Text ==
15648 == Space-Entity between Text ==
15651 == Plus+between+Text ==
15654 == Plus-Entity+between+Text ==
15657 == Underscore_between_Text ==
15660 == Underscore-Entity_between_Text ==
15663 [[#Space between Text]]
15664 [[#Space-Entity between Text]]
15665 [[#Plus+between+Text]]
15666 [[#Plus-Entity+between+Text]]
15667 [[#Underscore_between_Text]]
15668 [[#Underscore-Entity_between_Text]]
15670 <p>Id should not contain + for spaces
15672 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15674 <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>
15675 <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>
15676 <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>
15677 <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>
15678 <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>
15679 <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>
15683 <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>
15686 <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>
15689 <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>
15692 <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>
15695 <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>
15698 <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>
15700 </p><p><a href="#Space_between_Text">#Space between Text</a>
15701 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15702 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15703 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15704 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15705 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15710 Headers with excess '=' characters
15711 (Are similar tests necessary beyond the 1st level?)
15715 =''italic'' heading==
15716 ==''italic'' heading=
15718 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15720 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15721 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15722 <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>
15723 <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>
15727 <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>
15728 <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>
15729 <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>
15730 <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>
15735 HTML headers vs TOC (bug 23393)
15736 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15748 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15750 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15752 <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>
15753 <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>
15756 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15758 <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>
15759 <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>
15765 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15766 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15767 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15768 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15769 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15770 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15775 Single-line or multiline-comments can follow headings
15777 parsoid=wt2html,wt2wt
15785 <h2><span class="mw-headline" id="foo">foo</span></h2>
15786 <h2><span class="mw-headline" id="bar">bar</span></h2>
15787 <h2><span class="mw-headline" id="baz">baz</span></h2>
15792 BUG 1219 URL next to image (broken)
15794 http://example.com[[File:Foobar.jpg]]
15796 <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>
15799 <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>
15803 Bug 1186 news: in the middle of text
15805 http://en.wikinews.org/wiki/Wikinews:Workplace
15807 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15813 Namespaced link must have a title
15822 Namespaced link must have a title (bad fragment version)
15824 [[Project:#fragment]]
15826 <p>[[Project:#fragment]]
15832 ### HTML tags and HTML attributes
15836 div with no attributes
15838 <div>HTML rocks</div>
15840 <div>HTML rocks</div>
15845 div with double-quoted attribute
15847 <div id="rock">HTML rocks</div>
15849 <div id="rock">HTML rocks</div>
15854 div with single-quoted attribute
15856 <div id='rock'>HTML rocks</div>
15858 <div id="rock">HTML rocks</div>
15863 div with unquoted attribute
15865 <div id=rock>HTML rocks</div>
15867 <div id="rock">HTML rocks</div>
15872 div with illegal double attributes
15874 <div id="a" id="b">HTML rocks</div>
15876 <div id="b">HTML rocks</div>
15881 div with empty attribute value, space before equals
15883 parsoid=wt2html,html2html
15885 <div class =>HTML rocks</div>
15887 <div class="">HTML rocks</div>
15890 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15894 div with multiple empty attribute values
15896 parsoid=wt2html,html2html
15898 <div id= title=>HTML rocks</div>
15900 <div id="title.3D">HTML rocks</div>
15903 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15907 table with multiple empty attribute values
15909 parsoid=wt2html,html2html
15915 <table title="id=">
15921 <table title="id=">
15922 <tbody><tr><td> hi</td></tr>
15927 div with braces in attribute value
15929 <div title="{}">Foo</div>
15931 <div title="{}">Foo</div>
15934 <div title="{}">Foo</div>
15938 div with empty attribute value, no space before equals
15940 parsoid=wt2html,html2html
15942 <div class=>HTML rocks</div>
15944 <div class="">HTML rocks</div>
15947 <div class="">HTML rocks</div>
15951 HTML multiple attributes correction
15953 <p class="error" class="awesome">Awesome!</p>
15955 <p class="awesome">Awesome!</p>
15960 Table multiple attributes correction
15963 !+ class="error" class="awesome"| status
15968 <th class="awesome"> status
15976 <DIV ID="x">HTML ROCKS</DIV>
15978 <div id="x">HTML ROCKS</div>
15983 Non-ASCII pseudo-tags are rendered as text
15992 Pseudo-tag with URL 'name' renders as url link
15994 <http://example.com/>
15996 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16001 text with amp in the middle of nowhere
16005 <p>Remember AT&T?
16010 text with character entity: eacute
16012 I always thought é was a cute letter.
16014 <p>I always thought é was a cute letter.
16017 <p>I always thought é was a cute letter.</p>
16021 text with entity-escaped character entity-like string: eacute
16023 I always thought &eacute; was a cute letter.
16025 <p>I always thought &eacute; was a cute letter.
16030 text with undefined character entity: xacute
16032 I always thought &xacute; was a cute letter.
16034 <p>I always thought &xacute; was a cute letter.
16041 <data value="5">five</data>
16042 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16043 <mark>This highlighted text</mark>
16045 <p><data value="5">five</data>
16046 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16047 <mark>This highlighted text</mark>
16052 HTML tag with leading space is parsed as text
16056 <p>< div>foo< /div>
16061 ### Nesting tests (see bug 41545, 50604, 51081)
16064 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16065 # Note that html2wt is considerably more difficult if we use <b> in
16066 # the test case, instead of <big>
16068 Ensure that HTML adoption agency algorithm is properly implemented.
16070 <big>X<big>Y</big>Z</big>
16072 <p><big>X<big>Y</big>Z</big>
16076 # This was bug 41545 in the PHP parser.
16077 # Note that tidy doesn't handle this correctly.
16081 <kbd>X<kbd>Y</kbd>Z</kbd>
16083 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16087 # The following cases were bug 51081 in the PHP parser.
16088 # Note that there are some other nestable tags (b, i, etc) which are
16089 # not covered; see bug 51081 for discussion.
16091 # Note that tidy doesn't handle this correctly.
16095 <em>X<em>Y</em>Z</em>
16097 <p><em>X<em>Y</em>Z</em>
16101 # Note that tidy doesn't handle this correctly.
16103 Nesting of <strong>
16105 <strong>X<strong>Y</strong>Z</strong>
16107 <p><strong>X<strong>Y</strong>Z</strong>
16116 <p><q>X<q>Y</q>Z</q></p>
16119 # Note that tidy doesn't handle this correctly.
16123 <ruby>X<ruby>Y</ruby>Z</ruby>
16125 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16129 # Note that tidy doesn't handle this correctly.
16133 <bdo>X<bdo>Y</bdo>Z</bdo>
16135 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16147 [[Media:Foobar.jpg]]
16149 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16154 Media link with text
16156 [[Media:Foobar.jpg|A neat file to look at]]
16158 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16162 # FIXME: this is still bad HTML tag nesting
16163 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16165 Media link with nasty text
16167 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16169 <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>
16172 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16173 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16177 Media link to nonexistent file (bug 1702)
16179 [[Media:No such.jpg]]
16181 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16186 Image link to nonexistent file (bug 1850 - good)
16188 [[File:No_such.jpg]]
16190 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16193 <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>
16197 :Image link to nonexistent file (bug 1850 - bad)
16199 [[:Image:No such.jpg]]
16201 <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>
16204 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16210 Character reference normalization in link text (bug 1938)
16212 [[Main Page|this&that]]
16214 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16221 Test for unicode normalization
16223 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16227 (bug 19451) Links should refer to the normalized form.
16235 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16236 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16237 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16238 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16239 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16244 Empty attribute crash test (bug 2067)
16246 <font color="">foo</font>
16248 <p><font color="">foo</font>
16253 Empty attribute crash test single-quotes (bug 2067)
16255 <font color=''>foo</font>
16257 <p><font color="">foo</font>
16262 Attribute test: equals, then nothing
16264 parsoid=wt2html,html2html
16266 <font color=>foo</font>
16268 <p><font color="">foo</font>
16271 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16275 Attribute test: unquoted value
16277 parsoid=wt2html,html2html
16279 <font color=x>foo</font>
16281 <p><font color="x">foo</font>
16284 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16288 Attribute test: unquoted but illegal value (hash)
16290 <font color=#x>foo</font>
16292 <p><font color="#x">foo</font>
16296 # Parsoid does not serialize to empty attribute syntax,
16297 # so wt2wt and html2wt cases are skipped
16299 Attribute test: no value (T54330)
16301 parsoid=wt2html,html2html
16303 <font color>foo</font>
16305 <p><font color="">foo</font>
16308 <p><font color="">foo</font></p>
16312 Bug 2095: link with three closing brackets
16316 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16319 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16323 Bug 2095: link with pipe and three closing brackets
16325 [[Main Page|link]]]
16327 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16330 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16334 Bug 2095: link with pipe and three closing brackets, version 2
16336 [[Main Page|[http://example.com/]]]
16338 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16341 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16350 Template:Dangerous attribute
16352 " onmouseover="alert(document.cookie)
16356 Template:Dangerous style attribute
16358 border-size: expression(alert(document.cookie))
16364 <div style="float: right; {{{1}}}">Magic div</div>
16368 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16370 <div title="{{test}}"></div>
16372 <div title="This is a test template"></div>
16376 # Parsoid has enough context to handle this case
16378 Bug 2304: HTML attribute safety (dangerous template; 2309)
16380 <div title="{{dangerous attribute}}"></div>
16382 <div title=""></div>
16385 <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>
16389 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16391 <div style="{{dangerous style attribute}}"></div>
16393 <div style="/* insecure input */"></div>
16398 Bug 2304: HTML attribute safety (safe parameter; 2309)
16400 {{div style|width: 200px}}
16402 <div style="float: right; width: 200px">Magic div</div>
16407 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16409 {{div style|width: expression(alert(document.cookie))}}
16411 <div style="/* insecure input */">Magic div</div>
16416 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16418 {{div style|"><script>alert(document.cookie)</script>}}
16420 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16425 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16427 {{div style|" ><script>alert(document.cookie)</script>}}
16429 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16434 Bug 2304: HTML attribute safety (link)
16436 <div title="[[Main Page]]"></div>
16438 <div title="[[Main Page]]"></div>
16443 Bug 2304: HTML attribute safety (italics)
16445 <div title="''foobar''"></div>
16447 <div title="''foobar''"></div>
16452 Bug 2304: HTML attribute safety (bold)
16454 <div title="'''foobar'''"></div>
16456 <div title="'''foobar'''"></div>
16462 Bug 2304: HTML attribute safety (ISBN)
16464 <div title="ISBN 1234567890"></div>
16466 <div title="ISBN 1234567890"></div>
16471 Bug 2304: HTML attribute safety (RFC)
16473 <div title="RFC 1234"></div>
16475 <div title="RFC 1234"></div>
16480 Bug 2304: HTML attribute safety (PMID)
16482 <div title="PMID 1234567890"></div>
16484 <div title="PMID 1234567890"></div>
16489 Bug 2304: HTML attribute safety (web link)
16491 <div title="http://example.com/"></div>
16493 <div title="http://example.com/"></div>
16498 Bug 2304: HTML attribute safety (named web link)
16500 <div title="[http://example.com/ link]"></div>
16502 <div title="[http://example.com/ link]"></div>
16507 Bug 3244: HTML attribute safety (extension; safe)
16509 <div style="<nowiki>background:blue</nowiki>"></div>
16511 <div style="background:blue"></div>
16516 Bug 3244: HTML attribute safety (extension; unsafe)
16518 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16520 <div style="/* insecure input */"></div>
16524 # More MSIE fun discovered by Tom Gilder
16527 MSIE CSS safety test: spurious slash
16529 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16531 <div style="/* insecure input */">evil</div>
16536 MSIE CSS safety test: hex code
16538 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16540 <div style="/* insecure input */">evil</div>
16545 MSIE CSS safety test: comment in url
16547 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16549 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16554 MSIE CSS safety test: comment in expression
16556 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16558 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16563 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16565 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16567 <p style="/* invalid control char */">A</p>
16572 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16574 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16575 <div style="top:EXPRESSION(alert())">B</div>
16577 <p style="/* insecure input */">A</p>
16578 <div style="/* insecure input */">B</div>
16583 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16585 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16586 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16588 <div style="/* insecure input */">A</div>
16589 <p style="/* insecure input */">B</p>
16594 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16596 <div style="background-image:url⁽javascript:alert())">A</div>
16597 <div style="background-image:url₍javascript:alert())">B</div>
16598 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16600 <div style="/* insecure input */">A</div>
16601 <div style="/* insecure input */">B</div>
16602 <p style="/* insecure input */">C</p>
16606 # FIXME: Parsoid fails to sanitize this! See T58846.
16611 title="data:text/html,<img src=1 onerror=alert(1)>"
16612 style="-o-link:attr(title);-o-link-source:current">X</div>
16614 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16619 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16621 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16622 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16623 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16624 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16625 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16626 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16627 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16629 <p style="/* insecure input */">A</p>
16630 <p style="/* insecure input */">B</p>
16631 <p style="/* insecure input */">C</p>
16632 <p style="/* insecure input */">D</p>
16633 <p style="/* insecure input */">E</p>
16634 <p style="/* insecure input */">F</p>
16635 <p style="/* insecure input */">G</p>
16640 Table attribute legitimate extension
16643 !+ style="<nowiki>color:blue</nowiki>"| status
16648 <th style="color:blue"> status
16654 Table attribute safety
16657 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16662 <th style="/* insecure input */"> status
16668 CSS line continuation 1
16670 <div style="background-image: u\ rl(test.jpg);"></div>
16672 <div style="/* insecure input */"></div>
16677 CSS line continuation 2
16679 <div style="background-image: u\ rl(test.jpg); "></div>
16681 <div style="/* invalid control char */"></div>
16692 Expansion of multi-line templates in attribute values (bug 6255)
16694 <div style="background: {{identity|#00FF00}}">-</div>
16696 <div style="background: #00FF00">-</div>
16702 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16704 <div style="background:
16707 <div style="background: #00FF00">-</div>
16710 <div style="background:
16715 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16717 <div style="background: #00FF00">-</div>
16719 <div style="background: #00FF00">-</div>
16724 Tags which are hidden from Tidy cannot pass through the Sanitizer
16726 <mw:toc><script>alert();</script></mw:toc>
16728 <p><mw:toc><script>alert();</script></mw:toc></p>
16732 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16735 Parser hook: empty input
16746 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16749 ## Don't expect parsoid to rt this form.
16751 Parser hook: empty input using terminated empty elements
16753 parsoid=wt2html,html2html
16764 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16768 Parser hook: empty input using terminated empty elements (space before)
16779 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16783 Parser hook: basic input
16794 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16797 ## Don't expect parsoid to rt this form.
16799 Parser hook: case insensitive
16801 parsoid=wt2html,html2html
16812 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16815 ## Don't expect parsoid to rt this form.
16817 Parser hook: case insensitive, redux
16819 parsoid=wt2html,html2html
16830 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16834 Parser hook: nested tags
16836 <tag><tag></tag></tag>
16845 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16849 Parser hook: basic arguments
16851 <tag width="200" height="100" depth="50" square=""></tag>
16864 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16867 ## Don't expect parsoid to rt this form.
16869 Parser hook: basic arguments, variations
16871 parsoid=wt2html,html2html
16873 <tag width=200 height = "100" depth = '50' square></tag>
16886 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16890 Parser hook: argument containing a forward slash (bug 5344)
16892 <tag filename="/tmp/bla"></tag>
16897 'filename' => '/tmp/bla',
16902 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16905 ## Don't expect parsoid to rt this form.
16907 Parser hook: empty input using terminated empty elements (bug 2374)
16909 parsoid=wt2html,html2html
16921 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16924 ## </tag> should be output literally since there is no matching tag that begins it
16925 ## Don't expect parsoid to rt this form.
16927 Parser hook: basic arguments using terminated empty elements (bug 2374)
16931 <tag width=200 height = "100" depth = '50' square/>
16948 <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
16952 ## Don't expect parsoid to rt this form.
16954 Parser hook: Don't allow unclosed extension tags
16960 this is a '''test'''
16962 <p>test <tag>123
16963 </p><p>this is a <b>test</b>
16966 <p>test <tag>123</p>
16968 <p>this is a <b>test</b></p>
16972 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16976 Parser hook: static parser hook not inside a comment
16978 <statictag>hello, world</statictag>
16980 <statictag action="flush" />
16986 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16987 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16991 Parser hook: static parser hook inside a comment
16993 <!-- <statictag>hello, world</statictag> -->
16994 <statictag action="flush" />
16999 <!-- <statictag>hello, world</statictag> -->
17000 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17003 # Nested template calls; this case was broken by Parser.php rev 1.506,
17007 Template:One-parameter
17009 (My parameter is: {{{1}}})
17013 Template:Map-one-parameter
17015 {{{{{1}}}|{{{2}}}}}
17019 Nested template calls
17021 {{Map-one-parameter|One-parameter|param}}
17023 <p>(My parameter is: param)
17032 # HTML+Tidy effectively strips out the empty tags completely
17033 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17034 # which Tidy would have done for the PHP parser had there been content inside it.
17036 Sanitizer: Closing of open tags
17038 <s></s><table></table>
17040 <s></s><table></table>
17043 <p><s></s></p><table></table>
17047 Sanitizer: Closing of open but not closed tags
17056 Sanitizer: Closing of closed but not open tags
17066 Sanitizer: Closing of closed but not open table tags
17070 Table not started</td></tr></table>
17072 <p>Table not started</p>
17074 <p>Table not started</p>
17078 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17080 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17082 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17086 # In HTML5, the restrictions are that id must contain at least one character,
17087 # and must not contain any space characters.
17089 Sanitizer: Validating the contents of the id attribute (bug 4515)
17093 <br id="" /><br id="a space" />
17098 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17100 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17104 <br id="foo" /><br id="foo" />
17106 Something need to be done. foo-2 ?
17110 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17113 <meta itemprop="hello" content="world">
17114 <meta http-equiv="refresh" content="5">
17115 <meta itemprop="hello" http-equiv="refresh" content="5">
17116 <link itemprop="hello" href="{{SERVER}}">
17117 <link rel="stylesheet" href="{{SERVER}}">
17118 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17122 <p> <meta itemprop="hello" content="world" />
17123 <meta http-equiv="refresh" content="5">
17124 <meta itemprop="hello" content="5" />
17126 <link itemprop="hello" href="http://example.org" />
17127 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17128 <link itemprop="hello" href="http://example.org" />
17134 Language converter: output gets cut off unexpectedly (bug 5757)
17138 this bit is safe: }-
17140 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17142 then we get cut off here: }-
17144 all additional text is vanished
17146 <p>this bit is safe: }-
17147 </p><p>but if we add a conversion instance: xxx
17148 </p><p>then we get cut off here: }-
17149 </p><p>all additional text is vanished
17154 Self closed html pairs (bug 5487)
17157 <center><font id="bug" />Centered text</center>
17158 <div><font id="bug2" />In div text</div>
17160 <center><font id="bug" />Centered text</center>
17161 <div><font id="bug2" />In div text</div>
17170 Punctuation: nbsp before exclamation
17174 <p>C'est grave !
17179 Punctuation: CSS !important (bug 11874)
17181 <div style="width:50% !important">important</div>
17183 <div style="width:50% !important">important</div>
17188 Punctuation: CSS ! important (bug 11874; with space after)
17190 <div style="width:50% ! important">important</div>
17192 <div style="width:50% ! important">important</div>
17197 HTML bullet list, closed tags (bug 5497)
17210 <ul data-parsoid='{"stx":"html"}'>
17211 <li data-parsoid='{"stx":"html"}'>One</li>
17212 <li data-parsoid='{"stx":"html"}'>Two</li>
17218 HTML bullet list, unclosed tags (bug 5497)
17230 <ul data-parsoid='{"stx":"html"}'>
17231 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17232 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17238 HTML ordered list, closed tags (bug 5497)
17251 <ol data-parsoid='{"stx":"html"}'>
17252 <li data-parsoid='{"stx":"html"}'>One</li>
17253 <li data-parsoid='{"stx":"html"}'>Two</li>
17259 HTML ordered list, unclosed tags (bug 5497)
17272 <ol data-parsoid='{"stx":"html"}'>
17273 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17274 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17280 HTML nested bullet list, closed tags (bug 5497)
17303 <ul data-parsoid='{"stx":"html"}'>
17304 <li data-parsoid='{"stx":"html"}'>One</li>
17305 <li data-parsoid='{"stx":"html"}'>Two:
17306 <ul data-parsoid='{"stx":"html"}'>
17307 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17308 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17315 HTML nested bullet list, open tags (bug 5497)
17352 HTML nested ordered list, closed tags (bug 5497)
17377 HTML nested ordered list, open tags (bug 5497)
17414 HTML ordered list item with parameters oddity
17416 <ol><li id="fragment">One</li>
17419 <ol><li id="fragment">One</li>
17424 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17426 bug 5918: autonumbering
17428 [http://first/] [http://second] [ftp://ftp]
17432 [mailto:enclosed@mail.tld With target]
17434 [mailto:enclosed@mail.tld]
17436 mailto:inline@mail.tld
17438 <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>
17439 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17440 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17441 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17442 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17445 <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>
17446 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17447 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17448 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17449 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17454 # Security and HTML correctness
17455 # From Nick Jenkins' fuzz testing
17459 Fuzz testing: Parser13
17474 Fuzz testing: Parser14
17479 <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>
17480 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17482 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17488 <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>
17490 <div id="toc" class="toc">
17491 <div id="toctitle">
17495 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17502 Fuzz testing: Parser14-table
17504 parsoid=wt2html,html2html
17509 <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>
17510 <table style="__TOC__">
17515 <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>
17516 <table style="__TOC__">
17523 <table style="__TOC__"></table>
17526 # Known to produce bogus xml (extra </td>)
17528 Fuzz testing: Parser16
17555 Fuzz testing: Parser21
17558 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17563 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17573 Fuzz testing: Parser22
17575 http://===r:::https://b
17579 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17587 # Known to produce bad XML for now
17589 Fuzz testing: Parser24
17594 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17595 <br style="onmouseover='alert(document.cookie);' " />
17597 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17602 <u class="|">}}}} >
17603 <br style="onmouseover='alert(document.cookie);'" />
17605 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17614 # Note: the current result listed for this is not what the original one was,
17615 # but the original bug was JavaScript injection, which is fixed in any case.
17616 # It's not clear that the original result listed was any more correct than the
17617 # current one. Original result:
17620 # <li class="||">
17621 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17623 Fuzz testing: Parser25 (bug 6055)
17629 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17631 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17636 Fuzz testing: URL adjacent extension (with space, clean)
17638 http://example.com <nowiki>junk</nowiki>
17640 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17643 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17647 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17649 http://example.com<nowiki>junk</nowiki>
17651 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17654 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17658 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17660 http://example.com<pre>junk</pre>
17662 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17665 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17670 <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>
17674 Fuzz testing: image with bogus manual thumbnail
17676 [[Image:foobar.jpg|thumbnail= ]]
17678 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17681 <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>
17685 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17687 <pre dir=" "></pre>
17689 <pre dir=" "></pre>
17694 Parsing optional HTML elements (Bug 6171)
17699 <td> Some tabular data</td>
17700 <td> More tabular data ...
17701 <td> And yet som tabular data</td>
17707 <td> Some tabular data</td>
17708 <td> More tabular data ...
17709 </td><td> And yet som tabular data</td>
17716 Correct handling of <td>, <tr> (Bug 6171)
17721 <td> Some tabular data</td>
17722 <td> More tabular data ...</td>
17723 <td> And yet som tabular data</td>
17729 <td> Some tabular data</td>
17730 <td> More tabular data ...</td>
17731 <td> And yet som tabular data</td>
17739 Parsing crashing regression (fr:JavaScript)
17743 <p></body></x>
17748 Inline wiki vs wiki block nesting
17754 <p><b>Bold paragraph</b>
17755 </p><p>New wiki paragraph
17759 # FIXME: The current php output is documented
17760 # and desired output is the parsoid target.
17762 Inline HTML vs wiki block nesting
17768 <p><b>Bold paragraph
17769 </p><p>New wiki paragraph</b>
17772 <p><b>Bold paragraph</b>
17773 </p><p>New wiki paragraph
17777 # Original result was this:
17778 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17780 # While that might be marginally more intuitive, maybe, the six-apostrophe
17781 # construct is clearly pathological and the result stated here (which is what
17782 # the parser actually does) is about as reasonable as anything.
17784 Mixing markup for italics and bold
17787 '''bold''''''bold''bolditalics'''''
17789 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17797 Article for special page transclusion test
17801 Special page transclusion
17804 {{Special:Prefixindex/Xyzzyx}}
17806 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17812 Special page transclusion twice (bug 5021)
17815 {{Special:Prefixindex/Xyzzyx}}
17816 {{Special:Prefixindex/Xyzzyx}}
17818 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17820 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17826 Transclusion of default MediaWiki message
17828 {{MediaWiki:Mainpage}}
17835 Transclusion of nonexistent MediaWiki message
17837 {{MediaWiki:Mainpagexxx}}
17839 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17844 Transclusion of MediaWiki message with underscore
17846 {{MediaWiki:history_short}}
17853 Transclusion of MediaWiki message with space
17855 {{MediaWiki:history short}}
17862 Invalid header with following text
17872 Section extraction test (section 0)
17892 Section extraction test (section 1)
17914 Section extraction test (section 2)
17935 Section extraction test (section 3)
17955 Section extraction test (section 4)
17979 Section extraction test (section 5)
17999 Section extraction test (section 6)
18020 Section extraction test (section 7)
18040 Section extraction test (section 8)
18060 Section extraction test (section 9)
18081 Section extraction test (section 10)
18101 Section extraction test (nonexistent section 11)
18120 Section extraction test with bogus heading (section 1)
18125 ==bogus== not a legal section
18129 ==bogus== not a legal section
18133 Section extraction test with bogus heading (section 2)
18138 ==bogus== not a legal section
18145 Section extraction test with comment after heading (section 1)
18157 Section extraction test with comment after heading (section 2)
18169 Section extraction test with bogus <nowiki> heading (section 1)
18174 ==bogus== <nowiki>not a legal section</nowiki>
18178 ==bogus== <nowiki>not a legal section</nowiki>
18182 Section extraction test with bogus <nowiki> heading (section 2)
18187 ==bogus== <nowiki>not a legal section</nowiki>
18193 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18194 # instead of respecting commented sections
18196 Section extraction prefixed by comment (section 1)
18207 Section extraction prefixed by comment (section 2)
18217 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18218 # instead of respecting HTML-style headings
18220 Section extraction, mixed wiki and html (section 1)
18236 Section extraction, mixed wiki and html (section 2)
18252 # Formerly testing for bug 3342
18254 Section extraction, heading surrounded by <noinclude>
18258 <noinclude>==unmarked==</noinclude>
18264 # Test behavior of bug 19910
18266 Sectiion with all-equals
18271 The line above must have a trailing space
18274 But just in case it doesn't...
18278 But just in case it doesn't...
18282 Section replacement test (section 0)
18313 Section replacement test (section 1)
18342 Section replacement test (section 2)
18372 Section replacement test (section 3)
18403 Section replacement test (section 4)
18430 Section replacement test (section 5)
18461 Section replacement test (section 6)
18491 Section replacement test (section 7)
18522 Section replacement test (section 8)
18553 Section replacement test (section 9)
18582 Section replacement test (section 10)
18612 Section replacement test with initial whitespace (bug 13728)
18616 Preformatted initial line
18620 Preformatted initial line
18627 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18639 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18652 Section extraction, <pre> around bogus header (bug 10309)
18669 Section replacement, <pre> around bogus header (bug 10309)
18691 Handling of 
 in URLs
18695 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18698 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18700 a</a></li></ul></li></ul>
18704 Handling of %0A in URLs
18708 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18711 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18715 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18717 5 quotes, code coverage +1 line
18724 <p><b><i></i></b></p>
18727 # same html as previous, but wikitext adjusted to match parsoid html2wt
18728 # note that wt2html and html2html will put the <i> before the <b>
18730 5 quotes, code coverage +1 line w/ nowiki (1)
18732 parsoid=wt2wt,html2wt
18734 '''''<nowiki/>'''''
18739 <p><b><i></i></b></p>
18742 # same as previous, just swapping the <i> and <b>
18744 5 quotes, code coverage +1 line w/ nowiki (2)
18746 '''''<nowiki/>'''''
18751 <p><i><b></b></i></p>
18755 Special:Search page linking.
18759 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18764 {{!}} is a magic word
18766 {{!}} is a magic word there and {{!}} is still a magic word here
18767 | is not a magic word here but {{!}} is still a magic word here
18769 <p>| is a magic word there and | is still a magic word here
18770 | is not a magic word here but | is still a magic word here
18773 <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
18774 | 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>
18781 title=[[Parser test]]
18786 * {{FULLPAGENAMEE}}
18788 * {{BASEPAGENAMEE}}
18792 * {{ROOTPAGENAMEE}}
18794 * {{TALKPAGENAMEE}}
18795 * {{SUBJECTPAGENAME}}
18796 * {{SUBJECTPAGENAMEE}}
18799 * {{NAMESPACENUMBER}}
18803 * {{SUBJECTSPACEE}}
18804 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18806 <ul><li> Parser test</li>
18807 <li> Parser_test</li>
18808 <li> Parser test</li>
18809 <li> Parser_test</li>
18810 <li> Parser test</li>
18811 <li> Parser_test</li>
18812 <li> Parser test</li>
18813 <li> Parser_test</li>
18814 <li> Parser test</li>
18815 <li> Parser_test</li>
18816 <li> Talk:Parser test</li>
18817 <li> Talk:Parser_test</li>
18818 <li> Parser test</li>
18819 <li> Parser_test</li>
18827 <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>
18830 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18840 image4 |300px| centre
18841 image5.svg| http://///////
18846 <ul class="gallery mw-gallery-traditional">
18847 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18848 <div class="thumb" style="height: 150px;">Image1.png</div>
18849 <div class="gallerytext">
18852 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18853 <div class="thumb" style="height: 150px;">Image2.gif</div>
18854 <div class="gallerytext">
18857 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18858 <div class="thumb" style="height: 150px;">Image3</div>
18859 <div class="gallerytext">
18862 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18863 <div class="thumb" style="height: 150px;">Image4</div>
18864 <div class="gallerytext">
18869 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18870 <div class="thumb" style="height: 150px;">Image5.svg</div>
18871 <div class="gallerytext">
18872 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18876 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18877 <div class="thumb" style="height: 150px;">* image6</div>
18878 <div class="gallerytext">
18886 Gallery (with options)
18888 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18889 File:Nonexistent.jpg|caption
18890 File:Nonexistent.jpg
18891 image:foobar.jpg|some '''caption''' [[Main Page]]
18893 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18896 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18897 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18898 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18899 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18900 <div class="gallerytext">
18905 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18906 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18907 <div class="gallerytext">
18910 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18911 <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>
18912 <div class="gallerytext">
18913 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18917 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18918 <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>
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="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>
18924 <div class="gallerytext">
18934 Gallery with link that has fragment
18937 image:foobar.jpg|link=Main_Page
18938 image:foobar.jpg|link=Main_Page#section
18939 image:foobar.jpg|link=Main Page#section|caption
18942 <ul class="gallery mw-gallery-traditional">
18943 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18944 <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>
18945 <div class="gallerytext">
18948 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18949 <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>
18950 <div class="gallerytext">
18953 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18954 <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>
18955 <div class="gallerytext">
18965 Gallery with wikitext inside caption
18968 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18969 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18972 <ul class="gallery mw-gallery-traditional">
18973 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18974 <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>
18975 <div class="gallerytext">
18976 <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>
18980 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18981 <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>
18982 <div class="gallerytext">
18983 <p>This is a test template
18992 gallery (with showfilename option)
18994 <gallery showfilename>
18995 File:Nonexistent.jpg|caption
18996 File:Nonexistent.jpg
18997 image:foobar.jpg|some '''caption''' [[Main Page]]
19001 <ul class="gallery mw-gallery-traditional">
19002 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19003 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19004 <div class="gallerytext">
19005 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19010 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19011 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19012 <div class="gallerytext">
19013 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19017 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19018 <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>
19019 <div class="gallerytext">
19020 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19021 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19025 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19026 <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>
19027 <div class="gallerytext">
19028 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19037 Gallery (with namespace-less filenames)
19040 File:Nonexistent.jpg
19046 <ul class="gallery mw-gallery-traditional">
19047 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19048 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19049 <div class="gallerytext">
19052 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19053 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19054 <div class="gallerytext">
19057 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19058 <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>
19059 <div class="gallerytext">
19062 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19063 <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>
19064 <div class="gallerytext">
19072 HTML Hex character encoding (spells the word "JavaScript")
19074 parsoid=wt2html,wt2wt,html2html
19076 JavaScript
19078 <p>JavaScript
19083 <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>
19087 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19091 <p>&#xsee;&#XSEE;
19094 <p>&#xsee;&#XSEE;</p>
19098 HTML Hex character encoding mixed case
19100 parsoid=wt2html,wt2wt,html2html
19109 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19112 # See: http://www.w3.org/TR/html5/syntax.html#character-references
19113 # Note that U+000C (form feed) is not a valid XML character, so
19114 # it is banned even though allowed in HTML5.
19116 Illegal character references (T106578)
19121 ; Control (low): 
19122 ; Control (high):  Ÿ
19123 ; Surrogate: ��
19124 ; This is an okay astral character: 💩
19133 <dt>Control (low)</dt>
19135 <dt>Control (high)</dt>
19136 <dd>&#x7F; &#x9F;</dd>
19138 <dd>&#xD83D;&#xDCA9;</dd>
19139 <dt>This is an okay astral character</dt>
19145 __FORCETOC__ override
19157 ISBN 978-0-1234-56 789
19159 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19162 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19164 <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>
19168 ISBN followed by 5 spaces
19179 ISBN ISBN 1234567890
19181 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19184 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19187 # Uppercase X and lowercase x as well
19198 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19199 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19200 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19201 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19202 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19203 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19206 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19207 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19208 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19209 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19210 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19211 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19215 ISBN with empty prefix (parsoid test)
19219 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19222 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19226 Bug 22905: <abbr> followed by ISBN followed by </a>
19228 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19230 <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>
19233 <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>
19241 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19246 Double RFC with a wiki link
19250 <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>
19259 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19262 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19266 Centre-aligned image
19268 [[Image:foobar.jpg|centre]]
19270 <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>
19277 [[Image:foobar.jpg|none]]
19279 <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>
19284 Width + Height sized image (using px) (height is ignored)
19286 [[Image:foobar.jpg|640x480px]]
19288 <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>
19293 Width-sized image (using px, no following whitespace)
19295 [[Image:foobar.jpg|640px]]
19297 <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>
19302 Width-sized image (using px, with following whitespace - test regression from r39467)
19304 [[Image:foobar.jpg|640px ]]
19306 <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>
19311 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19313 [[Image:foobar.jpg| 640px]]
19315 <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>
19320 Image with page parameter
19324 [[File:LoremIpsum.djvu|page=2]]
19326 <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>
19329 <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>
19333 Another italics / bold test
19341 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19347 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19350 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19355 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19357 Images with the "|" character in the comment
19359 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19361 <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>
19364 <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>
19368 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19370 <html><script>alert(1);</script></html>
19372 <p><html><script>alert(1);</script></html>
19377 HTML with raw HTML ($wgRawHtml==true)
19381 <html><script>alert(1);</script></html>
19383 <p><script>alert(1);</script>
19388 Parents of subpages, one level up
19390 subpage title=[[Subpage test/L1/L2/L3]]
19394 <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>
19400 Parents of subpages, one level up, not named
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)">Subpage test/L1/L2</a>
19413 Parents of subpages, two levels up
19415 subpage title=[[Subpage test/L1/L2/L3]]
19421 <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
19422 </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>
19427 Parents of subpages, two levels up, without trailing slash or name.
19429 subpage title=[[Subpage test/L1/L2/L3]]
19438 Parents of subpages, two levels up, with lots of extra trailing slashes.
19440 subpage title=[[Subpage test/L1/L2/L3]]
19444 <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>
19449 Subpage test/L1/L2/L3Sibling
19455 Transclusion of a sibling page (one level up)
19457 subpage title=[[Subpage test/L1/L2/L3]]
19466 Transclusion of a child page
19468 subpage title=[[Subpage test/L1/L2]]
19476 # This is wt2html only in Parsoid because we add <nowiki>
19477 # because of {{..}} and we don't expect to fix that to
19478 # eliminate the nowikis selective for {{..}} markup.
19480 Non-transclusion because of too many up levels
19482 subpage title=[[Subpage test/L1/L2/L3]]
19485 {{../../../../More than parent}}
19487 <p>{{../../../../More than parent}}
19490 <p>{{../../../../More than parent}}</p>
19494 Definition list code coverage
19500 <dl><dt> title  </dt>
19502 <dt> title </dt>
19508 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19509 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19510 <dt>title</dt><dd> def</dd></dl>
19514 Don't fall for the self-closing div
19516 <div>hello world</div/>
19518 <div>hello world</div>
19527 <p>[[:Template:Msg]]
19536 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19540 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19542 Always escape literal '>' in output, not just after '<'
19556 <p>This is a test template
19557 This is a test template
19569 Inclusion of !userCanEdit() content
19573 <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>
19579 Out-of-order TOC heading levels
19588 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19590 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19592 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19593 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19596 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19598 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19599 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19605 <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>
19606 <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>
19607 <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>
19608 <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>
19609 <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>
19610 <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>
19616 ISBN with a dummy number
19626 ISBN with space-delimited number
19630 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19636 ISBN with multiple spaces, no number
19655 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19656 </p><p>ISBN 12345678901
19662 ISBN with trailing year (bug 8110)
19664 ISBN 1-234-56789-0 - 2006
19666 ISBN 1 234 56789 0 - 2006
19668 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19669 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19677 {{anchorencode:foo bar©#%n}}
19679 <p>foo_bar.C2.A9.23.25n
19684 anchorencode trims spaces
19686 {{anchorencode: __pretty__please__}}
19693 anchorencode deals with links
19695 {{anchorencode: [[hello|world]] [[hi]]}}
19702 anchorencode deals with templates
19704 {{anchorencode: {{Foo}} }}
19711 anchorencode encodes like the TOC generator: (bug 18431)
19713 === _ +:.3A%3A&&]] ===
19714 {{anchorencode: _ +:.3A%3A&&]] }}
19717 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19718 <p>.2B:.3A.253A.26.26.5D.5D
19723 Bug 6200: blockquotes and paragraph formatting
19744 Bug 8293: Use of center tag ruins paragraph formatting
19765 Parsing of overlapping (improperly nested) inline html tags
19767 <span><s>x</span></s>
19769 <p><span><s>x</span></s></span>
19772 <p><span><s>x</s></span>
19777 ### Language variants related tests
19780 Self-link in language variants
19782 title=[[Dunav]] language=sr
19784 Both [[Dunav]] and [[Дунав]] are names for this river.
19786 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19797 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19799 title=[[Duna]] language=sr
19801 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19803 <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.
19808 Link to a section of a variant of this title shouldn't be parsed as self-link
19810 title=[[Duna]] language=sr
19812 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19814 <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.
19819 Link to pages in language variants
19823 Main Page can be written as [[Маин Паге]]
19825 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19831 Multiple links to pages in language variants
19835 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19837 <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>.
19843 Simple template in language variants
19849 <p>This is a test template
19855 Template with explicit namespace in language variants
19861 <p>This is a test template
19867 Basic test for template parameter in language variants
19871 {{парамтест|param=foo}}
19873 <p>This is a test template with parameter foo
19878 Simple category in language variants
19882 [[Category:МедиаWики Усер'с Гуиде]]
19884 cat=МедиаWики_Усер'с_Гуиде sort=
19886 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
19901 ## We used to, but no longer wt2wt this test since the default serializer
19902 ## will normalize all categories to serialize on their own line.
19903 ## This wikitext usage is going to be fairly uncommon in production and
19904 ## selser will take care of preserving formatting in those scenarios.
19906 Don't convert blue categorylinks to another variant (bug 33210)
19912 [[A]][[Category:分类]]
19916 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19917 <link rel="mw:PageProp/Category" href="Category:分类"/>
19921 Stripping -{}- tags (language variants)
19925 Latin proverb: -{Ne nuntium necare}-
19927 <p>Latin proverb: Ne nuntium necare
19933 Prevent conversion with -{}- tags (language variants)
19935 language=sr variant=sr-ec
19937 Latinski: -{Ne nuntium necare}-
19939 <p>Латински: Ne nuntium necare
19945 Prevent conversion of text with -{}- tags (language variants)
19947 language=sr variant=sr-ec
19949 Latinski: -{Ne nuntium necare}-
19951 <p>Латински: Ne nuntium necare
19957 Prevent conversion of links with -{}- tags (language variants)
19959 language=sr variant=sr-ec
19963 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19969 -{}- tags within headlines (within html for parserConvert())
19971 language=sr variant=sr-ec
19975 <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>
19981 Explicit definition of language variant alternatives
19983 language=zh variant=zh-tw
19985 -{zh:China;zh-tw:Taiwan}-, not China
19987 <p>Taiwan, not China
19993 Conversion around HTML tags
19995 language=sr variant=sr-ec
19997 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19998 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20001 <span title="ЛаCтин">ски</span>
20007 Explicit session-wise language variant mapping (A flag and - flag)
20009 language=zh variant=zh-tw
20011 Taiwan is not China.
20012 But -{A|zh:China;zh-tw:Taiwan}- is China,
20013 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20014 and -{China}- is China.
20016 <p>Taiwan is not China.
20017 But Taiwan is Taiwan,
20018 (This should be stripped!)
20019 and China is China.
20024 Explicit session-wise language variant mapping (H flag for hide)
20026 language=zh variant=zh-tw
20028 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20031 <p>(This should be stripped!)
20037 Adding explicit conversion rule for title (T flag)
20039 language=zh variant=zh-tw showtitle
20041 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20044 <p>Should be stripped!
20049 Testing that changing the language variant here in the tests actually works
20051 language=zh variant=zh showtitle
20053 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20056 <p>Should be stripped!
20061 Recursive conversion of alt and title attrs shouldn't clear converter state
20063 language=zh variant=zh-cn showtitle
20065 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20066 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20070 Should be stripped<span title="Exclamation">!</span>
20075 Bug 24072: more test on conversion rule for title
20077 language=zh variant=zh-tw showtitle
20079 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20080 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20083 <p>This should be stripped!
20084 This won't take interferes with the title rule.
20089 Partly disable title conversion if variant == main language code
20091 language=zh variant=zh title=[[ZH]] showtitle
20093 -{T|zh-cn:CN;zh-tw:TW}-
20101 Partly disable title conversion if variant == main language code, more
20103 language=zh variant=zh title=[[ZH]] showtitle
20113 Raw output of variant escape tags (R flag)
20115 language=zh variant=zh-tw
20117 Raw: -{R|zh:China;zh-tw:Taiwan}-
20119 <p>Raw: zh:China;zh-tw:Taiwan
20124 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20126 language=zh variant=zh-cn
20128 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20135 Conversion rules from [numeric-only string] to [something else] (T48634)
20137 language=zh variant=zh-cn
20139 -{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
20146 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20148 language=zh variant=zh-cn
20150 -{H|zh-cn:foo;zh-tw:;}-foobar
20157 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20159 language=zh variant=zh-cn
20161 -{H|=>zh-cn:foo;}-foobar
20168 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20170 language=zh variant=zh-cn
20179 Nested using of manual convert syntax
20181 language=zh variant=zh-hk
20183 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20185 <p>Nested: Hello Hong Kong!
20189 # Since Parsoid is starting to emit canonical wikitext for links,
20190 # [http://example.com http://example.com] will not RT back to that
20193 Proper conversion of text in external links
20195 language=sr variant=sr-ec
20198 http://www.google.com
20199 gopher://www.google.com
20200 [http://www.google.com http://www.google.com]
20201 [gopher://www.google.com gopher://www.google.com]
20202 [https://www.google.com irc://www.google.com]
20203 [ftp://www.google.com www.google.com/ftp://dir]
20204 [//www.google.com www.google.com]
20206 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20207 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20208 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20209 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20210 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20211 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20212 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20215 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20216 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20217 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20218 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20219 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20220 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20221 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20225 Do not convert roman numbers to language variants
20227 language=sr variant=sr-ec
20231 <p>Фридрих IV је цар.
20236 Unclosed language converter markup "-{"
20247 Don't convert raw rule "-{R|=>}-" to "=>"
20258 Don't break link parsing if language converter markup is in the caption.
20260 language=sr variant=sr-ec
20262 [[Main Page|-{R|main page}-]]
20264 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20268 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20270 Don't break image parsing if language converter markup is in the caption.
20274 [[File:Foobar.jpg|-{R|caption}-]]
20276 <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>
20280 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20282 Don't break list handling if language converter markup is in the item.
20284 language=zh variant=zh-cn
20286 ;-{zh-cn:AAA;zh-tw:BBB}-
20288 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20295 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20297 Don't break table handling if language converter markup is in the cell.
20299 language=sr variant=sr-ec
20322 Bug 529: Uncovered bullet
20331 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20332 # Templates in Wikipedia rely on this behavior, as tidy has always been
20333 # enabled there. These tests are normally run *without* tidy, so specify the
20334 # full output here.
20335 # To test realistic parsing behavior, apply a tidy-like transformation to both
20336 # the expected output and your parser's output.
20338 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20340 ******* Foo {{bullet}}
20342 <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>
20348 Bug 529: Uncovered table already at line-start
20371 Bug 529: Uncovered bullet in parser function result
20373 * Foo {{lc:{{bullet}} }}
20381 Bug 5678: Double-parsed template argument
20383 {{lc:{{{1}}}|hello}}
20390 Bug 5678: Double-parsed template invocation
20392 {{lc:{{paramtest {{!}} param = hello }} }}
20394 <p>{{paramtest | param = hello }}
20399 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20402 title=[[Main Page]]
20404 {{PRVNÍVELKÉ:ěščř}}
20405 {{prvnívelké:ěščř}}
20425 Morwen/13: Unclosed link followed by heading
20432 <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>
20437 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20444 <h1><span class="mw-headline" id="heading">heading</span></h1>
20449 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20456 <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>
20471 Paragraphs inside divs (no extra line breaks)
20483 Paragraphs inside divs (extra line break on open)
20498 Paragraphs inside divs (extra line break on close)
20513 Paragraphs inside divs (extra line break on open and close)
20530 Nesting tags, paragraphs on lines which begin with <div>
20532 <div></div><strong>A
20535 <p><strong>A</strong></p>
20536 <p><strong>B</strong></p>
20544 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20546 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20548 <blockquote>Line one
20550 Line two</blockquote>
20552 <blockquote>Line one
20553 Line two</blockquote>
20557 <p>Line one Line two</p>
20562 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20567 Line two</blockquote>
20572 Line two</blockquote>
20577 Line two</blockquote>
20581 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20583 <blockquote>Line one
20588 <blockquote>Line one
20601 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20623 Paragraphs inside blockquotes/divs (no extra line breaks)
20625 <blockquote><div>Line one
20627 Line two</div></blockquote>
20629 <blockquote><div>Line one
20630 Line two</div></blockquote>
20635 Paragraphs inside blockquotes/divs (extra line break on open)
20640 Line two</div></blockquote>
20645 Line two</div></blockquote>
20650 Paragraphs inside blockquotes/divs (extra line break on close)
20652 <blockquote><div>Line one
20655 </div></blockquote>
20657 <blockquote><div>Line one
20660 </div></blockquote>
20665 Paragraphs inside blockquotes/divs (extra line break on open and close)
20671 </div></blockquote>
20677 </div></blockquote>
20682 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20684 wgLinkHolderBatchSize=0
20690 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20691 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20692 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20697 Free external link invading image caption
20699 [[Image:Foobar.jpg|thumb|http://x|hello]]
20701 <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>
20706 Bug 15196: localised external link numbers
20710 [http://en.wikipedia.org/]
20712 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20715 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20719 Multibyte character in padleft
20721 {{padleft:-Hello|7|Æ}}
20728 Multibyte character in padright
20730 {{padright:Hello-|7|Æ}}
20737 formatdate parser function
20739 {{#formatdate:2009-03-24}}
20741 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20746 formatdate parser function, with default format
20748 {{#formatdate:2009-03-24|mdy}}
20750 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20755 Spacing of numbers in formatted dates
20757 {{#formatdate:January 15}}
20759 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20764 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
20766 language=nl title=[[MediaWiki:Common.css]]
20768 {{#formatdate:2009-03-24|dmy}}
20770 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20783 Edit comment with link
20787 I like the [[Main Page]] a lot
20789 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20793 Edit comment with link and link text
20797 I like the [[Main Page|best pages]] a lot
20799 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20803 Edit comment with link and link text with suffix
20807 I like the [[Main Page|best page]]s a lot
20809 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20813 Edit comment with section link (non-local, eg in history list)
20815 comment title=[[Main Page]]
20817 /* External links */ removed bogus entries
20819 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20823 Edit comment with section link and text before it (non-local, eg in history list)
20825 comment title=[[Main Page]]
20827 pre-comment text /* External links */ removed bogus entries
20829 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>
20833 Edit comment with section link (local, eg in diff view)
20835 comment local title=[[Main Page]]
20837 /* External links */ removed bogus entries
20839 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20843 Edit comment with subpage link (bug 14080)
20847 title=[[Subpage test]]
20849 Poked at a [[/subpage]] here...
20851 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20855 Edit comment with subpage link and link text (bug 14080)
20859 title=[[Subpage test]]
20861 Poked at a [[/subpage|neat little page]] here...
20863 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20867 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20870 title=[[Subpage test]]
20872 Poked at a [[/subpage]] here...
20874 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20878 Edit comment with bare anchor link (local, as on diff)
20882 title=[[Main Page]]
20886 <a href="#section">#section</a>
20890 Edit comment with bare anchor link (non-local, as on history)
20893 title=[[Main Page]]
20897 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20901 Anchor starting with underscore
20907 <p><a href="#_ref">One</a>
20910 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20914 Id starting with underscore
20916 <div id="_ref"></div>
20918 <div id="_ref"></div>
20923 Edit comment with link with more than one pipe (T99346)
20927 [[Main Page|Many|pipes]]
20929 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
20933 Complex edit comment with link with more than one pipe (T99346)
20937 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
20939 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..."
20943 Space normalisation on autocomment (bug 22784)
20946 title=[[Main Page]]
20948 /* __hello__world__ */
20950 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20954 percent-encoding and + signs in comments (Bug 26410)
20958 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20960 <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>
20963 # Parsoid doesn't support this yet: see bug 73581
20964 # but it *should* omit the 'src' attribute if the image is bad.
20965 # PHP side of tests was disabled in
20966 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20967 # because of issues in the PHP parserTests infrastructure
20968 # (but the output below is indeed what the PHP side emits)
20970 Bad images - basic functionality
20973 !! DISABLED/html/php
20975 <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>
20979 Bad images - bug 16039: text after bad image disappears
20984 !! DISABLED/html/php
20990 <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>
20995 Verify that displaytitle works (bug #22501) no displaytitle
20999 wgAllowDisplayTitle=true
21000 wgRestrictDisplayTitle=false
21002 this is not the the title
21005 <p>this is not the the title
21010 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21015 wgAllowDisplayTitle=true
21016 wgRestrictDisplayTitle=false
21018 this is not the the title
21019 {{DISPLAYTITLE:whatever}}
21022 <p>this is not the the title
21027 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21032 wgAllowDisplayTitle=true
21033 wgRestrictDisplayTitle=true
21035 this is not the the title
21036 {{DISPLAYTITLE:whatever}}
21039 <p>this is not the the title
21044 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21049 wgAllowDisplayTitle=true
21050 wgRestrictDisplayTitle=true
21052 this is not the the title
21053 {{DISPLAYTITLE:screen}}
21056 <p>this is not the the title
21061 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21066 wgAllowDisplayTitle=false
21068 this is not the the title
21069 {{DISPLAYTITLE:screen}}
21072 <p>this is not the the title
21073 <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>
21078 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21083 wgAllowDisplayTitle=false
21085 this is not the the title
21088 <p>this is not the the title
21093 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21098 wgAllowDisplayTitle=true
21099 wgRestrictDisplayTitle=true
21101 this is not the the title
21102 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21104 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21105 <p>this is not the the title
21110 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21115 wgAllowDisplayTitle=true
21116 wgRestrictDisplayTitle=true
21118 this is not the the title
21119 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21121 <span style="color: red;">s</span>creen
21122 <p>this is not the the title
21127 Page status indicators: Empty name is invalid
21131 <indicator name=" "></indicator>
21132 <indicator></indicator>
21134 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21135 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21140 Page status indicators: Weird syntaxes that are okay
21144 <indicator name="empty" />
21145 <indicator name="name"></indicator>
21154 Page status indicators: Torture test
21158 <indicator name="01">hello world</indicator>
21159 <indicator name="02">[[Main Page]]</indicator>
21160 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21161 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21162 <indicator name="05">* foo
21164 <indicator name="06"><nowiki>foo</nowiki></indicator>
21165 <indicator name="07"> Preformatted</indicator>
21166 <indicator name="08"><div>Broken tag</indicator>
21167 <indicator name="09">{| class=wikitable
21170 <indicator name="10">Two
21172 paragraphs</indicator>
21175 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21176 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" />
21177 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>
21178 05=<ul><li> foo</li>
21182 07=<pre>Preformatted
21184 08=<div>Broken tag</div>
21186 09=<table class="wikitable">
21203 preload: check <noinclude> and <includeonly>
21207 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21213 preload: check <onlyinclude>
21217 Goodbye <onlyinclude>Hello world</onlyinclude>
21223 preload: can pass tags through if we want to
21227 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21229 <includeonly>Hello world</includeonly>
21233 preload: check that it doesn't try to do tricks
21237 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21239 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21243 Play a bit with r67090 and bug 3158
21245 <div style="width:50% !important"> </div>
21246 <div style="width:50% !important"> </div>
21247 <div style="width:50% !important"> </div>
21248 <div style="border : solid;"> </div>
21250 <div style="width:50% !important"> </div>
21251 <div style="width:50% !important"> </div>
21252 <div style="width:50% !important"> </div>
21253 <div style="border : solid;"> </div>
21256 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21257 <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>
21258 <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>
21259 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21264 HTML5 data attributes
21266 <span data-foo="bar">Baz</span>
21267 <p data-abc-def_hij="">Quuz</p>
21269 <p><span data-foo="bar">Baz</span>
21271 <p data-abc-def_hij="">Quuz</p>
21274 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21275 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21279 Strip reserved data attributes
21281 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21283 <div data-ok="fred">d</div>
21286 <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>
21290 percent-encoding and + signs in internal links (Bug 26410)
21292 [[User:+%]] [[Page+title%]]
21293 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21294 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21295 [[%33%45]] [[%33%45+]]
21297 <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>
21298 <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>
21299 <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>
21300 <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>
21303 <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>
21304 <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>
21305 <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>
21306 <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>
21310 Special characters in embedded file links (bug 27679)
21312 [[File:Contains & ampersand.jpg]]
21313 [[File:Does not exist.jpg|Title with & ampersand]]
21315 <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>
21316 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21319 <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>
21320 <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>
21324 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21326 Text's been normalized?
21328 <p>Text's been normalized?
21333 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21335 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21337 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21342 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21344 [http://www.example.org/ ideograms]
21346 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21351 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21353 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21355 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21379 Bug 31098 Template which includes system messages which includes the template
21383 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21384 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21389 Bug31490 Turkish: ucfirst 'blah'
21400 Bug31490 Turkish: ucfirst 'ix'
21411 Bug31490 Turkish: lcfirst 'BLAH'
21422 Bug31490 Turkish: ucfırst (with a dotless i)
21428 <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>
21433 Bug31490 ucfırst (with a dotless i) with English language
21439 <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>
21444 Bug 26375: TOC with italics
21446 title=[[Main Page]]
21449 == ''Lost'' episodes ==
21451 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21453 <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>
21457 <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>
21462 Bug 26375: TOC with bold
21464 title=[[Main Page]]
21467 == '''should be bold''' then normal text ==
21469 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21471 <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>
21475 <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>
21480 Bug 33845: Headings become cursive in TOC when they contain an image
21482 title=[[Main Page]]
21485 == Image [[Image:foobar.jpg]] ==
21487 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21489 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21493 <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>
21498 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21500 title=[[Main Page]]
21503 == <blockquote>Quote</blockquote> ==
21505 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21507 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21511 <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>
21515 <div id="toc" class="toc">
21516 <div id="toctitle">
21520 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21524 <h2><span class="mw-headline" id="Quote"></span></h2>
21526 <p><span class="mw-headline" id="Quote">Quote</span></p>
21528 <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>
21532 Unclosed tags in TOC
21534 title=[[Main Page]]
21538 <small>Hanc marginis exiguitas non caperet.</small>
21541 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21543 <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>
21547 <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>
21548 <p><small>Hanc marginis exiguitas non caperet.</small>
21554 Multiple tags in TOC
21557 == <i>Foo</i> <b>Bar</b> ==
21559 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21561 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21563 <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>
21564 <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>
21568 <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>
21569 <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>
21573 <div id="toc" class="toc">
21574 <div id="toctitle">
21578 <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>
21579 <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>
21583 <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>
21584 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21586 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21588 <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>
21591 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21592 # html5 tag parsing.
21594 Tags with parameters in TOC
21599 == <sup class="in-h2">Hello</sup> ==
21601 == <sup class="a > b">Evilbye</sup> ==
21603 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21605 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21606 <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>
21610 <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>
21611 <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>
21614 <meta property="mw:PageProp/toc" />
21615 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21617 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21621 span tags with directionality in TOC
21624 == <span dir="ltr">C++</span> ==
21626 == <span dir="rtl">זבנג!</span> ==
21628 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21630 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21632 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21634 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21636 <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>
21637 <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>
21638 <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>
21639 <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>
21640 <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>
21644 <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>
21645 <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>
21646 <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>
21647 <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>
21648 <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>
21653 Bug 72884: bdi element in ToC
21656 == <bdi>test</bdi> ==
21658 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21660 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21664 <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>
21669 T35715: s/strike element in ToC
21672 == <s>test</s> test <strike>test</strike> ==
21674 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21676 <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>
21680 <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>
21684 # Note that the html output does not have the <p></p>, but the
21685 # html+tidy output *does*. This is because the empty <p></p> is
21686 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21688 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21693 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21695 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21699 <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>
21703 <div id="toc" class="toc">
21704 <div id="toctitle">
21708 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21712 <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>
21718 == {{int:headline_sample}} ==
21722 Bug 32057: Title needed when expanding <h> nodes.
21724 title=[[Main Page]]
21728 <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>
21733 Strip marker in urlencode
21735 {{urlencode:x<nowiki/>y}}
21736 {{urlencode:x<nowiki/>y|wiki}}
21737 {{urlencode:x<nowiki/>y|path}}
21738 {{urlencode:x<pre id="one">two</pre>y}}
21766 Strip marker in formatNum
21768 {{formatnum:1<nowiki/>2}}
21769 {{formatnum:1<nowiki/>2|R}}
21777 Check noCommafy in formatNum
21781 {{formatnum:123456.78}}
21782 {{formatnum:123456.78|NOSEP}}
21790 Wrong option for formatNum (bug 56199)
21792 {{formatnum:1,234.56|Random}}
21793 {{formatnum:1,234.56|EVERYTHING}}
21794 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21803 Strip marker in grammar
21807 {{grammar:elative|foo<nowiki/>bar}}
21814 Strip marker in padleft
21816 {{padleft:|2|x<nowiki/>y}}
21823 Strip marker in padright
21825 {{padright:|2|x<nowiki/>y}}
21832 Strip marker in anchorencode
21834 {{anchorencode:x<nowiki/>y}}
21841 nowiki inside link inside heading (bug 18295)
21843 ==[[foo|x<nowiki>y</nowiki>z]]==
21845 <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>
21850 new support for bdi element (bug 31817)
21852 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21854 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21859 Ignore pipe between table row attributes
21863 |- id=foo | style='color: red'
21871 <tr id="foo" style="color: red">
21878 Gallery override link with WikiLink (bug 34852)
21881 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21884 <ul class="gallery mw-gallery-traditional">
21885 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21886 <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>
21887 <div class="gallerytext">
21897 Gallery override link with absolute external link (bug 34852)
21900 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21903 <ul class="gallery mw-gallery-traditional">
21904 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21905 <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>
21906 <div class="gallerytext">
21916 Gallery override link with malicious javascript (bug 34852)
21919 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21922 <ul class="gallery mw-gallery-traditional">
21923 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21924 <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>
21925 <div class="gallerytext">
21935 Gallery with invalid title as link (bug 43964)
21938 File:foobar.jpg|link=<
21941 <ul class="gallery mw-gallery-traditional">
21942 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21943 <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>
21944 <div class="gallerytext">
21952 Language parser function
21961 Padleft and padright as substr
21963 {{padleft:|3|abcde}}
21964 {{padright:|3|abcde}}
21972 Special parser function
21974 {{#special:RandomPage}}
21975 {{#special:BaDtItLe}}
21976 {{#special:Foobar}}
21985 Bug 34939 - Case insensitive link parsing ([HttP://])
21987 [HttP://MediaWiki.Org/]
21989 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21992 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21996 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21998 [HttP://MediaWiki.Org/ MediaWiki]
22000 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22005 Bug 34939 - Case insensitive link parsing (HttP://)
22007 HttP://MediaWiki.Org/
22009 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22012 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22030 <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>
22031 <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>
22032 <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>
22033 <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>
22034 <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>
22040 ### Parsoid-specific tests
22041 ### Parsoid-PHP parser incompatibilities
22044 1. SOL-sensitive wikitext tokens as template-args
22046 parsoid=wt2html,wt2wt
22052 <span about="#mwt1" typeof="mw:Transclusion">
22053 </span><ul about="#mwt1"><li>a</li>
22055 <span about="#mwt2" typeof="mw:Transclusion">
22056 </span><ol about="#mwt2"><li>a</li>
22058 <span about="#mwt3" typeof="mw:Transclusion">
22059 </span><dl about="#mwt3"><dd>a</dd>
22063 #### -----------------------------------------------------------------
22064 #### Parsoid-specific functionality tests
22065 #### -----------------------------------------------------------------
22067 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22068 # We know wt2wt will fail, but we expect selser to pass.
22069 # Due to the nature of our testing, wt2wt and selser tests will enter the
22070 # blacklist and we'll catch selser regressions based on changes to the
22071 # blacklist entries for selser tests.
22073 1. Bad treebuilder fixup of formatting elt is cleaned up
22075 parsoid=wt2html,wt2wt
22080 [[Image:Foobar.jpg|right|Test]]
22087 <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>
22094 2. Bad treebuilder fixup of formatting elt is cleaned up
22096 parsoid=wt2html,wt2wt
22098 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22100 <small>[[Image:Foobar.jpg|right|300px]]</small>
22104 <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>
22106 <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>
22110 3. Bad treebuilder fixup of formatting elt is cleaned up
22112 parsoid=wt2html,wt2wt
22114 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22116 <p><small><b>foo</b></small></p>
22117 <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>
22118 <p><small><b>bar</b></small></p>
22122 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22124 parsoid=wt2html,wt2wt
22126 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22128 <p><b><small></small></b></p>
22129 <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>
22133 #### ----------------------------------------------------------------
22134 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22135 #### tags. Parsoid's output for these tags differs from that of the
22137 #### ----------------------------------------------------------------
22140 Ref: 1. ref-location should be replaced with an index span
22143 B <ref name="x">foo</ref>
22147 <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>
22148 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>
22149 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>
22150 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22151 <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>
22152 <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>
22153 <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>
22158 Ref: 2. ref-tags with identical names should all get the same index
22160 A <ref name="x">foo</ref>
22164 <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>
22165 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>
22166 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22167 <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>
22172 Ref: 3. spaces in ref-names should be ignored
22174 A <ref name="x">foo</ref>
22175 B <ref name=" x " />
22179 <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>
22180 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>
22181 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>
22182 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22183 <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>
22187 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22189 Ref: 4. 'constructor' should be accepted as a valid ref-name
22191 A <ref name="constructor">foo</ref>
22194 <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>
22195 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22196 <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>
22201 Ref: 5. body should accept generic wikitext
22204 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22209 <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>
22211 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22212 <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>
22218 Ref: 6. indent-pres should not be output in ref-body
22228 <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>
22230 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22231 <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
22239 Ref: 7. No p-wrapping in ref-body
22256 <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>
22258 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22259 <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
22274 Ref: 8. transclusion wikitext has lower precedence
22276 A <ref> foo {{echo|</ref> B C}}
22280 <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>
22281 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22282 <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>
22287 Ref: 9. unclosed comments should not leak out of ref-body
22289 A <ref> foo <!--</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 <!----></span></li>
22299 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22301 A <ref> <b> foo </ref> B C
22305 <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>
22308 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22309 <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>
22314 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22320 <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
22321 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>
22322 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22323 <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>
22324 <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>
22329 Ref: 12. ref-tags act as trailing newline migration barrier
22331 <!--the newline at the end of this line moves out of the p tag-->a
22333 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22339 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22342 <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>
22343 <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>
22346 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22347 <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>
22348 <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>
22352 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22359 <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
22360 <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>
22361 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22362 <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>
22363 <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
22369 Ref: 14. A nested ref-tag should be emitted as plain text
22371 <ref>foo <ref>bar</ref> baz</ref>
22375 <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>
22377 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22378 <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>
22383 Ref: 15. ref-tags with identical names should get identical indexes
22385 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22386 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22390 <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>
22391 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>
22393 <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>
22397 ## We don't bother wt2wt-ing non-standard whitespace
22399 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22407 <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>
22408 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22409 <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>
22413 Ref: 17. Generate valid HTML5 id/about attributes
22415 <ref name="a b">foo</ref>
22419 <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>
22422 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22423 <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>
22428 Ref: 18. T58916: Extension attributes should be parsed as plain text
22430 <ref name="{{echo|a}}">foo</ref>
22434 <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>
22437 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22438 <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>
22443 Ref: 19. ref-tags with identical name encodings should get identical indexes
22445 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22449 <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>
22451 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22452 <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>
22457 Ref: 20. ref-tags with identical names but different content should keep it
22459 A <ref name="foo">Foo one</ref>
22460 B <ref name="foo">Foo two</ref>
22461 C <ref name="foo" />
22465 <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>
22466 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>
22467 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>
22469 <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>
22474 References: 1. references tag without any refs should be handled properly
22478 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22482 References: 2. references tag with group only outputs references from that group
22484 A <ref group="a">foo</ref>
22485 B <ref group="b">bar</ref>
22488 <references group="a" />
22490 <references group="b" />
22492 <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>
22493 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>
22494 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>
22496 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22497 <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>
22499 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22500 <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>
22502 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22503 <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>
22508 References: 3. ref list should be cleared after processing references
22518 <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>
22520 <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>
22523 <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>
22525 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22526 <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>
22531 References: 4. only referenced group should be cleared after processing references
22533 A <ref group="a">afoo</ref>
22536 <references group="a" />
22542 <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>
22543 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>
22545 <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>
22548 <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>
22550 <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>
22554 ## Don't expect this to rt since we're dropping content
22556 References: 5. ref tags in references should be processed while ignoring all other content
22558 parsoid=wt2html,html2html
22561 B <ref name="b">bar</ref>
22564 <ref name="a">foo</ref>
22565 This should just get lost.
22568 <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>
22569 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>
22572 <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>
22577 References: 6. <references /> from a transclusion
22579 <ref>Foo</ref> {{echo|<references />}}
22581 <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>
22586 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22588 A <ref>foo bar for a</ref>
22589 B <ref group="X" name="b" />
22593 <references group="X">
22594 <ref name="b">foo</ref>
22597 <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>
22598 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>
22601 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22602 <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>
22605 <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"}}'>
22606 <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>
22611 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22613 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22616 <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>
22617 <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>
22621 # This test only works in wt2html now as the <references /> are always generated
22622 # unless selser is active. Once T72722 is fixed, we should add a changes test
22623 # here to ensure that unrelated changes don't add the new <references />
22624 # when selser is active.
22626 References: 9. Generate missing references list at the end
22629 B <ref group="inexistent">bar</ref>
22631 <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>
22632 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22633 <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>
22635 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22636 <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>
22641 References: 10. New <references/> shouldn't be added for unrelated edits.
22644 "modes": ["selser"],
22645 "changes": [["#x", "remove"]],
22649 Unrelated text<span id="x"> that's going to disappear</span>.
22657 Entities in ref name
22659 <ref name="test & me">hi</ref>
22662 <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>
22663 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22664 <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>
22668 ## The output here may look funny, but it's what the php parser will do. The
22669 ## unclosed references tag becomes escaped text, and then a new references
22670 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22671 ## nowiki tags, and the auto-generated references tag is only dropped in
22674 Generate references for unclosed references tag
22682 <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>
22684 <p><references></p>
22685 <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>
22689 New reference serializes on its own line
22691 parsoid=wt2wt,html2wt
22696 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22699 #### ----------------------------------------------------------------
22700 #### Parsoid-only testing of Parsoid's impl of LST
22701 #### Not implemented yet, see
22702 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22703 #### ----------------------------------------------------------------
22706 LST Sections: 1. Simple section start and end
22708 parsoid={ "suppressErrors": true }
22710 <section begin="2011-05-16" />
22711 <section end="2014-04-10 (MW 1.23wmf22)" />
22713 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22714 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22717 #--------- Test stripping of empty nodes in template content ----------
22719 Empty LI and TR nodes should be stripped from template content
22724 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22728 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22741 Empty LI and TR nodes should not be stripped from top-level content
22768 Empty TR nodes should not be stripped if they have any attributes set
22770 {{EmptyTRWithHTMLAttrTest}}
22772 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22773 <tr align="center"></tr>
22774 <tr><td>foo</td></tr>
22775 <tr align="center"></tr>
22776 <tr><td>bar</td></tr>
22780 #### ----------------------------------------------------------------
22781 #### The following section of tests are primarily to test
22782 #### wikitext escaping capabilities of Parsoid. Given that
22783 #### escaping can be done any number of ways, the wikitext (input)
22784 #### is always adjusted to reflect how Parsoid adds nowiki
22787 #### We are marking several tests as parsoid-only since the
22788 #### HTML in the result section is different from what the
22789 #### PHP parser generates for it.
22790 #### ----------------------------------------------------------------
22793 #### --------------- Headings ---------------
22795 #### 1. Nested inside html <h1>=foo=</h1>
22796 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22797 #### 3. Nested inside html with wikitext split by html tags
22798 #### 4. No escape needed
22799 #### 5. Empty headings <h1></h1>
22800 #### 6. Heading chars in SOL context
22801 #### ----------------------------------------
22803 Headings: 0. Unnested
22813 <p>=foo<i>a</i>=</p>
22815 <nowiki>=foo=</nowiki>
22817 <nowiki> </nowiki>=foo=
22819 <nowiki>=foo=</nowiki>
22821 =foo''a''<nowiki>=</nowiki>
22824 # New headings and existing headings are handled differently
22826 Headings: 1. Nested inside html
22834 <h1 data-parsoid=''>=foo=</h1>
22835 <h2 data-parsoid=''>=foo=</h2>
22836 <h3 data-parsoid=''>=foo=</h3>
22837 <h4 data-parsoid=''>=foo=</h4>
22838 <h5 data-parsoid=''>=foo=</h5>
22839 <h6 data-parsoid=''>=foo=</h6>
22847 =<nowiki>=foo=</nowiki>=
22848 ==<nowiki>=foo=</nowiki>==
22849 ===<nowiki>=foo=</nowiki>===
22850 ====<nowiki>=foo=</nowiki>====
22851 =====<nowiki>=foo=</nowiki>=====
22852 ======<nowiki>=foo=</nowiki>======
22857 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22866 <nowiki>*</nowiki>bar
22872 <nowiki>=bar=</nowiki>
22876 Headings: 3. Nested inside html with wikitext split by html tags
22880 <h1>=<b>bold</b>foo=</h1>
22882 = ='''bold'''foo= =
22886 Headings: 4a. No escaping needed (testing just h1 and h2)
22897 <h1><i>=</i>foo=</h1>
22917 Headings: 4b. No escaping needed (inside p-tags)
22932 Headings: 5. Empty headings
22936 <h1 data-parsoid='{}'></h1>
22938 <h2 data-parsoid='{}'></h2>
22940 <h3 data-parsoid='{}'></h3>
22942 <h4 data-parsoid='{}'></h4>
22944 <h5 data-parsoid='{}'></h5>
22946 <h6 data-parsoid='{}'></h6>
22956 =====<nowiki/>=====
22958 ======<nowiki/>======
22962 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22972 <nowiki>=a=</nowiki>
22974 <nowiki>=a=</nowiki>
22976 <nowiki>=a=</nowiki>
22980 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22993 <nowiki>=a=</nowiki>
22996 <nowiki>=a=</nowiki>
22999 <nowiki>=a=</nowiki>
23004 Headings: 6c. Heading chars in SOL context (leading newline break)
23012 <nowiki>=b=</nowiki>
23016 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23020 <!--c0--><p>=a=</p>
23022 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23024 <!--c0--><nowiki>=a=</nowiki>
23026 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23030 Headings: 6d. Heading chars in SOL context (No escaping needed)
23040 Headings: 7. Insert a newline between new content and headings
23046 <h2 data-parsoid='{}'>A</h2>
23047 <p data-parsoid='{}'>a</p>
23057 #### --------------- Lists ---------------
23058 #### 0. Outside nests (*foo, etc.)
23059 #### 1. Nested inside html <ul><li>*foo</li></ul>
23060 #### 2. Inside definition lists
23061 #### 3. Only bullets at start should be escaped
23062 #### 4. No escapes needed
23063 #### 5. No unnecessary escapes
23064 #### 6. Escape bullets in SOL position
23065 #### 7. Escape bullets in a multi-line context
23066 #### ----------------------------------------
23069 Lists: 0. Outside nests
23079 <nowiki>*</nowiki>foo
23081 <nowiki>#</nowiki>foo
23083 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23086 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23087 ## to test wikitext escaping, and insignificant whitespace diffs
23088 ## cause PHP parser tests to barf
23090 Lists: 1. Nested inside html (No unnecessary escapes)
23099 <li data-parsoid='{}'>*foo</li>
23100 <li data-parsoid='{}'>#foo</li>
23101 <li data-parsoid='{}'>:foo</li>
23102 <li data-parsoid='{}'>;foo</li>
23110 <li data-parsoid='{}'>*foo</li>
23111 <li data-parsoid='{}'>#foo</li>
23112 <li data-parsoid='{}'>:foo</li>
23113 <li data-parsoid='{}'>;foo</li>
23120 *<nowiki>*foo</nowiki>
23121 *<nowiki>#foo</nowiki>
23122 *<nowiki>:foo</nowiki>
23123 *<nowiki>;foo</nowiki>
23129 #<nowiki>*foo</nowiki>
23130 #<nowiki>#foo</nowiki>
23131 #<nowiki>:foo</nowiki>
23132 #<nowiki>;foo</nowiki>
23136 Lists: 2. Inside definition lists
23140 <dl><dt>;foo</dt></dl>
23141 <dl><dt>:foo</dt></dl>
23144 <dl><dd>:foo</dd></dl>
23148 ; <nowiki>:foo</nowiki>
23150 ; <nowiki>:foo</nowiki>
23157 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23163 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23167 *<nowiki>*foo</nowiki>''it''*bar
23171 Lists: 4. No escapes needed
23184 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23188 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23202 Lists: 5. No unnecessary escapes
23206 <ul><li> bar <span>[[foo]]</span></li></ul>
23207 <ul><li> =bar <span>[[foo]]</span></li></ul>
23208 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23209 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23210 <ul><li> =bar <span>foo]]</span>=</li></ul>
23211 <ul><li> <s></s>: a</li></ul>
23212 <ul><li> <i>* foo</i></li></ul>
23215 * bar <span><nowiki>[[foo]]</nowiki></span>
23217 * =bar <span><nowiki>[[foo]]</nowiki></span>
23219 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23221 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23223 * =bar <span>foo]]</span>=
23231 Lists: 6. Escape bullets in SOL position
23235 <p><!--cmt-->*foo</p>
23237 <!--cmt--><nowiki>*</nowiki>foo
23241 Lists: 7. Escape bullets in a multi-line context
23250 <nowiki>*</nowiki>b
23254 Lists: 8. Escape colons only if not present in tags
23258 <dl><dt>a:b<i>c:d</i></dt></dl>
23260 ; <nowiki>a:b</nowiki>''c:d''
23263 #### --------------- HRs ---------------
23264 #### 1. Single line
23265 #### -----------------------------------
23268 HRs: 1. Single line
23276 ----<nowiki>----</nowiki>
23281 #### --------------- Tables ---------------
23282 #### 1a. Simple example
23283 #### 1b. No escaping needed (!foo)
23284 #### 1c. No escaping needed (|foo)
23285 #### 1d. No escaping needed (|}foo)
23287 #### 2a. Nested in td (<td>foo|bar</td>)
23288 #### 2b. Nested in td (<td>foo||bar</td>)
23289 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23291 #### 3a. Nested in th (<th>foo!bar</th>)
23292 #### 3b. Nested in th (<th>foo!!bar</th>)
23293 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23297 #### 4c. No escaping needed
23298 #### --------------------------------------
23301 Tables: 1a. Simple example
23309 <nowiki>{|</nowiki>
23314 Tables: 1b. No escaping needed
23325 Tables: 1c. No escaping needed
23336 Tables: 1d. No escaping needed
23347 Tables: 2a. Nested in td
23352 <td>foo|bar</td></tr>
23353 <tr><td>x<div>a|b</div></td>
23357 |<nowiki>foo|bar</nowiki>
23359 |x<div><nowiki>a|b</nowiki></div>
23375 Tables: 2b. Nested in td
23381 <td>a<i>b||c</i></td>
23382 <td>a<i><div>b||c</div></i></td>
23383 </tr></tbody></table>
23386 |<nowiki>foo||bar</nowiki>
23387 |a''<nowiki>b||c</nowiki>''
23388 |a''<div><nowiki>b||c</nowiki></div>''
23397 <td>a<i><div>b||c</div></i>
23403 Tables: 2c. Nested in td -- no escaping needed
23419 Tables: 3a. Nested in th
23435 Tables: 3b. Nested in th
23440 <tr><th>foo!!bar</th>
23441 <th><i>foo|bar</i></th>
23442 <th><i>foo!!bar</i></th>
23443 <th><i><span>foo!!bar</span></i></th>
23444 </tr></tbody></table>
23447 !<nowiki>foo!!bar</nowiki>
23448 !''<nowiki>foo|bar</nowiki>''
23449 !''<nowiki>foo!!bar</nowiki>''
23450 !''<span><nowiki>foo!!bar</nowiki></span>''
23459 <th><i>foo!!bar</i>
23461 <th><i><span>foo!!bar</span></i>
23467 Tables: 3c. Nested in th
23472 <tr><th>foo||bar</th>
23473 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23474 </tr></tbody></table>
23477 !<nowiki>foo||bar</nowiki>
23478 !<nowiki>foo||bar</nowiki>
23491 Tables: 4a. Escape -
23507 |<nowiki>-bar</nowiki>
23512 Tables: 4b. Escape +
23528 |<nowiki>+bar</nowiki>
23533 Tables: 4c. No escaping needed
23538 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23539 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23545 <div>a|b</div></td>
23590 Tables: 4d. No escaping needed
23595 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23596 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23597 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23608 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23618 T97430: Don't emit empty nowiki pairs around marker meta tags
23622 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23623 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23625 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23626 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23630 Unclosed xmlish element in table line shouldn't eat end delimiters
23635 <tbody><tr><td> <foo</td>
23636 <td> bar></td></tr>
23653 #### --------------- Links ----------------
23654 #### 1. Quote marks in link text
23655 #### 2. Wikilinks: Escapes needed
23656 #### 3. Wikilinks: No escapes needed
23657 #### 4. Extlinks: Escapes needed
23658 #### 5. Extlinks: No escapes needed
23659 #### --------------------------------------
23661 Links 1. WikiLinks: No escapes needed
23665 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23666 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23667 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23671 [[Foo|x [Foobar] x]]
23673 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23674 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23675 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23680 Links 2. WikiLinks: Escapes needed
23684 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23685 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23686 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23687 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23688 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23689 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23690 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23691 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23692 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23693 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23695 [[Foo|<nowiki>Foobar]</nowiki>]]
23696 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23697 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23698 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23699 [[Foo|<nowiki>|Bar</nowiki>]]
23700 [[Foo|<nowiki>]]bar</nowiki>]]
23701 [[Foo|<nowiki>[[bar</nowiki>]]
23702 [[Foo|<nowiki>x [[ y</nowiki>]]
23703 [[Foo|<nowiki>x ]] y</nowiki>]]
23704 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23706 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23707 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23708 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23709 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23710 <a href="/wiki/Foo" title="Foo">|Bar</a>
23711 <a href="/wiki/Foo" title="Foo">]]bar</a>
23712 <a href="/wiki/Foo" title="Foo">[[bar</a>
23713 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23714 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23715 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23720 Links 3. WikiLinks: No escapes needed
23724 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23725 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23730 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23731 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23736 Links 4. ExtLinks: Escapes needed
23740 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23741 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23742 <p>[http://google.com]</p>
23743 <p>[http://google.com google]</p>
23744 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23745 <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>
23747 [http://google.com <nowiki>[google]</nowiki>]
23748 [http://google.com <nowiki>google]</nowiki>]
23750 <nowiki>[http://google.com]</nowiki>
23752 <nowiki>[http://google.com google]</nowiki>
23754 [http://google.com<nowiki>]</nowiki>
23756 [{{echo|http://google.com}}<nowiki>]</nowiki>
23758 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23759 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23760 </p><p>[http://google.com]
23761 </p><p>[http://google.com google]
23762 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23763 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23768 Links 5. ExtLinks: No escapes needed
23772 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23773 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23775 [http://google.com [google]
23777 [[http://google.com]]
23779 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23780 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23785 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23789 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23790 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23791 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23792 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23793 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23794 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23795 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23796 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23797 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23798 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23799 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23800 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23801 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23804 x<nowiki/>http://example.com<nowiki/>y
23805 http://example.com<nowiki/>?x
23806 http://example.com<nowiki/>&x
23807 http://example.com<nowiki/>'x
23808 http://example.com<nowiki/>,x
23809 http://example.com<nowiki/>.x
23810 http://example.com<nowiki/>;x
23811 http://example.com<nowiki/>:x
23812 http://example.com<nowiki/>;x
23813 http://example.com<nowiki/>!x
23814 http://example.com<nowiki/>=x
23815 http://example.com<nowiki/>(x)
23816 http://example.com(x<nowiki/>)
23820 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23825 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23827 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23828 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23829 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23830 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23831 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23837 "http://example.com"
23838 (http://example.com)
23839 (http://example.com) foo
23840 http://example.com,
23841 http://example.com, foo
23844 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23846 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23847 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23848 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23849 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23850 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23855 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23859 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23860 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23862 http://example.com.,;:!?\
23863 -http://example.com:
23865 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23866 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23871 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23875 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23876 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23877 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23881 X<nowiki/>RFC 123<nowiki/>y
23885 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23889 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23890 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23891 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23898 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23899 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23900 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23905 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23909 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23910 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23911 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23915 X<nowiki/>PMID 123<nowiki/>y
23919 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23923 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23924 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23925 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23932 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23933 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23934 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23939 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23943 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23944 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23945 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23948 ISBN 1234567890<nowiki/>1
23949 ISBN 1234567890<nowiki/>x
23950 a<nowiki/>ISBN 1234567890<nowiki/>b
23954 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23958 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23962 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23967 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23971 <p>this is not a link: http://example.com
23974 this is not a link: <nowiki>http://example.com</nowiki>
23978 Links 15. Link trails can't become link prefixes.
23983 <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>
23985 [[Söfnuður]]-[[00]]
23987 <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>
23991 #### --------------- Quotes ---------------
23992 #### 1. Quotes inside <b> and <i>
23993 #### 2. Link fragments separated by <i> and <b> tags
23994 #### 3. Link fragments inside <i> and <b>
23995 #### 4. No escaping needed
23996 #### --------------------------------------
23998 1a. Quotes inside <b> and <i>
24009 <b>foo'<i>bar'</i>baz</b>
24018 <i>fools'<span> errand</span></i>
24019 <i><span>fool</span>'s errand</i>
24020 '<i>foo</i> bar '<i>baz</i>
24021 a|!*#-:;+-~[]{}b'<i>x</i>
24025 ''<nowiki>''foo''</nowiki>''
24026 ''<nowiki>'''foo'''</nowiki>''
24028 '''<nowiki/>'foo''''
24029 '''<nowiki>''foo''</nowiki>'''
24030 '''<nowiki>'''foo'''</nowiki>'''
24031 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24032 '''foo'''<nowiki/>'s
24038 '''foo'''<nowiki/>'
24039 ''''foo'''<nowiki/>'
24040 ''fools'<span> errand</span>''
24041 ''<span>fool</span>'s errand''
24042 '<nowiki/>''foo'' bar '''baz''
24043 a|!*#-:;+-~[]{}b'''x''
24047 1b. Quotes inside <b> and <i> with other tags on same line
24051 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24052 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24053 <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>
24054 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24055 '<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>
24056 '<i>foo</i> <div title="name">test</div>
24057 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24058 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24059 <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>
24062 '''a'' foo ''[[bar]]''
24063 ''a''' foo ''[[bar]]''
24064 ''a''' foo '''{{echo|[[bar]]}}'''
24065 [[foo]] x'''[[bar]]''
24066 '''foo'' <ref>test</ref>
24067 '''foo'' <div title="name">test</div>
24068 '''foo'' and <br> bar
24073 2. Link fragments separated by <i> and <b> tags
24077 <p>[[<i>foo</i>hello]]</p>
24078 <p>[[<b>foo</b>hello]]</p>
24080 [[''foo''<nowiki>hello]]</nowiki>
24082 [['''foo'''<nowiki>hello]]</nowiki>
24085 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24086 # this is one of the shortcomings of this format
24088 3. Link fragments inside <i> and <b>
24092 <p><i>[[foo</i>]]</p>
24093 <p><b>[[foo</b>]]</p>
24095 ''[[foo''<nowiki>]]</nowiki>
24097 '''[[foo'''<nowiki>]]</nowiki>
24101 4. No escaping needed
24105 <p>'<span><i>bar</i></span>'
24106 '<span><b>bar</b></span>'
24110 '<span>''bar''</span>'
24111 '<span>'''bar'''</span>'
24115 #### ----------- Paragraphs ---------------
24116 #### 1. No unnecessary escapes
24117 #### --------------------------------------
24120 1. No unnecessary escapes
24124 <p>bar <span>[[foo]]</span>
24125 </p><p>=bar <span>[[foo]]</span>
24126 </p><p>[[bar <span>[[foo]]</span>
24127 </p><p>]]bar <span>[[foo]]</span>
24128 </p><p>=bar <span>foo]]</span>=
24131 bar <span><nowiki>[[foo]]</nowiki></span>
24133 =bar <span><nowiki>[[foo]]</nowiki></span>
24135 [[bar <span><nowiki>[[foo]]</nowiki></span>
24137 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24139 =bar <span>foo]]</span><nowiki>=</nowiki>
24142 #### ----------------------- PRE --------------------------
24143 #### 1. Leading whitespace in SOL context should be escaped
24144 #### ------------------------------------------------------
24146 1. Leading whitespace in SOL context should be escaped
24169 <nowiki> </nowiki>a
24171 <nowiki> </nowiki> a
24175 <nowiki> </nowiki> a
24177 <nowiki> </nowiki>a
24180 <nowiki> </nowiki>b
24203 2. Leading whitespace in non-indent-pre contexts should not be escaped
24207 <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>
24208 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24209 <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>
24219 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24238 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24242 <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>
24244 [[File:Foobar.jpg|thumb|caption]]
24248 5. Nowiki escaping should account for indent-pres
24258 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24271 #### --------------- Behavior Switches --------------------
24274 1. Valid behavior switches should be escaped
24281 <nowiki>__TOC__</nowiki>
24282 ''<nowiki>__TOC__</nowiki>''
24286 2. Invalid behavior switches should not be escaped
24297 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24299 Behavior switches should be SOL-transparent
24303 <meta property="mw:PageProp/toc" />
24305 <!-- this one's bogus -->
24308 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24310 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24314 <!-- this one's bogus -->
24323 #### --------------- HTML tags ---------------
24326 #### 3. multi-line html tag
24327 #### 4. extension tags
24328 #### -----------------------------------------
24334 <a href="http://google.com">google</a>
24336 <a href="http://google.com">google</a>
24344 <ul><li> <div>foo</div></li>
24345 <li> <div style="color:red">foo</div></li>
24346 <li> <td></li></ul>
24349 * <nowiki><div>foo</div></nowiki>
24350 * <nowiki><div style="color:red">foo</div></nowiki>
24351 * <nowiki><td></nowiki>
24355 3. multi-line html tag
24374 <p><ref>foo</ref>
24375 </p><p><ref>bar
24376 </p><p>baz</ref>
24379 <nowiki><ref>foo</ref></nowiki>
24381 <nowiki><ref>bar</nowiki>
24383 baz<nowiki></ref></nowiki>
24386 #### --------------- Others ---------------
24392 <p><nowiki>foo</nowiki>
24395 <nowiki>foo</nowiki>
24398 ## The quote-char in the input is necessary for triggering the bug
24400 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24409 #----------- End of wikitext escaping tests --------------
24413 Tag-like HTML structures are passed through as text
24435 </p><p>1<d e>f
24440 HTML tag with necessary entities in attributes
24442 <span title="&amp;">foo</span>
24444 <p><span title="&amp;">foo</span>
24449 HTML tag with 'unnecessary' entity encoding in attributes
24451 <span title="&">foo</span>
24453 <p><span title="&">foo</span>
24458 HTML tag with broken attribute value quoting
24460 parsoid=wt2html,html2html
24462 <span title="Hello world>Foo</span>
24464 <p><span title="Hello world">Foo</span>
24467 <p><span title="Hello world">Foo</span></p>
24471 Self-closed tag with broken attribute value quoting
24473 parsoid=wt2html,html2html
24475 <div title="Hello world />Foo
24477 <div title="Hello world"></div>
24480 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24484 Table with broken attribute value quoting
24486 parsoid=wt2html,html2html
24489 | title="Hello world|Foo
24494 <td title="Hello world">Foo
24500 <td title="Hello world">Foo
24506 Table with broken attribute value quoting on consecutive lines
24508 parsoid=wt2html,html2html
24511 | title="Hello world|Foo
24512 | style="color:red|Bar
24517 <td title="Hello world">Foo
24519 <td style="color:red">Bar
24525 <td title="Hello world">Foo
24526 </td><td style="color: red">Bar
24527 </td></tr></tbody></table>
24532 Accept empty td cell attribute
24535 | align="center" | foo || |
24540 <td align="center"> foo </td>
24547 Non-empty attributes in th-cells
24550 ! Foo !! style="color: red" | Bar
24556 <th style="color: red"> Bar
24562 Accept empty attributes in th-cells
24577 Empty table rows go away
24598 ### Parsoid-centric tests for testing RTing of inter-element separators
24599 ### Edge cases not tested by existing parser tests and specific to
24600 ### Parsoid-specific serialization strategies.
24604 RT-ed inter-element separators should be valid separators
24616 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24620 # Parsoid-only since PHP parser relies on Tidy for correct output
24622 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24636 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24637 <p>bar</p></small></td></tr>
24641 <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>
24645 # Note that the "style" attribute is really a template parameter here.
24646 # The = would have to be {{=}} if you wanted the literal.
24648 Empty TD followed by TD with tpl-generated attribute
24653 |{{echo|style='color:red'}}|foo
24667 Indented table with an empty td
24685 ## We have some newline diffs RT-ing this edge case
24686 ## and it is not important enough -- we seem to be emitting
24687 ## at most 2 newlines after a </tr> and this is unrelated to
24688 ## the issue from T85627 that this is testing.
24690 Indented table with blank lines in between (T85627)
24709 Indented block & table
24723 <div data-parsoid='{"stx":"html"}'>foo</div>
24725 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24730 Indent and comment before table row
24745 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24746 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24750 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24752 Empty TR followed by a template-generated TR
24758 {{echo|<tr><td>foo</td></tr>}}
24764 <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}}]}'>
24769 ## PHP and parsoid output differ for this, and since this is primarily
24770 ## for testing Parsoid's serializer, marking this Parsoid only
24772 Empty TR followed by mixed-ws-comment line should RT correctly
24788 <!--c--> </tr><!--d-->
24794 Multi-line image caption generated by templates with/without trailing newlines
24796 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24797 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24799 <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>
24800 <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>
24804 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24808 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24810 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24812 <includeonly>foo</includeonly>
24820 ## PHP emits broken html for this, and since this is primarily
24821 ## a Parsoid serializer test, marking this Parsoid only
24823 Improperly nested inline or quotes tags with whitespace in between
24825 <span> <s>x</span> </s>
24828 <p><span> <s>x</s></span><s> </s>
24829 <b> <i>x</i></b><i> </i>
24834 Encapsulate protected attributes from wt
24836 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24838 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
24842 <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>
24844 <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">
24845 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
24849 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24850 ## Having nested or stray pre tags results in the attempt to add duplicates,
24851 ## causing an assertion fail. This test tries to prevent that situation.
24853 Ensure ParagraphWrapper can deal with stray closing pre tags
24863 1. Ensure fostered text content is wrapped in element nodes
24867 <table>hi</table><table>ho</table>
24876 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24878 parsoid=wt2html,wt2wt
24887 <tbody><tr><td> a</td></tr>
24892 Encapsulation properly handles null DSR information from foster box
24894 parsoid=wt2html,wt2wt
24896 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24898 <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>
24902 1. Encapsulate foster-parented transclusion content
24904 parsoid=wt2wt,wt2html
24906 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24908 <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>
24918 2. Encapsulate foster-parented transclusion content
24920 parsoid=wt2wt,wt2html
24922 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24924 <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>
24935 3. Encapsulate foster-parented transclusion content
24937 parsoid=wt2wt,wt2html
24939 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24941 <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>"]}">
24954 4. Encapsulate foster-parented transclusion content
24956 parsoid=wt2wt,wt2html
24958 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24960 <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>"]}">
24973 5. Encapsulate foster-parented transclusion content
24975 parsoid=wt2wt,wt2html
24977 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24979 <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>
24994 6. Encapsulate foster-parented transclusion content
24996 parsoid=wt2wt,wt2html
24998 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25000 <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>
25016 7. Encapsulate foster-parented transclusion content
25018 parsoid=wt2wt,wt2html
25020 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25022 <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>
25032 # Note that the wt is broken on purpose: the = should be {{=}} if you
25033 # don't want it to be a template parameter key.
25035 8. Encapsulate foster-parented transclusion content
25037 parsoid=wt2wt,wt2html
25040 }}{|{{echo|style='color:red'}}
25045 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25047 <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>
25058 9. Encapsulate foster-parented transclusion content
25060 parsoid=wt2wt,wt2html
25062 <table>{{echo|hi</table>hello}}
25064 <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>
25068 Table in fosterable position
25079 <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">
25081 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25087 # Parsoid only for bug 64747
25089 Properly encapsulate empty-content transclusions in fosterable positions
25097 <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"}]]}'>
25103 Always encapsulate foster box when template range is expanded to table
25116 T115289: Unclosed table
25118 {{echo|<table>}}<!--c-->[[Category:Two]]
25120 <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>
25124 T115289: Don't migrate newlines out of tables with fostered content
25126 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25128 <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>
25132 T73074: More fostering fun
25134 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25136 <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>
25140 Support <object> element with .data attribute
25144 <object data="test.swf"></object>
25146 <object data="test.swf"></object>
25150 Don't block XML namespace declaration
25152 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25154 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25157 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25160 # -----------------------------------------------------------------
25161 # The following section of tests are primarily to spec requirements
25162 # around Parsoid's serialization (old, new, edited content)
25164 # All these tests are marked Parsoid html2wt and html2html only
25165 # ----------------------------------------------------------------
25168 Ignore rel attribute in a-tags during serialization to url-links
25172 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25173 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25174 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25176 http://en.wikipedia.org/wiki/Foobar
25177 http://en.wikipedia.org/wiki/Foobar
25178 http://en.wikipedia.org/wiki/Foobar
25181 # 'mi' is a localinterwiki prefix as well as a language
25183 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25187 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25194 New wikilinks should be serialized properly
25198 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25199 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25200 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25201 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25202 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25206 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25207 http://en.wikipedia.org/wiki/Foo
25208 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25212 New wiki links (href variations)
25216 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25217 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25218 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25219 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25224 [[Toxine bactérienne]]
25228 New wiki links (content string variations)
25232 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25233 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25234 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25238 [[Foo_bar|./Foo_bar]]
25242 New category links (href variations)
25246 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25247 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25248 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25250 [[Category:Toxine bactérienne]]
25251 [[Category:Toxine bactérienne]]
25252 [[Category:Toxine bactérienne]]
25256 New sol transparent links don't need indent-pre nowiki protection
25261 <link rel="mw:PageProp/redirect" href="./Main_Page">
25262 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25263 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25265 #WEITERLEITUNG [[Main Page]]
25266 <!-- this is good --> [[Category:Good]]
25267 <!-- this is great --> [[Kategorie:Great]]
25271 New interlanguage links (href variations)
25275 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25276 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25277 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25279 [[es:Toxine bactérienne]]
25280 [[es:Toxine_bactérienne]]
25281 [[es:Toxine_bactérienne]]
25285 Image: Modifying size of an image (1)
25288 "modes": ["wt2wt"],
25290 ["img[height]", "attr", "height", "22"],
25291 ["img[width]", "attr", "width", "200"]
25295 [[Image:Foobar.jpg|230x230px]]
25297 [[Image:Foobar.jpg|200x200px]]
25301 Image: Modifying size of an image (2)
25304 "modes": ["wt2wt"],
25306 ["img[height]", "attr", "height", "100"],
25307 ["img[width]", "attr", "width", "500"]
25311 [[Image:Foobar.jpg|230x230px]]
25313 [[Image:Foobar.jpg|500x500px]]
25316 # Change in size is ignored so long as class='mw-default-size'
25318 Image: Modifying size of an image (3)
25321 "modes": ["wt2wt"],
25323 ["figure[class]", "removeClass", "mw-default-size"],
25324 ["figure img", "attr", "height", "19"],
25325 ["figure img", "attr", "width", "170"]
25329 [[Image:Foobar.jpg|thumb]]
25331 [[Image:Foobar.jpg|thumb|170x170px]]
25335 Image: Modifying alignment of an image (bug 48665)
25338 "modes": ["wt2wt"],
25340 ["figure[class]", "removeClass", "mw-halign-right"],
25341 ["figure[class]", "addClass", "mw-halign-left"]
25345 [[Image:Foobar.jpg|thumb|caption|right]]
25347 [[Image:Foobar.jpg|thumb|caption|left]]
25351 Image: Modifying mw-default-size of an frameless image (bug 62805)
25354 "modes": ["wt2wt"],
25356 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25360 [[Image:Foobar.jpg|frameless|right]]
25362 [[Image:Foobar.jpg|frameless|right|220x220px]]
25366 Image: Modifying valign of an image (bug 49221)
25369 "modes": ["wt2wt"],
25371 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25372 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25376 [[File:Foobar.jpg|20px|middle]]
25378 [[File:Foobar.jpg|20px|text-top]]
25382 Image: Modifying alt attribute of an image (bug 56400)
25385 "modes": ["wt2wt"],
25387 ["img[alt]", "attr", "alt", "some alternate edited text"]
25391 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25393 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25397 Image: Modifying caption of an image
25400 "modes": ["wt2wt"],
25402 ["figcaption", "text", "new caption"]
25406 [[Image:Foobar.jpg|thumb|original caption]]
25408 [[Image:Foobar.jpg|thumb|new caption]]
25412 Image: empty alt attribute (bug 48924)
25416 [[File:Foobar.jpg|thumb|alt=|bar]]
25418 <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>
25422 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25428 <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>
25430 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25434 Image: Block level image should have \n before and after
25437 [[File:Foobar.jpg|right|thumb|150x150px]]
25441 <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>
25446 Image: New block level image should have \n before and after (existing content)
25449 [[File:Foobar.jpg|right|thumb|150x150px]]
25453 <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>
25458 Image: upright option (parsoid)
25460 [[File:Foobar.jpg|thumb|upright|caption]]
25461 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25462 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25464 <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>
25465 <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>
25466 <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>
25470 Image: upright option is ignored on inline and frame images (parsoid)
25472 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25474 <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>
25478 Image: from basic HTML (1)
25482 <span typeof="mw:Image">
25483 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25486 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25490 Image: from basic HTML (2)
25494 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25496 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25500 Image: from basic HTML (3)
25504 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25506 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25510 Image: from basic HTML (4)
25514 <img src="./File:Foobar.jpg">
25516 [[File:Foobar.jpg|link=]]
25520 Image: Invalid title as link
25522 [[File:Foobar.jpg|link=<]]
25524 <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>
25527 <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>
25531 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25536 <li><p>foo</p></li>
25543 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25547 <ul> <li>foo</li></ul>
25553 Don't strip leading whitespace when handling indent-pre suppressing tags
25558 <tr><td> indented row</td></tr>
25561 <b>This is very bold of you!</b>
25564 indented cell (no pre-wrapping!)
25574 '''This is very bold of you!'''
25578 indented cell (no pre-wrapping!)
25586 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25608 <nowiki> </nowiki></span>bar2
25611 <nowiki> </nowiki><span>bar</span>
25614 <nowiki> </nowiki><span>foo</span>
25619 Lists: Dont insert newlines in a serialized list item.
25623 <ul><li>a<br>b</li><li>c</li></ul>
25630 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25633 "modes": ["html2wt"],
25634 "scrubWikitext": false
25637 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25638 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25640 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25641 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25643 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25645 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25647 == hello there [[Category:A1]] ==
25649 == [[Category:A2]] hi pal ==
25651 == <!--foo--> [[Category:A3]] how goes it ==
25653 == it goes well [[Category:A4]] <!--bar--> ==
25655 ==howdy [[Category:A5]]==
25661 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25664 "modes": ["html2wt"],
25665 "scrubWikitext": true
25668 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25669 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25671 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25672 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25674 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25682 <!--foo--> [[Category:A3]]
25687 [[Category:A4]] <!--bar-->
25695 Headings: Don't hoist metas that come from templates
25698 "modes": ["html2wt"],
25699 "scrubWikitext": true
25702 <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>
25704 == {{echo|foo [[Category:Foo]]}} ==
25708 Headings: Category in ref isn't hoisted
25711 "modes": ["html2wt"],
25712 "scrubWikitext": true
25715 <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>
25717 <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>
25720 [[Category:Baz]] </ref> ==
25726 Parsoid: Serialize positional parameters with = in them as named parameter
25730 <p about="#mwt1" typeof="mw:Transclusion"
25731 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25733 <p about="#mwt1" typeof="mw:Transclusion"
25734 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25736 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25737 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25738 <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>
25742 {{echo|1=f=oo|2=bar}}
25744 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25745 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25746 {{echo|<nowiki>f=oo</nowiki>|bar}}
25750 Parsoid: Serialize positional parameters with = in extlink as named parameter
25754 <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>
25756 {{echo|1=http://stuff?is=ok}}
25760 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25764 <div>a<p>b</p></div>
25785 Substrings resembling wikitext in hrefs should not get nowiki escapes
25789 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25795 Enforce single-line context in the serializer
25802 <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">
25803 </span><span about="#mwt1">you</span> </h2>
25805 <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>
25807 <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
25808 there</span></li></ol>
25820 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25827 </tbody></table></dd></dl>
25831 == hi {{bogus|there
25842 * foo '''bar''' baz
25854 Serialize new placeholder space without spans
25858 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25860 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25862 <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>
25868 <ref>foo : bar</ref>ok
25872 #-----------------------
25873 # Tag minimization tests
25874 #-----------------------
25877 1. I/B quote minimization: wikitext-only tags should be combined
25881 <p><i>A</i><i>B</i></p>
25882 <p><b>A</b><b>B</b></p>
25883 <p><i>A</i><b><i>B</i></b></p>
25884 <p><b>A</b><i><b>B</b></i></p>
25885 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25886 <p><i><b>A</b></i><i><b>B</b></i></p>
25887 <p><i><b>A</b></i><b><i>B</i></b></p>
25888 <p><b><i>A</i></b><i><b>B</b></i></p>
25908 2. I/B quote minimization: wikitext and html tags should not be combined
25912 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25913 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25917 ''A''<nowiki/>'''<i>B</i>'''
25921 3. I/B quote minimization: templated content stops minimization
25925 <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>
25926 <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>
25928 ''A''{{echo|''B''}}
25930 ''A''{{echo|'''''B'''''}}
25934 4. I/B quote minimization: new content should be mimimized with adjacent old content
25938 <p><i>A</i><i>B</i></p>
25939 <p><b>A</b><b>B</b></p>
25940 <p><i>A</i><b><i>B</i></b></p>
25950 5a. Merge adjacent quote nodes if they've been edited
25953 "modes": ["wt2wt", "selser"],
25955 ["p", "contents", "remove", ":contains('b')"]
25965 5b. Merge adjacent quote nodes if they've been edited
25968 "modes": ["wt2wt", "selser"],
25974 ''a''<span id="x">b</span>''c''
25980 1. Merge adjacent link nodes as long as at least one element is new
25983 "modes": ["html2wt"],
25984 "scrubWikitext": true
25987 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25988 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25989 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25993 [[Football|Foot]][[Football|ball]]
25997 2. Merge adjacent link nodes and enable additional normalizations
26000 "modes": ["html2wt"],
26001 "scrubWikitext": true
26004 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26006 [[Football|''Football'']]
26010 3. Don't merge adjacent link nodes if scrubWikitext is false
26013 "modes": ["html2wt"],
26014 "scrubWikitext": false
26017 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26019 [[Football|Foot]][[Football|ball]]
26022 #------------------------------
26023 # End of tag minimization tests
26024 #------------------------------
26027 Bug 54262: New entities
26031 <span typeof="mw:Entity"> </span>
26036 ## Note that there is no wikitext output for 'unknownproperty' ##
26037 ## Unknown magic words are silently dropped ##
26044 <meta property='mw:PageProp/toc' />
26045 <meta property='mw:PageProp/notoc' />
26046 <meta property='mw:PageProp/forcetoc' />
26047 <meta property='mw:PageProp/index' />
26048 <meta property='mw:PageProp/noindex' />
26049 <meta property='mw:PageProp/nogallery' />
26050 <meta property='mw:PageProp/noeditsection' />
26051 <meta property='mw:PageProp/notitleconvert' />
26052 <meta property='mw:PageProp/nocontentconvert' />
26053 <meta property='mw:PageProp/unknownproperty' />
26063 __NOCONTENTCONVERT__
26067 Consecutive <pre>s should not get merged
26069 parsoid=html2wt,html2html
26071 <pre>a</pre><pre>b</pre>
26099 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26103 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26105 [[Special:BookSources/1234567890|ISBN 1234567895]]
26109 Edited RFC links not serializable as RFC links should serialize as extlinks
26113 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26115 [//tools.ietf.org/html/rfc123 New RFC]
26119 Edited PMID links not serializable as PMID links should serialize as extlinks
26123 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26125 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26129 WTS of autolinks with trailing/surrounding context
26133 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26134 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26135 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26136 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26137 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26138 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26140 http://cscott.net'''foo'''
26142 http://cscott.net<b>foo</b>
26144 '''http://cscott.net'''
26146 '''http://cscott.net '''
26148 '''http://cscott.net<nowiki/>x'''
26150 http://cscott.net<nowiki/>x
26154 WTS of autolinks with nowikis (round-trip)
26156 x<nowiki/>http://cscott.net<nowiki/>x
26158 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26161 # this is the "easy" test because it leaves in place all the
26162 # data-parsoid information indicating this is an autolink
26164 WTS of autolinks with escapes (editing)
26167 "modes": ["wt2wt"],
26169 [ "meta", "remove" ]
26173 x<nowiki/>http://cscott.net<nowiki/>x
26175 x<nowiki/>http://cscott.net<nowiki/>x
26179 WTS of edited autolink-like text (T103364)
26182 "modes": ["wt2wt"],
26184 [ "span[typeof]", "removeAttr", "typeof" ]
26188 Not a link: <nowiki>http://example.com</nowiki>.
26190 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26194 WTS of newly-authored autolink-like text (T103364)
26198 <p>http://example.com is not a link.</p>
26200 <nowiki>http://example.com</nowiki> is not a link.
26204 WTS of autolink-like text after an autolink (T108563)
26208 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26210 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26214 Magic links inside links (not autolinked)
26216 [[Foo|http://example.com]]
26219 [[Foo|ISBN 123456789x]]
26221 [http://foo.com http://example.com]
26222 [http://foo.com RFC 1234]
26223 [http://foo.com PMID 1234]
26224 [http://foo.com ISBN 123456789x]
26226 <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>
26227 <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>
26229 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26230 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26231 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26232 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26234 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26235 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26236 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26237 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26241 Magic links inside image captions (autolinked)
26243 [[File:Foobar.jpg|thumb|http://example.com]]
26244 [[File:Foobar.jpg|thumb|RFC 1234]]
26245 [[File:Foobar.jpg|thumb|PMID 1234]]
26246 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26248 <div class="thumb tright">
26249 <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>
26250 <div class="thumbcaption">
26251 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26252 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26255 <div class="thumb tright">
26256 <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>
26257 <div class="thumbcaption">
26258 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26259 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26262 <div class="thumb tright">
26263 <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>
26264 <div class="thumbcaption">
26265 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26266 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26269 <div class="thumb tright">
26270 <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>
26271 <div class="thumbcaption">
26272 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26273 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26277 <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>
26278 <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>
26279 <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>
26280 <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>
26284 WTS of magic word text (T109371)
26289 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26290 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26292 <nowiki>RFC 1234</nowiki>
26294 [http://foo.com RFC 1234]
26300 Edited Redirect link should emit a non-piped wikitext link
26304 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26310 T75121: Infer extension name from typeOf if data-mw is not present
26312 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26314 <div typeOf="mw:Extension/foo"></div>
26319 # Note that the <p> wrapping isn't present in PHP parser output
26320 # The important thing for this test is that P-wrapping doesn't
26321 # interfere with the <nowiki> protection for leading - in <td>
26322 # (which isn't necessary for <th>).
26324 T88318: p-wrapped dash in table.
26326 parsoid=html2wt,wt2wt
26329 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26330 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26331 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26338 |<nowiki>-</nowiki>
26339 |<nowiki>- </nowiki>
26358 <td><small>-</small></td>
26370 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26375 <td id='mwAc'>foo</td>
26376 <td id='serialize-this'>bar</td>
26381 | id="serialize-this" |bar
26386 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26390 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26392 <div id="hello">ok</div>
26399 "modes": ["wt2wt"],
26401 [ "#xyz", "before", "<b>before</b> stuff " ],
26402 [ "#xyz", "after", " stuff <i>after</i>" ],
26403 [ "#xyz", "html", "x <b>y</b> z" ]
26407 <span id="xyz">hello</span>
26409 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26413 Never serialize a-tag as html, regardless of what data-parsoid has to say
26415 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26417 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26422 ## SSS FIXME: This is broken output nevertheless.
26423 ## What might be a reasonable non-broken output for this?
26424 ## This is an edge case unlikely to be seen in production
26425 ## that I am not wasting more time on this right now.
26427 Never serialize a-tag as html, no matter what attributes it has
26429 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26431 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26433 [http://boo.org http://boohoo.org]
26436 # Misnested is an indication that selser can reuse the source but these have
26437 # shown to sneak through on occasion. See T101768.
26438 # The original wikitext here is: [http://test.com [[one]] two three]
26440 Strip span tags added to mark misnested links
26444 <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>
26446 [http://test.com][[one]] two three
26450 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26454 <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|}"]}'>
26466 ## This test verifies the presence and computation of this attribute indirectly
26467 ## by making an edit and ensuring that the serialization is correct (which it would be
26468 ## only if firstWikitextNode is properly set).
26470 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26473 "modes": ["wt2wt"],
26475 [ "div#x", "remove" ],
26476 [ "div", "before", "<div>new</div>" ]
26480 <div id="x">foo</div>
26482 {{echo|<div>boo</div>
26490 {{echo|<div>boo</div>
26496 # --------------------------------------------
26497 # Tests spec'ing wikitext serialization norms |
26498 # --------------------------------------------
26501 1. Categories should always be serialized on their own line
26505 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26513 2. Categories that are part of templates should not introduce a line break
26515 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26517 <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>
26520 # Careful while editing these next 2 tests. There are \u200f characters
26521 # before and after the <link> tags in the HTML and following some
26522 # of the categories in wikitext
26523 # Do not remove these characters in edits.
26525 # As part of the serialization, these bidi characters will get stripped.
26527 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26530 "modes": ["html2wt"],
26531 "scrubWikitext": true
26534 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26535 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26538 [[קטגוריה: שיטות משפט]]
26542 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26545 "modes": ["html2wt"],
26546 "scrubWikitext": true
26549 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26556 Lists: Add space after bullets
26563 <li><span> baz</span></li>
26568 * <span> baz</span>
26572 1. Headings: Add space before/after == (T53744)
26579 <h2><span> baz</span></h2>
26587 == <span> baz</span> ==
26591 2. Headings: Add space before/after == even after hoisted content
26594 "modes": ["html2wt"],
26595 "scrubWikitext": true
26598 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26606 1. Headings: suppress newly created empty headings
26609 "modes": ["html2wt"],
26610 "scrubWikitext": true
26618 2. Headings: don't suppress empty headings if scrubWikitext is false
26628 3. Headings: suppress empty headings on edits
26631 "modes": ["selser"],
26632 "scrubWikitext": true,
26638 ==<span id="x">foo</span>==
26643 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26646 "modes": ["html2wt"],
26647 "scrubWikitext": true
26650 <h2>foo<br/>bar</h2>
26651 <h2>foo <span><br/>bar</span> baz</h2>
26655 == foo <span> bar</span> baz ==
26659 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26662 "modes": ["html2wt"],
26663 "scrubWikitext": false
26666 <h2>foo<br/>bar</h2>
26672 1. WT Quote Tags: suppress newly created empty style tags
26675 "modes": ["html2wt"],
26676 "scrubWikitext": true
26684 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26690 ''<nowiki/>'''''<nowiki/>'''
26694 3. WT Quote Tags: suppress empty style tags on edits
26697 "modes": ["selser"],
26698 "scrubWikitext": true,
26704 '''<span id="x">foo</span>'''
26709 1. Anchors: suppress newly created empty anchors
26712 "modes": ["html2wt"],
26713 "scrubWikitext": true
26716 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26721 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26724 "modes": ["html2wt"],
26725 "scrubWikitext": false
26728 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26734 3. Anchors: suppress empty anchors on edits
26737 "modes": ["selser"],
26738 "scrubWikitext": true,
26744 [[Test|<span id="x">foo</span>]]
26749 3a. Anchors: do not suppress numbered extlinks
26752 "modes": ["wt2wt"],
26753 "scrubWikitext": true
26758 <a rel="mw:ExtLink" href="http://foo.com"></a>
26762 3b. Anchors: do not suppress numbered extlinks
26765 "modes": ["wt2wt"],
26766 "scrubWikitext": true,
26772 [http://foo.com <span id="x">foo</span>]
26778 Normalizations should be restricted to edited content
26781 "modes": ["selser"],
26782 "scrubWikitext": true,
26784 [ "h1", "before", "<i></i>"]
26798 1. Multiple normalizations (html2wt)
26801 "modes": ["html2wt"],
26802 "scrubWikitext": true
26806 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26807 </a><b><i></i></b>x</p>
26816 2. Multiple normalizations (selser)
26819 "modes": ["selser"],
26820 "scrubWikitext": true,
26822 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26826 <span id="x">foo</span>
26828 <span id="x">foo</span>
26834 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26837 "modes": ["html2wt"],
26838 "scrubWikitext": true
26850 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26857 <nowiki> </nowiki>hi
26859 <nowiki> </nowiki> hello
26863 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26866 "modes": ["html2wt"],
26867 "scrubWikitext": true
26876 baz bang</td></tr></table>
26882 bar<span>boo</span></p>
26898 bar<span>boo</span>
26902 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26905 "modes": ["selser"],
26906 "scrubWikitext": true,
26908 [ "p", "html", " a\n b" ]
26919 1. New links that end in spaces
26922 "modes": ["html2wt"],
26923 "scrubWikitext": false
26926 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26927 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26928 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26930 [[Berlin ]]<nowiki/>is the capital of Germany.
26934 [[Boston ]] is a city.
26938 2. New links that end in spaces
26941 "modes": ["html2wt"],
26942 "scrubWikitext": true
26945 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26946 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26947 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26949 [[Berlin]] is the capital of Germany.
26953 [[Boston]] is a city.
26957 1. Table cells with escapable prefixes
26960 "modes": ["html2wt"],
26961 "scrubWikitext": false
26965 <tr><td>a</td></tr>
26966 <tr><td>-</td></tr>
26967 <tr><td>+</td></tr>
26973 |<nowiki>-</nowiki>
26975 |<nowiki>+</nowiki>
26980 2. Table cells with escapable prefixes
26983 "modes": ["html2wt"],
26984 "scrubWikitext": true
26988 <tr><td>a</td></tr>
26989 <tr><td>-</td></tr>
26990 <tr><td>+</td></tr>
27003 3a. Table cells with escapable prefixes after edits
27006 "modes": ["selser"],
27007 "scrubWikitext": true,
27009 [ "table tbody tr:first-child td:first-child", "remove"]
27023 3b. Table cells with escapable prefixes after edits
27026 "modes": ["selser"],
27027 "scrubWikitext": true,
27029 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27036 |<span id="x">foo</span>+
27045 # FIXME: This test will fail because
27046 # normalization doesn't realize that the id attribute
27047 # will eliminate the escapable scenario
27049 4a. Table cells without escapable prefixes after edits
27052 "modes": ["selser"],
27053 "scrubWikitext": true,
27055 [ "#x", "html", "-" ]
27068 ## This tests normalizer's ability to discriminate between
27069 ## cells having identical content.
27071 4b. Table cells without escapable prefixes after edits
27074 "modes": ["selser"],
27075 "scrubWikitext": true,
27077 [ "td", "html", "-" ]
27090 ## This tests normalizer's ability to not be tripped by
27091 ## comments (and whitespace)
27093 4c. Table cells without escapable prefixes after edits
27096 "modes": ["selser"],
27097 "scrubWikitext": true,
27099 [ "table tbody tr td:first-child", "remove" ]
27114 ## This tests normalizer's ability to handle HTML cells
27116 4d. Table cells without escapable prefixes after edits
27119 "modes": ["selser"],
27120 "scrubWikitext": true,
27122 [ "td", "html", "-" ]
27127 <tr><td>a</td></tr>
27131 <tr><td>-</td></tr>
27135 ## T111151 Remove font elements without attributes
27137 5a. font tags without attributes should be dropped in scrubWikitext mode
27140 "modes": ["html2wt"],
27141 "scrubWikitext": true
27145 <font><font>bar</font></font>
27146 <font class="x">boo</font>
27150 <font class="x">boo</font>
27154 5b. font tags should not be dropped without scrubWikitext being enabled
27157 "modes": ["html2wt"],
27158 "scrubWikitext": false
27167 Escape nowiki DOM elements
27171 <nowiki><i>foo</i></nowiki>
27173 <nowiki>''foo''</nowiki>
27176 # This is meant to be an interim fix while we go about figuring out
27177 # how to not introduce these trailing <nowiki/>s in the first place.
27179 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27183 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27185 <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>
27186 <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>
27199 # ---------------------------------------------------
27200 # End of tests spec'ing wikitext serialization norms |
27201 # ---------------------------------------------------
27205 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27213 <td><b>c</b><p>d</p></td>
27231 # -----------------------------------------------------------------
27232 # End of section for Parsoid-only html2wt tests for serialization
27234 # -----------------------------------------------------------------
27236 # -----------------------------------------------------------------
27237 # The following section of tests are primarily to spec behavior of
27238 # the selective serializer. All these tests have manual selser
27239 # changes. The automated selser changes for all tests handle the
27240 # wide variation of changes, but these tests here capture specs
27241 # deterministically.
27242 # ----------------------------------------------------------------
27246 Selser: New comments should not be lost
27249 "modes": ["selser"],
27251 [ "#a", "after", "<!--c1-->" ],
27252 [ "#b", "before", "<!--c2-->" ]
27256 <span id="a">a</span>
27258 <span id="b">b</span>
27260 <span id="a">a</span><!--c1-->
27262 <!--c2--><span id="b">b</span>
27267 Selser: Check for validity of DSR before using it
27270 "modes": ["selser"],
27272 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27276 <span id="a">a</span>
27278 {{DISPLAYTITLE:foo}}
27279 <span id="a">a</span>
27283 1. DOMDiff: Changes to <ref> content should be looked up using id
27286 "modes": ["selser"],
27288 ["#X", "after", "bar"],
27289 ["#Y", "after", "baz"]
27293 X <ref><span id="X">foo</span></ref>
27296 <ref name="a"><span id="Y">foo</span></ref>
27299 X <ref><span id="X">foo</span>bar</ref>
27302 <ref name="a"><span id="Y">foo</span>baz</ref>
27307 2. DOMDiff: Changes to <ref> content should be looked up using id
27310 "modes": ["selser"],
27312 ["#Z", "after", "bar"]
27316 A <ref>foo bar for a</ref>
27317 B <ref group="X" name="b" />
27321 <references group="X">
27322 <ref name="b"><span id="Z">foo</span></ref>
27325 A <ref>foo bar for a</ref>
27326 B <ref group="X" name="b" />
27330 <references group="X">
27331 <ref name="b"><span id="Z">foo</span>bar</ref>
27336 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27339 "modes": ["selser"],
27341 [ "div:first-child", "text", "bar" ]
27345 <div style="{{1x|color:red;}}%">foo</div>
27347 <div style="{{1x|color:red;}}%">bar</div>
27360 <li class="mw-empty-elt"></li>
27361 <li class="mw-empty-elt"></li>
27369 [[File:Thumb.png|thumb]]
27371 <div class="thumb tright">
27372 <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>
27373 <div class="thumbcaption">
27374 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27381 unclosed internal link XSS (T137264)
27383 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27385 <p>[[#<script>alert(1)</script>|
27388 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>