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 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well-formedness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-specific options (not run by PHP parser unless
25 # the test includes an html/php section)
26 # php php-only test (not run by the parsoid parser unless
27 # the test includes an html/parsoid section)
28 # showtitle make the first line the title
29 # showindicators make the first lines the page status indicators
30 # comment run through Linker::formatComment() instead of main parser
31 # local format section links in edit comment text as local links
32 # notoc disable table of contents
33 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # You can also set the following parser properties via test options:
36 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
37 # wgLinkHolderBatchSize, wgRawHtml
39 # For testing purposes, temporary articles can created:
40 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
41 # where '/' denotes a newline.
43 # This is the standard article assumed to exist.
80 MediaWiki:bad image list
82 * [[File:Bad.jpg]] except [[Nasty page]]
110 Template:echo_with_span
116 Template:echo_with_div
129 Template:table_attribs
132 |</noinclude>style="color:red;"|Foo
136 Template:table_attribs_2
139 |</noinclude>style="color:red;"|Foo
144 Template:table_attribs_3
147 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
151 Template:table_attribs_4
153 | style="background-color:#DC241f;" width="10px" |
157 Template:table_attribs_5
160 |</noinclude>style="color:red;"||Bar
164 Template:table_attribs_6
166 style="background: <nowiki>
173 Template:table_attribs_7
176 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
180 Template:table_header_cells
182 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
188 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
192 Template:PartialTable
199 Template:image_attribs
202 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
205 ## See T48811 for details
207 Template:mixed_attr_content_template
209 style="color:red;" title="T48811"
215 Template:definition_list
262 Template:EmptyTRWithHTMLAttrTest
265 <tr align="center"></tr>
266 <tr><td>foo</td></tr>
267 <tr align="center"></tr>
268 <tr><td>bar</td></tr>
285 This is a simple paragraph.
287 <p>This is a simple paragraph.
292 Paragraphs with extra newline spacing
315 Paragraphs with newline spacing with comment lines in between
323 <!--foo--><!--More than 1 comment, still stripped-->
327 <!--foo--> <!----> <!-- bar -->
388 Paragraphs with newline spacing with non-empty white-space lines in between
415 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
423 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
462 Extra newlines: More paragraphs with indented comment
477 Extra newlines followed by heading
492 <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>
493 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
496 <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>
501 Extra newlines between heading and content are swallowed
509 <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>
510 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
517 http://fr.wikipedia.org/wiki/🍺
518 <!-- EasterEgg we love beer, better be able be able to link to it -->
520 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
524 # Note that the html+tidy output removes the spaces after the <li>,
525 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
526 # This is an issue for all tests with lists. We intentionally do
527 # *not* add html+tidy clauses for these, as we don't want to
528 # document/test the broken behavior. (Parsoid matches the non-tidy
529 # output in these cases.)
538 <li> Item 2</li></ul>
546 * plain''italic''plain
547 * plain''italic''plain''italic''plain
548 * plain'''bold'''plain
549 * plain'''bold'''plain'''bold'''plain
550 * plain''italic''plain'''bold'''plain
551 * plain'''bold'''plain''italic''plain
552 * plain''italic'''bold-italic'''italic''plain
553 * plain'''bold''bold-italic''bold'''plain
554 * plain'''''bold-italic'''italic''plain
555 * plain'''''bold-italic''bold'''plain
556 * plain''italic'''bold-italic'''''plain
557 * plain'''bold''bold-italic'''''plain
558 * plain l'''italic''plain
559 * plain l''''bold''' plain
562 <li> plain<i>italic</i>plain</li>
563 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
564 <li> plain<b>bold</b>plain</li>
565 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
566 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
567 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
568 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
569 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
570 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
571 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
572 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
573 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
574 <li> plain l'<i>italic</i>plain</li>
575 <li> plain l'<b>bold</b> plain</li></ul>
579 # this example taken from the [[simple:Moon]] article (bug 47326)
581 Italics and possessives (1)
583 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
585 <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
589 # this example taken from [[en:Flaming Pie]] (bug 49926)
591 Italics and possessives (2)
593 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
595 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
599 # this example taken from [[en:Dictionary]] (bug 49926)
601 Italics and possessives (3)
603 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''.
605 <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>.
611 ### 2-quote opening sequence tests
614 Italics and bold: 2-quote opening sequence: (2,2)
623 Italics and bold: 2-quote opening sequence: (2,3)
632 Italics and bold: 2-quote opening sequence: (2,4)
642 # same html as previous, but wikitext adjusted to match parsoid html2wt
644 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
646 ''foo<nowiki>''</nowiki>''
652 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
654 Italics and bold: 2-quote opening sequence: (2,5)
667 # same html as previous, but wikitext adjusted to match parsoid html2wt
669 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
671 ''foo'''''<nowiki/>'''
682 ### 3-quote opening sequence tests
686 Italics and bold: 3-quote opening sequence: (3,2)
695 Italics and bold: 3-quote opening sequence: (3,3)
704 Italics and bold: 3-quote opening sequence: (3,4)
712 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
714 Italics and bold: 3-quote opening sequence: (3,5)
727 # same html as previous, but wikitext adjusted to match parsoid html2wt
729 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
731 '''foo'''''<nowiki/>''
742 ### 4-quote opening sequence tests
746 Italics and bold: 4-quote opening sequence: (4,2)
756 # same html as previous, but wikitext adjusted to match parsoid html2wt
758 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
760 <nowiki>''</nowiki>''foo''
767 Italics and bold: 4-quote opening sequence: (4,3)
776 Italics and bold: 4-quote opening sequence: (4,4)
786 # same html as previous, but wikitext adjusted to match parsoid html2wt
788 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
796 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
798 Italics and bold: 4-quote opening sequence: (4,5)
807 <p>'<b>foo</b><i></i>
811 # same html as previous, but wikitext adjusted to match parsoid html2wt
813 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
815 '<nowiki/>'''foo'''''<nowiki/>''
820 <p>'<b>foo</b><i></i>
826 ### 5-quote opening sequence tests
830 Italics and bold: 5-quote opening sequence: (5,2)
840 # same html as previous, but wikitext adjusted to match parsoid html2wt
842 Italics and bold: 5-quote opening sequence: (5,2+3)
851 Italics and bold: 5-quote opening sequence: (5,3)
861 # same html as previous, but wikitext adjusted to match parsoid html2wt
863 Italics and bold: 5-quote opening sequence: (5,3+2)
872 Italics and bold: 5-quote opening sequence: (5,4)
878 <p><i><b>foo'</b></i>
883 Italics and bold: 5-quote opening sequence: (5,5)
892 Italics and bold: 5-quote opening sequence: (5,6)
896 <p><i><b>foo'</b></i>
901 ### multiple quote sequences in a line
904 Italics and bold: multiple quote sequences: (2,4,2)
910 <p><i>foo'<b>bar</b></i>
915 # same html as previous, but wikitext adjusted to match parsoid html2wt
917 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
919 ''foo'<nowiki/>'''bar'''''
921 <p><i>foo'<b>bar</b></i>
927 Italics and bold: multiple quote sequences: (2,4,3)
933 <p><i>foo'<b>bar</b></i>
938 # same html as previous, but wikitext adjusted to match parsoid html2wt
940 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
942 ''foo'<nowiki/>'''bar'''''
944 <p><i>foo'<b>bar</b></i>
950 Italics and bold: multiple quote sequences: (2,4,4)
956 <p><i>foo'<b>bar'</b></i>
961 # same html as previous, but wikitext adjusted to match parsoid html2wt
963 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
965 ''foo'<nowiki/>'''bar'<nowiki/>'''''
967 <p><i>foo'<b>bar'</b></i>
972 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
974 Italics and bold: multiple quote sequences: (3,4,2)
983 <p><b>foo'</b>bar<i></i>
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
993 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
998 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1003 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1005 Italics and bold: multiple quote sequences: (3,4,3)
1014 <p><b>foo'</b>bar<b></b>
1018 # same html as previous, but wikitext adjusted to match parsoid html2wt
1020 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1022 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1027 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1032 ### other quote tests
1035 Italics and bold: other quote tests: (2,3,5)
1037 ''this is about '''foo's family'''''
1039 <p><i>this is about <b>foo's family</b></i>
1045 Italics and bold: other quote tests: (2,(3,3),2)
1047 ''this is about '''foo's''' family''
1049 <p><i>this is about <b>foo's</b> family</i>
1055 Italics and bold: other quote tests: (3,2,3,2)
1059 '''this is about ''foo'''s family''
1061 <p><b>this is about <i>foo</i></b><i>s family</i>
1066 # same html as previous, but wikitext adjusted to match parsoid html2wt
1068 Italics and bold: other quote tests: (3,2,3+2+2,2)
1070 '''this is about ''foo'''''<nowiki/>''s family''
1072 <p><b>this is about <i>foo</i></b><i>s family</i>
1078 Italics and bold: other quote tests: (3,2,3,3)
1080 '''this is about ''foo'''s family'''
1082 <p>'<i>this is about </i>foo<b>s family</b>
1088 Italics and bold: other quote tests: (3,(2,2),3)
1090 '''this is about ''foo's'' family'''
1092 <p><b>this is about <i>foo's</i> family</b>
1098 Italicized possessive
1100 The ''[[Main Page]]'''s talk page.
1102 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1105 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1109 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1110 (Requires tidy for PHP parser output to be fixed up)
1112 parsoid=wt2html,wt2wt
1129 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1130 <td><i>a</i></td><td><i>b</i></td></tr>
1139 Non-html5 tags should be accepted
1141 <center>''foo''</center>
1143 <font>''foo''</font>
1144 <strike>''foo''</strike>
1147 <center><i>foo</i></center>
1148 <p><big><i>foo</i></big>
1149 <font><i>foo</i></font>
1150 <strike><i>foo</i></strike>
1156 <wbr> is valid wikitext (bug 52468)
1164 # <strike> is HTML4, <s> is HTML4/5.
1166 <s> or <strike> for strikethrough
1168 <strike>strike</strike>
1172 <p><strike>strike</strike>
1180 Text-level semantic html elements in wikitext
1183 <strong>text</strong>
1199 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1206 <strong>text</strong>
1222 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1230 # test cases taken from
1231 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1233 Ruby markup (W3C-style)
1235 ; Mono-ruby for individual base characters
1236 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1238 : <ruby>今日<rt>きょう</rt></ruby>
1240 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1242 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1244 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1246 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1247 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1248 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1251 <dl><dt> Mono-ruby for individual base characters</dt>
1252 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1253 <dt> Group ruby</dt>
1254 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1255 <dt> Jukugo ruby</dt>
1256 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1257 <dt> Inline ruby</dt>
1258 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1259 <dt> Double-sided ruby</dt>
1260 <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>
1262 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1263 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1264 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1269 # The next two test different paths in the sanitizer.
1271 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1273 <blockquote|>a</blockquote>
1275 <b→> doesn't terminate </b→>
1277 <bä> doesn't terminate </bä>
1279 <boo> doesn't terminate </boo>
1281 <s.foo> doesn't terminate </s.foo>
1285 <p><blockquote|>a</blockquote>
1286 </p><p><b→> doesn't terminate </b→>
1287 </p><p><bä> doesn't terminate </bä>
1288 </p><p><boo> doesn't terminate </boo>
1289 </p><p><s.foo> doesn't terminate </s.foo>
1290 </p><p><sub-ID#1>
1294 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1295 # If the non-word-character tag made it through the sanitizer, tidy
1296 # would munge it up.
1298 Non-word characters don't terminate tag names + tidy
1300 <blockquote|>a</blockquote>
1302 <b→> doesn't terminate </b→>
1304 <bä> doesn't terminate </bä>
1306 <boo> doesn't terminate </boo>
1308 <s.foo> doesn't terminate </s.foo>
1312 <p><blockquote|>a</p>
1313 <p><b→> doesn't terminate </b→></p>
1314 <p><bä> doesn't terminate </bä></p>
1315 <p><boo> doesn't terminate </boo></p>
1316 <p><s.foo> doesn't terminate </s.foo></p>
1317 <p><sub-ID#1></p>
1321 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1322 ### This checks that HTML5 tags (with non-word characters in the tag
1323 ### name) make it safely through the parser -- the Sanitizer will
1324 ### munge them later, as it should.
1327 Non-word characters are valid in extension tags (T19663)
1340 Isolated close tags should be treated as literal text (bug 52760)
1348 <p><s.foo>s</p>
1350 <p><s.foo>s</p>
1354 ### Special characters
1358 Bare pipe character (bug 52363)
1367 Bare pipe character from a template (bug 52363)
1376 ### <nowiki> test cases
1380 <nowiki> unordered list
1382 <nowiki>* This is not an unordered list item.</nowiki>
1384 <p>* This is not an unordered list item.
1387 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1393 <nowiki>Lorem ipsum dolor
1401 <p>Lorem ipsum dolor
1410 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1422 :There is not nowiki.
1423 :There is <nowiki>nowiki</nowiki>.
1425 #There is not nowiki.
1426 #There is <nowiki>nowiki</nowiki>.
1428 *There is not nowiki.
1429 *There is <nowiki>nowiki</nowiki>.
1431 <dl><dd>There is not nowiki.</dd>
1432 <dd>There is nowiki.</dd></dl>
1433 <ol><li>There is not nowiki.</li>
1434 <li>There is nowiki.</li></ol>
1435 <ul><li>There is not nowiki.</li>
1436 <li>There is nowiki.</li></ul>
1439 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1440 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1442 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1443 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1445 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1446 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1450 Entities inside <nowiki>
1452 <nowiki><</nowiki>
1459 Entities inside template parameters
1465 <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>
1469 Properly escape nowiki when combined with other wiki markup
1473 <p>* </nowiki> tag</p>
1475 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1479 T93824: Put escaped HTML tags inside nowiki
1483 <p><h2>foo</h2></p>
1485 <nowiki><h2>foo</h2></nowiki>
1489 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1493 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1494 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1495 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1497 This text: L'[[Foo]]
1498 This text: L<nowiki>''</nowiki>[[Foo]]
1499 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1502 # This test fails because wikitext whitespace is not normalized before comparing.
1504 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1508 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1511 This text : L<nowiki>''</nowiki>[[Foo]]
1514 # This test and the next one are html2wt only as they test that incorrect wikitext
1515 # passed in template arguments gets escaped or wrapped in nowikis where required.
1517 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1521 <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>
1522 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1524 {{echo|foo{{!}}bar}}
1525 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1529 T53961: Output correct nowikis in template arguments
1533 <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>
1534 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1535 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1536 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1540 {{echo|a <nowiki>}}</nowiki> b}}
1541 {{echo|<nowiki>a [[ b</nowiki>}}
1542 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1543 {{echo|a <nowiki>}</nowiki>}}
1547 Cases where "!!" needs nowiki protection
1552 <tr><th>this needs protection !! here</th></tr>
1556 <tr><th>this does not need
1557 protection !! here</th></tr>
1561 !<nowiki>this needs protection !! here</nowiki>
1574 Comments and Indent-Pre
1576 <!-- comment 1 --> asdf
1578 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1582 <!-- comment 2 -->xyz
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 --> xyz
1641 asdf<!-- comment 1 -->jkl
1651 <!-- foo --> b <!-- bar -->
1665 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1671 Comment semantics and delimiters
1673 <!-- --><!----><!-----><!------>
1677 <!-- --><!----><!-----><!------>
1681 Comment semantics and delimiters, redux
1683 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1684 -- foo -- funky huh? ... -->
1688 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1689 -- foo -- funky huh? ... -->
1693 Comment semantics and delimiters: directors cut
1695 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1696 everything starting with < followed by !-- until the first -- and > we see,
1697 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1703 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1704 everything starting with < followed by !-- until the first -- and > we see,
1705 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1710 Comment semantics: nesting
1712 <!--<!-- no, we're not going to do anything fancy here -->-->
1717 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1720 # Parsoid closes the unclosed comment, even if it means a slight
1723 Comment semantics: unclosed comment at end
1725 parsoid=wt2html,html2html
1727 <!--This comment will run out to the end of the document
1731 <!--This comment will run out to the end of the document-->
1735 Comment semantics: normalize comments to play nice with XML and browsers
1737 <!-- Browsers --!> think this is closed -->
1738 <!--> This would normally be text -->
1739 <!---> As would this -->
1740 <!-- XML doesn't like trailing dashes -------->
1741 <!-- Nor doubled hyphens -- anywhere in the data -->
1742 But this is not a comment.
1744 <p>But this is not a comment.
1747 <!-- Browsers --!> think this is closed -->
1748 <!--> This would normally be text -->
1749 <!---> As would this -->
1750 <!-- XML doesn't like trailing dashes -------->
1751 <!-- Nor doubled hyphens -- anywhere in the data -->
1752 <p>But this is not a comment.</p>
1756 Comment semantics: round-trip even text which contains encoded -->
1758 <!-- hello & goodbye - > --> --&gt; --&xx -->
1760 <!-- hello & goodbye - > --> --&gt; --&xx -->
1764 Comment in template title
1773 Comment on its own line post-expand
1785 Comment on its own line post-expand with non-significant whitespace
1797 Multiple comments should still parse as SOL-transparent
1799 parsoid=wt2html,wt2wt
1802 <!--c2--><!--c3--><!--c4-->*b
1811 <!--c2--><!--c3--><!--c4-->
1818 ### paragraph wrapping tests
1833 Block tag on one line (<div>)
1849 Block tag on one line (<blockquote>)
1851 a <blockquote>foo</blockquote>
1855 a <blockquote>foo</blockquote>
1867 Block tag on both lines (<div>)
1884 Block tag on both lines (<blockquote>)
1886 a <blockquote>foo</blockquote>
1888 b <blockquote>foo</blockquote>
1890 a <blockquote>foo</blockquote>
1891 b <blockquote>foo</blockquote>
1905 Multiple lines without block tags
1929 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1930 # So, we have a separate section for Parsoid. We don't want
1931 # to mimic this stripping behavior in Parsoid. It affects
1932 # editing experience and also requires us to maintain additional
1935 Empty lines between lines with block tags
1973 <div data-parsoid='{"stx":"html"}'></div>
1976 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1979 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1981 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1984 <div data-parsoid='{"stx":"html"}'>e</div>
1987 ## PHP parser emits output which is broken
1989 Unclosed HTML p-tags should be handled properly
2002 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2007 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2008 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2011 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2015 a [[Category:A1]] [[Category:A2]]
2020 <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"/>
2024 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2030 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2034 ### Preformatted text
2043 And a [[Main Page|link]]
2049 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2054 Tabs don't trigger preformatted text
2058 This is preformatted text.
2064 <pre>This is preformatted text.
2070 Ident preformatting with inline content
2081 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2098 Regression with preformatted in <center>
2112 Bug 52763: Preformatted in <blockquote>
2118 indented cell (no pre-wrapping!)
2128 <p> indented cell (no pre-wrapping!)
2136 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2153 Bug 15491: <ins>/<del> in blockquote
2156 Foo <del>bar</del> <ins>baz</ins> quux
2160 <p>Foo <del>bar</del> <ins>baz</ins> quux
2166 # Note that the p-wrapping is newline sensitive, which could be
2167 # considered a bug: tidy will wrap only the 'Foo' in the example
2168 # below in a <p> tag. (see comment 23-25 of bug #6200)
2170 Bug 15491: <ins>/<del> in blockquote (2)
2172 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2175 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2181 <del>bar</del> <ins>baz</ins> quux</blockquote>
2185 <pre> with attributes (bug 3202)
2187 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2189 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2194 <pre> with width attribute (bug 3202)
2196 <pre width="8">Narrow screen goodies</pre>
2198 <pre width="8">Narrow screen goodies</pre>
2203 <pre> with forbidden attribute (bug 3202)
2205 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2207 <pre width="8">Narrow screen goodies</pre>
2212 Entities inside <pre>
2221 <pre> with forbidden attribute values (bug 3202)
2223 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2225 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2230 <nowiki> inside <pre> (bug 13238)
2238 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2246 <pre><nowiki>Foo</nowiki></pre>
2251 <nowiki> and <pre> preference (first one wins)
2280 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2282 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2285 <p><span typeof="mw:Nowiki">
2294 </pre> inside nowiki
2296 <nowiki></pre></nowiki>
2302 # Parsoid doesn't strip empty tags, like Tidy does.
2304 Empty pre; pre inside other HTML tags (bug 54946)
2306 parsoid=wt2html,wt2wt
2337 HTML pre followed by indent-pre
2347 # Note that tidy removes the empty <p> tags from the start and end.
2348 # Parsoid does not, by design.
2352 <p><pre>foo</pre></p>
2358 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2362 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2370 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2380 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2392 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2413 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2417 {{echo| foo}}{{echo| bar}}
2422 {{echo|<!--cmt--> foo}}
2424 <!--cmt-->{{echo| foo}}
2426 {{echo|{{echo| }}bar}}
2444 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2481 Pres with newline attributes
2486 <pre class="one two">hi</pre>
2490 two" data-parsoid='{"stx":"html"}'>hi</pre>
2494 Things that look like <pre> tags aren't treated as such
2496 Barack Obama <President> of the United States
2497 <President></President>
2499 <p>Barack Obama <President> of the United States
2500 <President></President>
2504 ## PHP parser discards the "<pre " string
2506 Handle broken pre-like tags (bug 64025)
2510 {{echo|<pre <pre>x</pre>}}
2512 <table><pre </table>
2515 <table><pre></pre></table>
2518 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2527 Parsoid: handle pre with space after attribute
2531 <pre style="width:50%;" >{{echo|foo}}</pre>
2533 <pre style="width:50%;">{{echo|foo}}</pre>
2536 <pre style="width:50%;">{{echo|foo}}</pre>
2539 # TODO / maybe: fix wt2wt for this
2541 Parsoid: Don't paragraph-wrap fosterable content
2567 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2595 #--------------------------------------------------------------------
2596 # Transclusion parameter whitespace stripping tests
2597 # Behavior is different for positional and named parameters
2598 #--------------------------------------------------------------------
2600 Templates: Strip leading and trailing whitespace from named-param values
2604 {{echo|1= {{echo|b}} }}
2617 <ul><li> d</li></ul>
2622 Templates: Don't strip whitespace from positional-param values
2626 {{echo|{{echo|b}} }}
2658 <ul><li> f</li></ul>
2666 Templates: Handle empty comment-and-ws-only lines correctly
2669 <!--should be ignored-->
2670 <!--should be ignored as well-->
2679 Templates: Handle comments in the target
2682 <!-- should be ignored -->
2685 {{echo<!-- should be ignored -->
2688 {{echo<!-- should be ignored -->|foo}}
2690 {{<!-- should be ignored -->echo|foo}}
2692 <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>
2694 <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>
2696 <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>
2698 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2702 Templates: Handle comments in parameter names (bug 67657)
2705 <!-- should be ignored -->
2709 <!-- should be ignored -->
2712 {{echo|1<!-- should be ignored --> = foo}}
2714 {{echo|<!-- should be ignored -->1 = foo}}
2716 <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>
2718 <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>
2720 <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>
2722 <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>
2726 Templates: Other wikitext in parameter names (bug 67657)
2730 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2736 #--------------------------------------------------------------------
2737 # Transclusion parameter escaping tests
2738 #--------------------------------------------------------------------
2740 Templates: Parsoid parameter escaping test 1
2742 {{echo|[foo]|{{echo|[bar]}}}}
2746 <p about="#mwt1" typeof="mw:Transclusion"
2747 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2751 Parsoid: Pipes in external links in template parameter
2753 {{echo|[{{echo|http://example.com}} link]}}
2755 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2757 <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>
2761 Parsoid: pipe in transclusion parameter
2763 {{echo|http://foo.com/a|b}}
2765 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2767 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2768 typeof="mw:Transclusion"
2769 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>
2773 Parsoid: Pipe in external link target and content in template parameter
2775 parsoid=html2wt,wt2wt
2777 {{echo|[http://foo.com/a|b a|b]}}
2779 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2781 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2782 typeof="mw:Transclusion"
2783 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2784 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2788 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2792 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2794 <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>
2798 Templates: Don't escape already nowiki-escaped text in template parameters
2800 parsoid=html2wt,wt2wt
2802 {{echo|foo<nowiki>|</nowiki>bar}}
2803 {{echo|<nowiki><div></nowiki>}}
2804 {{echo|<nowiki></nowiki>}}
2806 <p>foo|bar <div></p>
2808 <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>
2809 <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>
2810 <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>
2816 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2818 parsoid=html2wt,wt2wt
2820 {{echo|{{echo|1=bar}}}}
2824 <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>
2829 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2835 <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>
2840 Templates: Preserve blank parameter names
2846 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2850 Templates: Preserve blank parameter names in other positions
2852 {{blank_param|bar|=foo}}
2856 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]},{"k":"","named":true,"spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2861 ### Parsoid-centric tests for testing RT edge cases for pre
2865 1a. Indent-Pre and Comments
2878 1b. Indent-Pre and Comments
2891 1c. Indent-Pre and Comments
2904 1d. Indent-Pre and Comments
2905 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2918 2a. Indent-Pre and tables
2939 2b. Indent-Pre and tables
2955 2c. Indent-Pre and tables (bug 42252)
2972 2d. Indent-Pre and tables
2989 <tbody><tr><td> b</td></tr>
2994 2e. Indent-Pre and table-line syntax
3007 2f. Indent-pre started by table-line syntax
3026 3a. Indent-Pre and block tags (single-line html)
3030 c <blockquote> foo </blockquote>
3035 c <blockquote> foo </blockquote>
3036 <pre><span> foo </span>
3039 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3040 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3041 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3042 <pre><span> foo </span>
3059 3b. Indent-Pre and block tags (multi-line html)
3064 <pre>a <span>foo</span>
3069 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3070 b <div data-parsoid='{"stx":"html"}'> foo </div>
3080 3c. Indent-Pre and block tags (pre-content on separate line)
3144 4. Indent-Pre and extension tags
3150 a <ul class="gallery mw-gallery-traditional">
3151 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3152 <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>
3153 <div class="gallerytext">
3160 <ul class="gallery mw-gallery-traditional">
3161 <li class="gallerybox" style="width: 155px">
3162 <div style="width: 155px">
3163 <div class="thumb" style="width: 150px;">
3164 <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>
3166 <div class="gallerytext"></div>
3173 Table wikitext syntax outside wiki-tables
3176 ! not a table heading
3179 | class="foo bar" | baz
3186 ! not a table heading
3189 | class="foo bar" | baz
3198 Render paragraphs when indent-pre is suppressed in blocklevels
3215 4. Multiple spaces at start-of-line
3233 ## NOTE: the leading white-space chars on empty line are significant
3235 5a. White-space in indent-pre
3247 ## NOTE: the leading white-space chars on empty line are significant
3249 5b. White-space in indent-pre
3268 5c. White-space in indent-pre
3281 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3304 7a. Indent-pre and category links
3306 parsoid=wt2html,wt2wt
3308 [[Category:foo]] <!-- No pre-wrapping -->
3309 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3312 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3313 <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 -->
3317 7b. Indent-pre and category links
3319 parsoid=wt2html,wt2wt
3322 [[Category:foo]] {{echo|b}}
3324 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3325 <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>
3329 Indent-Pre: Newlines in comments shouldn't affect sol state
3343 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3347 HTML-pre: 1. embedded newlines
3382 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3384 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3388 <pre data-parsoid='{"stx":"html"}'>
3393 <pre data-parsoid='{"stx":"html"}'>
3401 HTML-pre: big spaces
3437 <pre data-parsoid='{"stx":"html"}'>
3456 HTML-pre: 2: indented text
3469 HTML-pre: 3: other wikitext
3488 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3497 ### Definition lists
3504 <dl><dt> name </dt>
3505 <dd> Definition</dd></dl>
3510 Definition list for indentation only
3514 <dl><dd> Indented text</dd></dl>
3519 Definition list with no space
3524 <dd>Definition</dd></dl>
3529 Definition list with URL link
3531 ; http://example.com/ : definition
3533 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3534 <dd> definition</dd></dl>
3539 Definition list with bracketed URL link
3541 ;[http://www.example.com/ Example]:Something about it
3543 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3544 <dd>Something about it</dd></dl>
3549 Definition list with wikilink containing colon
3551 ; [[Help:FAQ]]: The least-read page on Wikipedia
3553 <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>
3554 <dd> The least-read page on Wikipedia</dd></dl>
3558 # At Brion's and JeLuF's insistence... :)
3560 Definition list with news link containing colon
3562 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3564 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3565 <dd> This isn't even a real newsgroup!</dd></dl>
3568 <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>
3572 Malformed definition list with colon
3574 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3576 <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>
3581 Definition lists: colon in external link text
3583 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3585 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3586 <dd> OK, I made that up</dd></dl>
3591 Definition lists: colon in HTML attribute
3593 ;<b style="display: inline">bold</b>
3595 <dl><dt><b style="display: inline">bold</b></dt></dl>
3600 Definition lists: self-closed tag
3602 ;one<br/>two : two-line fun
3604 <dl><dt>one<br />two </dt>
3605 <dd> two-line fun</dd></dl>
3610 Bug 11748: Literal closing tags
3614 <dd>test test test test test</dd>
3616 <dd>test test test test test</dd>
3621 <dd>test test test test test</dd>
3623 <dd>test test test test test</dd>
3629 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3632 ; term : description
3637 <dl><dt> term </dt>
3638 <dd> description</dd></dl>
3639 <ul><li> unordered</li></ul>
3646 Definition list with empty definition and following paragraph
3658 Nested definition lists using html syntax
3667 Definition Lists: No nesting: Multiple dd's
3680 Definition Lists: Indentation: Regular
3688 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3693 Definition Lists: Indentation: Missing 1st level
3699 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3704 Definition Lists: Indentation: Multi-level indent
3708 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3713 Definition Lists: Hacky use to indent tables
3720 should be left alone
3722 <dl><dd><dl><dd><table>
3727 </td></tr></table></dd></dl></dd></dl>
3729 should be left alone
3734 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3742 should be left alone
3745 <dl><dd><dl><dd><table><tr>
3748 </tr></table><!-- bar --></dd></dl></dd></dl>
3750 should be left alone</p>
3754 Definition Lists: Hacky use to indent tables, with comment before table
3760 <dl><dd><dl><dd><!-- foo --><table><tr>
3762 </tr></table></dd></dl></dd></dl>
3765 # The trailing whitespace in this test is to catch a regression in
3766 # Parsoid after T54473.
3768 Definition Lists: Hacky use to indent tables (WS-insensitive)
3777 </td></tr></table></dd></dl>
3781 <tbody><tr><td>a</td></tr>
3782 </tbody></table> </dd></dl>
3785 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3786 ## as an empty dt item. It also ignores all but the last ";" when followed
3787 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3788 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3791 ## Ex: ";;t2 ::d2" is transformed into:
3803 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3804 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3815 ## All Parsoid only definition list tests have this difference.
3817 ## See also: https://phabricator.wikimedia.org/T8569
3818 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3821 Table / list interaction: indented table with lists in table contents
3836 <ul><li> b</li></ul>
3840 <ul><li> d</li></ul>
3841 </td></tr></table></dd></dl>
3846 Table / list interaction: lists nested in tables nested in indented lists
3869 </td></tr></table></dd></dl>
3876 Definition Lists: Nesting: Multi-level (Parsoid only)
3906 Definition Lists: Nesting: Test 2 (Parsoid only)
3933 Definition Lists: Nesting: Test 3 (Parsoid only)
3976 Definition Lists: Nesting: Test 4
3981 <dl><dd><dl><dd><dl><dt>t3</dt>
3982 <dd>d3</dd></dl></dd></dl></dd></dl>
3987 ## The Parsoid team believes the following three test exposes a
3988 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3989 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3990 ## It also exposes a "misfeature" in tidy, which doesn't like
3991 ## <dl> tags with a single <dt> child; it converts the <dt> into
3992 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3994 Definition Lists: Mixed Lists: Test 1
4000 <dl><dd><dl><dt><ul><li> foo</li>
4001 <li> bar</li></ul></dt></dl>
4002 <dl><dt> baz</dt></dl></dd></dl>
4037 Definition Lists: Mixed Lists: Test 2
4042 <ul><li><dl><dd> d1</dd>
4043 <dd> d2</dd></dl></li></ul>
4049 Definition Lists: Mixed Lists: Test 3
4054 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4055 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4061 Definition Lists: Mixed Lists: Test 4
4066 <ul><li><dl><dt>d1 </dt>
4069 <dd>d4</dd></dl></li></ul>
4075 Definition Lists: Mixed Lists: Test 5
4081 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4087 Definition Lists: Mixed Lists: Test 6
4092 <ol><li><ul><li><dl><dd>d1
4093 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4099 Definition Lists: Mixed Lists: Test 7
4104 <dl><dd><ul><li> d1</li>
4105 <li> d2</li></ul></dd></dl>
4111 Definition Lists: Mixed Lists: Test 8
4116 <dl><dd><ul><li> d1</li></ul>
4117 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4123 Definition Lists: Mixed Lists: Test 9
4127 <ul><li><dl><dt>foo </dt>
4128 <dd>bar</dd></dl></li></ul>
4134 Definition Lists: Mixed Lists: Test 10
4138 <ul><li><ol><li><dl><dt>foo </dt>
4139 <dd>bar</dd></dl></li></ol></li></ul>
4143 # The Parsoid team disagrees with the PHP parser's seemingly-random
4144 # rules regarding dd/dt on the next two tests. Parsoid is more
4145 # consistent, and recognizes the shared nesting and keeps the
4146 # still-open tags around until the nesting is complete.
4147 # (And tidy again converts <dt> to <dd> before 'bar'.)
4150 Definition Lists: Mixed Lists: Test 11
4155 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4156 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4157 <dl><dt>boo </dt>
4158 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4213 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4214 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4218 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4219 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4228 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4230 # * The test is wrong, there are two colons where there should be :;
4231 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4233 Definition Lists: Weird Ones: Test 1
4235 *#;*::;; foo : bar (who uses this?)
4237 <ul><li><ol><li><dl><dt> foo </dt>
4238 <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>
4257 <dt>bar (who uses this?)</dt>
4289 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4290 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4302 Definition Lists: colons occurring in tags
4320 <dt><span>a:b</span></dt>
4347 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4349 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4350 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4351 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4352 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4354 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4355 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4356 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4360 Definition Lists: colons and tables 1
4372 </td></tr></table></dd></dl>
4376 </td></tr></table></dd></dl>
4380 # Parsoid's output (as documented below) differs from php's in this case.
4381 # This is probably a bug. If we fixup parsoid to match php's output, the
4382 # above test should pass and the below test case can be removed. It is
4383 # unclear which output is more desirable.
4386 Definition Lists: colons and tables 2
4398 </td></tr></table></dd>
4402 </td></tr></table></dd></dl>
4406 Definition Lists: template interaction
4408 ::{{definition_list}}
4411 ::{{definition_list}}
4416 <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">
4417 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4419 <dl><dd data-parsoid='{}'>one
4420 <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">
4421 </span><dd about="#mwt2">two
4423 <dd>three</dd></dl></dd>
4424 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4432 External links: non-bracketed
4434 Non-bracketed: http://example.com
4436 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4440 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4442 External links: numbered
4444 Numbered: [http://example.com]
4445 Numbered: [http://example.net]
4446 Numbered: [http://example.com]
4448 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4449 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4450 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4453 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4454 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4455 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4459 External links: specified text
4461 Specified text: [http://example.com link]
4463 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4468 External links: trail
4470 Linktrails should not work for external links: [http://example.com link]s
4472 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4477 External links: dollar sign in URL
4479 http://example.com/1$2345
4481 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4485 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4487 External links: dollar sign in URL (autonumber)
4489 [http://example.com/1$2345]
4491 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4494 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4498 External links: open square bracket forbidden in URL (bug 4377)
4500 parsoid=wt2html,wt2wt,html2html
4502 http://example.com/1[2345
4504 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4507 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4511 External links: open square bracket forbidden in URL (named) (bug 4377)
4513 parsoid=wt2html,html2html
4515 [http://example.com/1[2345]
4517 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4520 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4523 # parsoid adds a space before the link name
4525 External links: open square bracket forbidden in URL (named) (bug 4377)
4528 [http://example.com/1 [2345]
4530 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4535 External links: nowiki in URL link text (bug 6230)
4537 [http://example.com/ <nowiki>''example site''</nowiki>]
4539 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4544 External links: newline forbidden in text (bug 6230 regression check)
4546 [http://example.com/ first
4549 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4555 External links: Pipe char between url and text
4557 [http://example.com | link]
4559 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4564 External links: protocol-relative URL in brackets
4566 [//example.com/ Test]
4568 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4572 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4574 External links: protocol-relative URL in brackets without text
4578 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4581 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4585 External links: protocol-relative URL in free text is left alone
4589 <p>//example.com/Foo
4594 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4596 foo//example.com/Foo
4598 <p>foo//example.com/Foo
4603 External links: with no contents
4605 [http://en.wikipedia.org/wiki/Foo]
4607 [[wikipedia:Foo|Bar]]
4609 [[wikipedia:Foo|<span>Bar</span>]]
4611 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4612 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4613 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4616 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4617 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4618 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4622 External links: Free with trailing punctuation
4632 http://example.com/url_with_(brackets)
4633 (http://example.com/url_without_brackets)
4634 http://example.com/url_with_entity
4635 http://example.com/url_with_entity 
4636 http://example.com/url_with_entity 
4637 http://example.com/url_with_entity<
4638 http://example.com/url_with_entity<
4639 http://example.com/url_with_entity<
4641 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4642 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4643 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4644 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4645 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4646 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4647 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4648 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4649 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4650 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4651 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4652 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4653 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4654 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4655 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4656 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4659 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4660 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4661 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4662 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4663 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4664 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4665 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4666 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4667 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4668 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4669 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4670 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4671 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4672 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4673 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4674 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4678 External links: Lone protocols are never linked (T105697)
4697 External links: No preceding word characters allowed (bug 65278)
4699 NOPEhttp://example.com
4700 N0http://example.com
4701 ok:http://example.com
4702 ok-http://example.com
4704 <p>NOPEhttp://example.com
4705 N0http://example.com
4706 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4707 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4714 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4716 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4721 External image from https
4723 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4725 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4730 External image (when not allowed)
4732 wgAllowExternalImages=0
4734 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4736 <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>
4741 Link to non-http image, no img tag
4743 Link to non-http image, no img tag: ftp://example.com/test.jpg
4745 <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>
4750 External links: terminating separator
4752 Terminating separator: http://example.com/thing,
4754 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4759 External links: intervening separator
4761 Intervening separator: http://example.com/1,2,3
4763 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4768 External links: old bug with URL in query
4770 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4772 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4777 External links: old URL-in-URL bug, mixed protocols
4779 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4781 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4786 External links: URL in text
4788 URL in text: [http://example.com http://example.com]
4790 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4795 External links: Clickable images
4797 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4799 <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>
4802 <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>
4806 External links: raw ampersand
4808 Old & use: http://x&y
4810 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4815 External links: encoded ampersand
4817 Old & use: http://x&y
4819 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4822 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4826 External links: encoded equals (bug 6102)
4828 http://example.com/?foo=bar
4830 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4833 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4837 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4838 ## does it number them. As discussed in bug 53505, we can identify
4839 ## autonumbered links via CSS.
4843 External links: [raw ampersand]
4845 Old & use: [http://x&y]
4847 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4850 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4853 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4854 # mode will return the [raw ampersand] wikitext
4856 External links: [encoded ampersand]
4858 parsoid=wt2html,wt2wt,html2html
4860 Old & use: [http://x&y]
4862 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4865 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4869 External links: [raw equals]
4871 [http://example.com/?foo=bar]
4873 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4876 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4879 # note that parsoid html is identical to [raw equals] case; so html2wt
4880 # mode will return the [raw equals] wikitext
4882 External links: [encoded equals] (bug 6102)
4884 parsoid=wt2html,wt2wt,html2html
4886 [http://example.com/?foo=bar]
4888 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4891 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4894 # xxx parsoid strips the IDN character, so the round-trip tests will
4895 # obviously fail and are disabled. --cscott
4897 External links: [IDN ignored character reference in hostname; strip it right off]
4899 parsoid=wt2html,wt2wt,html2html
4901 [http://e‌xample.com/]
4903 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4906 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4909 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4910 # Where an external link could easily circumvent the sanitization of the text of
4911 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4912 # test demands a higher standard. That's a bit strange.
4916 # http://example.com -> [http://example.com|http://example.com]
4917 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4919 # The first example is sanitized, but the second is not. Any security benefits
4920 # from this production are trivial to circumvent. Either remove this test and
4921 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4922 # the test accordingly.
4926 # xxx parsoid strips the IDN character, so the round-trip tests will
4927 # obviously fail and are disabled. --cscott
4929 External links: IDN ignored character reference in hostname; strip it right off
4931 parsoid=wt2html,html2html
4933 http://e‌xample.com/
4935 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4938 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4942 External links: www.jpeg.org (bug 554)
4946 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4950 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4952 External links: URL within URL (original bug 2)
4954 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4956 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4959 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4963 BUG 361: URL inside bracketed URL
4965 [http://www.example.com/foo http://www.example.com/bar]
4967 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4972 BUG 361: URL within URL, not bracketed
4974 http://www.example.com/foo?=http://www.example.com/bar
4976 <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>
4981 BUG 289: ">"-token in URL-tail
4983 http://www.example.com/<hello>
4985 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4990 BUG 289: literal ">"-token in URL-tail
4992 http://www.example.com/<b>html</b>
4994 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4997 <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>
5001 BUG 289: ">"-token in bracketed URL
5003 [http://www.example.com/<hello> stuff]
5005 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5010 BUG 289: literal ">"-token in bracketed URL
5012 [http://www.example.com/<b>html</b> stuff]
5014 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5019 BUG 289: literal double quote at end of URL
5021 http://www.example.com/"hello"
5023 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5028 BUG 289: literal double quote in bracketed URL
5030 [http://www.example.com/"hello" stuff]
5032 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5037 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5039 [http://www.example.com test]
5041 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5046 External links: link text with spaces
5048 [http://www.example.com a b c]
5049 [http://www.example.com ''a'' ''b'']
5051 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5052 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5057 External links: wiki links within external link (Bug 3695)
5059 [http://example.com [[wikilink]] embedded in ext link]
5061 <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>
5064 <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>
5068 BUG 787: Links with one slash after the url protocol are invalid
5072 [http:/example.com title]
5074 <p>http:/example.com
5075 </p><p>[http:/example.com title]
5080 Bracketed external links with template-generated invalid target
5082 [{{echo|http:/example.com}} title]
5084 <p>[http:/example.com title]
5089 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5091 ''[http://example.com text'']
5092 [http://example.com '''text]'''
5093 ''Something [http://example.com in italic'']
5094 ''Something [http://example.com mixed''''', even bold]'''
5095 '''''Now [http://example.com both''''']
5097 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5098 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5099 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5100 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5101 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5107 Bug 4781: %26 in URL
5109 http://www.example.com/?title=AT%26T
5111 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5114 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5117 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5118 # % is actually legal in HTML5. Any change in output would need testing though.
5120 Bug 4781, 5267: %25 in URL
5122 http://www.example.com/?title=100%25_Bran
5124 <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>
5127 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5131 Bug 4781, 5267: %28, %29 in URL
5133 http://www.example.com/?title=Ben-Hur_%281959_film%29
5135 <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>
5138 <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>
5143 Bug 4781: %26 in autonumber URL
5145 [http://www.example.com/?title=AT%26T]
5147 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5150 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5154 Bug 4781, 5267: %26 in autonumber URL
5156 [http://www.example.com/?title=100%25_Bran]
5158 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5161 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5165 Bug 4781, 5267: %28, %29 in autonumber URL
5167 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5169 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5172 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5177 Bug 4781: %26 in bracketed URL
5179 [http://www.example.com/?title=AT%26T link]
5181 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5184 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5188 Bug 4781, 5267: %25 in bracketed URL
5190 [http://www.example.com/?title=100%25_Bran link]
5192 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5197 Bug 4781, 5267: %28, %29 in bracketed URL
5199 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5201 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5204 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5208 External link containing a period in the anchor. (bug 63947)
5210 [//foo.org/bar#baz. bang]
5212 [//foo.org/bar. bang]
5214 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5215 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5218 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5219 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5223 External link containing a single quote. (bug 63947)
5227 [//foo.org/bar'baz bang]
5229 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5230 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5233 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5234 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5239 External link containing a period in the anchor. (bug 63947)
5241 [//foo.org/bar#baz. bang]
5243 [//foo.org/bar. bang]
5245 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5246 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5249 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5250 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5254 External link containing a single quote. (bug 63947)
5258 [//foo.org/bar'baz bang]
5260 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5261 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5264 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5265 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5270 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5272 Some [http://example.com/ pretty ''italics'' and stuff]!
5274 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5279 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5281 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5283 <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>
5288 External link containing double-single-quotes with no space separating the url from text in italics
5290 [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]].]
5292 <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>
5295 <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>
5297 <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>
5301 External link with comments in link text
5303 [http://www.google.com Google <!-- comment -->]
5305 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5310 URL-encoding in URL functions (single parameter)
5312 {{localurl:Some page|amp=&}}
5314 <p>/index.php?title=Some_page&amp=&
5319 URL-encoding in URL functions (multiple parameters)
5321 {{localurl:Some page|q=?&=&}}
5323 <p>/index.php?title=Some_page&q=?&amp=&
5330 http://example.com/index.php?foozoid%5B%5D=bar
5332 http://example.com/index.php?foozoid[]=bar
5334 <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>
5335 </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>
5338 <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>
5340 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5344 IPv6 urls (bug 21261)
5348 http://[2404:130:0:1000::187:2]/index.php
5350 <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>
5355 Non-extlinks in brackets
5364 [{{echo|foo}} ''bar'']
5365 [{{echo|foo}}l's] errand
5366 [{{echo|foo}}l's errand]
5368 [url=http://example.com]
5381 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5386 Percent encoding in external links
5388 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5390 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5393 <p><a rel="mw:ExtLink"
5394 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5398 Use url link syntax for links where the content is equal the link target
5402 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5405 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5409 Parenthesis in external links, especially URL links
5413 http://example.com/test)
5415 http://example.com/(test)
5417 http://example.com/((test)
5419 (http://example.com/(test))
5421 (http://example.com/(test)))))
5423 http://example.com/a)b
5425 [http://example.com) foo]
5427 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5428 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5429 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5430 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5431 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5432 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5433 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5434 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5437 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5438 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5439 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5440 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5441 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5442 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5443 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5444 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5448 Parenthesis in external links, w/ transclusion or comment
5450 (http://example.com/{{echo|hi}})
5452 (http://example.com<!-- hi -->)
5454 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5455 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5458 <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=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[20,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;hi&quot;}},&quot;i&quot;:0}}]}\">hi</span>"}]]}'>http://example.com/hi</a>)</p>
5460 <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>
5464 Serialize <a> tags with invalid link targets as plain text
5468 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5469 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5470 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5471 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5474 <nowiki>*</nowiki>text
5475 <nowiki>[[foo]]</nowiki>
5476 <nowiki>*a [[foo]]</nowiki>
5480 mw:ExtLink -vs- mw:WikiLink (T94723)
5484 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"},"dsr":[0,11,6,2]}'>Bar</a>
5485 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5486 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5487 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5489 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5490 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5495 [[wikipedia:Foo|Bar]]
5496 [[wikipedia:Foo|Bar]]
5498 [[wikipedia:European_Robin|European Robin]]
5499 [[wikipedia:European_Robin|European Robin]]
5503 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5507 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5509 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5520 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5522 Normal text. '''''Bold italic text.''''' Normal text.
5524 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5525 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5530 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5531 # parser strips. The wikitext contains just the first half of the bold
5534 Unclosed and unmatched quotes
5536 '''''Bold italic text '''with bold deactivated''' in between.'''''
5538 '''''Bold italic text ''with italic deactivated'' in between.'''''
5542 ..spanning two paragraphs (should not work).'''
5544 '''Bold tag left open
5546 ''Italic tag left open
5550 <!-- Unmatching number of opening, closing tags: -->
5551 '''This year''''s election ''should'' beat '''last year''''s.
5553 ''Tom'''s car is bigger than ''Susan'''s.
5555 Plain ''italic'''s plain
5557 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5558 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5559 </p><p><b>Bold text..</b>
5560 </p><p>..spanning two paragraphs (should not work).
5561 </p><p><b>Bold tag left open</b>
5562 </p><p><i>Italic tag left open</i>
5564 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5565 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5566 </p><p>Plain <i>italic'</i>s plain
5569 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5570 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5571 </p><p><b>Bold text..</b>
5572 </p><p>..spanning two paragraphs (should not work).<b></b>
5573 </p><p><b>Bold tag left open</b>
5574 </p><p><i>Italic tag left open</i>
5577 <!-- Unmatching number of opening, closing tags: -->
5578 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5579 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5580 </p><p>Plain <i>italic'</i>s plain
5587 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5590 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5591 # is the bare minimum required by the spec, see:
5592 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5593 # Parsoid team replies: empty table tags are legal in HTML5
5595 A table with no data.
5608 A table with stray table end tags on start tag line (wt2html)
5612 {|style="color: red;"|}
5614 {|style="color: red;" |}
5618 {|style="color: red;"|} id="foo"
5622 {|style="color: red;" |} id="foo"
5626 <table style="color: red;"></table>
5628 <table style="color: red;">
5634 <table style="color: red;" id="foo">
5640 <table style="color: red;" id="foo">
5649 A table with no data (take 2)
5657 # A table with nothing but a caption is invalid XHTML, we might want to render
5658 # this as <p>caption</p>
5659 # Parsoid team replies: table with only a caption is legal in HTML5
5661 A table with nothing but a caption
5669 </caption><tr><td></td></tr></table>
5672 <table><caption> caption</caption></table>
5676 A table with caption with default-spaced attributes and a table row
5679 |+ style="color: red;" | caption1
5685 <caption style="color: red;"> caption1
5694 A table with captions with non-default spaced attributes and a table row
5697 |+style="color: red;"|caption2
5698 |+ style="color: red;"| caption3
5704 <caption style="color: red;">caption2
5706 <caption style="color: red;"> caption3
5715 Table td-cell syntax variations
5719 | foo bar foo || baz
5720 | style='color:red;' | baz
5721 | style='color:red;' || baz
5728 <td> foo bar foo </td>
5731 <td style="color:red;"> baz
5733 <td> style='color:red;' </td>
5761 Simple table but with multiple dashes for row wikitext
5780 Multiplication table
5782 {| border="1" cellpadding="2"
5783 |+Multiplication table
5785 ! × !! 1 !! 2 !! 3
5803 <table border="1" cellpadding="2">
5804 <caption>Multiplication table
5851 Accept "||" in table headings
5866 Accept "!!" in table data
5880 <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>
5885 Accept "||" in indented table headings
5895 </th></tr></table></dd></dl>
5900 Accept "!!" in templates
5914 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1","spc":["","","",""]}]]}' 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>
5918 Accept "!!" in table headings after newline
5935 <p>b!!c</p></th></tr>
5940 Accept "!!" in table data of mixed wikitext / html syntax
5944 <tr><td>b!!c</td></tr>
5957 <tbody><tr><th>a</th></tr>
5958 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
5963 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5980 Accept "| !" at start of line in tables (ignore !-attribute)
5984 | !style="color:red" | bar
5996 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 +/-
6000 |style='color:red;'|+1
6001 |style='color:blue;'|-1
6013 <td style="color:red;">+1
6015 <td style="color:blue;">-1
6039 |rowspan=2| Cell 2, row 1 (and 2)
6050 <td rowspan="2"> Cell 2, row 1 (and 2)
6068 {| bgcolor=#ABCDEF border=2
6073 |the original table again
6081 <table bgcolor="#ABCDEF" border="2">
6089 <td>the original table again
6095 Invalid attributes in table cell (bug 1830)
6109 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6113 | title="foo<nowiki>|</nowiki>" |bar
6114 | title="foo<nowiki>|</nowiki>" bar
6121 <td title="foo|">bar
6123 <td> title="foo|" bar
6128 # The "|}" to close the table is missing from the input, so parsoid's
6129 # *2wt modes will fail.
6131 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
6133 parsoid=wt2html,html2html
6136 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6140 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6141 <td>]" onmouseover="alert(document.cookie)">test
6149 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6152 # FIXME: The php output is broken.
6154 ! and || in td attributes should not be parsed as <th>/<td>
6157 | style="color: red !important;" data-contrived="put this here ||" | foo
6162 <td> style="color: red !important;" data-contrived="put this here </td>
6168 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
6173 Indented table markup mixed with indented pre content (proposed in bug 6200)
6178 Text that should be rendered preformatted
6186 <pre>Text that should be rendered preformatted
6195 1. Template-generated table cell attributes and cell content
6200 || {{table_attribs_5}}
6201 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6202 |align=center {{table_attribs}}
6203 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6208 <td style="color:red;">Foo
6210 <td style="color:red;">Foo
6212 <td> style="color:red;"</td>
6215 <td style="color:red;">Foo
6217 <td align="center" style="color:red;">Foo
6219 <td align="center" style="color:red;">Foo
6225 2. Template-generated table cell attributes and cell content
6228 |{{table_attribs_2}}
6233 <td style="color:red;">Foo
6241 <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>
6242 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6247 3. Template-generated table cell attributes and cell content
6250 !align=center {{table_header_cells}}
6252 |align=center {{table_cells}}
6257 <th align="center" style="color:red;">Foo</th>
6258 <th style="color:red;"><i>Bar</i></th>
6259 <th style="color:brown;"><i>Foo</i> and Baz
6262 <td align="center" style="color:red;">Foo</td>
6263 <td style="color:red;"><i>Bar</i></td>
6264 <td style="color:brown;"><i>Foo</i> and Baz
6269 <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>
6270 <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>
6275 4. Template-generated table cell attributes and cell content inside a templated table
6278 !align=center {{table_header_cells}}
6280 |align=center {{table_cells}}
6285 <th align="center" style="color:red;">Foo</th>
6286 <th style="color:red;"><i>Bar</i></th>
6287 <th style="color:brown;"><i>Foo</i> and Baz
6290 <td align="center" style="color:red;">Foo</td>
6291 <td style="color:red;"><i>Bar</i></td>
6292 <td style="color:brown;"><i>Foo</i> and Baz
6296 <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}}]}'>
6297 <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>
6299 <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>
6303 ## Edge case fix to prevent future regressions
6305 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6308 |{{table_attribs_7}}
6313 <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>
6315 <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>
6319 Table with row followed by newlines and table heading
6337 Table with empty line following the start tag
6354 # FIXME: Preserve the attribute properly (with an empty string as value) in
6355 # the PHP parser. Parsoid implements the behavior below.
6357 Table attributes with empty value
6367 </td></tr></tbody></table>
6372 Wikitext table with a lot of comments
6395 Wikitext table comments represented in parsoid dom
6397 {|<!--c1--><!--c2-->
6408 <table><!--c1--><!--c2-->
6409 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6410 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6415 Wikitext table with double-line table cell
6432 Table cell with a single comment
6449 Table-cell after a comment-only-empty-line
6466 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6468 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6474 Build table with {{!}}
6476 {{{!}} class="wikitable"
6479 {{!}}- style="color:red;"
6480 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6483 <table class="wikitable">
6489 <tr style="color:red;">
6491 <td style="color:red;"> second data
6497 Build table with pipe as data
6499 {| class="wikitable"
6502 |- style="color:red;"
6503 | data || style="color:red;" | second data
6505 | style="color:red;" | data with | || style="color:red;" | second data with |
6507 || data with | ||| second data with |
6510 <table class="wikitable">
6516 <tr style="color:red;">
6518 <td style="color:red;"> second data
6521 <td style="color:red;"> data with | </td>
6522 <td style="color:red;"> second data with |
6525 <td> data with | </td>
6526 <td> second data with |
6532 Build table with wikilink
6534 {| class="wikitable"
6535 ! header || second header
6536 |- style="color:red;"
6537 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6539 | data || second data [[Main Page|link|text with pipe]]
6542 <table class="wikitable">
6547 <tr style="color:red;">
6548 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6549 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6553 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6558 # The expected HTML structure in this test is debatable. The PHP parser does
6559 # not parse this kind of table at all. The main focus for Parsoid is on
6560 # round-tripping, so this output is ok for now. TODO: revisit!
6562 Wikitext table with html-syntax row
6572 <td>foo</td></tr></tbody></table>
6575 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6576 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6577 ## PHP parser, which tidy then compounds by fostering the content
6578 ## entirely out of the table. Parsoid recognizes the table context
6579 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6580 ## depends on PHP's treatment of broken table markup!
6582 Implicit <td> after a |-
6584 parsoid=wt2html,html2html
6604 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6606 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6608 parsoid=wt2html,html2html
6641 <tr><td><pre>a</pre></td></tr>
6642 <tr><td> b</td></tr>
6647 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6648 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6650 Lists should be recognized in an implicit <td> context
6652 parsoid=wt2html,html2html
6679 Table cells not properly parsed in an implicit-td context
6683 {{table_attribs_4}} || a || b
6688 <td style="background-color:#DC241f;" width="10px"></td>
6695 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6696 <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>
6701 Parsoid: Round-trip tables directly followed by content (bug 51219)
6703 parsoid=wt2html,wt2wt
6728 Parsoid: Default to a newline after tables in new content (bug 51219)
6733 <tr><td>foo</td></tr></tbody></table> bar
6735 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6740 <nowiki> </nowiki>bar
6748 Parsoid: newline inducing block nodes don't suppress <nowiki>
6760 Parsoid: Row-syntax table headings followed by comment & table cells
6762 parsoid=wt2html,wt2wt
6766 <!-- foo --> || baz || quux
6780 <tbody><tr><th> foo </th><th> bar
6781 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6786 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6789 Parsoid: Recover better from broken table attributes
6809 <p>foo</p></td></tr>
6814 Strip unsupported table tags
6862 Testing serialization after deletion of table cells
6865 "modes": ["wt2wt", "selser"],
6873 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6886 Plain link, capitalized
6890 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6895 Plain link, uncapitalized
6899 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6906 [[Main Page|The Main Page]]
6908 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6913 Piped link with comment in link text
6915 [[Main Page|The Main<!--front--> Page]]
6917 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6922 Piped link with multiple pipe characters in link text
6924 [[Main Page||The|Main|Page|]]
6926 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6929 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6937 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6942 Broken link with fragment
6944 [[Zigzagzogzagzig#zug]]
6946 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6951 Special page link with fragment
6953 [[Special:Version#anchor]]
6955 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6960 Nonexistent special page link with fragment
6962 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6964 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6971 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6973 <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>
6980 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6982 <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>!!!
6993 Bug 43661: Piped links with identical prefixes
6995 [[prefixed article|prefixed articles with spaces]]
6997 [[prefixed article|prefixed articlesaoeu]]
6999 [[Main Page|Main Page test]]
7001 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7002 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7003 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7009 Link with HTML entity in suffix / tail
7011 [[Main Page]]", [[Main Page]]a
7013 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7016 <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>
7020 Link with 3 brackets
7029 Link with 4 brackets
7033 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7038 Piped link with 3 brackets
7040 [[[main page|the main page]]]
7042 <p>[[[main page|the main page]]]
7047 Piped link with extlink-like text
7050 [[Main Page|This is a [bar]]]
7052 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7053 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7056 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7057 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7061 Link with multiple pipes
7063 [[Main Page|The|Main|Page]]
7065 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7069 # Note that parsoid does not munge anchor text; all non-space
7070 # characters are valid in HTML5 ids.
7072 Anchor containing a #. (bug 63430)
7074 [[Main Page#And#Link]]
7076 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7079 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7085 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7087 <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>
7092 Link with space in namespace
7094 [[User talk:Foo bar]]
7096 <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>
7101 MemoryAlpha:AlphaTest
7103 This is an article in the MemoryAlpha namespace
7104 (which shadows the memoryalpha interwiki link).
7108 Namespace takes precedence over interwiki link (bug 51680)
7110 [[MemoryAlpha:AlphaTest]]
7112 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7116 # The previous test doesn't work correctly in html2*, due to not recognizing the
7117 # link as an internal one. This one checks for the correct behavior.
7119 Link to namespace preferred over interwiki with correct rel attribute
7121 parsoid=html2wt,html2html
7123 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7125 [[MemoryAlpha:AlphaTest]]
7129 Piped link to namespace
7131 [[Meta:Disclaimers|The disclaimers]]
7133 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7140 [[Usually caused by a typo (oops}]]
7142 <p>[[Usually caused by a typo (oops}]]
7149 Just a test of an article title containing a percent.
7153 Link containing % (not as a hex sequence)
7157 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7160 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7163 # note that the parsoid HTML is identical to the previous test output,
7164 # so the previous test ensures that the html2wt mode will generate the
7165 # "not as a hex sequence" wikitext.
7167 Link containing % as a single hex sequence interpreted to char
7169 parsoid=wt2wt,wt2html,html2html
7173 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7176 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7180 Link containing % as a double hex sequence interpreted to hex sequence
7184 <p>[[7%2525 Solution]]
7188 # note that parsoid does not munge anchor text; all non-space
7189 # characters are valid in HTML5 anchors.
7191 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7192 Example for such a section: == < ==
7194 [[%23%3c]][[%23%3e]]
7196 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7199 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E" title="Main Page">#></a></p>
7203 Link containing "<#" and ">#" as a hex sequences
7205 [[%3c%23]][[%3e%23]]
7207 <p>[[%3c%23]][[%3e%23]]
7212 Link containing an equals sign
7214 [[Special:BookSources/isbn=4-00-026157-6]]
7216 <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>
7219 <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>
7225 Just a test of an article title containing a tilde.
7228 # note that links containing signatures, like [[Foo~~~~]], are
7229 # massaged by the pre-save transform (PST) and so the tildes are never
7230 # seen by the parser.
7232 Link containing a tilde
7236 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7239 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7243 Link containing double-single-quotes '' (bug 4598)
7245 [[Lista d''e paise d''o munno]]
7247 <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>
7250 <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>
7254 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7256 Some [[Link|pretty ''italics'' and stuff]]!
7258 <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>!
7261 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7265 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7267 ''Some [[Link|pretty ''italics'' and stuff]]!''
7269 <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>
7274 Link with double quotes in title part (literal) and alternate part (interpreted)
7276 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7280 [[''Pentecoste''|Pentecoste]]
7282 [[''Pentecoste''|''Pentecoste'']]
7284 <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>
7285 </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>
7286 </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>
7287 </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>
7290 <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>
7291 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7292 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7293 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7297 Broken image links with HTML captions (bug 39700)
7299 [[File:Nonexistent|<script></script>]]
7300 [[File:Nonexistent|100x100px|<script></script>]]
7301 [[File:Nonexistent|<]]
7302 [[File:Nonexistent|a<i>b</i>c]]
7304 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7305 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7306 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7307 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7310 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script&gt;&lt;/script&gt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7311 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script&gt;&lt;/script&gt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
7312 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;lt;&quot;,&quot;srcContent&quot;:&quot;<&quot;,&quot;dsr&quot;:[107,111,null,null]}\">&lt;</span>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7313 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[134,142,3,4]}\">b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
7319 [[http://www.example.com]]
7321 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7324 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7328 Plain link to URL with link text
7330 [[http://www.example.com Link text]]
7332 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7337 Plain link to protocol-relative URL
7339 [[//www.example.com]]
7341 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7344 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7348 Plain link to protocol-relative URL with link text
7350 [[//www.example.com Link text]]
7352 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7357 Plain link to page with question mark in title
7363 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7364 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7369 # I'm fairly sure the expected result here is wrong.
7370 # We want these to be URL links, not pseudo-pages with URLs for titles....
7371 # However the current output is also pretty screwy.
7374 # I'm changing it to match the current output--it arguably makes more
7375 # sense in the light of the test above. Old expected result was:
7376 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7378 # But I think this test is bordering on "garbage in, garbage out" anyway.
7383 Piped link to URL: [[http://www.example.com|an example URL]]
7385 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7388 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7392 BUG 2: [[page|http://url/]] should link to page, not http://url/
7394 [[Main Page|http://url/]]
7396 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7399 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7402 # Parsoid does not mark self-links, by design.
7404 BUG 337: Escaped self-links should be bold
7408 [[Bug462]] [[Bug462]]
7410 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7413 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7415 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7419 Self-link to section should not be bold
7423 [[Main Page#section]]
7425 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7436 Self-link to numeric title
7442 <p><strong class="selflink">0</strong>
7447 Link to numeric-equivalent title
7453 <p><a href="/wiki/00" title="00">00</a>
7458 <nowiki> inside a link
7460 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7462 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7467 Non-breaking spaces in title
7469 [[ Main Page ]]
7471 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7476 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7482 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7487 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7493 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7498 Internal link with en linktrail: no apostrophes (bug 27473)
7504 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7509 Internal link with ca linktrail with apostrophes (bug 27473)
7515 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7520 Internal link with kaa linktrail with apostrophes (bug 27473)
7526 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7531 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7533 [[User:Foo/Test/63636:Bar|Test]]
7535 <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>
7538 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7542 Purely hash wikilink
7544 title=[[User:test/123]]
7548 <p><a href="#a">b</a>
7551 <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>
7555 1. Interaction of linktrail and template encapsulation
7561 <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>
7565 2. Interaction of linktrail and template encapsulation
7569 {{echo|Some [[Fool]]}}s
7571 <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","spc":["","","",""]}]]}'>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>
7575 3. Interaction of linktrail and template encapsulation
7579 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7581 <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","spc":["","","",""]}]]}'>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>
7591 Internal link with is link prefix
7595 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7597 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7608 Internal link with is link trail and link prefix
7612 [[mótmælendatrú|xxx]]ar
7614 mótmælenda[[söfnuður]]
7615 mótmælenda[[söfnuður|söfnuðir]]
7616 mótmælenda[[söfnuður|söfnuðir]]xxx
7618 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7619 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7620 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7621 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7622 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7627 Parsoid link trail escaping
7629 parsoid=html2wt,html2html
7631 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7637 Parsoid link prefix escaping
7640 parsoid=html2wt,html2html
7642 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7644 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7648 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7656 [http://wp.org ''foo'']
7658 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7659 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7660 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7661 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7666 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7670 [[Foo|{{echo|a}} b {{echo|c}}]]
7672 <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>
7676 Link with angle bracket after anchor
7680 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7683 <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>
7687 ### Interwiki links (see maintenance/interwiki.sql)
7691 Inline interwiki link
7693 parsoid=wt2html,wt2wt,html2html
7695 [[MeatBall:SoftSecurity]]
7697 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7700 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7704 Inline interwiki link with empty title (bug 2372)
7706 parsoid=wt2html,wt2wt,html2html
7710 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7713 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7717 Interwiki link encoding conversion (bug 1636)
7719 *[[Wikipedia:ro:Olteniţa]]
7720 *[[Wikipedia:ro:Olteniţa]]
7722 <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>
7723 <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>
7727 <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>
7728 <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>
7733 Interwiki link with fragment (bug 2130)
7735 [[MeatBall:SoftSecurity#foo]]
7737 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7741 # Ideally the wikipedia: prefix here should be proto-relative too
7742 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7743 # define the 'en' prefix, and originally the test used 'wikipedia',
7744 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7747 Different interwiki prefixes mapping to the same URL
7755 [[:wikipedia:Foo|Foo]]
7757 [[wikipedia:en:Foo]]
7759 [[:wikipedia:en:Foo]]
7763 <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>
7765 <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>
7767 <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>
7769 <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>
7771 <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>
7773 <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>
7775 <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>
7779 Interwiki links that cannot be represented in wiki syntax
7782 [[meatball:ok#foo|ok with fragment]]
7783 [[meatball:ok_as_well?|ok ending with ? mark]]
7784 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7785 [http://de.wikipedia.org/wiki/#foo is just fragment]
7788 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7789 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7790 <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>
7791 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7792 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7795 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7796 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7797 <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>
7798 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7799 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7803 Interwiki links: trail
7805 [[wikipedia:Foo|Ba]]r
7807 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7810 <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>
7814 Local interwiki link
7816 parsoid=wt2html,wt2wt,html2html
7818 [[local:Template:Foo]]
7820 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7823 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7826 # Parsoid does not mark self-links, by design.
7828 Local interwiki link: self-link to current page
7831 parsoid=wt2html,wt2wt,html2html
7835 <p><strong class="selflink">local:Main Page</strong>
7838 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7842 Local interwiki link: prefix only (bug 64167)
7844 parsoid=wt2html,wt2wt,html2html
7848 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7851 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7855 Local interwiki link: with additional interwiki prefix (bug 61357)
7857 parsoid=wt2html,wt2wt,html2html
7859 [[local:meatball:Hello]]
7861 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7864 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7868 Multiple local interwiki link prefixes
7870 [[local:local:local:local:mi:local:Foo]]
7872 parsoid=wt2html,wt2wt,html2html
7874 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7877 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7881 ### Interlanguage links
7882 ### Language links (so that searching for '### language' matches..)
7888 parsoid=wt2html,wt2wt,html2html
7896 <p>Blah blah blah</p>
7897 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7901 Interlanguage link with spacing
7903 parsoid=wt2html,wt2wt,html2html
7911 <p>Blah blah blah</p>
7912 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7916 Double interlanguage link
7918 parsoid=wt2html,wt2wt,html2html
7927 <p>Blah blah blah</p>
7928 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7929 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7933 Interlanguage link variations
7935 parsoid=wt2html,wt2wt,html2html
7945 <p>Blah blah blah</p>
7946 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7947 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7948 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7952 Space and question mark encoding in interlanguage links (T95473)
7954 parsoid=wt2html,wt2wt,html2html
7962 <p>Blah blah blah</p>
7963 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
7967 Interlanguage link, with prefix links
7977 <p>Blah blah blah</p>
7978 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7982 Double interlanguage link, with prefix links (bug 8897)
7993 <p>Blah blah blah</p>
7994 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7995 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7999 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8007 <p>Blah blah blah</p>
8008 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8012 Parsoid-specific test: Wikilinks with should RT properly
8018 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8023 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8027 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8028 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8030 He&nbsp;llo [[Foo|He&nbsp;llo]]
8032 He&nbsp;llo [[He&nbsp;llo]]
8036 Parsoid: handle constructor well
8042 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8043 </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>
8046 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8048 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8057 # Note that `ko` isn't a known interlanguage prefix
8059 Parsoid: recognize interlanguage links without a target page
8069 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8071 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8074 # Note that `ko` isn't a known interwiki prefix
8076 Parsoid: recognize interwiki links without a target page
8078 parsoid=wt2html,wt2wt,html2html
8084 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8085 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8088 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8089 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8093 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8097 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8100 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8104 Interlanguage link with preceding local interwiki link (bug 68085)
8106 parsoid=wt2html,wt2wt,html2html
8109 [[local:es:Spanish]]
8112 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8116 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8120 Looks like an interlanguage link, but is actually a local interwiki
8122 parsoid=wt2html,wt2wt,html2html
8128 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8132 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8136 ### Redirects, Parsoid-only
8140 1. Simple redirect to page
8142 #REDIRECT [[Main Page]]
8144 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8148 2. Other redirect variants
8150 #REDIRECT [[Main_Page]]
8152 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8155 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8156 # This tests the Parsoid bail-out code.
8158 3. Other redirect variants
8160 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8162 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8166 4. Redirect to a templated destination
8168 #REDIRECT [[{{echo|Foo}}bar]]
8170 <link typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[12,24,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;Foo&quot;}},&quot;i&quot;:0}}]}\">Foo</span>bar"}]]}'/>
8176 parsoid=wt2html,wt2wt
8181 <li>REDIRECT [[]]</li></ol>
8185 Optional colon in #REDIRECT
8187 # the colon is archaic syntax. we support it for wt2html, but we
8188 # don't care that it roundtrips back to the modern syntax.
8189 parsoid=wt2html,html2html
8191 #REDIRECT:[[Main Page]]
8193 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8197 Whitespace in #REDIRECT with optional colon
8199 # the colon and gratuitous whitespace is archaic syntax. we support
8200 # it for wt2html, but we don't care that it roundtrips back to the
8201 # modern syntax (without extra whitespace)
8202 parsoid=wt2html,html2html
8209 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8213 Piped link in #REDIRECT
8215 # content after piped link is ignored. we support this syntax,
8216 # but don't care that the piped link is lost when we roundtrip this.
8219 #REDIRECT [[Main Page|bar]]
8221 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8225 Redirect to category (T104502)
8227 parsoid=wt2html,wt2wt
8229 #REDIRECT [[Category:Foo]]
8231 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8235 Redirect to category with URL encoding (T104502)
8239 #REDIRECT [[Category%3AFoo]]
8241 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8245 Redirect to category page
8247 #REDIRECT [[:Category:Foo]]
8249 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8253 Redirect to image page (1)
8255 #REDIRECT [[File:Wiki.png]]
8257 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8261 Redirect to image page (2)
8263 #REDIRECT [[Image:Wiki.png]]
8265 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8268 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8269 # Next test confirms this.
8271 Redirect to language (1) (T104918)
8273 parsoid=wt2html,wt2wt,html2html
8275 #REDIRECT [[en:File:Wiki.png]]
8277 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8281 Redirect to language (2) (T104918)
8283 #REDIRECT [[:en:File:Wiki.png]]
8285 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8289 Redirect to interwiki (T104918)
8291 #REDIRECT [[meatball:File:Wiki.png]]
8293 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8297 Non-English #REDIRECT
8301 #TILVÍSUN [[Main Page]]
8303 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8307 Redirect syntax under text isn't considered a redirect
8310 #redirect [[Main Page]]
8313 <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>
8316 # FIXME: Should hoist the redirect to the top of the page and ensure there
8323 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8343 Broken br tag sanitization
8351 # TODO: Fix html2html mode (bug 51055)!
8353 Parsoid: Broken br tag recognition
8366 Incorrecly removing closing slashes from correctly formed XHTML
8368 <br style="clear:both;" />
8370 <p><br style="clear:both;" />
8375 Failing to transform badly formed HTML into correct XHTML
8377 <br style="clear: left;">
8378 <br style="clear: right;">
8379 <br style="clear: both;">
8381 <p><br style="clear: left;" />
8382 <br style="clear: right;" />
8383 <br style="clear: both;" />
8387 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8388 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8390 Handling html with a div self-closing tag
8399 <p><div title />
8403 <p><div title=bar />
8404 <div title=bar/>
8406 <div title="bar/"></div>
8410 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8411 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8412 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8413 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8414 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8415 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8419 Handling html with a br self-closing tag
8446 Horizontal ruler (should it add that extra space?)
8461 Horizontal ruler -- 4+ dashes render hr
8470 Horizontal ruler -- eats additional dashes on the same line
8479 Horizontal ruler -- does not collapse dashes on consecutive lines
8490 Horizontal ruler -- <4 dashes render as plain text
8499 Horizontal ruler -- Supports content following dashes on same line
8511 ### Block-level elements
8520 <ul><li>Common list</li>
8522 <li>item 3</li></ul>
8533 <ol><li>Numbered list</li>
8535 <li> item 3</li></ol>
8549 ***#Number on level 4
8551 **#Number on level 3
8552 **#Number on level 3
8556 #** Level 3, but ordered
8559 <ol><li> with numbers</li></ol>
8560 <ul><li> and bullets</li></ul>
8561 <ol><li> and numbers</li></ol></li>
8563 <ul><li>bullet level 2
8564 <ul><li>bullet level 3
8565 <ol><li>Number on level 4</li></ol></li></ul></li>
8567 <ol><li>Number on level 3</li>
8568 <li>Number on level 3</li></ol></li></ul>
8569 <ol><li>number level 2</li></ol></li>
8571 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8572 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8583 <ul><li>bar</li></ul></li></ul>
8593 <ul><li><ul><li>foo</li></ul></li>
8599 Nested lists 3 (first element empty)
8605 <ul><li>bar</li></ul></li></ul>
8610 Nested lists 4 (first element empty)
8615 <ul><li><ul><li></li></ul></li>
8621 Nested lists 5 (both elements empty)
8626 <ul><li><ul><li></li></ul></li>
8632 Nested lists 6 (both elements empty)
8638 <ul><li></li></ul></li></ul>
8643 Nested lists 7 (skip initial nesting levels)
8647 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8652 Nested lists 8 (multiple nesting transitions)
8660 <ul><li><ul><li> bar</li></ul></li>
8661 <li> baz</li></ul></li>
8667 Nested lists 9 (extension interaction)
8673 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8677 1. Lists with start-of-line-transparent tokens before bullets: Comments
8690 2. Lists with start-of-line-transparent tokens before bullets: Template close
8695 <ul><li>foo bar</li>
8701 List items are not parsed correctly following a <pre> block (bug 785)
8707 <ul><li> <pre>foo</pre></li>
8708 <li> <pre>bar</pre></li>
8712 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8713 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8718 List items from template
8729 * notSOL{{inner list}}
8732 <ul><li> item 1</li>
8733 <li> item 2</li></ul>
8734 <ul><li> item 0</li>
8736 <li> item 2</li></ul>
8737 <ul><li> item 0</li>
8740 <li> item 2</li></ul>
8745 List interrupted by empty line or heading
8753 <ul><li> foo</li></ul>
8754 <ul><li><ul><li> bar</li></ul></li></ul>
8755 <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>
8756 <ul><li> Another list item</li></ul>
8761 Multiple list tags generated by templates
8782 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8785 <!--This line will NOT split the list-->
8787 <!--This line will NOT split the list either-->
8789 <!--foo--> <!----> <!--This line NOT split the list either-->
8800 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8803 <!--This line will NOT split the list-->
8805 <!--This line will NOT split the list either-->
8807 <!--foo--> <!----> <!--This line NOT split the list
8820 (The PHP parser relies on Tidy for the hack)
8822 parsoid=wt2html,wt2wt
8826 * {{echo|<li>templated li-hack}}
8827 * <!--foo--> <li> unsupported li-hack with preceding comments
8830 <li><li>not a li-hack
8837 <li>templated li-hack</li>
8838 <li>unsupported li-hack with preceding comments</li>
8841 <li>not a li-hack</li>
8846 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8873 Parsoid: Test of whitespace serialization with Templated bullets
8880 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8884 # ------------------------------------------------------------------------
8885 # The next set of tests are about Parsoid's ability to handle badly nested
8886 # tags (parse, minimize scope of fixup, and roundtrip back)
8887 # ------------------------------------------------------------------------
8890 Unbalanced closing block tags break a list
8891 (php parser relies on Tidy to fix up)
8909 # Parsoid fails this test, but it might be tricky to support properly.
8912 Unbalanced closing non-block tags don't break a list
8913 (php parser relies on Tidy to fix up)
8920 <li><span>a</span></li>
8921 <li><span>b</span></li>
8935 Unclosed formatting tags that straddle lists are closed and reopened
8936 (php parser relies on Tidy to fix up)
8938 parsoid=wt2html,wt2wt,html2html
8948 <ol><li> <s> a</s></li>
8949 <li><s> b </s></li></ol>
8954 1. List embedded in a formatting tag
8961 <li><small>foo</small></li>
8971 ## Ugly Parsoid output here
8972 ## Not sure what the right output is.
8974 2. List embedded in a formatting tag
8981 <li><small>a</small></li>
8982 <li><small>b</small></li>
8989 <li><small>b</small></li>
8993 # Ugly Parsoid and PHP parser output here
8994 # Not sure if we want to make this a test!
8997 ## 3. Unclosed formatting tags in list elements
9003 ## <li><small>a</small></li>
9004 ## <li><small><small>b</small></small></li>
9008 ## <li><small>a</small></li>
9010 ## <li><small>b</small></li>
9014 # This is a bug in the PHP parser + tidy combination.
9015 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9016 # and then fostered out of the table by tidy.)
9017 # We believe the Parsoid output to be correct.
9019 Table with missing opening <tr> tag
9021 parsoid=wt2html,wt2wt
9039 # Note that the current date is hard-coded as
9040 # 1970-01-01T00:02:03Z (a Thursday)
9041 # when running parser tests. The timezone is also fixed to GMT, so
9042 # local date will be identical to current date.
9045 Magic Word: {{CURRENTDAY}}
9054 Magic Word: {{CURRENTDAY2}}
9063 Magic Word: {{CURRENTDAYNAME}}
9072 Magic Word: {{CURRENTDOW}}
9081 Magic Word: {{CURRENTMONTH}}
9090 Magic Word: {{CURRENTMONTH1}}
9099 Magic Word: {{CURRENTMONTHABBREV}}
9101 {{CURRENTMONTHABBREV}}
9108 Magic Word: {{CURRENTMONTHNAME}}
9110 {{CURRENTMONTHNAME}}
9117 Magic Word: {{CURRENTMONTHNAMEGEN}}
9119 {{CURRENTMONTHNAMEGEN}}
9126 Magic Word: {{CURRENTTIME}}
9135 Magic Word: {{CURRENTHOUR}}
9144 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9153 Magic Word: {{CURRENTYEAR}}
9162 Magic Word: {{CURRENTTIMESTAMP}}
9164 {{CURRENTTIMESTAMP}}
9171 Magic Words LOCAL (UTC)
9175 * {{LOCALMONTHNAME}}
9176 * {{LOCALMONTHNAMEGEN}}
9177 * {{LOCALMONTHABBREV}}
9186 * {{LOCALTIMESTAMP}}
9201 <li> 19700101000203</li></ul>
9206 Magic Word: {{FULLPAGENAME}}
9208 title=[[User:Ævar Arnfjörð Bjarmason]]
9212 <p>User:Ævar Arnfjörð Bjarmason
9217 Magic Word: {{FULLPAGENAMEE}}
9219 title=[[User:Ævar Arnfjörð Bjarmason]]
9223 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9228 Magic Word: {{TALKSPACE}}
9230 title=[[User:Ævar Arnfjörð Bjarmason]]
9239 Magic Word: {{TALKSPACE}}, same namespace
9241 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9250 Magic Word: {{TALKSPACE}}, main namespace
9252 title=[[Parser Test]]
9261 Magic Word: {{TALKSPACEE}}
9263 title=[[User:Ævar Arnfjörð Bjarmason]]
9272 Magic Word: {{SUBJECTSPACE}}
9274 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9283 Magic Word: {{SUBJECTSPACE}}, same namespace
9285 title=[[User:Ævar Arnfjörð Bjarmason]]
9294 Magic Word: {{SUBJECTSPACE}}, main namespace
9296 title=[[Parser Test]]
9304 Magic Word: {{SUBJECTSPACEE}}
9306 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9315 Magic Word: {{NAMESPACE}}
9317 title=[[User:Ævar Arnfjörð Bjarmason]]
9326 Magic Word: {{NAMESPACEE}}
9328 title=[[User:Ævar Arnfjörð Bjarmason]]
9337 Magic Word: {{NAMESPACENUMBER}}
9339 title=[[User:Ævar Arnfjörð Bjarmason]]
9348 Magic Word: {{SUBPAGENAME}}
9350 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9359 Magic Word: {{SUBPAGENAMEE}}
9361 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9370 Magic Word: {{ROOTPAGENAME}}
9372 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9376 <p>Ævar Arnfjörð Bjarmason
9381 Magic Word: {{ROOTPAGENAMEE}}
9383 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9387 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9392 Magic Word: {{BASEPAGENAME}}
9394 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9398 <p>Ævar Arnfjörð Bjarmason
9403 Magic Word: {{BASEPAGENAMEE}}
9405 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9409 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9414 Magic Word: {{TALKPAGENAME}}
9416 title=[[User:Ævar Arnfjörð Bjarmason]]
9420 <p>User talk:Ævar Arnfjörð Bjarmason
9425 Magic Word: {{TALKPAGENAMEE}}
9427 title=[[User:Ævar Arnfjörð Bjarmason]]
9431 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9436 Magic Word: {{SUBJECTPAGENAME}}
9438 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9442 <p>User:Ævar Arnfjörð Bjarmason
9447 Magic Word: {{SUBJECTPAGENAMEE}}
9449 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9451 {{SUBJECTPAGENAMEE}}
9453 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9458 Magic Word: {{NUMBEROFFILES}}
9467 Magic Word: {{PAGENAME}}
9469 title=[[User:Ævar Arnfjörð Bjarmason]]
9473 <p>Ævar Arnfjörð Bjarmason
9478 Magic Word: {{PAGENAME}} with metacharacters
9480 title=[['foo & bar = baz']]
9484 <p><i>'foo & bar = baz'</i>
9487 <p><i>'foo & bar = baz'</i></p>
9491 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9493 title=[[*RFC 1234 http://example.com/]]
9497 <p>*RFC 1234 http://example.com/
9500 <p>*RFC 1234 http://example.com/</p>
9504 Magic Word: {{PAGENAMEE}}
9506 title=[[User:Ævar Arnfjörð Bjarmason]]
9510 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9515 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9517 title=[[*RFC 1234 http://example.com/]]
9521 <p>*RFC_1234_http://example.com/
9524 <p>*RFC_1234_http://example.com/</p>
9528 Magic Word: {{REVISIONID}}
9537 Magic Word: {{SCRIPTPATH}}
9546 Magic Word: {{STYLEPATH}}
9555 Magic Word: {{SERVER}}
9559 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9564 Magic Word: {{SERVERNAME}}
9573 Magic Word: {{SITENAME}}
9582 Case-sensitive magic words, when cased differently, should just be template transclusions
9589 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9590 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9591 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9592 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9597 Case-insensitive magic words should still work with weird casing.
9607 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9611 # From plwiki:PLOS_ONE
9613 Parsoid: Page property magic word with magic word contents
9615 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9617 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid=\"{&quot;dsr&quot;:[15,31,2,2]}\"><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[17,29,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;PAGENAME&quot;,&quot;function&quot;:&quot;pagename&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">Main Page</span></i>"}]]}'/>
9621 Parsoid: Template-generated DISPLAYTITLE
9623 {{{{echo|DISPLAYTITLE}}:Foo}}
9625 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,29,null,null],"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
9629 Namespace 1 {{ns:1}}
9638 Namespace 1 {{ns:01}}
9647 Namespace 0 {{ns:0}} (bug 4783)
9655 Namespace 0 {{ns:00}} (bug 4783)
9663 Namespace -1 {{ns:-1}}
9672 Namespace User {{ns:User}}
9681 Namespace User talk {{ns:User_talk}}
9690 Namespace User talk {{ns:uSeR tAlK}}
9699 Namespace File {{ns:File}}
9708 Namespace File {{ns:Image}}
9717 Namespace (lang=de) Benutzer {{ns:User}}
9728 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9734 <p>Benutzer Diskussion
9742 {{urlencode:hi world?!}}
9743 {{urlencode:hi world?!|WIKI}}
9744 {{urlencode:hi world?!|PATH}}
9745 {{urlencode:hi world?!|QUERY}}
9755 Magic Word: prioritize type info over data-parsoid
9759 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9765 Magic Word: serialize on separate line (parsoid)
9767 parsoid=wt2wt,html2wt
9773 foo<meta property="mw:PageProp/notoc"/>bar
9777 Magic Word: rt non-english wikis
9784 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9788 __proto__ is treated as normal wikitext (T105997)
9800 Magic links: internal link to RFC (bug 479)
9804 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9809 Magic links: RFC (bug 479)
9813 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9818 Magic links: RFC (bug 65278)
9820 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9822 <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.
9827 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9829 RFC      822
9833 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9840 Magic links: ISBN (bug 1937)
9844 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9849 Magic links: ISBN (bug 65278)
9851 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9853 <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.
9856 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:ExtLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
9860 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9862 ISBN      978 0 316 09811 3
9868 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9877 Magic links: PMID incorrectly converts space to underscore
9881 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9886 Magic links: PMID (bug 65278)
9888 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9890 <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.
9895 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9897 PMID      1234
9901 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9912 Nonexistent template
9914 {{thistemplatedoesnotexist}}
9916 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9921 Template with invalid target containing tags
9923 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9925 <p>{{a<b>b</b>|foo|a=b|a = b}}
9930 Template with invalid target containing unclosed tag
9932 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9934 <p>{{a<b>|foo|a=b|a = b}}</b>
9939 Template with invalid target containing wikilink
9943 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9946 <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>
9950 Template with just whitespace in it, bug #68421
9954 <p><span typeof="mw:Transclusion mw:Nowiki" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</span></p>
9960 This is a test template
9968 <p>This is a test template
9973 Template with explicit namespace
9977 <p>This is a test template
9985 This is a test template with parameter {{{param}}}
9991 {{paramtest|param=foo}}
9993 <p>This is a test template with parameter foo
9998 Template:paramtestnum
10000 [[{{{1}}}|{{{2}}}]]
10004 Template unnamed parameter
10006 {{paramtestnum|Main Page|the main page}}
10008 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10013 Template:templatesimple
10019 Template:templateredirect
10021 #redirect [[Template:templatesimple]]
10025 Template:templateasargtestnum
10031 Template:templateasargtest
10033 {{template{{{templ}}}}}
10037 Template:templateasargtest2
10043 Template with template name as unnamed argument
10045 {{templateasargtestnum|templatesimple}}
10052 Template with template name as argument
10054 {{templateasargtest|templ=simple}}
10061 Template with template name as argument (2)
10063 {{templateasargtest2|templ=templatesimple}}
10070 Template:templateasargtestdefault
10072 {{{{{templ|templatesimple}}}}}
10082 Template with default value
10084 {{templateasargtestdefault}}
10091 Template with default value (value set)
10093 {{templateasargtestdefault|templ=templa}}
10102 {{templateredirect}}
10107 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10111 Template with argument in separate line
10113 {{ templateasargtest |
10121 Template with complex template as argument
10124 param ={{ templateasargtest |
10125 templ = simple }}}}
10127 <p>This is a test template with parameter (test)
10132 Template with thumb image (with link in description)
10134 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10136 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>
10139 <p>This is a test template with parameter</p>
10140 <div class="thumb tright">
10141 <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>
10142 <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>
10146 <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>
10150 Template:complextemplate
10152 {{{1}}} {{paramtest|
10153 param ={{{param}}}}}
10157 Template with complex arguments
10160 param ={{ templateasargtest |
10161 templ = simple }}|[[Template:complextemplate|link]]}}
10163 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10168 BUG 553: link with two variables in a piped link
10171 |[[{{{1}}}|{{{2}}}]]
10176 <td>[[{{{1}}}|{{{2}}}]]
10182 Magic variable as template parameter
10184 {{paramtest|param={{SITENAME}}}}
10186 <p>This is a test template with parameter MediaWiki
10193 [[{{{param}}}|link]]
10197 Template parameter as link source
10199 {{linktest|param=Main Page}}
10201 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10206 Template:paramtest2
10208 including another template, {{paramtest|param={{{arg}}}}}
10212 Template passing argument to another template
10214 {{paramtest2|arg='hmm'}}
10216 <p>including another template, This is a test template with parameter 'hmm'
10227 Template as link source
10231 [[{{linktest2}}|Main Page]]
10233 [[{{linktest2}}]]Page
10235 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10236 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10237 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10255 Template infinite loop
10259 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10264 Template from main namespace
10283 BUG 529: Template with table, not included at beginning of line
10302 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10322 BUG 41: Template parameters shown as broken links
10331 Template with targets containing wikilinks
10335 {{[[{{echo|foo}}]]}}
10337 {{{{echo|[[foo}}]]}}
10339 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10340 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10352 Templates: Double quotes as template target
10359 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10364 Template:MSGNW test
10366 ''None'' of '''this''' should be
10368 but rather passed unmodified
10376 # hmm, fix this or just deprecate msgnw and document its behavior?
10380 {{msgnw:MSGNW test}}
10382 <p>''None'' of '''this''' should be
10384  but rather passed unmodified
10385 {{test}}
10389 <!-- comment -->
10396 {{int:youhavenewmessages|lots of money|not!}}
10398 <p>You have lots of money (not!).
10405 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10409 <includeonly> and <noinclude> being included
10420 <onlyinclude>Foo</onlyinclude>bar
10424 <onlyinclude> being included
10436 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10440 <onlyinclude> and <includeonly> being included
10449 <includeonly> and <noinclude> on a page
10451 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10458 Un-closed <noinclude>
10465 <onlyinclude> on a page
10467 <onlyinclude>Foo</onlyinclude>bar
10474 Un-closed <onlyinclude>
10481 Self-closed noinclude, includeonly, onlyinclude tags
10492 Unbalanced includeonly and noinclude tags
10496 |b</noinclude></noinclude>
10497 |c</noinclude></includeonly>
10498 |d</includeonly></includeonly>
10507 <td>c</includeonly>
10509 <td>d</includeonly></includeonly>
10515 Template:Includeonly section
10518 ==Includeonly section==
10524 Bug 6563: Edit link generation for section shown by <includeonly>
10526 {{includeonly section}}
10528 <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>
10529 <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>
10533 # Uses same input as the contents of [[Template:Includeonly section]]
10535 Bug 6563: Section extraction for section shown by <includeonly>
10540 ==Includeonly section==
10548 Bug 6563: Edit link generation for section suppressed by <includeonly>
10551 ==Includeonly section==
10555 <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>
10560 Bug 6563: Section extraction for section suppressed by <includeonly>
10565 ==Includeonly section==
10573 Un-closed <includeonly>
10580 Includes and comments at SOL
10582 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10586 </noinclude>* stuff
10589 <includeonly>can have stuff</includeonly>=== here ===
10592 <h2><span class="mw-headline" id="hu">hu</span></h2>
10595 <ul><li> stuff</li>
10596 <li> here</li></ul>
10597 <h3><span class="mw-headline" id="here">here</span></h3>
10600 <!-- 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>
10602 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10604 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10605 <li> here</li></ul>
10607 <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>
10611 # TODO: test with DOM fragment reuse!
10613 Parsoid: DOM fragment reuse
10615 parsoid=wt2wt,wt2html
10617 a{{echo|b<table></table>c}}d
10629 <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","spc":["","","",""]}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
10631 <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","spc":["","","",""]}]]}'>ab</p><span about="#mwt2">
10632 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10633 </span><p about="#mwt2">cd</p>
10635 <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","spc":["","","",""]}]]}'>a</p><span about="#mwt3">
10637 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10639 </span><p about="#mwt3">b</p>
10643 Parsoid: Merge double tds (T52603)
10648 |{{echo|{{!}} foo}}
10652 <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>
10657 Parsoid: Merge double tds in nested transclusion content (T52603)
10663 |{{echo|{{!}} foo}}
10667 <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}}]}'>
10669 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10675 ### <includeonly> and <noinclude> in attributes
10678 0. includeonly around the entire attribute
10680 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10682 <p><span id="v2">bar</span>
10687 1. includeonly in html attr key
10689 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10691 <p><span id="foo">bar</span>
10696 2. includeonly in html attr value
10698 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10699 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10701 <p><span id="v1">bar</span>
10702 <span id="v1">bar</span>
10707 3. includeonly in part of an attr value
10709 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10711 <p><span style="color:red;">bar</span>
10716 4. includeonly in table attributes
10740 ### Token Stream Patcher tests
10742 ### These tests won't always pass wt2wt and other modes because
10743 ### on serialization, the table will be output on a new line.
10744 ### For now, we are blacklisting them, and using this to test selser.
10748 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10750 parsoid=wt2html,wt2wt
10752 {{echo|}}{| width = '100%'
10756 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10757 <tbody><tr><td>foo</td></tr>
10762 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10764 parsoid=wt2html,wt2wt
10766 <includeonly>a</includeonly>{| {{{b}}}
10770 <meta typeof="mw:Includes/IncludeOnly"/><meta typeof="mw:Includes/IncludeOnly/End"/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid=\"{&quot;dsr&quot;:[31,38,null,null],&quot;src&quot;:&quot;{{{b}}}&quot;}\">{{{b}}}</span>"},{"html":""}]]}' data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}'>
10771 <tbody><tr><td>c</td></tr>
10777 ### Testing parsing of templates where a template arg
10778 ### has the same name as the template itself.
10784 {{{quote|{{{1}}}}}}
10788 Templates: Template Name/Arg clash: 1. Use of positional param
10797 Templates: Template Name/Arg clash: 2. Use of named param
10799 {{quote|quote=foo}}
10806 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10815 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10819 Templates: 1. Simple use
10828 Templates: 2. Inside a block tag
10830 <div>{{echo|Foo}}</div>
10831 <blockquote>{{echo|Foo}}</blockquote>
10834 <blockquote>Foo</blockquote>
10844 Templates: P-wrapping: 1a. Templates on consecutive lines
10855 Templates: P-wrapping: 1b. Templates on consecutive lines
10869 Templates: P-wrapping: 1c. Templates on consecutive lines
10872 {{echo|bar}} <div>baz</div>
10885 Templates: P-wrapping: 1d. Template preceded by comment-only line
10894 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10898 Templates: Inline Text: 1. Multiple template uses
10900 {{echo|Foo}}bar{{echo|baz}}
10907 Templates: Inline Text: 2. Back-to-back template uses
10909 {{echo|Foo}}{{echo|bar}}
10916 Templates: Block Tags: 1. Multiple template uses
10918 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10920 <div>Foo</div><div>bar</div><div>baz</div>
10925 Templates: Block Tags: 2. Back-to-back template uses
10927 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10929 <div>Foo</div><div>bar</div>
10933 # This is an edge case relating to paragraph wrapping.
10935 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10940 <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
10945 Templates: Links: 1. Simple example
10947 {{echo|[[Foo|bar]]}}
10949 <p><a href="/wiki/Foo" title="Foo">bar</a>
10954 Templates: Links: 2. Generation of link href
10956 [[{{echo|Foo}}|bar]]
10958 <p><a href="/wiki/Foo" title="Foo">bar</a>
10963 Templates: Links: 3. Generation of part of a link href
10965 [[Fo{{echo|o}}|bar]]
10967 [[Foo{{echo|bar}}]]
10969 [[Foo{{echo|bar}}baz]]
10971 [[Foo{{echo|bar}}|bar]]
10973 [[:Foo{{echo|bar}}]]
10975 [[:Foo{{echo|bar}}|bar]]
10977 <p><a href="/wiki/Foo" title="Foo">bar</a>
10978 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10979 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10980 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10981 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10982 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10987 Templates: Links: 4. Multiple templates generating link href
10989 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10991 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10996 Templates: Links: 5. Generation of link text
10998 [[Foo|{{echo|bar}}]]
11000 <p><a href="/wiki/Foo" title="Foo">bar</a>
11005 Templates: Links: 5. Nested templates (only outermost template should be marked)
11007 {{echo|[[{{echo|Foo}}|bar]]}}
11009 <p><a href="/wiki/Foo" title="Foo">bar</a>
11014 Templates: HTML Tag: 1. Generation of HTML attr. key
11016 <div {{echo|style}}="color:red;">foo</div>
11018 <div style="color:red;">foo</div>
11023 Templates: HTML Tag: 2. Generation of HTML attr. value
11025 <div style={{echo|'color:red;'}}>foo</div>
11027 <div style="color:red;">foo</div>
11032 Templates: HTML Tag: 3. Generation of HTML attr key and value
11034 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11036 <div style="color:red;">foo</div>
11041 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11043 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11045 <div title="This is a long title with just one piece templated">foo</div>
11050 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11052 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11054 <div title="This is a long title with just one piece templated">foo</div>
11059 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11061 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11063 <div title="This is a long title with just one piece templated">foo</div>
11067 # SSS FIXME: While it is great we added support for all this,
11068 # do we want to make this part of the spec? Maybe we want to
11069 # deprecate this kind of usage in the future?
11071 Templates: HTML Tag: 7. Generation of partial attribute key string
11073 <div st{{echo|yle}}="color:red;">foo</div>
11075 <div style="color:red;">foo</div>
11080 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11082 <div {{echo|1=id="v1"}}>bar</div>
11084 <div id="v1">bar</div>
11089 Templates: HTML Tag: 9. Multiple template-generated attributes
11091 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11093 <div id="v1" title="foo">bar</div>
11098 Templates: Support for templates generating attributes and content
11100 {| {{mixed_attr_content_template}}
11105 <table style="color:red;" title="T48811">
11115 <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|}"]}'>
11124 1. Entities and nowikis inside templated attributes should be handled correctly
11126 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11128 <div style="background:#f9f9f9;">foo</div>
11131 <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=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[5,49,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;style{{=}}\\&quot;background:&amp;#35;f9f9f9;\\&quot;&quot;}},&quot;i&quot;: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=\"{&quot;src&quot;:&quot;&amp;#35;&quot;,&quot;srcContent&quot;:&quot;#&quot;}\">#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
11135 2. Entities and nowikis inside templated attributes should be handled correctly
11138 |{{table_attribs_3}}
11143 <td style="background:#f9f9f9;">Foo
11148 <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>
11153 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11156 |{{table_attribs_3}}
11161 <td style="background:#f9f9f9;">Foo
11165 <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}}]}'>
11166 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11172 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11175 | {{table_attribs_6}} hi
11180 <td style="background: red;"> hi
11185 <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>
11190 Templates: HTML Tables: 1. Generating start of a HTML table
11192 {{echo|<table><tr><td>foo</td>}}</tr></table>
11194 <table><tr><td>foo</td></tr></table>
11199 Templates: HTML Tables: 2a. Generating middle of a HTML table
11201 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11203 <table><tr><td>foo</td></tr></table>
11208 Templates: HTML Tables: 2b. Generating middle of a HTML table
11210 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11212 <table><tr><td>foo</td></tr></table>
11217 Templates: HTML Tables: 3. Generating end of a HTML table
11219 <table><tr>{{echo|<td>foo</td></tr></table>}}
11221 <table><tr><td>foo</td></tr></table>
11226 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11228 {{echo|<table>}}<tr><td>foo</td></tr></table>
11230 <table><tr><td>foo</td></tr></table>
11235 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11237 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11239 <table><tr><td>foo</td></tr></table>
11244 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11246 <table><tr>{{echo|<td>}}foo</td></tr></table>
11248 <table><tr><td>foo</td></tr></table>
11253 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11255 <table><tr><td>foo{{echo|</td>}}</tr></table>
11257 <table><tr><td>foo</td></tr></table>
11262 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11264 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11266 <table><tr><td>foo</td></tr></table>
11271 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11273 <table><tr><td>foo</td></tr>{{echo|</table>}}
11275 <table><tr><td>foo</td></tr></table>
11280 Templates: HTML Tables: 5. Proper fostering of categories from inside
11282 parsoid=wt2html,wt2wt
11284 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11285 <!--Two categories (Bug 50330)-->
11286 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11288 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11289 <!--Two categories (Bug 50330)-->
11290 <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>
11294 Templates: Wiki Tables: 1a. Fostering of entire template content
11302 <tr><td></td></tr></table>
11314 Templates: Wiki Tables: 1b. Fostering of entire template content
11327 <tr><td></td></tr></table>
11341 Templates: Wiki Tables: 2. Fostering of partial template content
11351 <tr><td></td></tr></table>
11364 Templates: Wiki Tables: 3. td-content via multiple templates
11367 {{echo|{{pipe}}a}}{{echo|b}}
11378 Templates: Wiki Tables: 4. Templated tags, no content
11384 <tr><td></td></tr></table>
11389 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11403 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11416 ## This test case is very specific to Parsoid's internals
11417 ## and is hence only tested for Parsoid's code. Parsoid uses
11418 ## a <meta> marker tag for <ref> tags and they are expanded
11419 ## much later. We are verifying that this <meta> tag usage
11420 ## doesn't prevent foster parenting.
11422 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11424 {{PartialTable}}<ref>foo</ref>
11429 <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">
11433 <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>
11437 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11447 <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{{!}}}"]}'>
11448 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11452 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11457 Templates: Lists: Multi-line list-items via templates
11459 *{{echo|a {{nonexistent|
11461 *{{echo|b {{nonexistent|
11464 <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>
11465 <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>
11470 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11472 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11474 <p><i>ab</i>c<i>d</i>e
11479 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11480 (PHP parser generates misnested html)
11482 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11484 <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>
11488 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11489 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11491 parsoid=wt2html,wt2wt
11493 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11495 <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>
11496 <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>
11497 <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>
11501 Templates: Ugly nesting: 4. Divs opened/closed across templates
11503 a<div>b{{echo|c</div>d}}e
11514 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11520 |{{echo|foo</table>}}
11524 <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|}"]}'>
11528 <td>foo</td></tr></tbody></table><span about="#mwt1">
11529 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11534 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11544 <td>1. {{echo|foo </table>}}</td>
11546 <td>2. {{echo|baz </table>}}</td>
11559 <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>"]}'>
11564 <td>1. foo </td></tr></tbody></table></td>
11566 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11567 </span><span about="#mwt2">
11568 </span><span about="#mwt2">
11569 </span><span about="#mwt2">abc</span><span about="#mwt2">
11570 </span><span about="#mwt2">
11571 </span><span about="#mwt2">
11572 </span><span about="#mwt2">
11573 </span><span about="#mwt2">
11574 </span><span about="#mwt2">
11575 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11576 </span><span about="#mwt2">
11581 Templates: Ugly templates: 3. newline-only template parameter
11590 # This looks like a bug: a single newline triggers p/br for some reason.
11592 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11601 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11602 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11604 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11610 <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","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]]}'>foo
11611 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11615 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11616 # that are "identical" and generate nesting cycles in the algorithm
11618 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11620 {{echo|<table><tr><td><table>}}
11624 <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","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
11625 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11626 </table></td></tr></tbody></table>
11630 Parser Functions: 1. Simple example
11639 Parser Functions: 2. Nested use (only outermost should be marked up)
11648 ### Pre-save transform tests
11651 pre-save transform: subst:
11657 This is a test template
11661 pre-save transform: normal template
11671 pre-save transform: nonexistent template
11675 {{thistemplatedoesnotexist}}
11677 {{thistemplatedoesnotexist}}
11681 pre-save transform: subst magic variables
11690 # This is bug 89, which I fixed. -- wtm
11692 pre-save transform: subst: templates with parameters
11696 {{subst:paramtest|param="something else"}}
11698 This is a test template with parameter "something else"
11702 Template:nowikitest
11704 <nowiki>'''not wiki'''</nowiki>
11708 pre-save transform: nowiki in subst (bug 1188)
11712 {{subst:nowikitest}}
11714 <nowiki>'''not wiki'''</nowiki>
11718 Template:commenttest
11720 This template has <!-- a comment --> in it.
11724 pre-save transform: comment in subst (bug 1936)
11728 {{subst:commenttest}}
11730 This template has <!-- a comment --> in it.
11734 pre-save transform: unclosed tag
11738 <nowiki>'''not wiki'''
11740 <nowiki>'''not wiki'''
11744 pre-save transform: mixed tag case
11748 <NOwiki>'''not wiki'''</noWIKI>
11750 <NOwiki>'''not wiki'''</noWIKI>
11754 pre-save transform: unclosed comment in <nowiki>
11758 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11760 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11763 # Leading @ in this template definition works around a limitation
11764 # in parsoid's parserTests which otherwise strips the <span> from the
11765 # result (confusing it for a template wrapper)
11769 @<span onmouseover="alert('crap')">Oh no</span>
11773 (confirming safety of fix for subst bug 1936)
11775 {{Template:dangerous}}
11777 <p>@<span>Oh no</span>
11782 pre-save transform: comment containing gallery (bug 5024)
11786 <!-- <gallery>data</gallery> -->
11788 <!-- <gallery>data</gallery> -->
11792 pre-save transform: comment containing extension
11796 <!-- <tag>data</tag> -->
11798 <!-- <tag>data</tag> -->
11802 pre-save transform: comment containing nowiki
11806 <!-- <nowiki>data</nowiki> -->
11808 <!-- <nowiki>data</nowiki> -->
11812 pre-save transform: <noinclude> in subst (bug 3298)
11822 pre-save transform: <onlyinclude> in subst (bug 3298)
11826 {{subst:Includes2}}
11834 {{<includeonly>subst:</includeonly>Includes}}
11838 Template:SafeSubstTest
11840 {{<includeonly>safesubst:</includeonly>Includes}}
11844 bug 22297: safesubst: works during PST
11848 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11854 bug 22297: safesubst: works during normal parse
11863 subst: does not work during normal parse
11867 <p>{{subst:Includes}}
11872 pre-save transform: context links ("pipe trick")
11876 [[Article (context)|]]
11879 [[Bar:Article (context)|]]
11880 [[:Bar:Article (context)|]]
11882 [[|Article (context)]]
11886 [[Article (context)|Article]]
11887 [[Bar:Article|Article]]
11888 [[:Bar:Article|Article]]
11889 [[Bar:Article (context)|Article]]
11890 [[:Bar:Article (context)|Article]]
11892 [[Article (context)]]
11893 [[Bar:X (Y) Z|X (Y) Z]]
11894 [[:Bar:X (Y) Z|X (Y) Z]]
11898 pre-save transform: context links ("pipe trick") with interwiki prefix
11902 [[interwiki:Article|]]
11903 [[:interwiki:Article|]]
11904 [[interwiki:Bar:Article|]]
11905 [[:interwiki:Bar:Article|]]
11907 [[interwiki:Article|Article]]
11908 [[:interwiki:Article|Article]]
11909 [[interwiki:Bar:Article|Bar:Article]]
11910 [[:interwiki:Bar:Article|Bar:Article]]
11914 pre-save transform: context links ("pipe trick") with parens in title
11916 pst title=[[Somearticle (context)]]
11920 [[Article (context)|Article]]
11924 pre-save transform: context links ("pipe trick") with comma in title
11926 pst title=[[Someplace, Somewhere]]
11929 [[Otherplace, Elsewhere|]]
11930 [[Otherplace, Elsewhere, Anywhere|]]
11932 [[Otherplace, Somewhere|Otherplace]]
11933 [[Otherplace, Elsewhere|Otherplace]]
11934 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11938 pre-save transform: context links ("pipe trick") with parens and comma
11940 pst title=[[Someplace (IGNORED), Somewhere]]
11943 [[Otherplace (place), Elsewhere|]]
11945 [[Otherplace, Somewhere|Otherplace]]
11946 [[Otherplace (place), Elsewhere|Otherplace]]
11950 pre-save transform: context links ("pipe trick") with comma and parens
11952 pst title=[[Who, me? (context)]]
11955 [[Me, Myself, and I (1937 song)|]]
11957 [[Yes, you. (context)|Yes, you.]]
11958 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11962 pre-save transform: context links ("pipe trick") with namespace
11964 pst title=[[Ns:Somearticle]]
11968 [[Ns:Article|Article]]
11972 pre-save transform: context links ("pipe trick") with namespace and parens
11974 pst title=[[Ns:Somearticle (context)]]
11978 [[Ns:Article (context)|Article]]
11982 pre-save transform: context links ("pipe trick") with namespace and comma
11984 pst title=[[Ns:Somearticle, Context, Whatever]]
11988 [[Ns:Article, Context, Whatever|Article]]
11992 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11994 pst title=[[Ns:Somearticle, Context (context)]]
11998 [[Ns:Article (context)|Article]]
12002 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12004 pst title=[[Ns:Somearticle (IGNORED), Context]]
12008 [[Ns:Article, Context|Article]]
12012 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12016 [[Article(context)|]]
12017 [[Bar:Article(context)|]]
12018 [[:Bar:Article(context)|]]
12019 [[|Article(context)]]
12023 [[Article(context)|Article]]
12024 [[Bar:Article(context)|Article]]
12025 [[:Bar:Article(context)|Article]]
12026 [[Article(context)]]
12027 [[Bar:X(Y)Z|X(Y)Z]]
12028 [[:Bar:X(Y)Z|X(Y)Z]]
12032 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12036 [[Article (context)|]]
12037 [[Bar:Article (context)|]]
12038 [[:Bar:Article (context)|]]
12039 [[|Article (context)]]
12043 [[Article (context)|Article]]
12044 [[Bar:Article (context)|Article]]
12045 [[:Bar:Article (context)|Article]]
12046 [[Article (context)]]
12047 [[Bar:X (Y) Z|X (Y) Z]]
12048 [[:Bar:X (Y) Z|X (Y) Z]]
12052 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12056 [[Article(context)|]]
12057 [[Bar:Article(context)|]]
12058 [[:Bar:Article(context)|]]
12059 [[|Article(context)]]
12063 [[Article(context)|Article]]
12064 [[Bar:Article(context)|Article]]
12065 [[:Bar:Article(context)|Article]]
12066 [[Article(context)]]
12067 [[Bar:X(Y)Z|X(Y)Z]]
12068 [[:Bar:X(Y)Z|X(Y)Z]]
12072 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12076 [[Article (context), context|]]
12077 [[Article (context),context|]]
12078 [[Bar:Article (context), context|]]
12079 [[Bar:Article (context),context|]]
12080 [[:Bar:Article (context), context|]]
12081 [[:Bar:Article (context),context|]]
12083 [[Article (context), context|Article]]
12084 [[Article (context),context|Article]]
12085 [[Bar:Article (context), context|Article]]
12086 [[Bar:Article (context),context|Article]]
12087 [[:Bar:Article (context), context|Article]]
12088 [[:Bar:Article (context),context|Article]]
12092 pre-save transform: trim trailing empty lines
12096 Empty lines are trimmed
12102 Empty lines are trimmed
12106 pre-save transform: Signature expansion
12111 * <noinclude>~~~</noinclude>
12112 * <includeonly>~~~</includeonly>
12113 * <onlyinclude>~~~</onlyinclude>
12115 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12116 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12117 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12118 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12123 pre-save transform: Signature expansion in nowiki tags (bug 93)
12129 <nowiki>~~~~</nowiki>
12131 <includeonly><nowiki>~~~~</nowiki></includeonly>
12133 <noinclude><nowiki>~~~~</nowiki></noinclude>
12135 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12137 {{subst:Foo}} shall be converted to FOO
12139 As well as inside noinclude/onlyinclude
12140 <noinclude>{{subst:Foo}}</noinclude>
12141 <onlyinclude>{{subst:Foo}}</onlyinclude>
12143 But not inside includeonly
12144 <includeonly>{{subst:Foo}}</includeonly>
12148 <nowiki>~~~~</nowiki>
12150 <includeonly><nowiki>~~~~</nowiki></includeonly>
12152 <noinclude><nowiki>~~~~</nowiki></noinclude>
12154 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12156 FOO shall be converted to FOO
12158 As well as inside noinclude/onlyinclude
12159 <noinclude>FOO</noinclude>
12160 <onlyinclude>FOO</onlyinclude>
12162 But not inside includeonly
12163 <includeonly>{{subst:Foo}}</includeonly>
12167 Parsoid: Recognize nowiki with trailing space in tags
12171 <nowiki ><div>[[foo]]</nowiki >
12179 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12186 Parsoid: Recognize nowiki with odd capitalization
12190 <noWikI ><div>[[foo]]</Nowiki >
12192 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12197 Parsoid: Escape nowiki with trailing space in tags
12201 <p><nowiki > foo </nowiki ></p>
12202 <p>a<nowiki />b</p>
12203 <p>c<nowiki/ >d</p>
12205 <nowiki > foo </nowiki >
12213 Parsoid: Escape weird noWikI capitalizations
12217 <p><noWikI > foo </NoWikI ></p>
12219 <noWikI > foo </NoWikI >
12223 ### Message transform tests
12226 message transform: magic variables
12236 message transform: should not transform wiki markup
12246 message transform: <noinclude> in transcluded template (bug 4926)
12256 message transform: <onlyinclude> in transcluded template (bug 4926)
12266 {{#special:}} page name, known
12270 {{#special:Recentchanges}}
12272 Special:RecentChanges
12276 {{#special:}} page name with subpage, known
12280 {{#special:Recentchanges/param}}
12282 Special:RecentChanges/param
12286 {{#special:}} page name, unknown
12290 {{#special:foobar nonexistent}}
12292 Special:Foobar nonexistent
12296 {{#speciale:}} page name, known
12300 {{#speciale:Recentchanges}}
12302 Special:RecentChanges
12306 {{#speciale:}} page name with subpage, known
12310 {{#speciale:Recentchanges/param}}
12312 Special:RecentChanges/param
12316 {{#speciale:}} page name, unknown
12320 {{#speciale:foobar nonexistent}}
12322 Special:Foobar_nonexistent
12328 ### For Parsoid-specific tests, see
12329 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12334 parsoid=wt2html,wt2wt,html2html
12336 [[Image:foobar.jpg]]
12338 <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>
12341 <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>
12345 Simple image (using File: namespace, now canonical)
12347 [[File:Foobar.jpg]]
12349 <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>
12352 <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>
12356 Right-aligned image
12358 [[File:Foobar.jpg|right]]
12360 <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>
12363 <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>
12369 [[File:Foobar.jpg|right|Caption text]]
12371 <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>
12374 <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>
12378 Image with caption, bug 53312 #1
12380 [[File:Foobar.jpg|right|Caption page stuff]]
12382 <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>
12385 <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>
12389 Image with caption, bug 53312 #2
12391 [[File:Foobar.jpg|right|Caption page=]]
12393 <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>
12396 <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>
12400 Image with caption, bug 53312 #3
12402 [[File:Foobar.jpg|right|Caption page=stuff]]
12404 <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>
12407 <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>
12411 Allow empty links in image captions (Bug 60753)
12415 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12420 <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>
12423 <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>
12425 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12426 </figcaption></figure>
12430 Titles in unlinked images (T23454)
12432 [[File:Foobar.jpg|link=|stuff]]
12434 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12439 Link with empty target
12448 Image with link trail
12450 Linktrails should not work for images: [[File:Foobar.jpg]]s
12452 <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
12455 <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>
12459 Image with empty attribute
12461 parsoid=wt2html,wt2wt,html2html
12463 [[File:Foobar.jpg|right||Caption text]]
12465 <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>
12468 <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>
12472 1. Block image with individual attributes from templates
12474 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12476 <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>
12479 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[24,38,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><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"/></a><figcaption>This is a caption</figcaption></figure>
12483 2. Block Image with individual attributes from templates
12485 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12487 <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>
12490 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,32,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;thumb&quot;}},&quot;i&quot;:0}}]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[33,47,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><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"/></a><figcaption>This is a caption</figcaption></figure>
12494 3. Inline image with individual attributes from templates
12496 [[File:Foobar.jpg|{{echo|50px}}]]
12498 <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>
12501 <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=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;50px&quot;}},&quot;i&quot;: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"/></a></span></p>
12504 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12505 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12507 Image with multiple attributes from the same template
12509 [[File:Foobar.jpg|{{image_attribs}}]]
12511 <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>
12514 <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>
12518 Image with link tails
12522 123[[File:Foobar.jpg]]456
12523 123[[File:Foobar.jpg|right]]456
12524 123[[File:Foobar.jpg|thumb]]456
12526 <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
12528 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
12529 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
12532 <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>
12534 <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>
12536 <div class="thumb tright">
12537 <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>
12538 <div class="thumbcaption">
12539 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12545 <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>
12546 <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>
12547 <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>
12551 Image with multiple captions -- only last one is accepted
12553 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12555 <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>
12558 <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>
12562 Image with multiple widths -- use last
12564 [[File:Foobar.jpg|200px|300px|caption]]
12566 <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>
12569 <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>
12573 Image with multiple alignments -- use first (bug 48664)
12577 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12579 [[File:Foobar.jpg|middle|text-top|caption]]
12581 <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>
12582 <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>
12585 <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>
12586 <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>
12590 Image with width attribute at different positions
12592 [[File:Foobar.jpg|200px|right|Caption]]
12593 [[File:Foobar.jpg|right|200px|Caption]]
12594 [[File:Foobar.jpg|right|Caption|200px]]
12596 <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>
12597 <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>
12598 <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>
12601 <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>
12602 <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>
12603 <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>
12606 # a sad bit of backward-compatibility
12608 Image with size specified with pxpx (bug 13500, 51628)
12610 parsoid=wt2html,wt2wt,html2html
12612 [[File:Foobar.jpg|20pxpx]]
12613 [[File:Foobar.jpg|200x20pxpx]]
12615 <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>
12616 <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>
12619 <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>
12623 Image with link parameter, wiki target
12625 [[File:Foobar.jpg|link=Main Page]]
12627 <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>
12630 <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>
12633 # parsoid bug 49293 (part 1)
12635 Image with link parameter, URL target
12637 [[File:Foobar.jpg|link=http://example.com/]]
12639 <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>
12642 <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>
12645 # parsoid bug 49293 (part 2)
12647 Image with link parameter, protocol-less URL target
12649 [[File:Foobar.jpg|link=//example.com/]]
12651 <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>
12654 <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>
12658 Escaping non-block captions (T107435)
12661 "modes": ["wt2wt"],
12663 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
12667 [[Image:Foobar.jpg|caption]]
12669 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
12673 Image with link parameter, wgExternalLinkTarget
12675 [[Image:foobar.jpg|link=http://example.com/]]
12677 wgExternalLinkTarget='foobar'
12679 <p><a href="http://example.com/" target="foobar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12684 Image with link parameter, wgNoFollowLinks set to false
12686 [[Image:foobar.jpg|link=http://example.com/]]
12688 wgNoFollowLinks=false
12690 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12695 Image with link parameter, wgNoFollowDomainExceptions
12697 [[Image:foobar.jpg|link=http://example.com/]]
12699 wgNoFollowDomainExceptions='example.com'
12701 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12706 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12708 [[Image:foobar.jpg|link=http://example.com/|Title]]
12710 wgExternalLinkTarget='foobar'
12712 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12717 Image with empty link parameter
12719 [[File:Foobar.jpg|link=]]
12721 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12724 <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>
12728 Image with link parameter (wiki target) and unnamed parameter
12730 [[File:Foobar.jpg|link=Main_Page|Title]]
12732 <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>
12735 <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>
12739 Image with link parameter (URL target) and unnamed parameter
12741 [[File:Foobar.jpg|link=http://example.com/|Title]]
12743 <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>
12746 <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>
12750 Thumbnail image with link parameter
12753 parsoid=wt2html,wt2wt,html2html
12755 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12757 <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>
12760 <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>
12764 Manually-specified thumbnail image
12768 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12770 <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>
12773 <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>
12777 Manually-specified thumbnail image with explicit link to wiki page
12780 parsoid=wt2html,wt2wt,html2html
12782 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12784 <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>
12787 <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>
12791 Manually-specified thumbnail image with explicit link to url
12794 parsoid=wt2html,wt2wt,html2html
12796 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12798 <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>
12801 <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>
12805 Manually-specified thumbnail image with explicit no link
12808 parsoid=wt2html,wt2wt,html2html
12810 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12812 <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>
12815 <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>
12819 Manually-specified thumbnail image with explicit link and alt text
12822 parsoid=wt2html,wt2wt,html2html
12824 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12826 <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>
12829 <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>
12833 Image with frame and link
12835 parsoid=wt2html,wt2wt,html2html
12837 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12839 <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>
12842 <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>
12846 Image with frame and link and explicit alt
12848 parsoid=wt2html,wt2wt,html2html
12850 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12852 <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>
12855 <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>
12859 Image with wiki markup in implicit alt
12861 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12863 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12865 <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>
12866 </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>
12869 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"testing <b data-parsoid=\"{&quot;dsr&quot;:[27,37,3,3]}\">bold</b> in alt"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
12870 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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>
12874 Alt image option should handle most kinds of wikitext without barfing
12876 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12878 <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>
12881 <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=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[65,73,2,2]}\">link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;dsr&quot;:[80,106,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;''bold template''&quot;}},&quot;i&quot;: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>
12884 ###################
12885 # Conflicting image format options.
12886 # First option specified should 'win'.
12887 # All three cases in each test should be identical.
12890 Image with 'frameless' first.
12892 parsoid=wt2html,wt2wt,html2html
12894 [[File:Foobar.jpg|frameless|caption]]
12896 [[File:Foobar.jpg|frameless|frame|caption]]
12898 [[File:Foobar.jpg|frameless|thumb|caption]]
12900 <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>
12901 </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>
12902 </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>
12905 <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>
12906 <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>
12907 <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>
12911 Image with 'frame' first.
12913 parsoid=wt2html,wt2wt,html2html
12915 [[File:Foobar.jpg|frame|caption]]
12916 [[File:Foobar.jpg|frame|frameless|caption]]
12917 [[File:Foobar.jpg|frame|thumb|caption]]
12919 <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>
12920 <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>
12921 <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>
12924 <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>
12925 <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>
12926 <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>
12930 Image with 'thumb' first.
12932 parsoid=wt2html,wt2wt,html2html
12934 [[File:Foobar.jpg|thumb|caption]]
12935 [[File:Foobar.jpg|thumb|frameless|caption]]
12936 [[File:Foobar.jpg|thumb|frame|caption]]
12938 <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>
12939 <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>
12940 <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>
12943 <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>
12944 <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>
12945 <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>
12948 ###################
12950 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12951 # and https://phabricator.wikimedia.org/T64258
12952 # Foobar has actual size of 1941x220
12953 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12954 # a scalable format.
12955 # 2. Framed images always ignore size options; always render at default size.
12956 # 3. "Unspecified format" and border are the only types which can be
12960 Image: "unspecified format" and border enlarge
12962 parsoid=wt2html,wt2wt,html2html
12964 [[File:Foobar.jpg|2000px]]
12966 [[File:Foobar.jpg|border|2000px]]
12968 <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>
12969 </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>
12972 <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>
12973 <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>
12977 Image: "unspecified format" and border reduce
12979 parsoid=wt2html,wt2wt,html2html
12981 [[File:Foobar.jpg|1000px]]
12983 [[File:Foobar.jpg|border|1000px]]
12985 <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>
12986 </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>
12989 <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>
12990 <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>
12994 Image: thumbs reduce
12996 parsoid=wt2html,wt2wt,html2html
12998 [[File:Foobar.jpg|thumb|50px]]
13000 <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>
13003 <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>
13007 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13009 parsoid=wt2html,wt2wt,html2html
13011 [[File:Foobar.jpg|thumb|2000px]]
13013 [[File:Foobar.svg|thumb|2000px]]
13015 <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>
13016 <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>
13019 <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>
13020 <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>
13024 Image: frameless can reduce in size
13026 parsoid=wt2html,wt2wt,html2html
13028 [[File:Foobar.jpg|frameless|50px]]
13030 <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>
13033 <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>
13037 Image: bitmap frameless can't be enlarged past original size, but vector can
13039 parsoid=wt2html,wt2wt,html2html
13041 [[File:Foobar.jpg|frameless|2000px]]
13043 [[File:Foobar.svg|frameless|2000px]]
13045 <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>
13046 </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>
13049 <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>
13050 <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>
13054 Image: framed images are always unscaled.
13056 parsoid=wt2html,wt2wt,html2html
13058 [[File:Foobar.jpg|frame]]
13060 [[File:Foobar.jpg|frame|50px]]
13062 [[File:Foobar.jpg|frame|50x50px]]
13064 [[File:Foobar.jpg|frame|2000px]]
13066 <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>
13067 <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>
13068 <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>
13069 <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>
13072 <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>
13073 <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>
13074 <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>
13075 <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>
13078 ###################
13081 Link to image page- image page normally doesn't exists, hence edit link
13082 Add test with existing image page
13083 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13087 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13092 bug 18784 Link to non-existent image page with caption should use caption as link text
13094 [[:Image:test|caption]]
13096 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13101 Frameless image caption with a free URL
13103 [[File:Foobar.jpg|http://example.com]]
13105 <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>
13108 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid=\"{&quot;stx&quot;:&quot;url&quot;,&quot;dsr&quot;:[18,36,0,0]}\">http://example.com</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>
13112 Thumbnail image caption with a free URL
13116 [[File:Foobar.jpg|thumb|http://example.com]]
13118 <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>
13121 <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>
13125 Thumbnail image caption with a free URL and explicit alt
13128 parsoid=wt2html,wt2wt,html2html
13130 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13132 <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>
13135 <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>
13139 SVG thumbnails with no language set
13142 [[File:Foobar.svg|thumb|caption]]
13144 <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>
13147 <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>
13151 SVG thumbnails with language de
13153 parsoid=wt2html,wt2wt,html2html
13155 [[File:Foobar.svg|thumb|caption|lang=de]]
13157 <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>
13160 <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>
13164 SVG thumbnails with invalid language code
13166 parsoid=wt2html,wt2wt,html2html
13168 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13170 <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>
13173 <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>
13177 BUG 1887: A ISBN with a thumbnail
13179 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13181 <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>
13184 <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:ExtLink">ISBN 1235467890</a></figcaption></figure>
13188 BUG 1887: A RFC with a thumbnail
13190 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13192 <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>
13195 <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>
13199 BUG 1887: A mailto link with a thumbnail
13201 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13203 <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>
13206 <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>
13209 # Pending resolution to bug 368
13211 BUG 648: Frameless image caption with a link
13213 [[File:Foobar.jpg|text with a [[link]] in it]]
13215 <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>
13218 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[30,38,2,2]}\">link</a> in it"}'><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>
13222 BUG 648: Frameless image caption with a link (suffix)
13224 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13226 <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>
13229 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[30,41,2,5],&quot;tail&quot;:&quot;foo&quot;}\">linkfoo</a> in it"}'><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>
13233 BUG 648: Frameless image caption with an interwiki link
13235 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13237 <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>
13240 <p><span class="mw-default-size" typeof="mw:Image" 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=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;http://www.usemod.com/cgi-bin/mb.pl?Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;MeatBall:Link&quot;},&quot;isIW&quot;:true,&quot;dsr&quot;:[30,47,2,2]}\">MeatBall:Link</a> in it"}'><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>
13244 BUG 648: Frameless image caption with a piped interwiki link
13246 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13248 <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>
13251 <p><span class="mw-default-size" typeof="mw:Image" 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=\"{&quot;stx&quot;:&quot;piped&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;http://www.usemod.com/cgi-bin/mb.pl?Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;MeatBall:Link&quot;},&quot;isIW&quot;:true,&quot;dsr&quot;:[30,52,16,2]}\">link</a> in it"}'><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>
13255 T107474: Frameless image caption with <nowiki>
13257 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13259 <p><span class="mw-default-size" typeof="mw:Image mw:Placeholder" data-mw='{"caption":"<span typeof=\"mw:Nowiki\">text with a [[MeatBall:Link|link]] in it</span>"}'><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>
13263 Escape HTML special chars in image alt text
13265 [[File:Foobar.jpg|& < > "]]
13267 <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>
13270 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&amp; &lt; &gt; \""}'><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>
13274 BUG 499: Alt text should have Ӓ, not &1234;
13276 [[File:Foobar.jpg|♀]]
13278 <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>
13281 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;#9792;&quot;,&quot;srcContent&quot;:&quot;♀&quot;,&quot;dsr&quot;:[18,25,null,null]}\">♀</span>"}'><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>
13285 Broken image caption with link
13287 parsoid=wt2html,wt2wt,html2html
13289 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13291 <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.
13294 <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>
13298 Image caption containing another image
13300 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13302 <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>
13305 <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>
13309 Image: caption containing a newline
13311 [[File:Foobar.jpg|This
13314 <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>
13317 <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>
13321 Image: caption containing leading space
13322 (The leading space should not trigger nowiki escaping in wt2wt mode)
13324 [[File:Foobar.jpg|thumb| bar]]
13326 <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>
13329 <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>
13333 Image: caption containing a table
13335 parsoid=wt2html,wt2wt,html2html
13337 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13343 and some more text.]]
13345 <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>
13348 <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
13351 <tr><th>Foo </th><th>Bar</th></tr>
13354 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13358 Bug 3090: External links other than http: in image captions
13360 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13362 <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>
13365 <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>
13371 parsoid=wt2html,wt2wt,html2html
13373 [[Image:foobar.jpg|a|class=b]]
13375 <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>
13378 <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>
13382 Localized image handling (1).
13384 parsoid=wt2html,wt2wt,html2html
13387 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13389 <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>
13392 <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>
13396 Localized image handling (2).
13399 parsoid=wt2html,wt2wt,html2html
13402 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13404 <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>
13407 <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>
13411 "border", "frameless" and "class" attributes on an image.
13414 parsoid=wt2html,wt2wt,html2html
13416 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13418 <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>
13421 <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>
13424 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13426 Invalid image attributes (bug 62500)
13429 parsoid=wt2html,wt2wt,html2html
13431 [[File:Foobar.jpg|thumb|float|left|caption]]
13433 [[File:Foobar.jpg|thumb|righ|caption]]
13435 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13437 <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>
13438 <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>
13439 <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>
13442 <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>
13443 <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>
13444 <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>
13450 #REDIRECT [[File:Barfoo.jpg]]
13453 # FIXME: Parsoid should run this test -- but we'd need to teach the
13454 # mockAPI about the redirected Barfoo.jpg image.
13458 [[Image:Barfoo.jpg]]
13460 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13465 Missing image with uploads disabled
13469 [[File:Foobaz.jpg]]
13471 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13474 <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>
13477 # Parsoid-specific testing for images
13478 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13479 # Currently imperfect due to a flaw in the Parsoid testrunner
13481 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13485 Parsoid-specific image handling - simple image with size and middle alignment
13487 [[File:Foobar.jpg|middle|50px]]
13489 <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>
13493 Parsoid-specific image handling - simple image with size, middle alignment,
13494 non-standard namespace alias
13496 parsoid=wt2wt,wt2html,html2html
13498 [[Image:Foobar.jpg|middle|50px]]
13500 <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>
13504 Parsoid-specific image handling - simple image with size and middle alignment
13507 [[File:Foobar.jpg|50px|middle]]
13509 <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>
13513 Parsoid-specific image handling - simple image with size and middle alignment
13514 and non-standard namespace name
13516 parsoid=wt2html,wt2wt,html2html
13518 [[Image:Foobar.jpg|50px|middle]]
13520 <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>
13524 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13526 [[File:Foobar.jpg|500x10px|baseline|caption]]
13528 <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>
13532 Parsoid-specific image handling - simple image with border and size spec
13534 [[File:Foobar.jpg|50px|border|caption]]
13536 <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>
13540 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13542 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13544 <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>
13548 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13551 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13553 <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>
13557 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13559 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13561 <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>
13565 Parsoid-specific image handling - thumbnail with specific size, halign,
13566 valign, and caption (existing content)
13568 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13570 <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>
13574 Parsoid-specific image handling - framed image with specific size and caption
13577 parsoid=wt2html,wt2wt,html2html
13579 [[File:Foobar.jpg|frame|500x50px|caption]]
13581 <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>
13585 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13588 parsoid=wt2html,wt2wt,html2html
13590 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13592 <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>
13596 Parsoid-specific image handling - frameless image with specific size, border, and caption
13598 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13600 <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>
13604 Parsoid-specific image handling - simple image with a formatted caption
13606 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13608 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[18,81,7,8]}\"><tbody data-parsoid=\"{&quot;dsr&quot;:[25,73,0,0]}\"><tr data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[25,54,4,5]}\"><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[29,39,4,5]}\">a</td><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[39,49,4,5]}\">b</td></tr><tr data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[54,73,4,5]}\"><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[58,68,4,5]}\">c</td></tr></tbody></table>"}'><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>
13612 Parsoid-specific image handling - caption with a template in it
13614 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13616 <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>
13620 Parsoid-specific image handling - caption with unbalanced tags in it
13622 parsoid=wt2html,wt2wt,html2html
13625 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13629 <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>
13634 Parsoid-specific image handling - empty caption (1)
13636 parsoid=wt2html,wt2wt
13638 [[File:Foobar.jpg|thumb|]]
13640 <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>
13643 # empty captions don't get serialized unless we're in the "round trip" case
13645 Parsoid-specific image handling - empty caption (2)
13649 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13650 <a href="./File:Foobar.jpg">
13651 <img resource="./File:Foobar.jpg"
13652 src="//example.com/images/3/3a/Foobar.jpg"
13653 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13654 height="25" width="220"/>
13656 <figcaption></figcaption>
13659 [[File:Foobar.jpg|thumb]]
13663 Parsoid-specific image handling - whitespace caption
13665 [[File:Foobar.jpg|thumb| ]]
13667 <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>
13671 Parsoid-specific image handling - lang option
13674 [[File:Foobar.svg|lang=de|caption]]
13678 <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>
13687 Subpage test/subpage
13695 subpage title=[[Subpage test]]
13699 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13704 Subpage noslash link
13706 subpage title=[[Subpage test]]
13710 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13715 Subpage test/1/2/subpage
13721 Relative subpage noslash link
13723 parsoid=wt2wt,wt2html,html2html
13724 subpage title=[[Subpage test/1/2/3/4]]
13730 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13731 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13734 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13735 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13739 Parsoid: dot-slash prefixed wikilinks
13749 </p><p>[[././baz/]]
13754 </p><p>[[././baz/]]
13759 Render invalid page names as plain text (bug 51090)
13772 [[{{echo|./../foo}}|bar]]
13773 [[{{echo|foo/.}}|bar]]
13774 [[{{echo|foo/..}}|bar]]
13775 [[{{echo|foo~~~~bar}}]]
13776 [[{{echo|foo>bar}}]]
13777 [[{{echo|foo././bar}}]]
13778 [[{{echo|foo{bar}}]]
13779 [[{{echo|foo}bar}}]]
13780 [[{{echo|foo[bar}}]]
13781 [[{{echo|foo]bar}}]]
13782 [[{{echo|foo<bar}}]]
13784 <p>[[./../foo|bar]]
13794 </p><p>[[./../foo|bar]]
13807 <p>[[./../foo|bar]]
13818 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13819 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13820 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13821 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13822 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13823 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13824 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13825 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13826 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
13827 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
13828 [[<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>
13836 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13841 BUG 561: {{/Subpage}}
13843 subpage title=[[Page]]
13847 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13855 Category:MediaWiki User's Guide
13863 [[:Category:MediaWiki User's Guide]]
13865 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13874 [[Category:MediaWiki User's Guide]]
13876 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13880 PAGESINCATEGORY invalid title fatal (r33546 fix)
13882 {{PAGESINCATEGORY:<bogus>}}
13889 Category with different sort key
13893 [[Category:MediaWiki User's Guide|Foo]]
13895 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13899 Category with identical sort key
13903 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13905 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13909 Category with empty sort key
13914 [[Category:MediaWiki User's Guide|]]
13916 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13920 Category with empty sort key and parentheses
13925 [[Category:Foo (bar)|]]
13927 [[Category:Foo (bar)|Foo]]
13931 Category with link tail
13936 123[[Category:Foo]]456
13938 123[[Category:Foo]]456
13942 Category with template
13947 [[Category:{{echo|Foo}}]]
13949 [[Category:{{echo|Foo}}]]
13953 Category with template in sort key
13958 [[Category:Foo|{{echo|Bar}}]]
13960 [[Category:Foo|{{echo|Bar}}]]
13964 Category with template in sort key and title
13969 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13971 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13975 Category / paragraph interactions
13977 Foo [[Category:Baz]] Bar
13979 Foo [[Category:Baz]]
13987 [[Category:Baz]] Bar
14000 {{echo|[[Category:Baz]]}}
14014 ## The whitespace on the empty line is part of the test. Please do not delete
14016 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14018 parsoid=wt2html,wt2wt
14022 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14024 {{echo|[[Category:Foo]] and so should this!}}
14026 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14031 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14033 <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>
14036 ## Parsoid will not try to wt2wt this while preserving newlines because
14037 ## it suppresses excess newlines within list items -- and we don't want to
14038 ## introduce a special case just for categories, which is, in reality somewhat
14039 ## odd behavior -- categories are unlikely to be used in list items like this
14040 ## in top-level pages and are only likely to show up in template-generated
14041 ## list items where this RT-ing is a non-issue.
14043 ## The whitespace on the empty line is part of the test. Please do not delete
14045 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14051 [[Category:Foo]] and this should be part of the same list item
14054 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14056 <ul><li>This and this should be part of the same list item</li>
14057 <li>So should this and this should be part of the same list item</li></ul>
14060 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14061 <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>
14065 ## Newlines and categories that follow the last item of a list
14066 ## are treated differently because this (list followed by categories)
14067 ## is an extremely common pattern on wikis.
14069 3. Categories and newlines: newline suppression for last list item should RT properly
14082 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14084 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14085 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14089 4. Categories and newlines: newline suppression for last list item should RT properly
14097 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14099 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14102 ## only wt2html for this to make sure the algo only applies to the rightmost path
14104 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14117 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14119 <ul><li> d</li></ul></li></ul>
14120 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14124 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14126 * a [[Category:Foo]]
14128 <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>
14131 # This test also demonstrates because of newline+category tunneling
14132 # through the list hander, template wrapping doesn't expand to the
14133 # containing list when the list item swallows the category.
14135 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14140 <ul><li> <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a</span><span about="#mwt1">
14141 </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>
14145 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14149 {{echo|[[Category:Foo]]
14153 <ul><li> a</li></ul>
14155 <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","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
14156 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14157 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14161 Parsoid: Serialize link to category page with colon escape
14167 [[:Category:Foo|Bar]]
14170 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14171 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14175 # html2wt localizes the "Category" namespace.
14176 # XXX the <link> element needs an empty data-parsoid attribute, or
14177 # else the html2html test fails because spaces are inserted.
14179 Link prefix/suffixes aren't applied to category links
14181 parsoid=wt2html,wt2wt,html2html
14189 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14193 Parsoid: Serialize link to file page with colon escape
14199 [[:File:Foo.png|Bar]]
14202 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14203 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14208 Parsoid: Serialize a genuine category link without colon escape
14213 [[Category:Foo|Bar]]
14215 <link rel="mw:PageProp/Category" href="./Category:Foo">
14216 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14220 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14224 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14226 [[Category:Toxine bactérienne]]
14230 Parsoid: Defaultsort
14232 {{DEFAULTSORT:Foo}}
14234 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14238 Parsoid: Defaultsort (template-generated)
14240 {{{{echo|DEFAULTSORT}}:Foo}}
14242 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,28,null,null],"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
14246 ### Inter-language links
14249 Interlanguage links
14257 es:Alimento fr:Nourriture zh:食品
14259 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14260 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14261 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14265 Duplicate interlanguage links (bug 24502)
14276 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14277 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14278 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14279 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14286 Basic section headings
14293 ===Smaller headline===
14296 <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>
14299 <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>
14302 <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>
14308 Section headings with TOC
14311 === Subheadline 1 ===
14312 ===== Skipping a level =====
14313 ====== Skipping a level ======
14317 ===Another headline===
14319 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14321 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14323 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14325 <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>
14327 <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>
14334 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14336 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14342 <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>
14343 <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>
14344 <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>
14345 <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>
14346 <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>
14349 <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>
14354 TOC anchors don't collide
14362 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14364 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14365 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14366 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14367 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14371 <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>
14372 <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>
14373 <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>
14374 <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>
14378 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14380 Handling of sections up to level 6 and beyond
14383 == Level 2 Heading==
14384 === Level 3 Heading===
14385 ==== Level 4 Heading====
14386 ===== Level 5 Heading=====
14387 ====== Level 6 Heading======
14388 ======= Level 7 Heading=======
14389 ======== Level 8 Heading========
14390 ========= Level 9 Heading=========
14391 ========== Level 10 Heading==========
14393 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14395 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14397 <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>
14399 <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>
14401 <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>
14403 <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>
14405 <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>
14406 <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>
14407 <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>
14408 <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>
14409 <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>
14423 <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>
14424 <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>
14425 <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>
14426 <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>
14427 <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>
14428 <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>
14429 <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>
14430 <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>
14431 <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>
14432 <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>
14437 TOC regression (T11764)
14441 ==== title 1.1.1 ====
14446 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14448 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14450 <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>
14452 <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>
14455 <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>
14458 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14460 <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>
14466 <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>
14467 <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>
14468 <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>
14469 <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>
14470 <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>
14471 <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>
14476 TOC for heading containing <span id="..."></span> (T96153)
14479 ==<span id="old-anchor"></span>New title==
14481 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14483 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14487 <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>
14492 TOC with wgMaxTocLevel=3 (bug 6204)
14498 ==== title 1.1.1 ====
14503 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14505 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14507 <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>
14508 <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>
14511 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14513 <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>
14519 <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>
14520 <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>
14521 <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>
14522 <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>
14523 <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>
14524 <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>
14529 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14535 ====Section 1.1.1====
14536 ====Section 1.1.1.1====
14539 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14541 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14543 <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>
14546 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14550 <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>
14551 <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>
14552 <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>
14553 <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>
14554 <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>
14560 Resolving duplicate section names
14565 <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>
14566 <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>
14571 Resolving duplicate section names with differing case (bug 10721)
14576 <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>
14577 <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>
14589 Template with sections, __NOTOC__
14596 <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>
14597 <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>
14598 <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>
14599 <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>
14604 __NOEDITSECTION__ keyword
14610 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14611 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14616 Link inside a section heading
14618 ==Section with a [[Main Page|link]] in it==
14620 <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>
14625 TOC regression (T14077)
14632 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14634 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14636 <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>
14639 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14643 <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>
14644 <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>
14645 <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>
14650 BUG 1219 URL next to image (good)
14652 http://example.com [[File:Foobar.jpg]]
14654 <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>
14657 <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>
14661 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14664 The line above must have a trailing space!
14667 But just in case it doesn't...
14669 <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>
14670 <p>The line above must have a trailing space!
14672 <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>
14673 <p>But just in case it doesn't...
14678 Header with special characters (bug 25462)
14680 The tooltips shall not show entities to the user (ie. be double escaped)
14697 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14699 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14701 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14702 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14703 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14704 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14705 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14709 <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>
14712 <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>
14715 <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>
14718 <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>
14721 <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>
14727 Header with space, plus and underscore as entity
14729 Id should not contain + for spaces
14731 == Space between Text ==
14734 == Space-Entity between Text ==
14737 == Plus+between+Text ==
14740 == Plus-Entity+between+Text ==
14743 == Underscore_between_Text ==
14746 == Underscore-Entity_between_Text ==
14749 [[#Space between Text]]
14750 [[#Space-Entity between Text]]
14751 [[#Plus+between+Text]]
14752 [[#Plus-Entity+between+Text]]
14753 [[#Underscore_between_Text]]
14754 [[#Underscore-Entity_between_Text]]
14756 <p>Id should not contain + for spaces
14758 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14760 <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>
14761 <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>
14762 <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>
14763 <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>
14764 <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>
14765 <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>
14769 <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>
14772 <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>
14775 <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>
14778 <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>
14781 <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>
14784 <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>
14786 </p><p><a href="#Space_between_Text">#Space between Text</a>
14787 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14788 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14789 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14790 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14791 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14796 Headers with excess '=' characters
14797 (Are similar tests necessary beyond the 1st level?)
14801 =''italic'' heading==
14802 ==''italic'' heading=
14804 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14806 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14807 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14808 <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>
14809 <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>
14813 <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>
14814 <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>
14815 <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>
14816 <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>
14821 HTML headers vs TOC (bug 23393)
14822 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14834 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14836 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14838 <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>
14839 <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>
14842 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14844 <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>
14845 <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>
14851 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14852 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14853 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14854 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14855 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14856 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14861 Single-line or multiline-comments can follow headings
14863 parsoid=wt2html,wt2wt
14871 <h2><span class="mw-headline" id="foo">foo</span></h2>
14872 <h2><span class="mw-headline" id="bar">bar</span></h2>
14873 <h2><span class="mw-headline" id="baz">baz</span></h2>
14878 BUG 1219 URL next to image (broken)
14880 http://example.com[[File:Foobar.jpg]]
14882 <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>
14885 <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>
14889 Bug 1186 news: in the middle of text
14891 http://en.wikinews.org/wiki/Wikinews:Workplace
14893 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14899 Namespaced link must have a title
14908 Namespaced link must have a title (bad fragment version)
14910 [[Project:#fragment]]
14912 <p>[[Project:#fragment]]
14918 ### HTML tags and HTML attributes
14922 div with no attributes
14924 <div>HTML rocks</div>
14926 <div>HTML rocks</div>
14931 div with double-quoted attribute
14933 <div id="rock">HTML rocks</div>
14935 <div id="rock">HTML rocks</div>
14940 div with single-quoted attribute
14942 <div id='rock'>HTML rocks</div>
14944 <div id="rock">HTML rocks</div>
14949 div with unquoted attribute
14951 <div id=rock>HTML rocks</div>
14953 <div id="rock">HTML rocks</div>
14958 div with illegal double attributes
14960 <div id="a" id="b">HTML rocks</div>
14962 <div id="b">HTML rocks</div>
14966 # FIXME: produce empty string instead of "class" in the PHP parser, following
14969 div with empty attribute value, space before equals
14973 <div class =>HTML rocks</div>
14975 <div class="">HTML rocks</div>
14980 div with multiple empty attribute values
14984 <div id= title=>HTML rocks</div>
14986 <div id="" title="">HTML rocks</div>
14991 table with multiple empty attribute values
14999 <table title="" id="">
15000 <tbody><tr><td> hi</td></tr>
15005 div with braces in attribute value
15007 <div title="{}">Foo</div>
15009 <div title="{}">Foo</div>
15012 <div title="{}">Foo</div>
15015 # This it very inconsistent in the PHP parser: it returns
15016 # class="class" if there is a space between the name and the equal sign (see
15017 # 'div with empty attribute value, space before equals'), but strips the
15018 # attribute completely if the space is missing. We hope that not much content
15019 # depends on this, so are implementing the behavior below in Parsoid for
15020 # consistencies' sake.
15021 # FIXME: fix this behavior in the PHP parser?
15023 div with empty attribute value, no space before equals
15025 parsoid=wt2html,html2html
15027 <div class=>HTML rocks</div>
15029 <div>HTML rocks</div>
15032 <div class="">HTML rocks</div>
15036 HTML multiple attributes correction
15038 <p class="error" class="awesome">Awesome!</p>
15040 <p class="awesome">Awesome!</p>
15045 Table multiple attributes correction
15048 !+ class="error" class="awesome"| status
15053 <th class="awesome"> status
15061 <DIV ID="x">HTML ROCKS</DIV>
15063 <div id="x">HTML ROCKS</div>
15068 Non-ASCII pseudo-tags are rendered as text
15077 Pseudo-tag with URL 'name' renders as url link
15079 <http://example.com/>
15081 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15086 text with amp in the middle of nowhere
15090 <p>Remember AT&T?
15095 text with character entity: eacute
15097 I always thought é was a cute letter.
15099 <p>I always thought é was a cute letter.
15102 <p>I always thought é was a cute letter.</p>
15106 text with entity-escaped character entity-like string: eacute
15108 I always thought &eacute; was a cute letter.
15110 <p>I always thought &eacute; was a cute letter.
15115 text with undefined character entity: xacute
15117 I always thought &xacute; was a cute letter.
15119 <p>I always thought &xacute; was a cute letter.
15126 <data value="5">five</data>
15127 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15128 <mark>This highlighted text</mark>
15130 <p><data value="5">five</data>
15131 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15132 <mark>This highlighted text</mark>
15137 HTML tag with leading space is parsed as text
15141 <p>< div>foo< /div>
15146 ### Nesting tests (see bug 41545, 50604, 51081)
15149 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15150 # Note that html2wt is considerably more difficult if we use <b> in
15151 # the test case, instead of <big>
15153 Ensure that HTML adoption agency algorithm is properly implemented.
15155 <big>X<big>Y</big>Z</big>
15157 <p><big>X<big>Y</big>Z</big>
15161 # This was bug 41545 in the PHP parser.
15162 # Note that tidy doesn't handle this correctly.
15166 <kbd>X<kbd>Y</kbd>Z</kbd>
15168 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15172 # The following cases were bug 51081 in the PHP parser.
15173 # Note that there are some other nestable tags (b, i, etc) which are
15174 # not covered; see bug 51081 for discussion.
15176 # Note that tidy doesn't handle this correctly.
15180 <em>X<em>Y</em>Z</em>
15182 <p><em>X<em>Y</em>Z</em>
15186 # Note that tidy doesn't handle this correctly.
15188 Nesting of <strong>
15190 <strong>X<strong>Y</strong>Z</strong>
15192 <p><strong>X<strong>Y</strong>Z</strong>
15201 <p><q>X<q>Y</q>Z</q></p>
15204 # Note that tidy doesn't handle this correctly.
15208 <ruby>X<ruby>Y</ruby>Z</ruby>
15210 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15214 # Note that tidy doesn't handle this correctly.
15218 <bdo>X<bdo>Y</bdo>Z</bdo>
15220 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15232 [[Media:Foobar.jpg]]
15234 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15239 Media link with text
15241 [[Media:Foobar.jpg|A neat file to look at]]
15243 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15247 # FIXME: this is still bad HTML tag nesting
15248 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15250 Media link with nasty text
15252 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15254 <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>
15257 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15258 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15262 Media link to nonexistent file (bug 1702)
15264 [[Media:No such.jpg]]
15266 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15271 Image link to nonexistent file (bug 1850 - good)
15273 [[File:No_such.jpg]]
15275 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15278 <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>
15282 :Image link to nonexistent file (bug 1850 - bad)
15284 [[:Image:No such.jpg]]
15286 <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>
15289 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15295 Character reference normalization in link text (bug 1938)
15297 [[Main Page|this&that]]
15299 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15306 Test for unicode normalization
15308 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15312 (bug 19451) Links should refer to the normalized form.
15320 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15321 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15322 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15323 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15324 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15329 Empty attribute crash test (bug 2067)
15331 <font color="">foo</font>
15333 <p><font color="">foo</font>
15338 Empty attribute crash test single-quotes (bug 2067)
15340 <font color=''>foo</font>
15342 <p><font color="">foo</font>
15347 Attribute test: equals, then nothing
15349 <font color=>foo</font>
15351 <p><font>foo</font>
15356 Attribute test: unquoted value
15358 <font color=x>foo</font>
15360 <p><font color="x">foo</font>
15365 Attribute test: unquoted but illegal value (hash)
15367 <font color=#x>foo</font>
15369 <p><font color="#x">foo</font>
15373 # Parsoid does not serialize to empty attribute syntax,
15374 # so wt2wt and html2wt cases are skipped
15376 Attribute test: no value (T54330)
15378 parsoid=wt2html,html2html
15380 <font color>foo</font>
15382 <p><font color="">foo</font>
15385 <p><font color="">foo</font></p>
15389 Bug 2095: link with three closing brackets
15393 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15396 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15400 Bug 2095: link with pipe and three closing brackets
15402 [[Main Page|link]]]
15404 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15407 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15411 Bug 2095: link with pipe and three closing brackets, version 2
15413 [[Main Page|[http://example.com/]]]
15415 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15418 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15427 Template:Dangerous attribute
15429 " onmouseover="alert(document.cookie)
15433 Template:Dangerous style attribute
15435 border-size: expression(alert(document.cookie))
15441 <div style="float: right; {{{1}}}">Magic div</div>
15445 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15447 <div title="{{test}}"></div>
15449 <div title="This is a test template"></div>
15453 # Parsoid has enough context to handle this case
15455 Bug 2304: HTML attribute safety (dangerous template; 2309)
15457 <div title="{{dangerous attribute}}"></div>
15459 <div title=""></div>
15462 <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=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[12,35,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;dangerous attribute&quot;,&quot;href&quot;:&quot;./Template:Dangerous_attribute&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
15466 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15468 <div style="{{dangerous style attribute}}"></div>
15470 <div style="/* insecure input */"></div>
15475 Bug 2304: HTML attribute safety (safe parameter; 2309)
15477 {{div style|width: 200px}}
15479 <div style="float: right; width: 200px">Magic div</div>
15484 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15486 {{div style|width: expression(alert(document.cookie))}}
15488 <div style="/* insecure input */">Magic div</div>
15493 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15495 {{div style|"><script>alert(document.cookie)</script>}}
15497 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15502 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15504 {{div style|" ><script>alert(document.cookie)</script>}}
15506 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15511 Bug 2304: HTML attribute safety (link)
15513 <div title="[[Main Page]]"></div>
15515 <div title="[[Main Page]]"></div>
15520 Bug 2304: HTML attribute safety (italics)
15522 <div title="''foobar''"></div>
15524 <div title="''foobar''"></div>
15529 Bug 2304: HTML attribute safety (bold)
15531 <div title="'''foobar'''"></div>
15533 <div title="'''foobar'''"></div>
15539 Bug 2304: HTML attribute safety (ISBN)
15541 <div title="ISBN 1234567890"></div>
15543 <div title="ISBN 1234567890"></div>
15548 Bug 2304: HTML attribute safety (RFC)
15550 <div title="RFC 1234"></div>
15552 <div title="RFC 1234"></div>
15557 Bug 2304: HTML attribute safety (PMID)
15559 <div title="PMID 1234567890"></div>
15561 <div title="PMID 1234567890"></div>
15566 Bug 2304: HTML attribute safety (web link)
15568 <div title="http://example.com/"></div>
15570 <div title="http://example.com/"></div>
15575 Bug 2304: HTML attribute safety (named web link)
15577 <div title="[http://example.com/ link]"></div>
15579 <div title="[http://example.com/ link]"></div>
15584 Bug 3244: HTML attribute safety (extension; safe)
15586 <div style="<nowiki>background:blue</nowiki>"></div>
15588 <div style="background:blue"></div>
15593 Bug 3244: HTML attribute safety (extension; unsafe)
15595 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15597 <div style="/* insecure input */"></div>
15601 # More MSIE fun discovered by Tom Gilder
15604 MSIE CSS safety test: spurious slash
15606 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15608 <div style="/* insecure input */">evil</div>
15613 MSIE CSS safety test: hex code
15615 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15617 <div style="/* insecure input */">evil</div>
15622 MSIE CSS safety test: comment in url
15624 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15626 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15631 MSIE CSS safety test: comment in expression
15633 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15635 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15640 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15642 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15644 <p style="/* invalid control char */">A</p>
15649 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15651 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15652 <div style="top:EXPRESSION(alert())">B</div>
15654 <p style="/* insecure input */">A</p>
15655 <div style="/* insecure input */">B</div>
15660 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15662 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15663 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15665 <div style="/* insecure input */">A</div>
15666 <p style="/* insecure input */">B</p>
15671 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15673 <div style="background-image:url⁽javascript:alert())">A</div>
15674 <div style="background-image:url₍javascript:alert())">B</div>
15675 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15677 <div style="/* insecure input */">A</div>
15678 <div style="/* insecure input */">B</div>
15679 <p style="/* insecure input */">C</p>
15687 title="data:text/html,<img src=1 onerror=alert(1)>"
15688 style="-o-link:attr(title);-o-link-source:current">X</div>
15690 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15695 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15697 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15698 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15699 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15700 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15701 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15702 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15703 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15705 <p style="/* insecure input */">A</p>
15706 <p style="/* insecure input */">B</p>
15707 <p style="/* insecure input */">C</p>
15708 <p style="/* insecure input */">D</p>
15709 <p style="/* insecure input */">E</p>
15710 <p style="/* insecure input */">F</p>
15711 <p style="/* insecure input */">G</p>
15716 Table attribute legitimate extension
15719 !+ style="<nowiki>color:blue</nowiki>"| status
15724 <th style="color:blue"> status
15730 Table attribute safety
15733 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15738 <th style="/* insecure input */"> status
15744 CSS line continuation 1
15746 <div style="background-image: u\ rl(test.jpg);"></div>
15748 <div style="/* insecure input */"></div>
15753 CSS line continuation 2
15755 <div style="background-image: u\ rl(test.jpg); "></div>
15757 <div style="/* insecure input */"></div>
15768 Expansion of multi-line templates in attribute values (bug 6255)
15770 <div style="background: {{identity|#00FF00}}">-</div>
15772 <div style="background: #00FF00">-</div>
15778 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15780 <div style="background:
15783 <div style="background: #00FF00">-</div>
15786 <div style="background:
15791 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15793 <div style="background: #00FF00">-</div>
15795 <div style="background: #00FF00">-</div>
15800 evil <math>-wiki-tags without Extension:Math enabled
15802 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15804 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15808 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15811 Parser hook: empty input
15824 Parser hook: empty input using terminated empty elements
15837 Parser hook: empty input using terminated empty elements (space before)
15850 Parser hook: basic input
15864 Parser hook: case insensitive
15878 Parser hook: case insensitive, redux
15891 Parser hook: nested tags
15895 <tag><tag></tag></tag>
15906 Parser hook: basic arguments
15908 <tag width=200 height = "100" depth = '50' square></tag>
15923 Parser hook: argument containing a forward slash (bug 5344)
15925 <tag filename='/tmp/bla'></tag>
15930 'filename' => '/tmp/bla',
15937 Parser hook: empty input using terminated empty elements (bug 2374)
15950 # </tag> should be output literally since there is no matching tag that begins it
15952 Parser hook: basic arguments using terminated empty elements (bug 2374)
15954 <tag width=200 height = "100" depth = '50' square/>
15973 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
15977 Parser hook: static parser hook not inside a comment
15979 <statictag>hello, world</statictag>
15980 <statictag action=flush/>
15988 Parser hook: static parser hook inside a comment
15990 <!-- <statictag>hello, world</statictag> -->
15991 <statictag action=flush/>
15997 # Nested template calls; this case was broken by Parser.php rev 1.506,
16001 Template:One-parameter
16003 (My parameter is: {{{1}}})
16007 Template:Map-one-parameter
16009 {{{{{1}}}|{{{2}}}}}
16013 Nested template calls
16015 {{Map-one-parameter|One-parameter|param}}
16017 <p>(My parameter is: param)
16026 # HTML+Tidy effectively strips out the empty tags completely
16027 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16028 # which Tidy would have done for the PHP parser had there been content inside it.
16030 Sanitizer: Closing of open tags
16032 <s></s><table></table>
16034 <s></s><table></table>
16037 <p><s></s></p><table></table>
16041 Sanitizer: Closing of open but not closed tags
16050 Sanitizer: Closing of closed but not open tags
16060 Sanitizer: Closing of closed but not open table tags
16064 Table not started</td></tr></table>
16066 <p>Table not started</p>
16068 <p>Table not started</p>
16072 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16074 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16076 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16080 # In HTML5, the restrictions are that id must contain at least one character,
16081 # and must not contain any space characters.
16083 Sanitizer: Validating the contents of the id attribute (bug 4515)
16087 <br id="" /><br id="a space" />
16092 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16094 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16098 <br id="foo" /><br id="foo" />
16100 Something need to be done. foo-2 ?
16104 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16107 <meta itemprop="hello" content="world">
16108 <meta http-equiv="refresh" content="5">
16109 <meta itemprop="hello" http-equiv="refresh" content="5">
16110 <link itemprop="hello" href="{{SERVER}}">
16111 <link rel="stylesheet" href="{{SERVER}}">
16112 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16116 <p> <meta itemprop="hello" content="world" />
16117 <meta http-equiv="refresh" content="5">
16118 <meta itemprop="hello" content="5" />
16120 <link itemprop="hello" href="http://example.org" />
16121 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16122 <link itemprop="hello" href="http://example.org" />
16128 Language converter: output gets cut off unexpectedly (bug 5757)
16132 this bit is safe: }-
16134 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16136 then we get cut off here: }-
16138 all additional text is vanished
16140 <p>this bit is safe: }-
16141 </p><p>but if we add a conversion instance: xxx
16142 </p><p>then we get cut off here: }-
16143 </p><p>all additional text is vanished
16148 Self closed html pairs (bug 5487)
16151 <center><font id="bug" />Centered text</center>
16152 <div><font id="bug2" />In div text</div>
16154 <center><font id="bug" />Centered text</center>
16155 <div><font id="bug2" />In div text</div>
16164 Punctuation: nbsp before exclamation
16168 <p>C'est grave !
16173 Punctuation: CSS !important (bug 11874)
16175 <div style="width:50% !important">important</div>
16177 <div style="width:50% !important">important</div>
16182 Punctuation: CSS ! important (bug 11874; with space after)
16184 <div style="width:50% ! important">important</div>
16186 <div style="width:50% ! important">important</div>
16191 HTML bullet list, closed tags (bug 5497)
16204 <ul data-parsoid='{"stx":"html"}'>
16205 <li data-parsoid='{"stx":"html"}'>One</li>
16206 <li data-parsoid='{"stx":"html"}'>Two</li>
16212 HTML bullet list, unclosed tags (bug 5497)
16224 <ul data-parsoid='{"stx":"html"}'>
16225 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16226 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16232 HTML ordered list, closed tags (bug 5497)
16245 <ol data-parsoid='{"stx":"html"}'>
16246 <li data-parsoid='{"stx":"html"}'>One</li>
16247 <li data-parsoid='{"stx":"html"}'>Two</li>
16253 HTML ordered list, unclosed tags (bug 5497)
16266 <ol data-parsoid='{"stx":"html"}'>
16267 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16268 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16274 HTML nested bullet list, closed tags (bug 5497)
16299 HTML nested bullet list, open tags (bug 5497)
16336 HTML nested ordered list, closed tags (bug 5497)
16361 HTML nested ordered list, open tags (bug 5497)
16398 HTML ordered list item with parameters oddity
16400 <ol><li id="fragment">One</li>
16403 <ol><li id="fragment">One</li>
16408 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16410 bug 5918: autonumbering
16412 [http://first/] [http://second] [ftp://ftp]
16416 [mailto:enclosed@mail.tld With target]
16418 [mailto:enclosed@mail.tld]
16420 mailto:inline@mail.tld
16422 <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>
16423 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16424 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16425 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16426 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16429 <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>
16430 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16431 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16432 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16433 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16438 # Security and HTML correctness
16439 # From Nick Jenkins' fuzz testing
16443 Fuzz testing: Parser13
16458 Fuzz testing: Parser14
16463 <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>
16464 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16466 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16472 <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>
16474 <div id="toc" class="toc">
16475 <div id="toctitle">
16479 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16486 Fuzz testing: Parser14-table
16491 <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>
16492 <table style="__TOC__">
16497 <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>
16498 <table style="__TOC__">
16505 # Known to produce bogus xml (extra </td>)
16507 Fuzz testing: Parser16
16536 Fuzz testing: Parser21
16539 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16544 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16554 Fuzz testing: Parser22
16556 http://===r:::https://b
16560 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16568 # Known to produce bad XML for now
16570 Fuzz testing: Parser24
16577 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16578 <br style="onmouseover='alert(document.cookie);' " />
16580 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16585 <u class="|">}}}} >
16586 <br style="onmouseover='alert(document.cookie);'" />
16588 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16597 # Note: the current result listed for this is not what the original one was,
16598 # but the original bug was JavaScript injection, which is fixed in any case.
16599 # It's not clear that the original result listed was any more correct than the
16600 # current one. Original result:
16603 # <li class="||">
16604 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16606 Fuzz testing: Parser25 (bug 6055)
16612 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16614 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16619 Fuzz testing: URL adjacent extension (with space, clean)
16621 http://example.com <nowiki>junk</nowiki>
16623 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16626 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16630 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16632 http://example.com<nowiki>junk</nowiki>
16634 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16637 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16641 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16643 http://example.com<pre>junk</pre>
16645 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16648 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16653 <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>
16657 Fuzz testing: image with bogus manual thumbnail
16659 [[Image:foobar.jpg|thumbnail= ]]
16661 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16664 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,2,2]}' 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":{},"dsr":[2,30,null,null]}'><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>
16668 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16670 <pre dir=" "></pre>
16672 <pre dir=" "></pre>
16677 Parsing optional HTML elements (Bug 6171)
16682 <td> Some tabular data</td>
16683 <td> More tabular data ...
16684 <td> And yet som tabular data</td>
16690 <td> Some tabular data</td>
16691 <td> More tabular data ...
16692 </td><td> And yet som tabular data</td>
16699 Correct handling of <td>, <tr> (Bug 6171)
16704 <td> Some tabular data</td>
16705 <td> More tabular data ...</td>
16706 <td> And yet som tabular data</td>
16712 <td> Some tabular data</td>
16713 <td> More tabular data ...</td>
16714 <td> And yet som tabular data</td>
16722 Parsing crashing regression (fr:JavaScript)
16726 <p></body></x>
16731 Inline wiki vs wiki block nesting
16737 <p><b>Bold paragraph</b>
16738 </p><p>New wiki paragraph
16742 # FIXME: The current php output is documented
16743 # and desired output is the parsoid target.
16745 Inline HTML vs wiki block nesting
16751 <p><b>Bold paragraph
16752 </p><p>New wiki paragraph</b>
16755 <p><b>Bold paragraph</b>
16756 </p><p>New wiki paragraph
16760 # Original result was this:
16761 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16763 # While that might be marginally more intuitive, maybe, the six-apostrophe
16764 # construct is clearly pathological and the result stated here (which is what
16765 # the parser actually does) is about as reasonable as anything.
16767 Mixing markup for italics and bold
16770 '''bold''''''bold''bolditalics'''''
16772 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16780 Article for special page transclusion test
16784 Special page transclusion
16787 {{Special:Prefixindex/Xyzzyx}}
16789 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16794 Special page transclusion twice (bug 5021)
16797 {{Special:Prefixindex/Xyzzyx}}
16798 {{Special:Prefixindex/Xyzzyx}}
16800 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16801 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16806 Transclusion of default MediaWiki message
16808 {{MediaWiki:Mainpage}}
16815 Transclusion of nonexistent MediaWiki message
16817 {{MediaWiki:Mainpagexxx}}
16819 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16824 Transclusion of MediaWiki message with underscore
16826 {{MediaWiki:history_short}}
16833 Transclusion of MediaWiki message with space
16835 {{MediaWiki:history short}}
16842 Invalid header with following text
16852 Section extraction test (section 0)
16872 Section extraction test (section 1)
16894 Section extraction test (section 2)
16915 Section extraction test (section 3)
16935 Section extraction test (section 4)
16959 Section extraction test (section 5)
16979 Section extraction test (section 6)
17000 Section extraction test (section 7)
17020 Section extraction test (section 8)
17040 Section extraction test (section 9)
17061 Section extraction test (section 10)
17081 Section extraction test (nonexistent section 11)
17100 Section extraction test with bogus heading (section 1)
17105 ==bogus== not a legal section
17109 ==bogus== not a legal section
17113 Section extraction test with bogus heading (section 2)
17118 ==bogus== not a legal section
17125 Section extraction test with comment after heading (section 1)
17137 Section extraction test with comment after heading (section 2)
17149 Section extraction test with bogus <nowiki> heading (section 1)
17154 ==bogus== <nowiki>not a legal section</nowiki>
17158 ==bogus== <nowiki>not a legal section</nowiki>
17162 Section extraction test with bogus <nowiki> heading (section 2)
17167 ==bogus== <nowiki>not a legal section</nowiki>
17173 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17174 # instead of respecting commented sections
17176 Section extraction prefixed by comment (section 1)
17187 Section extraction prefixed by comment (section 2)
17197 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17198 # instead of respecting HTML-style headings
17200 Section extraction, mixed wiki and html (section 1)
17216 Section extraction, mixed wiki and html (section 2)
17232 # Formerly testing for bug 3342
17234 Section extraction, heading surrounded by <noinclude>
17238 <noinclude>==unmarked==</noinclude>
17244 # Test behavior of bug 19910
17246 Sectiion with all-equals
17251 The line above must have a trailing space
17254 But just in case it doesn't...
17258 But just in case it doesn't...
17262 Section replacement test (section 0)
17293 Section replacement test (section 1)
17322 Section replacement test (section 2)
17352 Section replacement test (section 3)
17383 Section replacement test (section 4)
17410 Section replacement test (section 5)
17441 Section replacement test (section 6)
17471 Section replacement test (section 7)
17502 Section replacement test (section 8)
17533 Section replacement test (section 9)
17562 Section replacement test (section 10)
17592 Section replacement test with initial whitespace (bug 13728)
17596 Preformatted initial line
17600 Preformatted initial line
17607 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17619 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17632 Section extraction, <pre> around bogus header (bug 10309)
17649 Section replacement, <pre> around bogus header (bug 10309)
17651 noxml replace=2,"xxx"
17671 Handling of 
 in URLs
17675 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17678 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17680 a</a></li></ul></li></ul>
17684 Handling of %0A in URLs
17688 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17691 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17695 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17697 5 quotes, code coverage +1 line
17704 <p><b><i></i></b></p>
17707 # same html as previous, but wikitext adjusted to match parsoid html2wt
17708 # note that wt2html and html2html will put the <i> before the <b>
17710 5 quotes, code coverage +1 line w/ nowiki (1)
17712 parsoid=wt2wt,html2wt
17714 '''''<nowiki/>'''''
17719 <p><b><i></i></b></p>
17722 # same as previous, just swapping the <i> and <b>
17724 5 quotes, code coverage +1 line w/ nowiki (2)
17726 '''''<nowiki/>'''''
17731 <p><i><b></b></i></p>
17735 Special:Search page linking.
17739 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17744 {{!}} is a magic word
17746 {{!}} is a magic word there and {{!}} is still a magic word here
17748 <p>| is a magic word there and | is still a magic word here
17751 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is still a magic word here</p>
17757 title=[[Parser test]]
17762 * {{FULLPAGENAMEE}}
17764 * {{BASEPAGENAMEE}}
17768 * {{ROOTPAGENAMEE}}
17770 * {{TALKPAGENAMEE}}
17771 * {{SUBJECTPAGENAME}}
17772 * {{SUBJECTPAGENAMEE}}
17775 * {{NAMESPACENUMBER}}
17779 * {{SUBJECTSPACEE}}
17780 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17782 <ul><li> Parser test</li>
17783 <li> Parser_test</li>
17784 <li> Parser test</li>
17785 <li> Parser_test</li>
17786 <li> Parser test</li>
17787 <li> Parser_test</li>
17788 <li> Parser test</li>
17789 <li> Parser_test</li>
17790 <li> Parser test</li>
17791 <li> Parser_test</li>
17792 <li> Talk:Parser test</li>
17793 <li> Talk:Parser_test</li>
17794 <li> Parser test</li>
17795 <li> Parser_test</li>
17803 <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>
17806 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17816 image4 |300px| centre
17817 image5.svg| http://///////
17822 <ul class="gallery mw-gallery-traditional">
17823 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17824 <div class="thumb" style="height: 150px;">Image1.png</div>
17825 <div class="gallerytext">
17828 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17829 <div class="thumb" style="height: 150px;">Image2.gif</div>
17830 <div class="gallerytext">
17835 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17836 <div class="thumb" style="height: 150px;">Image3</div>
17837 <div class="gallerytext">
17840 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17841 <div class="thumb" style="height: 150px;">Image4</div>
17842 <div class="gallerytext">
17847 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17848 <div class="thumb" style="height: 150px;">Image5.svg</div>
17849 <div class="gallerytext">
17850 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17854 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17855 <div class="thumb" style="height: 150px;">* image6</div>
17856 <div class="gallerytext">
17864 Gallery (with options)
17866 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17867 File:Nonexistent.jpg|caption
17868 File:Nonexistent.jpg
17869 image:foobar.jpg|some '''caption''' [[Main Page]]
17871 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17874 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17875 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17876 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17877 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17878 <div class="gallerytext">
17883 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17884 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17885 <div class="gallerytext">
17888 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17889 <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>
17890 <div class="gallerytext">
17891 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17895 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17896 <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>
17897 <div class="gallerytext">
17900 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17901 <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>
17902 <div class="gallerytext">
17912 Gallery with link that has fragment
17915 image:foobar.jpg|link=Main_Page
17916 image:foobar.jpg|link=Main_Page#section
17917 image:foobar.jpg|link=Main Page#section|caption
17920 <ul class="gallery mw-gallery-traditional">
17921 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17922 <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>
17923 <div class="gallerytext">
17926 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17927 <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>
17928 <div class="gallerytext">
17931 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17932 <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>
17933 <div class="gallerytext">
17943 Gallery with wikitext inside caption
17946 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
17947 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
17950 <ul class="gallery mw-gallery-traditional">
17951 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17952 <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>
17953 <div class="gallerytext">
17954 <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>
17958 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17959 <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>
17960 <div class="gallerytext">
17961 <p>This is a test template
17970 gallery (with showfilename option)
17972 <gallery showfilename>
17973 File:Nonexistent.jpg|caption
17974 File:Nonexistent.jpg
17975 image:foobar.jpg|some '''caption''' [[Main Page]]
17979 <ul class="gallery mw-gallery-traditional">
17980 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17981 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17982 <div class="gallerytext">
17983 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17988 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17989 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17990 <div class="gallerytext">
17991 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17995 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17996 <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>
17997 <div class="gallerytext">
17998 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17999 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18003 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18004 <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>
18005 <div class="gallerytext">
18006 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18015 Gallery (with namespace-less filenames)
18018 File:Nonexistent.jpg
18024 <ul class="gallery mw-gallery-traditional">
18025 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18026 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18027 <div class="gallerytext">
18030 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18031 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18032 <div class="gallerytext">
18035 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18036 <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>
18037 <div class="gallerytext">
18040 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18041 <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>
18042 <div class="gallerytext">
18050 HTML Hex character encoding (spells the word "JavaScript")
18052 parsoid=wt2html,wt2wt,html2html
18054 JavaScript
18056 <p>JavaScript
18061 <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>
18065 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18069 <p>&#xsee;&#XSEE;
18072 <p>&#xsee;&#XSEE;</p>
18076 HTML Hex character encoding mixed case
18078 parsoid=wt2html,wt2wt,html2html
18087 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18091 __FORCETOC__ override
18103 ISBN 978-0-1234-56 789
18105 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18108 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18110 <p><a href="./Special:BookSources/9780123456" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
18114 ISBN followed by 5 spaces
18125 ISBN ISBN 1234567890
18127 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18130 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18133 # Uppercase X and lowercase x as well
18144 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18145 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18146 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18147 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18148 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18149 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18152 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18153 <a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18154 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18155 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18156 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18157 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18161 ISBN with empty prefix (parsoid test)
18165 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18168 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
18172 Bug 22905: <abbr> followed by ISBN followed by </a>
18174 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18176 <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>
18179 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
18187 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18192 Double RFC with a wiki link
18196 <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>
18205 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18208 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18212 Centre-aligned image
18214 [[Image:foobar.jpg|centre]]
18216 <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>
18223 [[Image:foobar.jpg|none]]
18225 <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>
18230 Width + Height sized image (using px) (height is ignored)
18232 [[Image:foobar.jpg|640x480px]]
18234 <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>
18239 Width-sized image (using px, no following whitespace)
18241 [[Image:foobar.jpg|640px]]
18243 <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>
18248 Width-sized image (using px, with following whitespace - test regression from r39467)
18250 [[Image:foobar.jpg|640px ]]
18252 <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>
18257 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18259 [[Image:foobar.jpg| 640px]]
18261 <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>
18266 Image with page parameter
18270 [[File:LoremIpsum.djvu|page=2]]
18272 <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>
18275 <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>
18279 Another italics / bold test
18287 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18293 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18296 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18301 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18303 Images with the "|" character in the comment
18305 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18307 <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>
18310 <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>
18314 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18316 <html><script>alert(1);</script></html>
18318 <p><html><script>alert(1);</script></html>
18323 HTML with raw HTML ($wgRawHtml==true)
18327 <html><script>alert(1);</script></html>
18329 <p><script>alert(1);</script>
18334 Parents of subpages, one level up
18336 subpage title=[[Subpage test/L1/L2/L3]]
18340 <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>
18346 Parents of subpages, one level up, not named
18348 subpage title=[[Subpage test/L1/L2/L3]]
18352 <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>
18359 Parents of subpages, two levels up
18361 subpage title=[[Subpage test/L1/L2/L3]]
18367 <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
18368 </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>
18373 Parents of subpages, two levels up, without trailing slash or name.
18375 subpage title=[[Subpage test/L1/L2/L3]]
18384 Parents of subpages, two levels up, with lots of extra trailing slashes.
18386 subpage title=[[Subpage test/L1/L2/L3]]
18390 <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>
18395 Subpage test/L1/L2/L3Sibling
18401 Transclusion of a sibling page (one level up)
18403 subpage title=[[Subpage test/L1/L2/L3]]
18412 Transclusion of a child page
18414 subpage title=[[Subpage test/L1/L2]]
18423 Non-transclusion because of too many up levels
18425 subpage title=[[Subpage test/L1/L2/L3]]
18427 {{../../../../More than parent}}
18429 <p>{{../../../../More than parent}}
18434 Definition list code coverage
18440 <dl><dt> title  </dt>
18442 <dt> title </dt>
18448 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18449 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18450 <dt>title</dt><dd> def</dd></dl>
18454 Don't fall for the self-closing div
18456 <div>hello world</div/>
18458 <div>hello world</div>
18467 <p>[[:Template:Msg]]
18476 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18480 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18482 Always escape literal '>' in output, not just after '<'
18496 <p>This is a test template
18497 This is a test template
18509 Inclusion of !userCanEdit() content
18513 <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>
18519 Out-of-order TOC heading levels
18528 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18530 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18532 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18533 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18536 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18538 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18539 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18545 <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>
18546 <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>
18547 <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>
18548 <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>
18549 <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>
18550 <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>
18556 ISBN with a dummy number
18566 ISBN with space-delimited number
18570 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18576 ISBN with multiple spaces, no number
18595 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18596 </p><p>ISBN 12345678901
18602 ISBN with trailing year (bug 8110)
18604 ISBN 1-234-56789-0 - 2006
18606 ISBN 1 234 56789 0 - 2006
18608 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18609 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18617 {{anchorencode:foo bar©#%n}}
18619 <p>foo_bar.C2.A9.23.25n
18624 anchorencode trims spaces
18626 {{anchorencode: __pretty__please__}}
18633 anchorencode deals with links
18635 {{anchorencode: [[hello|world]] [[hi]]}}
18642 anchorencode deals with templates
18644 {{anchorencode: {{Foo}} }}
18651 anchorencode encodes like the TOC generator: (bug 18431)
18653 === _ +:.3A%3A&&]] ===
18654 {{anchorencode: _ +:.3A%3A&&]] }}
18657 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18658 <p>.2B:.3A.253A.26.26.5D.5D
18663 Bug 6200: blockquotes and paragraph formatting
18684 Bug 8293: Use of center tag ruins paragraph formatting
18705 Parsing of overlapping (improperly nested) inline html tags
18707 <span><s>x</span></s>
18709 <p><span><s>x</span></s></span>
18712 <p><span><s>x</s></span>
18717 ### Language variants related tests
18720 Self-link in language variants
18722 title=[[Dunav]] language=sr
18724 Both [[Dunav]] and [[Дунав]] are names for this river.
18726 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18737 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
18739 title=[[Duna]] language=sr
18741 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
18743 <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.
18748 Link to a section of a variant of this title shouldn't be parsed as self-link
18750 title=[[Duna]] language=sr
18752 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
18754 <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.
18759 Link to pages in language variants
18763 Main Page can be written as [[Маин Паге]]
18765 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18771 Multiple links to pages in language variants
18775 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18777 <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>.
18783 Simple template in language variants
18789 <p>This is a test template
18795 Template with explicit namespace in language variants
18801 <p>This is a test template
18807 Basic test for template parameter in language variants
18811 {{парамтест|param=foo}}
18813 <p>This is a test template with parameter foo
18819 Simple category in language variants
18823 [[Category:МедиаWики Усер'с Гуиде]]
18825 <a href="/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%98%D0%B0:MediaWiki_User%27s_Guide" title="Категорија:MediaWiki User's Guide">MediaWiki User's Guide</a>
18842 Don't convert blue categorylinks to another variant (bug 33210)
18846 [[A]][[Category:分类]]
18848 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18853 Stripping -{}- tags (language variants)
18857 Latin proverb: -{Ne nuntium necare}-
18859 <p>Latin proverb: Ne nuntium necare
18865 Prevent conversion with -{}- tags (language variants)
18867 language=sr variant=sr-ec
18869 Latinski: -{Ne nuntium necare}-
18871 <p>Латински: Ne nuntium necare
18877 Prevent conversion of text with -{}- tags (language variants)
18879 language=sr variant=sr-ec
18881 Latinski: -{Ne nuntium necare}-
18883 <p>Латински: Ne nuntium necare
18889 Prevent conversion of links with -{}- tags (language variants)
18891 language=sr variant=sr-ec
18895 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18901 -{}- tags within headlines (within html for parserConvert())
18903 language=sr variant=sr-ec
18907 <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>
18913 Explicit definition of language variant alternatives
18915 language=zh variant=zh-tw
18917 -{zh:China;zh-tw:Taiwan}-, not China
18919 <p>Taiwan, not China
18925 Conversion around HTML tags
18927 language=sr variant=sr-ec
18929 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
18930 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
18933 <span title="ЛаCтин">ски</span>
18939 Explicit session-wise language variant mapping (A flag and - flag)
18941 language=zh variant=zh-tw
18943 Taiwan is not China.
18944 But -{A|zh:China;zh-tw:Taiwan}- is China,
18945 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
18946 and -{China}- is China.
18948 <p>Taiwan is not China.
18949 But Taiwan is Taiwan,
18950 (This should be stripped!)
18951 and China is China.
18956 Explicit session-wise language variant mapping (H flag for hide)
18958 language=zh variant=zh-tw
18960 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
18963 <p>(This should be stripped!)
18969 Adding explicit conversion rule for title (T flag)
18971 language=zh variant=zh-tw showtitle
18973 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18976 <p>Should be stripped!
18981 Testing that changing the language variant here in the tests actually works
18983 language=zh variant=zh showtitle
18985 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18988 <p>Should be stripped!
18993 Recursive conversion of alt and title attrs shouldn't clear converter state
18995 language=zh variant=zh-cn showtitle
18997 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
18998 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19002 Should be stripped<span title="Exclamation">!</span>
19007 Bug 24072: more test on conversion rule for title
19009 language=zh variant=zh-tw showtitle
19011 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19012 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19015 <p>This should be stripped!
19016 This won't take interferes with the title rule.
19021 Partly disable title conversion if variant == main language code
19023 language=zh variant=zh title=[[ZH]] showtitle
19025 -{T|zh-cn:CN;zh-tw:TW}-
19033 Partly disable title conversion if variant == main language code, more
19035 language=zh variant=zh title=[[ZH]] showtitle
19045 Raw output of variant escape tags (R flag)
19047 language=zh variant=zh-tw
19049 Raw: -{R|zh:China;zh-tw:Taiwan}-
19051 <p>Raw: zh:China;zh-tw:Taiwan
19056 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19058 language=zh variant=zh-cn
19060 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19067 Conversion rules from [numeric-only string] to [something else] (T48634)
19069 language=zh variant=zh-cn
19071 -{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
19078 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19080 language=zh variant=zh-cn
19082 -{H|zh-cn:foo;zh-tw:;}-foobar
19089 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19091 language=zh variant=zh-cn
19093 -{H|=>zh-cn:foo;}-foobar
19100 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19102 language=zh variant=zh-cn
19111 Nested using of manual convert syntax
19113 language=zh variant=zh-hk
19115 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19117 <p>Nested: Hello Hong Kong!
19122 Proper conversion of text in external links
19124 language=sr variant=sr-ec
19126 http://www.google.com
19127 gopher://www.google.com
19128 [http://www.google.com http://www.google.com]
19129 [gopher://www.google.com gopher://www.google.com]
19130 [https://www.google.com irc://www.google.com]
19131 [ftp://www.google.com www.google.com/ftp://dir]
19132 [//www.google.com www.google.com]
19134 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19135 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19136 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19137 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19138 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19139 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19140 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19145 Do not convert roman numbers to language variants
19147 language=sr variant=sr-ec
19151 <p>Фридрих IV је цар.
19156 Unclosed language converter markup "-{"
19167 Don't convert raw rule "-{R|=>}-" to "=>"
19178 Don't break link parsing if language converter markup is in the caption.
19180 language=sr variant=sr-ec
19182 [[Main Page|-{R|main page}-]]
19184 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19188 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19190 Don't break image parsing if language converter markup is in the caption.
19194 [[File:Foobar.jpg|-{R|caption}-]]
19196 <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>
19200 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19202 Don't break list handling if language converter markup is in the item.
19204 language=zh variant=zh-cn
19206 ;-{zh-cn:AAA;zh-tw:BBB}-
19208 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19215 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19217 Don't break table handling if language converter markup is in the cell.
19219 language=sr variant=sr-ec
19242 Bug 529: Uncovered bullet
19251 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19252 # Templates in Wikipedia rely on this behavior, as tidy has always been
19253 # enabled there. These tests are normally run *without* tidy, so specify the
19254 # full output here.
19255 # To test realistic parsing behavior, apply a tidy-like transformation to both
19256 # the expected output and your parser's output.
19258 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19260 ******* Foo {{bullet}}
19262 <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>
19268 Bug 529: Uncovered table already at line-start
19291 Bug 529: Uncovered bullet in parser function result
19293 * Foo {{lc:{{bullet}} }}
19301 Bug 5678: Double-parsed template argument
19303 {{lc:{{{1}}}|hello}}
19310 Bug 5678: Double-parsed template invocation
19312 {{lc:{{paramtest {{!}} param = hello }} }}
19314 <p>{{paramtest | param = hello }}
19319 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19322 title=[[Main Page]]
19324 {{PRVNÍVELKÉ:ěščř}}
19325 {{prvnívelké:ěščř}}
19345 Morwen/13: Unclosed link followed by heading
19352 <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>
19357 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19364 <h1><span class="mw-headline" id="heading">heading</span></h1>
19369 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19376 <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>
19391 Paragraphs inside divs (no extra line breaks)
19403 Paragraphs inside divs (extra line break on open)
19418 Paragraphs inside divs (extra line break on close)
19433 Paragraphs inside divs (extra line break on open and close)
19450 Nesting tags, paragraphs on lines which begin with <div>
19452 <div></div><strong>A
19455 <p><strong>A</strong></p>
19456 <p><strong>B</strong></p>
19464 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19466 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19468 <blockquote>Line one
19470 Line two</blockquote>
19472 <blockquote>Line one
19473 Line two</blockquote>
19477 <p>Line one Line two</p>
19482 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19487 Line two</blockquote>
19492 Line two</blockquote>
19497 Line two</blockquote>
19501 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19503 <blockquote>Line one
19508 <blockquote>Line one
19521 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19543 Paragraphs inside blockquotes/divs (no extra line breaks)
19545 <blockquote><div>Line one
19547 Line two</div></blockquote>
19549 <blockquote><div>Line one
19550 Line two</div></blockquote>
19555 Paragraphs inside blockquotes/divs (extra line break on open)
19560 Line two</div></blockquote>
19565 Line two</div></blockquote>
19570 Paragraphs inside blockquotes/divs (extra line break on close)
19572 <blockquote><div>Line one
19575 </div></blockquote>
19577 <blockquote><div>Line one
19580 </div></blockquote>
19585 Paragraphs inside blockquotes/divs (extra line break on open and close)
19591 </div></blockquote>
19597 </div></blockquote>
19602 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19604 wgLinkHolderBatchSize=0
19610 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19611 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19612 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19617 Free external link invading image caption
19619 [[Image:Foobar.jpg|thumb|http://x|hello]]
19621 <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>
19626 Bug 15196: localised external link numbers
19630 [http://en.wikipedia.org/]
19632 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19635 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19639 Multibyte character in padleft
19641 {{padleft:-Hello|7|Æ}}
19648 Multibyte character in padright
19650 {{padright:Hello-|7|Æ}}
19657 formatdate parser function
19659 {{#formatdate:2009-03-24}}
19661 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19666 formatdate parser function, with default format
19668 {{#formatdate:2009-03-24|mdy}}
19670 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19675 Spacing of numbers in formatted dates
19677 {{#formatdate:January 15}}
19679 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19684 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
19686 language=nl title=[[MediaWiki:Common.css]]
19688 {{#formatdate:2009-03-24|dmy}}
19690 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19703 Edit comment with link
19707 I like the [[Main Page]] a lot
19709 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19713 Edit comment with link and link text
19717 I like the [[Main Page|best pages]] a lot
19719 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19723 Edit comment with link and link text with suffix
19727 I like the [[Main Page|best page]]s a lot
19729 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19733 Edit comment with section link (non-local, eg in history list)
19735 comment title=[[Main Page]]
19737 /* External links */ removed bogus entries
19739 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19743 Edit comment with section link and text before it (non-local, eg in history list)
19745 comment title=[[Main Page]]
19747 pre-comment text /* External links */ removed bogus entries
19749 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>
19753 Edit comment with section link (local, eg in diff view)
19755 comment local title=[[Main Page]]
19757 /* External links */ removed bogus entries
19759 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19763 Edit comment with subpage link (bug 14080)
19767 title=[[Subpage test]]
19769 Poked at a [[/subpage]] here...
19771 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
19775 Edit comment with subpage link and link text (bug 14080)
19779 title=[[Subpage test]]
19781 Poked at a [[/subpage|neat little page]] here...
19783 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
19787 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
19790 title=[[Subpage test]]
19792 Poked at a [[/subpage]] here...
19794 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
19798 Edit comment with bare anchor link (local, as on diff)
19802 title=[[Main Page]]
19806 <a href="#section">#section</a>
19810 Edit comment with bare anchor link (non-local, as on history)
19813 title=[[Main Page]]
19817 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19821 Anchor starting with underscore
19825 <p><a href="#_ref">One</a>
19830 Id starting with underscore
19832 <div id="_ref"></div>
19834 <div id="_ref"></div>
19839 Space normalisation on autocomment (bug 22784)
19842 title=[[Main Page]]
19844 /* __hello__world__ */
19846 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19850 percent-encoding and + signs in comments (Bug 26410)
19854 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19856 <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>
19859 # Parsoid doesn't support this yet: see bug 73581
19860 # but it *should* omit the 'src' attribute if the image is bad.
19861 # PHP side of tests was disabled in
19862 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19863 # because of issues in the PHP parserTests infrastructure
19864 # (but the output below is indeed what the PHP side emits)
19866 Bad images - basic functionality
19869 !! DISABLED/html/php
19871 <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>
19875 Bad images - bug 16039: text after bad image disappears
19880 !! DISABLED/html/php
19886 <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>
19891 Verify that displaytitle works (bug #22501) no displaytitle
19895 wgAllowDisplayTitle=true
19896 wgRestrictDisplayTitle=false
19898 this is not the the title
19901 <p>this is not the the title
19906 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
19911 wgAllowDisplayTitle=true
19912 wgRestrictDisplayTitle=false
19914 this is not the the title
19915 {{DISPLAYTITLE:whatever}}
19918 <p>this is not the the title
19923 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
19928 wgAllowDisplayTitle=true
19929 wgRestrictDisplayTitle=true
19931 this is not the the title
19932 {{DISPLAYTITLE:whatever}}
19935 <p>this is not the the title
19940 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
19945 wgAllowDisplayTitle=true
19946 wgRestrictDisplayTitle=true
19948 this is not the the title
19949 {{DISPLAYTITLE:screen}}
19952 <p>this is not the the title
19957 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
19962 wgAllowDisplayTitle=false
19964 this is not the the title
19965 {{DISPLAYTITLE:screen}}
19968 <p>this is not the the title
19969 <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>
19974 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
19979 wgAllowDisplayTitle=false
19981 this is not the the title
19984 <p>this is not the the title
19989 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
19994 wgAllowDisplayTitle=true
19995 wgRestrictDisplayTitle=true
19997 this is not the the title
19998 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20000 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20001 <p>this is not the the title
20006 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20011 wgAllowDisplayTitle=true
20012 wgRestrictDisplayTitle=true
20014 this is not the the title
20015 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20017 <span style="color: red;">s</span>creen
20018 <p>this is not the the title
20023 Page status indicators: Empty name is invalid
20027 <indicator name=" "></indicator>
20028 <indicator></indicator>
20030 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20031 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20036 Page status indicators: Weird syntaxes that are okay
20040 <indicator name="empty" />
20041 <indicator name="name"></indicator>
20050 Page status indicators: Torture test
20054 <indicator name="01">hello world</indicator>
20055 <indicator name="02">[[Main Page]]</indicator>
20056 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20057 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20058 <indicator name="05">* foo
20060 <indicator name="06"><nowiki>foo</nowiki></indicator>
20061 <indicator name="07"> Preformatted</indicator>
20062 <indicator name="08"><div>Broken tag</indicator>
20063 <indicator name="09">{| class=wikitable
20066 <indicator name="10">Two
20068 paragraphs</indicator>
20071 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20072 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" />
20073 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>
20074 05=<ul><li> foo</li>
20078 07=<pre>Preformatted
20080 08=<div>Broken tag</div>
20082 09=<table class="wikitable">
20099 preload: check <noinclude> and <includeonly>
20103 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20109 preload: check <onlyinclude>
20113 Goodbye <onlyinclude>Hello world</onlyinclude>
20119 preload: can pass tags through if we want to
20123 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20125 <includeonly>Hello world</includeonly>
20129 preload: check that it doesn't try to do tricks
20133 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20135 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20139 Play a bit with r67090 and bug 3158
20141 <div style="width:50% !important"> </div>
20142 <div style="width:50% !important"> </div>
20143 <div style="width:50% !important"> </div>
20144 <div style="border : solid;"> </div>
20146 <div style="width:50% !important"> </div>
20147 <div style="width:50% !important"> </div>
20148 <div style="width:50% !important"> </div>
20149 <div style="border : solid;"> </div>
20152 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20153 <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>
20154 <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>
20155 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20160 HTML5 data attributes
20162 <span data-foo="bar">Baz</span>
20163 <p data-abc-def_hij="">Quuz</p>
20165 <p><span data-foo="bar">Baz</span>
20167 <p data-abc-def_hij="">Quuz</p>
20172 percent-encoding and + signs in internal links (Bug 26410)
20174 [[User:+%]] [[Page+title%]]
20175 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20176 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20177 [[%33%45]] [[%33%45+]]
20179 <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>
20180 <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>
20181 <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>
20182 <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>
20185 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%">User:+%</a> <a rel="mw:WikiLink" href="Page+title%25" title="Page+title%">Page+title%</a>
20186 <a rel="mw:WikiLink" href="%25+" title="%+">%+</a> <a rel="mw:WikiLink" href="%25+" title="%+">%20</a> <a rel="mw:WikiLink" href="%25+" title="%+">%+ </a> <a rel="mw:WikiLink" href="%25+r" title="%+r">%+r</a>
20187 <a rel="mw:WikiLink" href="%25" title="%">%</a> <a rel="mw:WikiLink" href="+" title="+">+</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=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Bar&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;bar&quot;},&quot;dsr&quot;:[94,101,2,2]}\">bar</a>"}'><a href="./File:%25+abc9"><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>
20188 <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>
20192 Special characters in embedded file links (bug 27679)
20194 [[File:Contains & ampersand.jpg]]
20195 [[File:Does not exist.jpg|Title with & ampersand]]
20197 <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>
20198 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20201 <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>
20202 <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>
20206 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20208 Text's been normalized?
20210 <p>Text's been normalized?
20215 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20217 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20219 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20224 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20226 [http://www.example.org/ ideograms]
20228 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20233 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20235 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20237 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20261 Bug 31098 Template which includes system messages which includes the template
20265 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20266 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20271 Bug31490 Turkish: ucfirst 'blah'
20282 Bug31490 Turkish: ucfirst 'ix'
20293 Bug31490 Turkish: lcfirst 'BLAH'
20304 Bug31490 Turkish: ucfırst (with a dotless i)
20310 <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>
20315 Bug31490 ucfırst (with a dotless i) with English language
20321 <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>
20326 Bug 26375: TOC with italics
20328 title=[[Main Page]]
20331 == ''Lost'' episodes ==
20333 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20335 <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>
20339 <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>
20344 Bug 26375: TOC with bold
20346 title=[[Main Page]]
20349 == '''should be bold''' then normal text ==
20351 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20353 <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>
20357 <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>
20362 Bug 33845: Headings become cursive in TOC when they contain an image
20364 title=[[Main Page]]
20367 == Image [[Image:foobar.jpg]] ==
20369 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20371 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20375 <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>
20380 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20382 title=[[Main Page]]
20385 == <blockquote>Quote</blockquote> ==
20387 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20389 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20393 <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>
20397 <div id="toc" class="toc">
20398 <div id="toctitle">
20402 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20406 <h2><span class="mw-headline" id="Quote"></span></h2>
20408 <p><span class="mw-headline" id="Quote">Quote</span></p>
20410 <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>
20414 Unclosed tags in TOC
20416 title=[[Main Page]]
20420 <small>Hanc marginis exiguitas non caperet.</small>
20423 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20425 <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>
20429 <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>
20430 <p><small>Hanc marginis exiguitas non caperet.</small>
20436 Multiple tags in TOC
20439 == <i>Foo</i> <b>Bar</b> ==
20441 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20443 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20445 <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>
20446 <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>
20450 <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>
20451 <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>
20455 <div id="toc" class="toc">
20456 <div id="toctitle">
20460 <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>
20461 <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>
20465 <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>
20466 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20468 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20470 <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>
20474 Tags with parameters in TOC
20477 == <sup class="in-h2">Hello</sup> ==
20479 == <sup class="a > b">Evilbye</sup> ==
20481 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20483 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20484 <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>
20488 <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>
20489 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> 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>
20494 span tags with directionality in TOC
20497 == <span dir="ltr">C++</span> ==
20499 == <span dir="rtl">זבנג!</span> ==
20501 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20503 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20505 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20507 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20509 <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>
20510 <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>
20511 <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>
20512 <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>
20513 <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>
20517 <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>
20518 <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>
20519 <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>
20520 <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>
20521 <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>
20526 Bug 72884: bdi element in ToC
20529 == <bdi>test</bdi> ==
20531 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20533 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20537 <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>
20541 # Note that the html output does not have the <p></p>, but the
20542 # html+tidy output *does*. This is because the empty <p></p> is
20543 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20545 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20550 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20552 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20556 <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>
20560 <div id="toc" class="toc">
20561 <div id="toctitle">
20565 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20569 <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>
20575 == {{int:headline_sample}} ==
20579 Bug 32057: Title needed when expanding <h> nodes.
20581 title=[[Main Page]]
20585 <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>
20590 Strip marker in urlencode
20592 {{urlencode:x<nowiki/>y}}
20593 {{urlencode:x<nowiki/>y|wiki}}
20594 {{urlencode:x<nowiki/>y|path}}
20595 {{urlencode:x<pre id="one">two</pre>y}}
20623 Strip marker in formatNum
20625 {{formatnum:1<nowiki/>2}}
20626 {{formatnum:1<nowiki/>2|R}}
20634 Check noCommafy in formatNum
20638 {{formatnum:123456.78}}
20639 {{formatnum:123456.78|NOSEP}}
20647 Wrong option for formatNum (bug 56199)
20649 {{formatnum:1,234.56|Random}}
20650 {{formatnum:1,234.56|EVERYTHING}}
20651 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20660 Strip marker in grammar
20664 {{grammar:elative|foo<nowiki/>bar}}
20671 Strip marker in padleft
20673 {{padleft:|2|x<nowiki/>y}}
20680 Strip marker in padright
20682 {{padright:|2|x<nowiki/>y}}
20689 Strip marker in anchorencode
20691 {{anchorencode:x<nowiki/>y}}
20698 nowiki inside link inside heading (bug 18295)
20700 ==[[foo|x<nowiki>y</nowiki>z]]==
20702 <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>
20707 new support for bdi element (bug 31817)
20709 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20711 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20716 Ignore pipe between table row attributes
20720 |- id=foo | style='color: red'
20728 <tr id="foo" style="color: red">
20735 Gallery override link with WikiLink (bug 34852)
20738 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
20741 <ul class="gallery mw-gallery-traditional">
20742 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20743 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
20744 <div class="gallerytext">
20754 Gallery override link with absolute external link (bug 34852)
20757 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20760 <ul class="gallery mw-gallery-traditional">
20761 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20762 <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>
20763 <div class="gallerytext">
20773 Gallery override link with malicious javascript (bug 34852)
20776 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20779 <ul class="gallery mw-gallery-traditional">
20780 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20781 <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>
20782 <div class="gallerytext">
20792 Gallery with invalid title as link (bug 43964)
20795 File:foobar.jpg|link=<
20798 <ul class="gallery mw-gallery-traditional">
20799 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20800 <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>
20801 <div class="gallerytext">
20809 Language parser function
20818 Padleft and padright as substr
20820 {{padleft:|3|abcde}}
20821 {{padright:|3|abcde}}
20829 Special parser function
20831 {{#special:RandomPage}}
20832 {{#special:BaDtItLe}}
20833 {{#special:Foobar}}
20842 Bug 34939 - Case insensitive link parsing ([HttP://])
20844 [HttP://MediaWiki.Org/]
20846 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20849 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20853 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20855 [HttP://MediaWiki.Org/ MediaWiki]
20857 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20862 Bug 34939 - Case insensitive link parsing (HttP://)
20864 HttP://MediaWiki.Org/
20866 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20869 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
20887 <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>
20888 <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>
20889 <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>
20890 <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>
20891 <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>
20897 ### Parsoid-specific tests
20898 ### Parsoid-PHP parser incompatibilities
20901 1. SOL-sensitive wikitext tokens as template-args
20903 parsoid=wt2html,wt2wt
20909 <span about="#mwt1" typeof="mw:Transclusion">
20910 </span><ul about="#mwt1"><li>a</li>
20912 <span about="#mwt2" typeof="mw:Transclusion">
20913 </span><ol about="#mwt2"><li>a</li>
20915 <span about="#mwt3" typeof="mw:Transclusion">
20916 </span><dl about="#mwt3"><dd>a</dd>
20920 #### -----------------------------------------------------------------
20921 #### Parsoid-specific functionality tests
20922 #### -----------------------------------------------------------------
20924 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
20925 # We know wt2wt will fail, but we expect selser to pass.
20926 # Due to the nature of our testing, wt2wt and selser tests will enter the
20927 # blacklist and we'll catch selser regressions based on changes to the
20928 # blacklist entries for selser tests.
20930 1. Bad treebuilder fixup of formatting elt is cleaned up
20932 parsoid=wt2html,wt2wt
20937 [[Image:Foobar.jpg|right|Test]]
20944 <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>
20951 2. Bad treebuilder fixup of formatting elt is cleaned up
20953 parsoid=wt2html,wt2wt
20955 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
20957 <small>[[Image:Foobar.jpg|right|300px]]</small>
20961 <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>
20963 <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>
20967 3. Bad treebuilder fixup of formatting elt is cleaned up
20969 parsoid=wt2html,wt2wt
20971 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
20973 <p><small><b>foo</b></small></p>
20974 <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>
20975 <p><small><b>bar</b></small></p>
20979 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
20981 parsoid=wt2html,wt2wt
20983 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
20985 <p><b><small></small></b></p>
20986 <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>
20990 #### ----------------------------------------------------------------
20991 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
20992 #### tags. Parsoid's output for these tags differs from that of the
20994 #### ----------------------------------------------------------------
20997 Ref: 1. ref-location should be replaced with an index span
21002 B <ref name="x">foo</ref>
21006 <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>
21007 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>
21008 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>
21009 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21010 <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>
21011 <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>
21012 <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>
21017 Ref: 2. ref-tags with identical names should all get the same index
21021 A <ref name="x">foo</ref>
21025 <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>
21026 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>
21027 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21028 <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>
21033 Ref: 3. spaces in ref-names should be ignored
21037 A <ref name="x">foo</ref>
21038 B <ref name=" x " />
21042 <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>
21043 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>
21044 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>
21045 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21046 <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>
21050 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21052 Ref: 4. 'constructor' should be accepted as a valid ref-name
21056 A <ref name="constructor">foo</ref>
21059 <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>
21060 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21061 <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>
21066 Ref: 5. body should accept generic wikitext
21071 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21076 <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>
21078 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21079 <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>
21085 Ref: 6. indent-pres should not be output in ref-body
21097 <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>
21099 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21100 <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
21108 Ref: 7. No p-wrapping in ref-body
21127 <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>
21129 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21130 <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
21145 Ref: 8. transclusion wikitext has lower precedence
21149 A <ref> foo {{echo|</ref> B C}}
21153 <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<span typeof="mw:Nowiki">}}</span></p>
21154 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21155 <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 typeof="mw:Nowiki" data-parsoid='{"src":"{{","dsr":[12,14,0,0]}'>{{</span>echo|</span></li>
21160 Ref: 9. unclosed comments should not leak out of ref-body
21164 A <ref> foo <!--</ref> B C
21167 <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>
21168 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21169 <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>
21174 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21178 A <ref> <b> foo </ref> B C
21182 <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>
21185 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21186 <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>
21191 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21199 <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
21200 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>
21201 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21202 <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>
21203 <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>
21208 Ref: 12. ref-tags act as trailing newline migration barrier
21210 <!--the newline at the end of this line moves out of the p tag-->a
21212 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21218 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21221 <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>
21222 <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>
21225 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21226 <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>
21227 <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>
21231 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21240 <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
21241 <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>
21242 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21243 <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>
21244 <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
21250 Ref: 14. A nested ref-tag should be emitted as plain text
21254 <ref>foo <ref>bar</ref> baz</ref>
21258 <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>
21260 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21261 <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>
21266 Ref: 15. ref-tags with identical names should get identical indexes
21270 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21271 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21275 <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>
21276 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>
21278 <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>
21282 ## We don't bother wt2wt-ing non-standard whitespace
21284 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21292 <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>
21293 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21294 <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>
21298 Ref: 17. Generate valid HTML5 id/about attributes
21302 <ref name="a b">foo</ref>
21306 <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>
21309 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21310 <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>
21315 Ref: 18. T58916: Extension attributes should be parsed as plain text
21319 <ref name="{{echo|a}}">foo</ref>
21323 <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>
21326 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21327 <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>
21332 Ref: 19. ref-tags with identical name encodings should get identical indexes
21336 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21340 <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>
21342 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21343 <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>
21348 Ref: 20. ref-tags with identical names but different content should keep it
21352 A <ref name="foo">Foo one</ref>
21353 B <ref name="foo">Foo two</ref>
21354 C <ref name="foo" />
21358 <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>
21359 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>
21360 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>
21362 <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>
21367 References: 1. references tag without any refs should be handled properly
21371 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21375 References: 2. references tag with group only outputs references from that group
21377 A <ref group="a">foo</ref>
21378 B <ref group="b">bar</ref>
21381 <references group="a" />
21383 <references group="b" />
21385 <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>
21386 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>
21387 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>
21389 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21390 <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>
21392 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21393 <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>
21395 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21396 <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>
21401 References: 3. ref list should be cleared after processing references
21411 <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>
21413 <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>
21416 <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>
21418 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21419 <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>
21424 References: 4. only referenced group should be cleared after processing references
21426 A <ref group="a">afoo</ref>
21429 <references group="a" />
21435 <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>
21436 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>
21438 <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>
21441 <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>
21443 <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>
21448 References: 5. ref tags in references should be processed while ignoring all other content
21451 B <ref name="b">bar</ref>
21454 <ref name="a">foo</ref>
21455 This should just get lost.
21458 <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>
21459 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>
21462 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"a\">foo</ref>\nThis should just get lost.","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;\"><span class=\"mw-reflink-text\">[1]</span></a></span>\n"},"attrs":{}}'><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>
21467 References: 6. <references /> from a transclusion
21469 <ref>Foo</ref> {{echo|<references />}}
21471 <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>
21476 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21478 A <ref>foo bar for a</ref>
21479 B <ref group="X" name="b" />
21483 <references group="X">
21484 <ref name="b">foo</ref>
21487 <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>
21488 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>
21491 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21492 <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>
21495 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"b\">foo</ref>","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\"><span class=\"mw-reflink-text\">[X 1]</span></a></span>\n"},"attrs":{"group":"X"}}'>
21496 <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>
21501 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21503 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21506 <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>
21507 <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>
21511 # This test only works in wt2html now as the <references /> are always generated
21512 # unless selser is active. Once T72722 is fixed, we should add a changes test
21513 # here to ensure that unrelated changes don't add the new <references /> in
21516 References: 9. Generate missing references list at the end
21519 B <ref group="inexistent">bar</ref>
21521 <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>
21522 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21523 <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>
21525 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21526 <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>
21531 References: 10. New <references/> shouldn't be added for unrelated edits.
21534 "modes": ["selser"],
21535 "changes": [["#x", "remove"]],
21539 Unrelated text<span id="x"> that's going to disappear</span>.
21547 Entities in ref name
21549 <ref name="test & me">hi</ref>
21552 <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>
21553 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21554 <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>
21558 # This test is wt2html only because we're permitting the serializer to produce
21559 # dirty diffs, normalizing the unclosed references to the self-closed version.
21561 Generate references for unclosed references tag
21569 <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>
21570 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21571 <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>
21575 New reference serializes on its own line
21577 parsoid=wt2wt,html2wt
21582 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21585 #### ----------------------------------------------------------------
21586 #### Parsoid-only testing of Parsoid's impl of LST
21587 #### Not implemented yet, see
21588 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21589 #### ----------------------------------------------------------------
21592 LST Sections: 1. Simple section start and end
21594 <section begin="2011-05-16" />
21595 <section end="2014-04-10 (MW 1.23wmf22)" />
21597 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21598 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21601 #--------- Test stripping of empty nodes in template content ----------
21603 Empty LI and TR nodes should be stripped from template content
21608 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21612 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21625 Empty LI and TR nodes should not be stripped from top-level content
21652 Empty TR nodes should not be stripped if they have any attributes set
21654 {{EmptyTRWithHTMLAttrTest}}
21656 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21657 <tr align="center"></tr>
21658 <tr><td>foo</td></tr>
21659 <tr align="center"></tr>
21660 <tr><td>bar</td></tr>
21664 #### ----------------------------------------------------------------
21665 #### The following section of tests are primarily to test
21666 #### wikitext escaping capabilities of Parsoid. Given that
21667 #### escaping can be done any number of ways, the wikitext (input)
21668 #### is always adjusted to reflect how Parsoid adds nowiki
21671 #### We are marking several tests as parsoid-only since the
21672 #### HTML in the result section is different from what the
21673 #### PHP parser generates for it.
21674 #### ----------------------------------------------------------------
21677 #### --------------- Headings ---------------
21679 #### 1. Nested inside html <h1>=foo=</h1>
21680 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21681 #### 3. Nested inside html with wikitext split by html tags
21682 #### 4. No escape needed
21683 #### 5. Empty headings <h1></h1>
21684 #### 6. Heading chars in SOL context
21685 #### ----------------------------------------
21687 Headings: 0. Unnested
21691 <nowiki>=foo=</nowiki>
21693 <nowiki> =foo= </nowiki>
21695 <nowiki>=foo=</nowiki>
21697 =foo''a''<nowiki>=</nowiki>
21699 <p><span typeof="mw:Nowiki">=foo=</span></p>
21701 <p><span typeof="mw:Nowiki"> =foo= </span>
21703 <span typeof="mw:Nowiki">=foo=</span></p>
21705 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
21708 # New headings and existing headings are handled differently
21710 Headings: 1. Nested inside html
21718 <h1 data-parsoid=''>=foo=</h1>
21719 <h2 data-parsoid=''>=foo=</h2>
21720 <h3 data-parsoid=''>=foo=</h3>
21721 <h4 data-parsoid=''>=foo=</h4>
21722 <h5 data-parsoid=''>=foo=</h5>
21723 <h6 data-parsoid=''>=foo=</h6>
21731 =<nowiki>=foo=</nowiki>=
21732 ==<nowiki>=foo=</nowiki>==
21733 ===<nowiki>=foo=</nowiki>===
21734 ====<nowiki>=foo=</nowiki>====
21735 =====<nowiki>=foo=</nowiki>=====
21736 ======<nowiki>=foo=</nowiki>======
21741 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
21750 <nowiki>*</nowiki>bar
21756 <nowiki>=bar=</nowiki>
21760 Headings: 3. Nested inside html with wikitext split by html tags
21762 parsoid=html2wt,wt2wt
21764 = ='''bold'''<nowiki>foo=</nowiki> =
21766 <h1>=<b>bold</b>foo=</h1>
21770 Headings: 4a. No escaping needed (testing just h1 and h2)
21795 <h1><i>=</i>foo=</h1>
21799 Headings: 4b. No escaping needed (inside p-tags)
21814 Headings: 5. Empty headings
21824 =====<nowiki/>=====
21826 ======<nowiki/>======
21828 <h1 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h1>
21830 <h2 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h2>
21832 <h3 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h3>
21834 <h4 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h4>
21836 <h5 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h5>
21838 <h6 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h6>
21842 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21844 <nowiki>=a=</nowiki>
21846 <nowiki>=a=</nowiki>
21848 <nowiki>=a=</nowiki>
21850 <nowiki>=a=</nowiki>
21858 <p><span typeof="mw:Nowiki">=a=</span></p>
21860 <p><span typeof="mw:Nowiki">=a=</span></p>
21862 <p><span typeof="mw:Nowiki">=a=</span></p>
21864 <p><span typeof="mw:Nowiki">=a=</span></p>
21868 Headings: 6b. Heading chars in SOL context (with trailing newlines)
21892 <p><span typeof="mw:Nowiki">=a=
21895 <p><span typeof="mw:Nowiki">=a=
21898 <p><span typeof="mw:Nowiki">=a=
21901 <p><span typeof="mw:Nowiki">=a=
21906 Headings: 6c. Heading chars in SOL context (leading newline break)
21909 <nowiki>=b=</nowiki>
21916 <span typeof="mw:Nowiki">=b=</span>
21920 Headings: 6d. Heading chars in SOL context (with interspersed comments)
21922 <!--c0--><nowiki>=a=</nowiki>
21924 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
21930 <!--c0--><p><span typeof="mw:Nowiki">=a=</span></p>
21932 <!--c1--><p><span typeof="mw:Nowiki">=a=</span></p> <!--c2--> <!--c3-->
21936 Headings: 6d. Heading chars in SOL context (No escaping needed)
21946 Headings: 7. Insert a newline between new content and headings
21952 <h2 data-parsoid='{}'>A</h2>
21953 <p data-parsoid='{}'>a</p>
21963 #### --------------- Lists ---------------
21964 #### 0. Outside nests (*foo, etc.)
21965 #### 1. Nested inside html <ul><li>*foo</li></ul>
21966 #### 2. Inside definition lists
21967 #### 3. Only bullets at start should be escaped
21968 #### 4. No escapes needed
21969 #### 5. No unnecessary escapes
21970 #### 6. Escape bullets in SOL position
21971 #### 7. Escape bullets in a multi-line context
21972 #### ----------------------------------------
21975 Lists: 0. Outside nests
21977 <nowiki>*</nowiki>foo
21979 <nowiki>#</nowiki>foo
21981 <nowiki>;Foo:</nowiki>bar
21988 <p><span typeof="mw:Nowiki">*</span>foo</p>
21990 <p><span typeof="mw:Nowiki">#</span>foo</p>
21992 <p><span typeof="mw:Nowiki">;Foo:</span>bar</p>
21996 Lists: 1. Nested inside html
21998 *<nowiki>*foo</nowiki>
22000 *<nowiki>#foo</nowiki>
22002 *<nowiki>:foo</nowiki>
22004 *<nowiki>;foo</nowiki>
22006 #<nowiki>*foo</nowiki>
22008 #<nowiki>#foo</nowiki>
22010 #<nowiki>:foo</nowiki>
22012 #<nowiki>;foo</nowiki>
22014 <ul><li>*foo</li></ul>
22015 <ul><li>#foo</li></ul>
22016 <ul><li>:foo</li></ul>
22017 <ul><li>;foo</li></ul>
22018 <ol><li>*foo</li></ol>
22019 <ol><li>#foo</li></ol>
22020 <ol><li>:foo</li></ol>
22021 <ol><li>;foo</li></ol>
22026 Lists: 2. Inside definition lists
22028 ;<nowiki>;foo</nowiki>
22030 ;<nowiki>:foo</nowiki>
22032 ;<nowiki>:foo</nowiki>
22035 :<nowiki>:foo</nowiki>
22037 <dl><dt>;foo</dt></dl>
22038 <dl><dt>:foo</dt></dl>
22041 <dl><dd>:foo</dd></dl>
22046 Lists: 3. Only bullets at start of text should be escaped
22048 *<nowiki>*foo*bar</nowiki>
22050 *<nowiki>*foo</nowiki>''it''*bar
22052 <ul><li>*foo*bar</li></ul>
22053 <ul><li>*foo<i>it</i>*bar</li></ul>
22058 Lists: 4. No escapes needed
22079 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22083 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22089 Lists: 5. No unnecessary escapes
22091 * bar <span><nowiki>[[foo]]</nowiki></span>
22093 * =bar <span><nowiki>[[foo]]</nowiki></span>
22095 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22097 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22099 * =bar <span>foo]]</span>=
22105 <ul><li> bar <span>[[foo]]</span></li></ul>
22106 <ul><li> =bar <span>[[foo]]</span></li></ul>
22107 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22108 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22109 <ul><li> =bar <span>foo]]</span>=</li></ul>
22110 <ul><li> <s></s>: a</li></ul>
22111 <ul><li> <i>* foo</i></li></ul>
22116 Lists: 6. Escape bullets in SOL position
22120 <p><!--cmt-->*foo</p>
22122 <!--cmt--><nowiki>*</nowiki>foo
22126 Lists: 7. Escape bullets in a multi-line context
22129 <nowiki>*</nowiki>b
22137 Lists: 8. Escape colons only if not present in tags
22141 <dl><dt>a:b<i>c:d</i></dt></dl>
22143 ; <nowiki>a:b</nowiki>''c:d''
22146 #### --------------- HRs ---------------
22147 #### 1. Single line
22148 #### -----------------------------------
22151 HRs: 1. Single line
22153 ----<nowiki>----</nowiki>
22165 #### --------------- Tables ---------------
22166 #### 1a. Simple example
22167 #### 1b. No escaping needed (!foo)
22168 #### 1c. No escaping needed (|foo)
22169 #### 1d. No escaping needed (|}foo)
22171 #### 2a. Nested in td (<td>foo|bar</td>)
22172 #### 2b. Nested in td (<td>foo||bar</td>)
22173 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22175 #### 3a. Nested in th (<th>foo!bar</th>)
22176 #### 3b. Nested in th (<th>foo!!bar</th>)
22177 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22181 #### 4c. No escaping needed
22182 #### --------------------------------------
22185 Tables: 1a. Simple example
22196 Tables: 1b. No escaping needed
22205 Tables: 1c. No escaping needed
22214 Tables: 1d. No escaping needed
22223 Tables: 2a. Nested in td
22228 <td>foo|bar</td></tr>
22229 <tr><td>x<div>a|b</div></td>
22233 |<nowiki>foo|bar</nowiki>
22235 |x<div><nowiki>a|b</nowiki></div>
22251 Tables: 2b. Nested in td
22257 <td>a<i>b||c</i></td>
22258 <td>a<i><div>b||c</div></i></td>
22259 </tr></tbody></table>
22262 |<nowiki>foo||bar</nowiki>
22263 |a''<nowiki>b||c</nowiki>''
22264 |a''<div><nowiki>b||c</nowiki></div>''
22273 <td>a<i><div>b||c</div></i>
22279 Tables: 2c. Nested in td -- no escaping needed
22295 Tables: 3a. Nested in th
22311 Tables: 3b. Nested in th
22316 <tr><th>foo!!bar</th>
22317 <th><i>foo|bar</i></th>
22318 <th><i>foo!!bar</i></th>
22319 <th><i><span>foo!!bar</span></i></th>
22320 </tr></tbody></table>
22323 !<nowiki>foo!!bar</nowiki>
22324 !''<nowiki>foo|bar</nowiki>''
22325 !''<nowiki>foo!!bar</nowiki>''
22326 !''<span><nowiki>foo!!bar</nowiki></span>''
22335 <th><i>foo!!bar</i>
22337 <th><i><span>foo!!bar</span></i>
22343 Tables: 3c. Nested in th
22348 <tr><th>foo||bar</th>
22349 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22350 </tr></tbody></table>
22353 !<nowiki>foo||bar</nowiki>
22354 !<nowiki>foo||bar</nowiki>
22367 Tables: 4a. Escape -
22386 |<nowiki>-bar</nowiki>
22391 Tables: 4b. Escape +
22410 |<nowiki>+bar</nowiki>
22415 Tables: 4c. No escaping needed
22458 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22459 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22465 <div>a|b</div></td>
22470 Tables: 4d. No escaping needed
22480 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22489 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22490 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22491 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22496 Tables: Digest broken attributes on table and tr tag
22513 T97430: Don't emit empty nowiki pairs around marker meta tags
22517 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22518 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22520 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22521 <nowiki>|</nowiki>** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22525 Unclosed xmlish element in table line shouldn't eat end delimiters
22541 <tbody><tr><td> <foo</td>
22542 <td> bar></td></tr>
22546 #### --------------- Links ----------------
22547 #### 1. Quote marks in link text
22548 #### 2. Wikilinks: Escapes needed
22549 #### 3. Wikilinks: No escapes needed
22550 #### 4. Extlinks: Escapes needed
22551 #### 5. Extlinks: No escapes needed
22552 #### --------------------------------------
22554 Links 1. WikiLinks: No escapes needed
22558 [[Foo|x [Foobar] x]]
22560 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22561 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22562 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22565 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22566 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22567 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22571 Links 2. WikiLinks: Escapes needed
22575 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22576 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22577 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22578 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22579 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22580 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22581 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22582 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22583 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22584 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22586 [[Foo|<nowiki>Foobar]</nowiki>]]
22587 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22588 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22589 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22590 [[Foo|<nowiki>|Bar</nowiki>]]
22591 [[Foo|<nowiki>]]bar</nowiki>]]
22592 [[Foo|<nowiki>[[bar</nowiki>]]
22593 [[Foo|<nowiki>x [[ y</nowiki>]]
22594 [[Foo|<nowiki>x ]] y</nowiki>]]
22595 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22597 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22598 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22599 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22600 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22601 <a href="/wiki/Foo" title="Foo">|Bar</a>
22602 <a href="/wiki/Foo" title="Foo">]]bar</a>
22603 <a href="/wiki/Foo" title="Foo">[[bar</a>
22604 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22605 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22606 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22611 Links 3. WikiLinks: No escapes needed
22616 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22617 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22620 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22621 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22625 Links 4. ExtLinks: Escapes needed
22629 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22630 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22631 <p>[http://google.com]</p>
22632 <p>[http://google.com google]</p>
22634 [http://google.com <nowiki>[google]</nowiki>]
22635 [http://google.com <nowiki>google]</nowiki>]
22637 <nowiki>[http://google.com]</nowiki>
22639 <nowiki>[http://google.com google]</nowiki>
22642 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22643 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22644 </p><p>[http://google.com]
22645 </p><p>[http://google.com google]
22650 Links 5. ExtLinks: No escapes needed
22652 [http://google.com [google]
22654 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22657 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22661 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22663 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22664 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22665 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22666 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22667 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22668 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22669 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22670 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
22671 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22672 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
22673 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
22674 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
22675 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22678 x<nowiki/>http://example.com<nowiki/>y
22679 http://example.com<nowiki/>?x
22680 http://example.com<nowiki/>&x
22681 http://example.com<nowiki/>'x
22682 http://example.com<nowiki/>,x
22683 http://example.com<nowiki/>.x
22684 http://example.com<nowiki/>;x
22685 http://example.com<nowiki/>:x
22686 http://example.com<nowiki/>;x
22687 http://example.com<nowiki/>!x
22688 http://example.com<nowiki/>=x
22689 http://example.com<nowiki/>(x)
22690 http://example.com(x<nowiki/>)
22694 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22697 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22699 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22700 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22701 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22702 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22703 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22709 "http://example.com"
22710 (http://example.com)
22711 (http://example.com) foo
22712 http://example.com,
22713 http://example.com, foo
22716 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22718 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22719 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22720 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22721 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22722 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22727 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22729 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22730 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
22732 http://example.com.,;:!?\
22733 -http://example.com:
22735 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
22736 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
22741 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
22743 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
22744 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
22745 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
22749 X<nowiki/>RFC 123<nowiki/>y
22753 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
22755 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
22756 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
22757 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
22764 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
22765 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
22766 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
22771 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
22773 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
22774 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22775 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22779 X<nowiki/>PMID 123<nowiki/>y
22783 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
22785 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
22786 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
22787 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
22794 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
22795 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
22796 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
22801 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
22803 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
22804 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
22805 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
22808 ISBN 1234567890<nowiki/>1
22809 ISBN 1234567890<nowiki/>x
22810 a<nowiki/>ISBN 1234567890<nowiki/>b
22814 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
22816 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
22820 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
22825 Links 14. Protect link-like plain text. (Parsoid bug T78425)
22829 <p>this is not a link: http://example.com
22832 <nowiki>this is not a link: http://example.com</nowiki>
22836 Links 15. Link trails can't become link prefixes.
22840 [[Söfnuður]]-[[00]]
22842 <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>
22845 <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>
22848 #### --------------- Quotes ---------------
22849 #### 1. Quotes inside <b> and <i>
22850 #### 2. Link fragments separated by <i> and <b> tags
22851 #### 3. Link fragments inside <i> and <b>
22852 #### 4. No escaping needed
22853 #### --------------------------------------
22855 1a. Quotes inside <b> and <i>
22857 parsoid=html2wt,wt2wt
22860 ''<nowiki>''foo''</nowiki>''
22861 ''<nowiki>'''foo'''</nowiki>''
22863 '''<nowiki/>'foo''''
22864 '''<nowiki>''foo''</nowiki>'''
22865 '''<nowiki>'''foo'''</nowiki>'''
22866 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
22867 '''foo'''<nowiki/>'s
22873 '''foo'''<nowiki/>'
22874 ''''foo'''<nowiki/>'
22875 ''fools'<span> errand</span>''
22876 ''<span>fool</span>'s errand''
22877 '<nowiki/>''foo'' bar '''baz''
22878 a|!*#-:;+-~[]{}b'''x''
22887 <b>foo'<i>bar'</i>baz</b>
22896 <i>fools'<span> errand</span></i>
22897 <i><span>fool</span>'s errand</i>
22898 '<i>foo</i> bar '<i>baz</i>
22899 a|!*#-:;+-~[]{}b'<i>x</i>
22904 1b. Quotes inside <b> and <i> with other tags on same line
22906 parsoid=html2wt,wt2wt
22908 '''a'' foo ''[[bar]]''
22909 ''a''' foo ''[[bar]]''
22910 ''a''' foo '''{{echo|[[bar]]}}'''
22911 [[foo]] x'''[[bar]]''
22912 '''foo'' <ref>test</ref>
22913 '''foo'' <div title="name">test</div>
22914 '''foo'' and <br> bar
22917 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22918 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22919 <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>
22920 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
22921 '<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>
22922 '<i>foo</i> <div title="name">test</div>
22923 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
22924 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22925 <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>
22930 2. Link fragments separated by <i> and <b> tags
22932 [[''foo''<nowiki>hello]]</nowiki>
22934 [['''foo'''<nowiki>hello]]</nowiki>
22936 <p>[[<i>foo</i>hello]]
22937 </p><p>[[<b>foo</b>hello]]
22941 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
22942 # this is one of the shortcomings of this format
22944 3. Link fragments inside <i> and <b>
22946 ''[[foo''<nowiki>]]</nowiki>
22948 '''[[foo'''<nowiki>]]</nowiki>
22951 </p><p><b>[[foo</b>]]
22956 4. No escaping needed
22958 '<span>''bar''</span>'
22959 '<span>'''bar'''</span>'
22962 <p>'<span><i>bar</i></span>'
22963 '<span><b>bar</b></span>'
22968 #### ----------- Paragraphs ---------------
22969 #### 1. No unnecessary escapes
22970 #### --------------------------------------
22973 1. No unnecessary escapes
22975 bar <span><nowiki>[[foo]]</nowiki></span>
22977 =bar <span><nowiki>[[foo]]</nowiki></span>
22979 [[bar <span><nowiki>[[foo]]</nowiki></span>
22981 ]]bar <span><nowiki>[[foo]]</nowiki></span>
22983 =bar <span>foo]]</span><nowiki>=</nowiki>
22985 <p>bar <span>[[foo]]</span>
22986 </p><p>=bar <span>[[foo]]</span>
22987 </p><p>[[bar <span>[[foo]]</span>
22988 </p><p>]]bar <span>[[foo]]</span>
22989 </p><p>=bar <span>foo]]</span>=
22993 #### ----------------------- PRE --------------------------
22994 #### 1. Leading whitespace in SOL context should be escaped
22995 #### ------------------------------------------------------
22997 1. Leading whitespace in SOL context should be escaped
23001 <nowiki> </nowiki>a
23003 <nowiki> </nowiki> a
23005 <nowiki> </nowiki>a(tab)
23007 <nowiki> </nowiki> a
23009 <nowiki> </nowiki> a
23012 <nowiki> </nowiki>b
23015 <nowiki> </nowiki>b
23018 <nowiki> </nowiki> b
23024 <p><!--cmt--> a</p>
23034 2. Leading whitespace in non-indent-pre contexts should not be escaped
23042 <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>
23043 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23044 <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 data-parsoid='{"dsr":[9,14,2,2]}'>a</i>
23050 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23069 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23073 [[File:Foobar.jpg|thumb|caption]]
23075 <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>
23079 5. Nowiki escaping should account for indent-pres
23089 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23102 #### --------------- Behavior Switches --------------------
23105 1. Valid behavior switches should be escaped
23112 <nowiki>__TOC__</nowiki>
23113 ''<nowiki>__TOC__</nowiki>''
23117 2. Invalid behavior switches should not be escaped
23128 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23130 Behavior switches should be SOL-transparent
23134 <!-- this one's bogus -->
23141 <meta property="mw:PageProp/toc" />
23143 <!-- this one's bogus -->
23146 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23148 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23151 #### --------------- HTML tags ---------------
23154 #### 3. multi-line html tag
23155 #### 4. extension tags
23156 #### -----------------------------------------
23162 <a href="http://google.com">google</a>
23164 <a href="http://google.com">google</a>
23170 * <nowiki><div>foo</div></nowiki>
23171 * <nowiki><div style="color:red">foo</div></nowiki>
23172 * <nowiki><td></nowiki>
23174 <ul><li> <div>foo</div></li>
23175 <li> <div style="color:red">foo</div></li>
23176 <li> <td></li></ul>
23181 3. multi-line html tag
23196 <nowiki><ref>foo</ref></nowiki>
23198 <nowiki><ref>bar</nowiki>
23200 baz<nowiki></ref></nowiki>
23202 <p><ref>foo</ref>
23203 </p><p><ref>bar
23204 </p><p>baz</ref>
23208 #### --------------- Others ---------------
23212 <nowiki>foo</nowiki>
23214 <p><nowiki>foo</nowiki>
23218 ## The quote-char in the input is necessary for triggering the bug
23220 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23222 parsoid=wt2wt,html2wt
23231 Tag-like HTML structures are passed through as text
23253 </p><p>1<d e>f
23258 HTML tag with necessary entities in attributes
23260 <span title="&amp;">foo</span>
23262 <p><span title="&amp;">foo</span>
23267 HTML tag with 'unnecessary' entity encoding in attributes
23269 <span title="&">foo</span>
23271 <p><span title="&">foo</span>
23276 HTML tag with broken attribute value quoting
23278 <span title="Hello world>Foo</span>
23280 <p><span>Foo</span>
23283 <p><span title="Hello world">Foo</span>
23288 Parsoid-only: HTML tag with broken attribute value quoting
23292 <span title="Hello world>Foo</span>
23294 <p><span title="Hello world">Foo</span>
23299 Table with broken attribute value quoting
23302 | title="Hello world|Foo
23313 <td title="Hello world">Foo
23319 Table with broken attribute value quoting on consecutive lines
23322 | title="Hello world|Foo
23323 | style="color:red|Bar
23336 <td title="Hello world">Foo
23337 </td><td style="color: red">Bar
23338 </td></tr></tbody></table>
23343 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23353 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23363 Accept empty td cell attribute
23366 | align="center" | foo || |
23371 <td align="center"> foo </td>
23378 Non-empty attributes in th-cells
23381 ! Foo !! style="color: red" | Bar
23387 <th style="color: red"> Bar
23393 Accept empty attributes in th-cells
23408 Empty table rows go away
23429 ### Parsoid-centric tests for testing RTing of inter-element separators
23430 ### Edge cases not tested by existing parser tests and specific to
23431 ### Parsoid-specific serialization strategies.
23435 RT-ed inter-element separators should be valid separators
23447 # Parsoid-only since PHP parser relies on Tidy for correct output
23449 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23463 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23464 <p>bar</p></small></td></tr>
23468 <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>
23472 # Note that the "style" attribute is really a template parameter here.
23473 # The = would have to be {{=}} if you wanted the literal.
23475 Empty TD followed by TD with tpl-generated attribute
23480 |{{echo|style='color:red'}}|foo
23494 Indented table with an empty td
23512 ## We have some newline diffs RT-ing this edge case
23513 ## and it is not important enough -- we seem to be emitting
23514 ## at most 2 newlines after a </tr> and this is unrelated to
23515 ## the issue from T85627 that this is testing.
23517 Indented table with blank lines in between (T85627)
23536 Indented block & table
23550 <div data-parsoid='{"stx":"html"}'>foo</div>
23552 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23557 Indent and comment before table row
23572 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23573 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23577 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23579 Empty TR followed by a template-generated TR
23585 {{echo|<tr><td>foo</td></tr>}}
23591 <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}}]}'>
23596 ## PHP and parsoid output differ for this, and since this is primarily
23597 ## for testing Parsoid's serializer, marking this Parsoid only
23599 Empty TR followed by mixed-ws-comment line should RT correctly
23615 <!--c--> </tr><!--d-->
23621 Multi-line image caption generated by templates with/without trailing newlines
23623 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23624 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23626 <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>
23627 <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>
23631 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23635 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23637 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23639 <includeonly>foo</includeonly>
23647 ## PHP emits broken html for this, and since this is primarily
23648 ## a Parsoid serializer test, marking this Parsoid only
23650 Improperly nested inline or quotes tags with whitespace in between
23652 <span> <s>x</span> </s>
23655 <p><span> <s>x</s></span><s> </s>
23656 <b> <i>x</i></b><i> </i>
23661 Encapsulate protected attributes from wt
23663 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23665 <body><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>
23669 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23670 ## Having nested or stray pre tags results in the attempt to add duplicates,
23671 ## causing an assertion fail. This test tries to prevent that situation.
23673 Ensure ParagraphWrapper can deal with stray closing pre tags
23683 1. Ensure fostered text content is wrapped in element nodes
23687 <table>hi</table><table>ho</table>
23696 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
23698 parsoid=wt2html,wt2wt
23707 <tbody><tr><td> a</td></tr>
23712 Encapsulation properly handles null DSR information from foster box
23714 parsoid=wt2html,wt2wt
23716 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
23718 <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>
23722 1. Encapsulate foster-parented transclusion content
23724 parsoid=wt2wt,wt2html
23726 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
23728 <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>
23738 2. Encapsulate foster-parented transclusion content
23740 parsoid=wt2wt,wt2html
23742 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
23744 <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>
23755 3. Encapsulate foster-parented transclusion content
23757 parsoid=wt2wt,wt2html
23759 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23761 <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>"]}">
23774 4. Encapsulate foster-parented transclusion content
23776 parsoid=wt2wt,wt2html
23778 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23780 <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>"]}">
23793 5. Encapsulate foster-parented transclusion content
23795 parsoid=wt2wt,wt2html
23797 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
23799 <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>
23814 6. Encapsulate foster-parented transclusion content
23816 parsoid=wt2wt,wt2html
23818 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
23820 <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>
23836 7. Encapsulate foster-parented transclusion content
23838 parsoid=wt2wt,wt2html
23840 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
23842 <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>
23852 # Note that the wt is broken on purpose: the = should be {{=}} if you
23853 # don't want it to be a template parameter key.
23855 8. Encapsulate foster-parented transclusion content
23857 parsoid=wt2wt,wt2html
23860 }}{|{{echo|style='color:red'}}
23865 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
23867 <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>
23878 9. Encapsulate foster-parented transclusion content
23880 parsoid=wt2wt,wt2html
23882 <table>{{echo|hi</table>hello}}
23884 <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","spc":["","","",""]}]]}'>hi</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
23888 Table in fosterable position
23890 parsoid=wt2html,wt2wt
23899 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
23901 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
23907 # Parsoid only for bug 64747
23909 Properly encapsulate empty-content transclusions in fosterable positions
23917 <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","spc":["","","",""]}]]}'>
23923 Support <object> element with .data attribute
23927 <object data="test.swf"></object>
23929 <object data="test.swf"></object>
23933 Don't block XML namespace declaration
23935 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
23937 <p><span>MediaWiki</span>
23940 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
23943 # -----------------------------------------------------------------
23944 # The following section of tests are primarily to spec requirements
23945 # around serialization of new/edited content.
23947 # All these tests are marked Parsoid html2wt and html2html only
23948 # ----------------------------------------------------------------
23950 # 'mi' is a localinterwiki prefix as well as a language
23952 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
23956 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
23963 New wikilinks should be serialized properly
23967 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
23968 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
23975 New wiki links (href variations)
23979 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23980 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
23981 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
23982 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
23987 [[Toxine bactérienne]]
23991 New wiki links (content string variations)
23995 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23996 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
23997 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24001 [[Foo_bar|./Foo_bar]]
24005 New category links (href variations)
24009 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24010 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24011 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24013 [[Category:Toxine bactérienne]]
24014 [[Category:Toxine bactérienne]]
24015 [[Category:Toxine bactérienne]]
24019 New sol transparent links don't need indent-pre nowiki protection
24024 <link rel="mw:PageProp/redirect" href="./Main_Page">
24025 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24026 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24028 #WEITERLEITUNG [[Main Page]]
24029 <!-- this is good --> [[Category:Good]]
24030 <!-- this is great --> [[Kategorie:Great]]
24034 New interlanguage links (href variations)
24038 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24039 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24040 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24042 [[es:Toxine bactérienne]]
24043 [[es:Toxine_bactérienne]]
24044 [[es:Toxine_bactérienne]]
24048 Image: Modifying size of an image (1)
24051 "modes": ["wt2wt"],
24053 ["img[height]", "attr", "height", "22"],
24054 ["img[width]", "attr", "width", "200"]
24058 [[Image:Foobar.jpg|230x230px]]
24060 [[Image:Foobar.jpg|200x200px]]
24064 Image: Modifying size of an image (2)
24067 "modes": ["wt2wt"],
24069 ["img[height]", "attr", "height", "100"],
24070 ["img[width]", "attr", "width", "500"]
24074 [[Image:Foobar.jpg|230x230px]]
24076 [[Image:Foobar.jpg|500x500px]]
24079 # Change in size is ignored so long as class='mw-default-size'
24081 Image: Modifying size of an image (3)
24084 "modes": ["wt2wt"],
24086 ["figure[class]", "removeClass", "mw-default-size"],
24087 ["figure img", "attr", "height", "19"],
24088 ["figure img", "attr", "width", "170"]
24092 [[Image:Foobar.jpg|thumb]]
24094 [[Image:Foobar.jpg|thumb|170x170px]]
24098 Image: Modifying alignment of an image (bug 48665)
24101 "modes": ["wt2wt"],
24103 ["figure[class]", "removeClass", "mw-halign-right"],
24104 ["figure[class]", "addClass", "mw-halign-left"]
24108 [[Image:Foobar.jpg|thumb|caption|right]]
24110 [[Image:Foobar.jpg|thumb|caption|left]]
24114 Image: Modifying mw-default-size of an frameless image (bug 62805)
24117 "modes": ["wt2wt"],
24119 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24123 [[Image:Foobar.jpg|frameless|right]]
24125 [[Image:Foobar.jpg|frameless|right|220x220px]]
24129 Image: Modifying valign of an image (bug 49221)
24132 "modes": ["wt2wt"],
24134 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24135 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24139 [[File:Foobar.jpg|20px|middle]]
24141 [[File:Foobar.jpg|20px|text-top]]
24145 Image: Modifying alt attribute of an image (bug 56400)
24148 "modes": ["wt2wt"],
24150 ["img[alt]", "attr", "alt", "some alternate edited text"]
24154 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24156 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24160 Image: Modifying caption of an image
24163 "modes": ["wt2wt"],
24165 ["figcaption", "text", "new caption"]
24169 [[Image:Foobar.jpg|thumb|original caption]]
24171 [[Image:Foobar.jpg|thumb|new caption]]
24175 Image: empty alt attribute (bug 48924)
24179 [[File:Foobar.jpg|thumb|alt=|bar]]
24181 <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>
24185 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24191 <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>
24193 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24197 Image: Block level image should have \n before and after
24200 [[File:Foobar.jpg|right|thumb|150x150px]]
24204 <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>
24209 Image: New block level image should have \n before and after (existing content)
24212 [[File:Foobar.jpg|right|thumb|150x150px]]
24216 <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>
24221 Image: upright option (parsoid)
24223 [[File:Foobar.jpg|thumb|upright|caption]]
24224 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24225 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24227 <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>
24228 <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>
24229 <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>
24233 Image: upright option is ignored on inline and frame images (parsoid)
24235 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24237 <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>
24241 Image: from basic HTML (1)
24245 <span typeof="mw:Image">
24246 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24249 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24253 Image: from basic HTML (2)
24257 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24259 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24263 Image: from basic HTML (3)
24267 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24269 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24273 Image: from basic HTML (4)
24277 <img src="./File:Foobar.jpg">
24279 [[File:Foobar.jpg|link=]]
24283 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24288 <li><p>foo</p></li>
24295 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24299 <ul> <li>foo</li></ul>
24305 Don't strip leading whitespace when handling indent-pre suppressing tags
24310 <tr><td> indented row</td></tr>
24313 <b>This is very bold of you!</b>
24316 indented cell (no pre-wrapping!)
24326 '''This is very bold of you!'''
24330 indented cell (no pre-wrapping!)
24338 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24356 <nowiki> </nowiki><span>bar</span>
24359 <nowiki> </nowiki></span>bar2
24362 <nowiki> </nowiki><span>bar</span>
24365 <nowiki> </nowiki><span>foo</span>
24370 Lists: Dont insert newlines in a serialized list item.
24374 <ul><li>a<br>b</li><li>c</li></ul>
24381 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24384 "modes": ["html2wt"],
24385 "scrubWikitext": false
24388 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24389 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24391 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24392 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24394 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
24396 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24398 == hello there [[Category:A1]] ==
24400 == [[Category:A2]] hi pal ==
24402 == <!--foo--> [[Category:A3]] how goes it ==
24404 == it goes well [[Category:A4]] <!--bar--> ==
24406 ==howdy [[Category:A5]] ==
24412 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24415 "modes": ["html2wt"],
24416 "scrubWikitext": true
24419 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24420 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24422 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24423 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24425 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24433 <!--foo--> [[Category:A3]]
24438 [[Category:A4]] <!--bar-->
24446 Headings: Don't hoist metas that come from templates
24449 "modes": ["html2wt"],
24450 "scrubWikitext": true
24453 <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>
24455 == {{echo|foo [[Category:Foo]]}} ==
24459 Headings: Category in ref isn't hoisted
24462 "modes": ["html2wt"],
24463 "scrubWikitext": true
24466 <h2> foo <span about="#mwt2" class="reference" 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">[1]</a></span> </h2>
24468 <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>
24471 [[Category:Baz]] </ref> ==
24477 Parsoid: Serialize positional parameters with = in them as named parameter
24481 <p about="#mwt1" typeof="mw:Transclusion"
24482 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24484 <p about="#mwt1" typeof="mw:Transclusion"
24485 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24487 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24488 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24489 <p data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]},{"k":"2","spc":["","","",""]}]]}' 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>
24493 {{echo|1 = f=oo|2 = bar}}
24495 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24496 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24497 {{echo|<nowiki>f=oo</nowiki>|bar}}
24501 Parsoid: Serialize positional parameters with = in extlink as named parameter
24505 <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>
24507 {{echo|1 = http://stuff?is=ok}}
24511 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24515 <div>a<p>b</p></div>
24536 Substrings resembling wikitext in hrefs should not get nowiki escapes
24540 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24546 Enforce single-line context in the serializer
24553 <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">
24554 </span><span about="#mwt1">you</span> </h2>
24556 <h2> foo <span about="#mwt2" class="reference" 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">[1]</a></span> </h2>
24558 <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
24559 there</span></li></ol>
24571 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
24578 </tbody></table></dd></dl>
24582 == hi {{bogus|there
24593 * foo '''bar''' baz
24605 Serialize new placeholder space without spans
24609 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24611 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24613 <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>
24619 <ref>foo : bar</ref>ok
24623 #-----------------------
24624 # Tag minimization tests
24625 #-----------------------
24628 1. I/B quote minimization: wikitext-only tags should be combined
24632 <p><i>A</i><i>B</i></p>
24633 <p><b>A</b><b>B</b></p>
24634 <p><i>A</i><b><i>B</i></b></p>
24635 <p><b>A</b><i><b>B</b></i></p>
24636 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24637 <p><i><b>A</b></i><i><b>B</b></i></p>
24638 <p><i><b>A</b></i><b><i>B</i></b></p>
24639 <p><b><i>A</i></b><i><b>B</b></i></p>
24659 2. I/B quote minimization: wikitext and html tags should not be combined
24663 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24664 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24668 ''A''<nowiki/>'''<i>B</i>'''
24672 3. I/B quote minimization: templated content stops minimization
24676 <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>
24677 <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>
24679 ''A''{{echo|''B''}}
24681 ''A''{{echo|'''''B'''''}}
24685 4. I/B quote minimization: new content should be mimimized with adjacent old content
24689 <p><i>A</i><i>B</i></p>
24690 <p><b>A</b><b>B</b></p>
24691 <p><i>A</i><b><i>B</i></b></p>
24701 5a. Merge adjacent quote nodes if they've been edited
24704 "modes": ["wt2wt", "selser"],
24706 ["p", "contents", "remove", ":contains('b')"]
24716 5b. Merge adjacent quote nodes if they've been edited
24719 "modes": ["wt2wt", "selser"],
24725 ''a''<span id="x">b</span>''c''
24731 1. Merge adjacent link nodes as long as at least one element is new
24734 "modes": ["html2wt"],
24735 "scrubWikitext": true
24738 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24739 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24740 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
24744 [[Football|Foot]][[Football|ball]]
24748 2. Merge adjacent link nodes and enable additional normalizations
24751 "modes": ["html2wt"],
24752 "scrubWikitext": true
24755 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
24757 [[Football|''Football'']]
24761 3. Don't merge adjacent link nodes if scrubWikitext is false
24764 "modes": ["html2wt"],
24765 "scrubWikitext": false
24768 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24770 [[Football|Foot]][[Football|ball]]
24773 #------------------------------
24774 # End of tag minimization tests
24775 #------------------------------
24778 Bug 54262: New entities
24782 <span typeof="mw:Entity"> </span>
24787 ## Note that there is no wikitext output for 'unknownproperty' ##
24788 ## Unknown magic words are silently dropped ##
24795 <meta property='mw:PageProp/toc' />
24796 <meta property='mw:PageProp/notoc' />
24797 <meta property='mw:PageProp/forcetoc' />
24798 <meta property='mw:PageProp/index' />
24799 <meta property='mw:PageProp/noindex' />
24800 <meta property='mw:PageProp/nogallery' />
24801 <meta property='mw:PageProp/noeditsection' />
24802 <meta property='mw:PageProp/notitleconvert' />
24803 <meta property='mw:PageProp/nocontentconvert' />
24804 <meta property='mw:PageProp/unknownproperty' />
24814 __NOCONTENTCONVERT__
24818 Consecutive <pre>s should not get merged
24820 parsoid=html2wt,html2html
24822 <pre>a</pre><pre>b</pre>
24850 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
24854 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
24856 [[Special:BookSources/1234567890|ISBN 1234567895]]
24860 Edited RFC links not serializable as RFC links should serialize as extlinks
24864 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
24866 [//tools.ietf.org/html/rfc123 New RFC]
24870 Edited PMID links not serializable as PMID links should serialize as extlinks
24874 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
24876 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
24880 WTS of autolinks with trailing/surrounding context
24884 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
24885 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
24886 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
24887 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
24888 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
24889 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
24891 http://cscott.net<nowiki/>'''foo'''
24893 http://cscott.net<b>foo</b>
24895 '''http://cscott.net<nowiki/>'''
24897 '''http://cscott.net '''
24899 '''http://cscott.net<nowiki/>x'''
24901 http://cscott.net<nowiki/>x
24905 WTS of autolinks with nowikis (round-trip)
24907 x<nowiki/>http://cscott.net<nowiki/>x
24909 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
24912 # this is the "easy" test because it leaves in place all the
24913 # data-parsoid information indicating this is an autolink
24915 WTS of autolinks with escapes (editing)
24918 "modes": ["wt2wt"],
24920 [ "meta", "remove" ]
24924 x<nowiki/>http://cscott.net<nowiki/>x
24926 x<nowiki/>http://cscott.net<nowiki/>x
24930 WTS of edited autolink-like text (T103364)
24933 "modes": ["wt2wt"],
24935 [ "span[typeof]", "removeAttr", "typeof" ]
24939 Not a link: <nowiki>http://example.com</nowiki>.
24941 Not a link: <span><nowiki>http://example.com</nowiki></span>.
24945 WTS of newly-authored autolink-like text (T103364)
24949 <p>http://example.com is not a link.</p>
24951 <nowiki>http://example.com is not a link.</nowiki>
24955 WTS of autolink-like text after an autolink (T108563)
24959 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
24961 http://example.com<nowiki> http://example.com is not a link.</nowiki>
24965 Edited Redirect link should emit a non-piped wikitext link
24969 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
24975 T75121: Infer extension name from typeOf if data-mw is not present
24979 <div typeOf="mw:Extension/foo"></div>
24984 # Note that the <p> wrapping isn't present in PHP parser output
24985 # The important thing for this test is that P-wrapping doesn't
24986 # interfere with the <nowiki> protection for leading - in <td>
24987 # (which isn't necessary for <th>).
24989 T88318: p-wrapped dash in table.
24991 parsoid=html2wt,wt2wt
24994 <tr><th><p>-</p></th><th><p>- </p></th></tr>
24995 <tr><td><p>-</p></td><td><p>- </p></td></tr>
24996 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25003 |<nowiki>-</nowiki>
25004 |<nowiki>- </nowiki>
25023 <td><small>-</small></td>
25035 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25040 <td id='mwAc'>foo</td>
25041 <td id='serialize-this'>bar</td>
25046 | id="serialize-this" |bar
25051 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25055 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25057 <div id="hello">ok</div>
25064 "modes": ["wt2wt"],
25066 [ "#xyz", "before", "<b>before</b> stuff " ],
25067 [ "#xyz", "after", " stuff <i>after</i>" ],
25068 [ "#xyz", "html", "x <b>y</b> z" ]
25072 <span id="xyz">hello</span>
25074 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25078 Never serialize a-tag as html, regardless of what data-parsoid has to say
25082 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25087 ## SSS FIXME: This is broken output nevertheless.
25088 ## What might be a reasonable non-broken output for this?
25089 ## This is an edge case unlikely to be seen in production
25090 ## that I am not wasting more time on this right now.
25092 Never serialize a-tag as html, no matter what attributes it has
25096 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25098 [http://boo.org http://boohoo.org]
25101 # Misnested is an indication that selser can reuse the source but these have
25102 # shown to sneak through on occasion. See T101768.
25103 # The original wikitext here is: [http://test.com [[one]] two three]
25105 Strip span tags added to mark as misnested
25109 <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>
25111 [http://test.com][[one]] two three
25114 # --------------------------------------------
25115 # Tests spec'ing wikitext serialization norms |
25116 # --------------------------------------------
25119 Lists: Add space after bullets
25126 <li><span> baz</span></li>
25131 * <span> baz</span>
25135 1. Headings: Add space before/after == (T53744)
25142 <h2><span> baz</span></h2>
25150 == <span> baz</span> ==
25154 2. Headings: Add space before/after == even after hoisted content
25157 "modes": ["html2wt"],
25158 "scrubWikitext": true
25161 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
25169 1. Headings: suppress newly created empty headings
25172 "modes": ["html2wt"],
25173 "scrubWikitext": true
25181 2. Headings: don't suppress empty headings if scrubWikitext is false
25191 3. Headings: suppress empty headings on edits
25194 "modes": ["selser"],
25195 "scrubWikitext": true,
25201 ==<span id="x">foo</span>==
25206 1. WT Quote Tags: suppress newly created empty style tags
25209 "modes": ["html2wt"],
25210 "scrubWikitext": true
25218 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
25224 ''<nowiki/>'''''<nowiki/>'''
25228 3. WT Quote Tags: suppress empty style tags on edits
25231 "modes": ["selser"],
25232 "scrubWikitext": true,
25238 '''<span id="x">foo</span>'''
25243 1. Anchors: suppress newly created empty anchors
25246 "modes": ["html2wt"],
25247 "scrubWikitext": true
25250 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25255 2. Anchors: don't suppress empty anchors if scrubWikitext is false
25258 "modes": ["html2wt"],
25259 "scrubWikitext": false
25262 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25268 3. Anchors: suppress empty anchors on edits
25271 "modes": ["selser"],
25272 "scrubWikitext": true,
25278 [[Test|<span id="x">foo</span>]]
25283 3a. Anchors: do not suppress numbered extlinks
25286 "modes": ["wt2wt"],
25287 "scrubWikitext": true
25292 <a rel="mw:ExtLink" href="http://foo.com"></a>
25296 3b. Anchors: do not suppress numbered extlinks
25299 "modes": ["wt2wt"],
25300 "scrubWikitext": true,
25306 [http://foo.com <span id="x">foo</span>]
25312 Normalizations should be restricted to edited content
25315 "modes": ["selser"],
25316 "scrubWikitext": true,
25318 [ "h1", "before", "<i></i>"]
25332 1. Multiple normalizations (html2wt)
25335 "modes": ["html2wt"],
25336 "scrubWikitext": true
25340 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
25341 </a><b><i></i></b>x</p>
25350 2. Multiple normalizations (selser)
25353 "modes": ["selser"],
25354 "scrubWikitext": true,
25356 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
25360 <span id="x">foo</span>
25362 <span id="x">foo</span>
25368 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
25371 "modes": ["html2wt"],
25372 "scrubWikitext": true
25384 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
25391 <nowiki> </nowiki>hi
25393 <nowiki> </nowiki> hello
25397 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
25400 "modes": ["html2wt"],
25401 "scrubWikitext": true
25410 baz bang</td></tr></table>
25416 bar<span>boo</span></p>
25432 bar<span>boo</span>
25436 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
25439 "modes": ["selser"],
25440 "scrubWikitext": true,
25442 [ "p", "html", " a\n b" ]
25453 1. New links that end in spaces
25456 "modes": ["html2wt"],
25457 "scrubWikitext": false
25460 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25461 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25462 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
25464 [[Berlin ]]<nowiki/>is the capital of Germany.
25468 [[Boston ]] is a city.
25472 2. New links that end in spaces
25475 "modes": ["html2wt"],
25476 "scrubWikitext": true
25479 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25480 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25481 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
25483 [[Berlin]] is the capital of Germany.
25487 [[Boston]] is a city.
25491 1. Table cells with escapable prefixes
25494 "modes": ["html2wt"],
25495 "scrubWikitext": false
25499 <tr><td>a</td></tr>
25500 <tr><td>-</td></tr>
25501 <tr><td>+</td></tr>
25507 |<nowiki>-</nowiki>
25509 |<nowiki>+</nowiki>
25514 2. Table cells with escapable prefixes
25517 "modes": ["html2wt"],
25518 "scrubWikitext": true
25522 <tr><td>a</td></tr>
25523 <tr><td>-</td></tr>
25524 <tr><td>+</td></tr>
25537 3a. Table cells with escapable prefixes after edits
25540 "modes": ["selser"],
25541 "scrubWikitext": true,
25543 [ "table tbody tr:first-child td:first-child", "remove"]
25557 3b. Table cells with escapable prefixes after edits
25560 "modes": ["selser"],
25561 "scrubWikitext": true,
25563 [ "table tbody tr:first-child td:first-child", "html", "-" ],
25570 |<span id="x">foo</span>+
25579 # FIXME: This test will fail because
25580 # normalization doesn't realize that the id attribute
25581 # will eliminate the escapable scenario
25583 4a. Table cells without escapable prefixes after edits
25586 "modes": ["selser"],
25587 "scrubWikitext": true,
25589 [ "#x", "html", "-" ]
25602 ## This tests normalizer's ability to discriminate between
25603 ## cells having identical content.
25605 4b. Table cells without escapable prefixes after edits
25608 "modes": ["selser"],
25609 "scrubWikitext": true,
25611 [ "td", "html", "-" ]
25624 ## This tests normalizer's ability to not be tripped by
25625 ## comments (and whitespace)
25627 4c. Table cells without escapable prefixes after edits
25630 "modes": ["selser"],
25631 "scrubWikitext": true,
25633 [ "table tbody tr td:first-child", "remove" ]
25648 ## This tests normalizer's ability to handle HTML cells
25650 4d. Table cells without escapable prefixes after edits
25653 "modes": ["selser"],
25654 "scrubWikitext": true,
25656 [ "td", "html", "-" ]
25661 <tr><td>a</td></tr>
25665 <tr><td>-</td></tr>
25669 # ---------------------------------------------------
25670 # End of tests spec'ing wikitext serialization norms |
25671 # ---------------------------------------------------
25673 # -----------------------------------------------------------------
25674 # End of section for Parsoid-only html2wt tests for serialization
25676 # -----------------------------------------------------------------
25678 # -----------------------------------------------------------------
25679 # The following section of tests are primarily to spec behavior of
25680 # the selective serializer. All these tests have manual selser
25681 # changes. The automated selser changes for all tests handle the
25682 # wide variation of changes, but these tests here capture specs
25683 # deterministically.
25684 # ----------------------------------------------------------------
25688 Selser: New comments should not be lost
25691 "modes": ["selser"],
25693 [ "#a", "after", "<!--c1-->" ],
25694 [ "#b", "before", "<!--c2-->" ]
25698 <span id="a">a</span>
25700 <span id="b">b</span>
25702 <span id="a">a</span><!--c1-->
25704 <!--c2--><span id="b">b</span>
25709 Selser: Check for validity of DSR before using it
25712 "modes": ["selser"],
25714 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
25718 <span id="a">a</span>
25720 {{DISPLAYTITLE:foo}}
25721 <span id="a">a</span>
25725 1. DOMDiff: Changes to <ref> content should be looked up using id
25728 "modes": ["selser"],
25730 ["#X", "after", "bar"],
25731 ["#Y", "after", "baz"]
25735 X <ref><span id="X">foo</span></ref>
25738 <ref name="a"><span id="Y">foo</span></ref>
25741 X <ref><span id="X">foo</span>bar</ref>
25744 <ref name="a"><span id="Y">foo</span>baz</ref>
25749 2. DOMDiff: Changes to <ref> content should be looked up using id
25752 "modes": ["selser"],
25754 ["#Z", "after", "bar"]
25758 A <ref>foo bar for a</ref>
25759 B <ref group="X" name="b" />
25763 <references group="X">
25764 <ref name="b"><span id="Z">foo</span></ref>
25767 A <ref>foo bar for a</ref>
25768 B <ref group="X" name="b" />
25772 <references group="X">
25773 <ref name="b"><span id="Z">foo</span>bar</ref>