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.
2069 preformatted text.</p>
2070 <pre>This is preformatted text.
2075 Space before tab needs nowiki pre protection
2081 <nowiki> </nowiki> a
2085 Ident preformatting with inline content
2096 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2113 Regression with preformatted in <center>
2127 Bug 52763: Preformatted in <blockquote>
2133 indented cell (no pre-wrapping!)
2143 <p> indented cell (no pre-wrapping!)
2151 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2168 Bug 15491: <ins>/<del> in blockquote
2171 Foo <del>bar</del> <ins>baz</ins> quux
2175 <p>Foo <del>bar</del> <ins>baz</ins> quux
2181 # Note that the p-wrapping is newline sensitive, which could be
2182 # considered a bug: tidy will wrap only the 'Foo' in the example
2183 # below in a <p> tag. (see comment 23-25 of bug #6200)
2185 Bug 15491: <ins>/<del> in blockquote (2)
2187 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2190 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2196 <del>bar</del> <ins>baz</ins> quux</blockquote>
2200 <pre> with attributes (bug 3202)
2202 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2204 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2209 <pre> with width attribute (bug 3202)
2211 <pre width="8">Narrow screen goodies</pre>
2213 <pre width="8">Narrow screen goodies</pre>
2218 <pre> with forbidden attribute (bug 3202)
2220 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2222 <pre width="8">Narrow screen goodies</pre>
2227 Entities inside <pre>
2236 <pre> with forbidden attribute values (bug 3202)
2238 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2240 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2245 <nowiki> inside <pre> (bug 13238)
2253 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2261 <pre><nowiki>Foo</nowiki></pre>
2266 <nowiki> and <pre> preference (first one wins)
2295 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2297 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2300 <p><span typeof="mw:Nowiki">
2309 </pre> inside nowiki
2311 <nowiki></pre></nowiki>
2317 # Parsoid doesn't strip empty tags, like Tidy does.
2319 Empty pre; pre inside other HTML tags (bug 54946)
2321 parsoid=wt2html,wt2wt
2352 HTML pre followed by indent-pre
2362 # Note that tidy removes the empty <p> tags from the start and end.
2363 # Parsoid does not, by design.
2367 <p><pre>foo</pre></p>
2373 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2377 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2385 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2395 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2407 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2428 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2432 {{echo| foo}}{{echo| bar}}
2437 {{echo|<!--cmt--> foo}}
2439 <!--cmt-->{{echo| foo}}
2441 {{echo|{{echo| }}bar}}
2459 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2496 Pres with newline attributes
2501 <pre class="one two">hi</pre>
2505 two" data-parsoid='{"stx":"html"}'>hi</pre>
2509 Things that look like <pre> tags aren't treated as such
2511 Barack Obama <President> of the United States
2512 <President></President>
2514 <p>Barack Obama <President> of the United States
2515 <President></President>
2519 ## PHP parser discards the "<pre " string
2521 Handle broken pre-like tags (bug 64025)
2525 {{echo|<pre <pre>x</pre>}}
2527 <table><pre </table>
2530 <table><pre></pre></table>
2533 <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>
2542 Parsoid: handle pre with space after attribute
2546 <pre style="width:50%;" >{{echo|foo}}</pre>
2548 <pre style="width:50%;">{{echo|foo}}</pre>
2551 <pre style="width:50%;">{{echo|foo}}</pre>
2554 # TODO / maybe: fix wt2wt for this
2556 Parsoid: Don't paragraph-wrap fosterable content
2582 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2610 #--------------------------------------------------------------------
2611 # Transclusion parameter whitespace stripping tests
2612 # Behavior is different for positional and named parameters
2613 #--------------------------------------------------------------------
2615 Templates: Strip leading and trailing whitespace from named-param values
2619 {{echo|1= {{echo|b}} }}
2632 <ul><li> d</li></ul>
2637 Templates: Don't strip whitespace from positional-param values
2641 {{echo|{{echo|b}} }}
2673 <ul><li> f</li></ul>
2681 Templates: Handle empty comment-and-ws-only lines correctly
2684 <!--should be ignored-->
2685 <!--should be ignored as well-->
2694 Templates: Handle comments in the target
2697 <!-- should be ignored -->
2700 {{echo<!-- should be ignored -->
2703 {{echo<!-- should be ignored -->|foo}}
2705 {{<!-- should be ignored -->echo|foo}}
2707 <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>
2709 <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>
2711 <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>
2713 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2717 Templates: Handle comments in parameter names (bug 67657)
2720 <!-- should be ignored -->
2724 <!-- should be ignored -->
2727 {{echo|1<!-- should be ignored --> = foo}}
2729 {{echo|<!-- should be ignored -->1 = foo}}
2731 <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>
2733 <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>
2735 <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>
2737 <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>
2741 Templates: Other wikitext in parameter names (bug 67657)
2745 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2751 #--------------------------------------------------------------------
2752 # Transclusion parameter escaping tests
2753 #--------------------------------------------------------------------
2755 Templates: Parsoid parameter escaping test 1
2757 {{echo|[foo]|{{echo|[bar]}}}}
2761 <p about="#mwt1" typeof="mw:Transclusion"
2762 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2766 Parsoid: Pipes in external links in template parameter
2768 {{echo|[{{echo|http://example.com}} link]}}
2770 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2772 <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>
2776 Parsoid: pipe in transclusion parameter
2778 {{echo|http://foo.com/a|b}}
2780 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2782 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2783 typeof="mw:Transclusion"
2784 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>
2788 Parsoid: Pipe in external link target and content in template parameter
2790 parsoid=html2wt,wt2wt
2792 {{echo|[http://foo.com/a|b a|b]}}
2794 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2796 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2797 typeof="mw:Transclusion"
2798 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2799 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2803 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2807 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2809 <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>
2813 Templates: Don't escape already nowiki-escaped text in template parameters
2815 parsoid=html2wt,wt2wt
2817 {{echo|foo<nowiki>|</nowiki>bar}}
2818 {{echo|<nowiki><div></nowiki>}}
2819 {{echo|<nowiki></nowiki>}}
2821 <p>foo|bar <div></p>
2823 <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>
2824 <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>
2825 <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>
2831 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2833 parsoid=html2wt,wt2wt
2835 {{echo|{{echo|1=bar}}}}
2839 <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>
2844 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2850 <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>
2855 Templates: Preserve blank parameter names
2861 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2865 Templates: Preserve blank parameter names in other positions
2867 {{blank_param|bar|=foo}}
2871 <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
2876 ### Parsoid-centric tests for testing RT edge cases for pre
2880 1a. Indent-Pre and Comments
2893 1b. Indent-Pre and Comments
2906 1c. Indent-Pre and Comments
2919 1d. Indent-Pre and Comments
2920 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2933 2a. Indent-Pre and tables
2954 2b. Indent-Pre and tables
2970 2c. Indent-Pre and tables (bug 42252)
2987 2d. Indent-Pre and tables
3004 <tbody><tr><td> b</td></tr>
3009 2e. Indent-Pre and table-line syntax
3022 2f. Indent-pre started by table-line syntax
3041 3a. Indent-Pre and block tags (single-line html)
3045 c <blockquote> foo </blockquote>
3050 c <blockquote> foo </blockquote>
3051 <pre><span> foo </span>
3054 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3055 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3056 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3057 <pre><span> foo </span>
3074 3b. Indent-Pre and block tags (multi-line html)
3079 <pre>a <span>foo</span>
3084 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3085 b <div data-parsoid='{"stx":"html"}'> foo </div>
3095 3c. Indent-Pre and block tags (pre-content on separate line)
3159 4. Indent-Pre and extension tags
3165 a <ul class="gallery mw-gallery-traditional">
3166 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3167 <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>
3168 <div class="gallerytext">
3175 <ul class="gallery mw-gallery-traditional">
3176 <li class="gallerybox" style="width: 155px">
3177 <div style="width: 155px">
3178 <div class="thumb" style="width: 150px;">
3179 <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>
3181 <div class="gallerytext"></div>
3188 Table wikitext syntax outside wiki-tables
3191 ! not a table heading
3194 | class="foo bar" | baz
3201 ! not a table heading
3204 | class="foo bar" | baz
3213 Render paragraphs when indent-pre is suppressed in blocklevels
3230 4. Multiple spaces at start-of-line
3248 ## NOTE: the leading white-space chars on empty line are significant
3250 5a. White-space in indent-pre
3262 ## NOTE: the leading white-space chars on empty line are significant
3264 5b. White-space in indent-pre
3283 5c. White-space in indent-pre
3296 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3319 7a. Indent-pre and category links
3321 parsoid=wt2html,wt2wt
3323 [[Category:foo]] <!-- No pre-wrapping -->
3324 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3327 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3328 <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 -->
3332 7b. Indent-pre and category links
3334 parsoid=wt2html,wt2wt
3337 [[Category:foo]] {{echo|b}}
3339 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3340 <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>
3344 Indent-Pre: Newlines in comments shouldn't affect sol state
3358 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3362 HTML-pre: 1. embedded newlines
3397 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3399 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3403 <pre data-parsoid='{"stx":"html"}'>
3408 <pre data-parsoid='{"stx":"html"}'>
3416 HTML-pre: big spaces
3452 <pre data-parsoid='{"stx":"html"}'>
3471 HTML-pre: 2: indented text
3484 HTML-pre: 3: other wikitext
3503 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3512 ### Definition lists
3519 <dl><dt> name </dt>
3520 <dd> Definition</dd></dl>
3525 Definition list for indentation only
3529 <dl><dd> Indented text</dd></dl>
3534 Definition list with no space
3539 <dd>Definition</dd></dl>
3544 Definition list with URL link
3546 ; http://example.com/ : definition
3548 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3549 <dd> definition</dd></dl>
3554 Definition list with bracketed URL link
3556 ;[http://www.example.com/ Example]:Something about it
3558 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3559 <dd>Something about it</dd></dl>
3564 Definition list with wikilink containing colon
3566 ; [[Help:FAQ]]: The least-read page on Wikipedia
3568 <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>
3569 <dd> The least-read page on Wikipedia</dd></dl>
3573 # At Brion's and JeLuF's insistence... :)
3575 Definition list with news link containing colon
3577 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3579 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3580 <dd> This isn't even a real newsgroup!</dd></dl>
3583 <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>
3587 Malformed definition list with colon
3589 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3591 <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>
3596 Definition lists: colon in external link text
3598 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3600 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3601 <dd> OK, I made that up</dd></dl>
3606 Definition lists: colon in HTML attribute
3608 ;<b style="display: inline">bold</b>
3610 <dl><dt><b style="display: inline">bold</b></dt></dl>
3615 Definition lists: self-closed tag
3617 ;one<br/>two : two-line fun
3619 <dl><dt>one<br />two </dt>
3620 <dd> two-line fun</dd></dl>
3625 Bug 11748: Literal closing tags
3629 <dd>test test test test test</dd>
3631 <dd>test test test test test</dd>
3636 <dd>test test test test test</dd>
3638 <dd>test test test test test</dd>
3644 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3647 ; term : description
3652 <dl><dt> term </dt>
3653 <dd> description</dd></dl>
3654 <ul><li> unordered</li></ul>
3661 Definition list with empty definition and following paragraph
3673 Nested definition lists using html syntax
3682 Definition Lists: No nesting: Multiple dd's
3695 Definition Lists: Indentation: Regular
3703 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3708 Definition Lists: Indentation: Missing 1st level
3714 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3719 Definition Lists: Indentation: Multi-level indent
3723 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3728 Definition Lists: Hacky use to indent tables
3735 should be left alone
3737 <dl><dd><dl><dd><table>
3742 </td></tr></table></dd></dl></dd></dl>
3744 should be left alone
3749 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3757 should be left alone
3760 <dl><dd><dl><dd><table><tr>
3763 </tr></table><!-- bar --></dd></dl></dd></dl>
3765 should be left alone</p>
3769 Definition Lists: Hacky use to indent tables, with comment before table
3775 <dl><dd><dl><dd><!-- foo --><table><tr>
3777 </tr></table></dd></dl></dd></dl>
3780 # The trailing whitespace in this test is to catch a regression in
3781 # Parsoid after T54473.
3783 Definition Lists: Hacky use to indent tables (WS-insensitive)
3792 </td></tr></table></dd></dl>
3796 <tbody><tr><td>a</td></tr>
3797 </tbody></table> </dd></dl>
3800 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3801 ## as an empty dt item. It also ignores all but the last ";" when followed
3802 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3803 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3806 ## Ex: ";;t2 ::d2" is transformed into:
3818 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3819 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3830 ## All Parsoid only definition list tests have this difference.
3832 ## See also: https://phabricator.wikimedia.org/T8569
3833 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3836 Table / list interaction: indented table with lists in table contents
3851 <ul><li> b</li></ul>
3855 <ul><li> d</li></ul>
3856 </td></tr></table></dd></dl>
3861 Table / list interaction: lists nested in tables nested in indented lists
3884 </td></tr></table></dd></dl>
3891 Definition Lists: Nesting: Multi-level (Parsoid only)
3921 Definition Lists: Nesting: Test 2 (Parsoid only)
3948 Definition Lists: Nesting: Test 3 (Parsoid only)
3991 Definition Lists: Nesting: Test 4
3996 <dl><dd><dl><dd><dl><dt>t3</dt>
3997 <dd>d3</dd></dl></dd></dl></dd></dl>
4002 ## The Parsoid team believes the following three test exposes a
4003 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4004 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4005 ## It also exposes a "misfeature" in tidy, which doesn't like
4006 ## <dl> tags with a single <dt> child; it converts the <dt> into
4007 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4009 Definition Lists: Mixed Lists: Test 1
4015 <dl><dd><dl><dt><ul><li> foo</li>
4016 <li> bar</li></ul></dt></dl>
4017 <dl><dt> baz</dt></dl></dd></dl>
4052 Definition Lists: Mixed Lists: Test 2
4057 <ul><li><dl><dd> d1</dd>
4058 <dd> d2</dd></dl></li></ul>
4064 Definition Lists: Mixed Lists: Test 3
4069 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4070 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4076 Definition Lists: Mixed Lists: Test 4
4081 <ul><li><dl><dt>d1 </dt>
4084 <dd>d4</dd></dl></li></ul>
4090 Definition Lists: Mixed Lists: Test 5
4096 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4102 Definition Lists: Mixed Lists: Test 6
4107 <ol><li><ul><li><dl><dd>d1
4108 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4114 Definition Lists: Mixed Lists: Test 7
4119 <dl><dd><ul><li> d1</li>
4120 <li> d2</li></ul></dd></dl>
4126 Definition Lists: Mixed Lists: Test 8
4131 <dl><dd><ul><li> d1</li></ul>
4132 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4138 Definition Lists: Mixed Lists: Test 9
4142 <ul><li><dl><dt>foo </dt>
4143 <dd>bar</dd></dl></li></ul>
4149 Definition Lists: Mixed Lists: Test 10
4153 <ul><li><ol><li><dl><dt>foo </dt>
4154 <dd>bar</dd></dl></li></ol></li></ul>
4158 # The Parsoid team disagrees with the PHP parser's seemingly-random
4159 # rules regarding dd/dt on the next two tests. Parsoid is more
4160 # consistent, and recognizes the shared nesting and keeps the
4161 # still-open tags around until the nesting is complete.
4162 # (And tidy again converts <dt> to <dd> before 'bar'.)
4165 Definition Lists: Mixed Lists: Test 11
4170 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4171 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4172 <dl><dt>boo </dt>
4173 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4228 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4229 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4233 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4234 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4243 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4245 # * The test is wrong, there are two colons where there should be :;
4246 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4248 Definition Lists: Weird Ones: Test 1
4250 *#;*::;; foo : bar (who uses this?)
4252 <ul><li><ol><li><dl><dt> foo </dt>
4253 <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>
4272 <dt>bar (who uses this?)</dt>
4304 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4305 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4317 Definition Lists: colons occurring in tags
4335 <dt><span>a:b</span></dt>
4362 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4364 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4365 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4366 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4367 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4369 <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>
4370 <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>
4371 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4375 Definition Lists: colons and tables 1
4387 </td></tr></table></dd></dl>
4391 </td></tr></table></dd></dl>
4395 # Parsoid's output (as documented below) differs from php's in this case.
4396 # This is probably a bug. If we fixup parsoid to match php's output, the
4397 # above test should pass and the below test case can be removed. It is
4398 # unclear which output is more desirable.
4401 Definition Lists: colons and tables 2
4413 </td></tr></table></dd>
4417 </td></tr></table></dd></dl>
4421 Definition Lists: template interaction
4423 ::{{definition_list}}
4426 ::{{definition_list}}
4431 <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">
4432 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4434 <dl><dd data-parsoid='{}'>one
4435 <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">
4436 </span><dd about="#mwt2">two
4438 <dd>three</dd></dl></dd>
4439 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4447 External links: non-bracketed
4449 Non-bracketed: http://example.com
4451 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4455 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4457 External links: numbered
4459 Numbered: [http://example.com]
4460 Numbered: [http://example.net]
4461 Numbered: [http://example.com]
4463 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4464 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4465 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4468 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4469 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4470 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4474 External links: specified text
4476 Specified text: [http://example.com link]
4478 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4483 External links: trail
4485 Linktrails should not work for external links: [http://example.com link]s
4487 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4492 External links: dollar sign in URL
4494 http://example.com/1$2345
4496 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4500 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4502 External links: dollar sign in URL (autonumber)
4504 [http://example.com/1$2345]
4506 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4509 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4513 External links: open square bracket forbidden in URL (bug 4377)
4515 parsoid=wt2html,wt2wt,html2html
4517 http://example.com/1[2345
4519 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4522 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4526 External links: open square bracket forbidden in URL (named) (bug 4377)
4528 parsoid=wt2html,html2html
4530 [http://example.com/1[2345]
4532 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4535 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4538 # parsoid adds a space before the link name
4540 External links: open square bracket forbidden in URL (named) (bug 4377)
4543 [http://example.com/1 [2345]
4545 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4550 External links: nowiki in URL link text (bug 6230)
4552 [http://example.com/ <nowiki>''example site''</nowiki>]
4554 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4559 External links: newline forbidden in text (bug 6230 regression check)
4561 [http://example.com/ first
4564 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4570 External links: Pipe char between url and text
4572 [http://example.com | link]
4574 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4579 External links: protocol-relative URL in brackets
4581 [//example.com/ Test]
4583 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4587 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4589 External links: protocol-relative URL in brackets without text
4593 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4596 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4600 External links: protocol-relative URL in free text is left alone
4604 <p>//example.com/Foo
4609 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4611 foo//example.com/Foo
4613 <p>foo//example.com/Foo
4618 External links: with no contents
4620 [http://en.wikipedia.org/wiki/Foo]
4622 [[wikipedia:Foo|Bar]]
4624 [[wikipedia:Foo|<span>Bar</span>]]
4626 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4627 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4628 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4631 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4632 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4633 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4637 External links: Free with trailing punctuation
4647 http://example.com/url_with_(brackets)
4648 (http://example.com/url_without_brackets)
4649 http://example.com/url_with_entity&
4650 http://example.com/url_with_entity&
4651 http://example.com/url_with_entity&
4652 http://example.com/url_with_entity
4653 http://example.com/url_with_entity 
4654 http://example.com/url_with_entity 
4655 http://example.com/url_with_entity<
4656 http://example.com/url_with_entity<
4657 http://example.com/url_with_entity<
4659 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4660 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4661 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4662 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4663 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4664 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4665 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4666 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4667 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4668 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4669 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4670 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4671 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4672 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4673 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4674 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4675 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4676 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4677 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4680 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4681 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4682 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4683 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4684 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4685 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4686 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4687 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4688 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4689 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4690 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4691 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4692 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4693 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4694 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4695 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4699 External links: Lone protocols are never linked (T105697)
4718 External links: No preceding word characters allowed (bug 65278)
4720 NOPEhttp://example.com
4721 N0http://example.com
4722 ok:http://example.com
4723 ok-http://example.com
4725 <p>NOPEhttp://example.com
4726 N0http://example.com
4727 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4728 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4735 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4737 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4742 External image from https
4744 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4746 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4751 External image (when not allowed)
4753 wgAllowExternalImages=0
4755 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4757 <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>
4762 Link to non-http image, no img tag
4764 Link to non-http image, no img tag: ftp://example.com/test.jpg
4766 <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>
4771 External links: terminating separator
4773 Terminating separator: http://example.com/thing,
4775 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4780 External links: intervening separator
4782 Intervening separator: http://example.com/1,2,3
4784 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4789 External links: old bug with URL in query
4791 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4793 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4798 External links: old URL-in-URL bug, mixed protocols
4800 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4802 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4807 External links: URL in text
4809 URL in text: [http://example.com http://example.com]
4811 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4816 External links: Clickable images
4818 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4820 <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>
4823 <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>
4827 External links: raw ampersand
4829 Old & use: http://x&y
4831 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4836 External links: encoded ampersand
4838 Old & use: http://x&y
4840 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4843 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4847 External links: encoded equals (bug 6102)
4849 http://example.com/?foo=bar
4851 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4854 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4858 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4859 ## does it number them. As discussed in bug 53505, we can identify
4860 ## autonumbered links via CSS.
4864 External links: [raw ampersand]
4866 Old & use: [http://x&y]
4868 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4871 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4874 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4875 # mode will return the [raw ampersand] wikitext
4877 External links: [encoded ampersand]
4879 parsoid=wt2html,wt2wt,html2html
4881 Old & use: [http://x&y]
4883 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4886 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4890 External links: [raw equals]
4892 [http://example.com/?foo=bar]
4894 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4897 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4900 # note that parsoid html is identical to [raw equals] case; so html2wt
4901 # mode will return the [raw equals] wikitext
4903 External links: [encoded equals] (bug 6102)
4905 parsoid=wt2html,wt2wt,html2html
4907 [http://example.com/?foo=bar]
4909 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4912 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4915 # xxx parsoid strips the IDN character, so the round-trip tests will
4916 # obviously fail and are disabled. --cscott
4918 External links: [IDN ignored character reference in hostname; strip it right off]
4920 parsoid=wt2html,wt2wt,html2html
4922 [http://e‌xample.com/]
4924 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4927 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4930 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4931 # Where an external link could easily circumvent the sanitization of the text of
4932 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4933 # test demands a higher standard. That's a bit strange.
4937 # http://example.com -> [http://example.com|http://example.com]
4938 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4940 # The first example is sanitized, but the second is not. Any security benefits
4941 # from this production are trivial to circumvent. Either remove this test and
4942 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4943 # the test accordingly.
4947 # xxx parsoid strips the IDN character, so the round-trip tests will
4948 # obviously fail and are disabled. --cscott
4950 External links: IDN ignored character reference in hostname; strip it right off
4952 parsoid=wt2html,html2html
4954 http://e‌xample.com/
4956 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4959 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4963 External links: www.jpeg.org (bug 554)
4967 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4971 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4973 External links: URL within URL (original bug 2)
4975 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4977 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4980 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4984 BUG 361: URL inside bracketed URL
4986 [http://www.example.com/foo http://www.example.com/bar]
4988 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4993 BUG 361: URL within URL, not bracketed
4995 http://www.example.com/foo?=http://www.example.com/bar
4997 <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>
5002 BUG 289: ">"-token in URL-tail
5004 http://www.example.com/<hello>
5006 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5011 BUG 289: literal ">"-token in URL-tail
5013 http://www.example.com/<b>html</b>
5015 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5018 <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>
5022 BUG 289: ">"-token in bracketed URL
5024 [http://www.example.com/<hello> stuff]
5026 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5031 BUG 289: literal ">"-token in bracketed URL
5033 [http://www.example.com/<b>html</b> stuff]
5035 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5040 BUG 289: literal double quote at end of URL
5042 http://www.example.com/"hello"
5044 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5049 BUG 289: literal double quote in bracketed URL
5051 [http://www.example.com/"hello" stuff]
5053 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5058 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5060 [http://www.example.com test]
5062 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5067 External links: link text with spaces
5069 [http://www.example.com a b c]
5070 [http://www.example.com ''a'' ''b'']
5072 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5073 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5078 External links: wiki links within external link (Bug 3695)
5080 [http://example.com [[wikilink]] embedded in ext link]
5082 <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>
5085 <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>
5089 BUG 787: Links with one slash after the url protocol are invalid
5093 [http:/example.com title]
5095 <p>http:/example.com
5096 </p><p>[http:/example.com title]
5101 Bracketed external links with template-generated invalid target
5103 [{{echo|http:/example.com}} title]
5105 <p>[http:/example.com title]
5110 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5112 ''[http://example.com text'']
5113 [http://example.com '''text]'''
5114 ''Something [http://example.com in italic'']
5115 ''Something [http://example.com mixed''''', even bold]'''
5116 '''''Now [http://example.com both''''']
5118 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5119 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5120 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5121 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5122 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5128 Bug 4781: %26 in URL
5130 http://www.example.com/?title=AT%26T
5132 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5135 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5138 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5139 # % is actually legal in HTML5. Any change in output would need testing though.
5141 Bug 4781, 5267: %25 in URL
5143 http://www.example.com/?title=100%25_Bran
5145 <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>
5148 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5152 Bug 4781, 5267: %28, %29 in URL
5154 http://www.example.com/?title=Ben-Hur_%281959_film%29
5156 <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>
5159 <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>
5164 Bug 4781: %26 in autonumber URL
5166 [http://www.example.com/?title=AT%26T]
5168 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5171 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5175 Bug 4781, 5267: %26 in autonumber URL
5177 [http://www.example.com/?title=100%25_Bran]
5179 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5182 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5186 Bug 4781, 5267: %28, %29 in autonumber URL
5188 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5190 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5193 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5198 Bug 4781: %26 in bracketed URL
5200 [http://www.example.com/?title=AT%26T link]
5202 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5205 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5209 Bug 4781, 5267: %25 in bracketed URL
5211 [http://www.example.com/?title=100%25_Bran link]
5213 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5218 Bug 4781, 5267: %28, %29 in bracketed URL
5220 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5222 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5225 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5229 External link containing a period in the anchor. (bug 63947)
5231 [//foo.org/bar#baz. bang]
5233 [//foo.org/bar. bang]
5235 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5236 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5239 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5240 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5244 External link containing a single quote. (bug 63947)
5248 [//foo.org/bar'baz bang]
5250 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5251 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5254 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5255 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5259 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5261 Some [http://example.com/ pretty ''italics'' and stuff]!
5263 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5268 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5270 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5272 <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>
5277 External link containing double-single-quotes with no space separating the url from text in italics
5279 [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]].]
5281 <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>
5284 <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>
5286 <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>
5290 External link with comments in link text
5292 [http://www.google.com Google <!-- comment -->]
5294 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5297 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5301 External link to bare IPv4 address
5303 [http://192.168.0.1 Link]
5305 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5308 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5312 URL-encoding in URL functions (single parameter)
5314 {{localurl:Some page|amp=&}}
5316 <p>/index.php?title=Some_page&amp=&
5321 URL-encoding in URL functions (multiple parameters)
5323 {{localurl:Some page|q=?&=&}}
5325 <p>/index.php?title=Some_page&q=?&amp=&
5332 http://example.com/index.php?foozoid%5B%5D=bar
5334 http://example.com/index.php?foozoid[]=bar
5336 <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>
5337 </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>
5340 <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>
5342 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5346 IPv6 urls, autolink format (T23261)
5348 http://[2404:130:0:1000::187:2]/index.php
5350 Examples from RFC 2373, section 2.2:
5351 * http://[1080::8:800:200C:417A]/unicast
5352 * http://[FF01::101]/multicast
5353 * http://[::1]/loopback
5354 * http://[::]/unspecified
5355 * http://[::13.1.68.3]/ipv4compat
5356 * http://[::FFFF:129.144.52.38]/ipv4compat
5358 Examples from RFC 2732, section 2:
5359 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5360 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5361 * http://[3ffe:2a00:100:7031::1]
5362 * http://[1080::8:800:200C:417A]/foo
5363 * http://[::192.9.5.5]/ipng
5364 * http://[::FFFF:129.144.52.38]:80/index.html
5365 * http://[2010:836B:4179::836B:4179]
5368 <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>
5369 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5371 <ul><li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5372 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5373 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5374 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5375 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5376 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5377 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5379 <ul><li> <a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5380 <li> <a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5381 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5382 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5383 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5384 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5385 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5388 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5390 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5391 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5392 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5393 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5394 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5395 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5396 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5398 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5399 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5400 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5401 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5402 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5403 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5404 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5405 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5409 IPv6 urls, bracketed format (T23261)
5411 [http://[2404:130:0:1000::187:2]/index.php test]
5413 Examples from RFC 2373, section 2.2:
5414 * [http://[1080::8:800:200C:417A] unicast]
5415 * [http://[FF01::101] multicast]
5416 * [http://[::1]/ loopback]
5417 * [http://[::] unspecified]
5418 * [http://[::13.1.68.3] ipv4compat]
5419 * [http://[::FFFF:129.144.52.38] ipv4compat]
5421 Examples from RFC 2732, section 2:
5422 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5423 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5424 * [http://[3ffe:2a00:100:7031::1] 3]
5425 * [http://[1080::8:800:200C:417A]/foo 4]
5426 * [http://[::192.9.5.5]/ipng 5]
5427 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5428 * [http://[2010:836B:4179::836B:4179] 7]
5431 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5432 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5434 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5435 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5436 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5437 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5438 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5439 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5440 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5442 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5443 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5444 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5445 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5446 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5447 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5448 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5451 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5453 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5454 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5455 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5456 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5457 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5458 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5459 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5461 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5462 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5463 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5464 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5465 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5466 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5467 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5468 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5472 Non-extlinks in brackets
5481 [{{echo|foo}} ''bar'']
5482 [{{echo|foo}}l's] errand
5483 [{{echo|foo}}l's errand]
5485 [url=http://example.com]
5486 [http:// bare protocols don't count]
5499 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5500 [http:// bare protocols don't count]
5508 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5509 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5510 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5511 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5512 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5513 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5514 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5515 [http:// bare protocols don't count]</p>
5519 Percent encoding in external links
5521 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5523 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5526 <p><a rel="mw:ExtLink"
5527 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5531 Use url link syntax for links where the content is equal the link target
5535 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5538 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5542 Parenthesis in external links, especially URL links
5546 http://example.com/test)
5548 http://example.com/(test)
5550 http://example.com/((test)
5552 (http://example.com/(test))
5554 (http://example.com/(test)))))
5556 http://example.com/a)b
5558 [http://example.com) foo]
5560 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5561 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5562 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5563 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5564 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5565 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5566 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5567 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5570 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5571 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5572 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5573 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5574 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5575 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5576 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5577 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5581 Parenthesis in external links, w/ transclusion or comment
5583 (http://example.com/{{echo|hi}})
5585 (http://example.com<!-- hi -->)
5587 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5588 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5591 <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>
5593 <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>
5597 Serialize <a> tags with invalid link targets as plain text
5601 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5602 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5603 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5604 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5607 <nowiki>*</nowiki>text
5608 <nowiki>[[foo]]</nowiki>
5609 <nowiki>*a [[foo]]</nowiki>
5613 mw:ExtLink -vs- mw:WikiLink (T94723)
5617 <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>
5618 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5619 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5620 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5622 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5623 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5628 [[wikipedia:Foo|Bar]]
5629 [[wikipedia:Foo|Bar]]
5631 [[wikipedia:European_Robin|European Robin]]
5632 [[wikipedia:European_Robin|European Robin]]
5636 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5640 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5642 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5653 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5655 Normal text. '''''Bold italic text.''''' Normal text.
5657 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5658 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5663 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5664 # parser strips. The wikitext contains just the first half of the bold
5667 Unclosed and unmatched quotes
5669 '''''Bold italic text '''with bold deactivated''' in between.'''''
5671 '''''Bold italic text ''with italic deactivated'' in between.'''''
5675 ..spanning two paragraphs (should not work).'''
5677 '''Bold tag left open
5679 ''Italic tag left open
5683 <!-- Unmatching number of opening, closing tags: -->
5684 '''This year''''s election ''should'' beat '''last year''''s.
5686 ''Tom'''s car is bigger than ''Susan'''s.
5688 Plain ''italic'''s plain
5690 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5691 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5692 </p><p><b>Bold text..</b>
5693 </p><p>..spanning two paragraphs (should not work).
5694 </p><p><b>Bold tag left open</b>
5695 </p><p><i>Italic tag left open</i>
5697 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5698 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5699 </p><p>Plain <i>italic'</i>s plain
5702 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5703 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5704 </p><p><b>Bold text..</b>
5705 </p><p>..spanning two paragraphs (should not work).<b></b>
5706 </p><p><b>Bold tag left open</b>
5707 </p><p><i>Italic tag left open</i>
5710 <!-- Unmatching number of opening, closing tags: -->
5711 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5712 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5713 </p><p>Plain <i>italic'</i>s plain
5720 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5723 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5724 # is the bare minimum required by the spec, see:
5725 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5726 # Parsoid team replies: empty table tags are legal in HTML5
5728 A table with no data.
5741 A table with stray table end tags on start tag line (wt2html)
5745 {|style="color: red;"|}
5747 {|style="color: red;" |}
5751 {|style="color: red;"|} id="foo"
5755 {|style="color: red;" |} id="foo"
5759 <table style="color: red;"></table>
5761 <table style="color: red;">
5767 <table style="color: red;" id="foo">
5773 <table style="color: red;" id="foo">
5782 A table with no data (take 2)
5790 # A table with nothing but a caption is invalid XHTML, we might want to render
5791 # this as <p>caption</p>
5792 # Parsoid team replies: table with only a caption is legal in HTML5
5794 A table with nothing but a caption
5802 </caption><tr><td></td></tr></table>
5805 <table><caption> caption</caption></table>
5809 A table with caption with default-spaced attributes and a table row
5812 |+ style="color: red;" | caption1
5818 <caption style="color: red;"> caption1
5827 A table with captions with non-default spaced attributes and a table row
5830 |+style="color: red;"|caption2
5831 |+ style="color: red;"| caption3
5837 <caption style="color: red;">caption2
5839 <caption style="color: red;"> caption3
5848 Table td-cell syntax variations
5852 | foo bar foo || baz
5853 | style='color:red;' | baz
5854 | style='color:red;' || baz
5861 <td> foo bar foo </td>
5864 <td style="color:red;"> baz
5866 <td> style='color:red;' </td>
5894 Simple table but with multiple dashes for row wikitext
5913 Multiplication table
5915 {| border="1" cellpadding="2"
5916 |+Multiplication table
5918 ! × !! 1 !! 2 !! 3
5936 <table border="1" cellpadding="2">
5937 <caption>Multiplication table
5984 Accept "||" in table headings
5999 Accept "!!" in table data
6013 <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>
6018 Accept "||" in indented table headings
6028 </th></tr></table></dd></dl>
6033 Accept "!!" in templates
6047 <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>
6051 Accept "!!" in table headings after newline
6068 <p>b!!c</p></th></tr>
6073 Accept "!!" in table data of mixed wikitext / html syntax
6077 <tr><td>b!!c</td></tr>
6090 <tbody><tr><th>a</th></tr>
6091 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6096 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6113 Accept "| !" at start of line in tables (ignore !-attribute)
6117 | !style="color:red" | bar
6129 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 +/-
6133 |style='color:red;'|+1
6134 |style='color:blue;'|-1
6146 <td style="color:red;">+1
6148 <td style="color:blue;">-1
6172 |rowspan=2| Cell 2, row 1 (and 2)
6183 <td rowspan="2"> Cell 2, row 1 (and 2)
6201 {| bgcolor=#ABCDEF border=2
6206 |the original table again
6214 <table bgcolor="#ABCDEF" border="2">
6222 <td>the original table again
6228 Invalid attributes in table cell (bug 1830)
6242 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6246 | title="foo<nowiki>|</nowiki>" |bar
6247 | title="foo<nowiki>|</nowiki>" bar
6254 <td title="foo|">bar
6256 <td> title="foo|" bar
6261 <tbody><tr><td title="foo">bar</td>
6262 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6263 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6267 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6268 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6269 # *2wt modes will fail.
6271 Table security: embedded pipes
6273 parsoid=wt2html,html2html
6276 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6280 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6281 <td>]" onmouseover="alert(document.cookie)">test
6289 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6292 # FIXME: The output seems broken. Filed as T110268.
6294 ! and || in td attributes should not be parsed as <th>/<td>
6299 | style="color: red !important;" data-contrived="put this here ||" | foo
6304 <td> style="color: red !important;" data-contrived="put this here </td>
6310 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx_v":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6315 Indented table markup mixed with indented pre content (proposed in bug 6200)
6320 Text that should be rendered preformatted
6328 <pre>Text that should be rendered preformatted
6337 1. Template-generated table cell attributes and cell content
6342 || {{table_attribs_5}}
6343 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6344 |align=center {{table_attribs}}
6345 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6350 <td style="color:red;">Foo
6352 <td style="color:red;">Foo
6354 <td> style="color:red;"</td>
6357 <td style="color:red;">Foo
6359 <td align="center" style="color:red;">Foo
6361 <td align="center" style="color:red;">Foo
6367 2. Template-generated table cell attributes and cell content
6370 |{{table_attribs_2}}
6375 <td style="color:red;">Foo
6383 <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>
6384 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6389 3. Template-generated table cell attributes and cell content
6392 !align=center {{table_header_cells}}
6394 |align=center {{table_cells}}
6399 <th align="center" style="color:red;">Foo</th>
6400 <th style="color:red;"><i>Bar</i></th>
6401 <th style="color:brown;"><i>Foo</i> and Baz
6404 <td align="center" style="color:red;">Foo</td>
6405 <td style="color:red;"><i>Bar</i></td>
6406 <td style="color:brown;"><i>Foo</i> and Baz
6411 <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>
6412 <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>
6417 4. Template-generated table cell attributes and cell content inside a templated table
6420 !align=center {{table_header_cells}}
6422 |align=center {{table_cells}}
6427 <th align="center" style="color:red;">Foo</th>
6428 <th style="color:red;"><i>Bar</i></th>
6429 <th style="color:brown;"><i>Foo</i> and Baz
6432 <td align="center" style="color:red;">Foo</td>
6433 <td style="color:red;"><i>Bar</i></td>
6434 <td style="color:brown;"><i>Foo</i> and Baz
6438 <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}}]}'>
6439 <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>
6441 <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>
6445 ## Edge case fix to prevent future regressions
6447 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6450 |{{table_attribs_7}}
6455 <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>
6457 <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>
6461 Table with row followed by newlines and table heading
6479 Table with empty line following the start tag
6496 # FIXME: Preserve the attribute properly (with an empty string as value) in
6497 # the PHP parser. Parsoid implements the behavior below.
6499 Table attributes with empty value
6509 </td></tr></tbody></table>
6514 Wikitext table with a lot of comments
6537 Wikitext table comments represented in parsoid dom
6539 {|<!--c1--><!--c2-->
6550 <table><!--c1--><!--c2-->
6551 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6552 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6557 Wikitext table with double-line table cell
6574 Table cell with a single comment
6591 Table-cell after a comment-only-empty-line
6608 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6610 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6616 Build table with {{!}}
6618 {{{!}} class="wikitable"
6621 {{!}}- style="color:red;"
6622 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6625 <table class="wikitable">
6631 <tr style="color:red;">
6633 <td style="color:red;"> second data
6639 Build table with pipe as data
6641 {| class="wikitable"
6644 |- style="color:red;"
6645 | data || style="color:red;" | second data
6647 | style="color:red;" | data with | || style="color:red;" | second data with |
6649 || data with | ||| second data with |
6652 <table class="wikitable">
6658 <tr style="color:red;">
6660 <td style="color:red;"> second data
6663 <td style="color:red;"> data with | </td>
6664 <td style="color:red;"> second data with |
6667 <td> data with | </td>
6668 <td> second data with |
6674 Build table with wikilink
6676 {| class="wikitable"
6677 ! header || second header
6678 |- style="color:red;"
6679 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6681 | data || second data [[Main Page|link|text with pipe]]
6684 <table class="wikitable">
6689 <tr style="color:red;">
6690 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6691 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6695 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6700 # The expected HTML structure in this test is debatable. The PHP parser does
6701 # not parse this kind of table at all. The main focus for Parsoid is on
6702 # round-tripping, so this output is ok for now. TODO: revisit!
6704 Wikitext table with html-syntax row
6714 <td>foo</td></tr></tbody></table>
6717 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6718 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6719 ## PHP parser, which tidy then compounds by fostering the content
6720 ## entirely out of the table. Parsoid recognizes the table context
6721 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6722 ## depends on PHP's treatment of broken table markup!
6724 Implicit <td> after a |-
6726 parsoid=wt2html,html2html
6746 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6748 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6750 parsoid=wt2html,html2html
6783 <tr><td><pre>a</pre></td></tr>
6784 <tr><td> b</td></tr>
6789 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6790 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6792 Lists should be recognized in an implicit <td> context
6794 parsoid=wt2html,html2html
6821 Table cells not properly parsed in an implicit-td context
6825 {{table_attribs_4}} || a || b
6830 <td style="background-color:#DC241f;" width="10px"></td>
6837 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6838 <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>
6843 Parsoid: Round-trip tables directly followed by content (bug 51219)
6845 parsoid=wt2html,wt2wt
6870 Parsoid: Default to a newline after tables in new content (bug 51219)
6875 <tr><td>foo</td></tr></tbody></table> bar
6877 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6882 <nowiki> </nowiki>bar
6890 Parsoid: newline inducing block nodes don't suppress <nowiki>
6902 Parsoid: Row-syntax table headings followed by comment & table cells
6904 parsoid=wt2html,wt2wt
6908 <!-- foo --> || baz || quux
6922 <tbody><tr><th> foo </th><th> bar
6923 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6928 Parsoid: Recover better from broken table attributes
6948 <p>foo</p></td></tr>
6953 Tables: Digest broken attributes on table and tr tag
6970 Strip unsupported table tags
7018 Testing serialization after deletion of table cells
7021 "modes": ["wt2wt", "selser"],
7029 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7042 Plain link, capitalized
7046 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7051 Plain link, uncapitalized
7055 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7062 [[Main Page|The Main Page]]
7064 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7069 Piped link with comment in link text
7071 [[Main Page|The Main<!--front--> Page]]
7073 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7078 Piped link with multiple pipe characters in link text
7080 [[Main Page||The|Main|Page|]]
7082 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7085 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7093 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7098 Broken link with fragment
7100 [[Zigzagzogzagzig#zug]]
7102 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7107 Special page link with fragment
7109 [[Special:Version#anchor]]
7111 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7116 Nonexistent special page link with fragment
7118 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7120 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7127 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7129 <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>
7136 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7138 <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>!!!
7149 Bug 43661: Piped links with identical prefixes
7151 [[prefixed article|prefixed articles with spaces]]
7153 [[prefixed article|prefixed articlesaoeu]]
7155 [[Main Page|Main Page test]]
7157 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7158 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7159 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7165 Link with HTML entity in suffix / tail
7167 [[Main Page]]", [[Main Page]]a
7169 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7172 <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>
7176 Link with 3 brackets
7187 Link with 4 brackets
7191 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7196 Piped link with 3 brackets
7198 [[[main page|the main page]]]
7200 <p>[[[main page|the main page]]]
7205 Piped link with extlink-like text
7208 [[Main Page|This is a [bar]]]
7210 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7211 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7214 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7215 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7219 Link with multiple pipes
7221 [[Main Page|The|Main|Page]]
7223 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7227 # Note that parsoid does not munge anchor text; all non-space
7228 # characters are valid in HTML5 ids.
7230 Anchor containing a #. (bug 63430)
7232 [[Main Page#And#Link]]
7234 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7237 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7243 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7245 <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>
7250 Link with space in namespace
7252 [[User talk:Foo bar]]
7254 <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>
7259 MemoryAlpha:AlphaTest
7261 This is an article in the MemoryAlpha namespace
7262 (which shadows the memoryalpha interwiki link).
7266 Namespace takes precedence over interwiki link (bug 51680)
7268 [[MemoryAlpha:AlphaTest]]
7270 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7274 # The previous test doesn't work correctly in html2*, due to not recognizing the
7275 # link as an internal one. This one checks for the correct behavior.
7277 Link to namespace preferred over interwiki with correct rel attribute
7279 parsoid=html2wt,html2html
7281 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7283 [[MemoryAlpha:AlphaTest]]
7287 Piped link to namespace
7289 [[Meta:Disclaimers|The disclaimers]]
7291 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7298 [[Usually caused by a typo (oops}]]
7300 <p>[[Usually caused by a typo (oops}]]
7307 Just a test of an article title containing a percent.
7311 Link containing % (not as a hex sequence)
7315 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7318 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7321 # note that the parsoid HTML is identical to the previous test output,
7322 # so the previous test ensures that the html2wt mode will generate the
7323 # "not as a hex sequence" wikitext.
7325 Link containing % as a single hex sequence interpreted to char
7327 parsoid=wt2wt,wt2html,html2html
7331 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7334 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7338 Link containing % as a double hex sequence interpreted to hex sequence
7342 <p>[[7%2525 Solution]]
7346 # note that parsoid does not munge anchor text; all non-space
7347 # characters are valid in HTML5 anchors.
7349 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7350 Example for such a section: == < ==
7352 [[%23%3c]][[%23%3e]]
7354 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7357 <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>
7361 Link containing "<#" and ">#" as a hex sequences
7363 [[%3c%23]][[%3e%23]]
7365 <p>[[%3c%23]][[%3e%23]]
7370 Link containing an equals sign
7372 [[Special:BookSources/isbn=4-00-026157-6]]
7374 <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>
7377 <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>
7383 Just a test of an article title containing a tilde.
7386 # note that links containing signatures, like [[Foo~~~~]], are
7387 # massaged by the pre-save transform (PST) and so the tildes are never
7388 # seen by the parser.
7390 Link containing a tilde
7394 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7397 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7401 Link containing double-single-quotes '' (bug 4598)
7403 [[Lista d''e paise d''o munno]]
7405 <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>
7408 <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>
7412 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7414 Some [[Link|pretty ''italics'' and stuff]]!
7416 <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>!
7419 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7423 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7425 ''Some [[Link|pretty ''italics'' and stuff]]!''
7427 <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>
7432 Link with double quotes in title part (literal) and alternate part (interpreted)
7434 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7438 [[''Pentecoste''|Pentecoste]]
7440 [[''Pentecoste''|''Pentecoste'']]
7442 <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>
7443 </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>
7444 </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>
7445 </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>
7448 <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>
7449 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7450 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7451 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7455 Broken image links with HTML captions (bug 39700)
7457 [[File:Nonexistent|<script></script>]]
7458 [[File:Nonexistent|100x100px|<script></script>]]
7459 [[File:Nonexistent|<]]
7460 [[File:Nonexistent|a<i>b</i>c]]
7462 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7463 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7464 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7465 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7468 <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>
7469 <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>
7470 <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>
7471 <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>
7477 [[http://www.example.com]]
7479 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7482 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7486 Plain link to URL with link text
7488 [[http://www.example.com Link text]]
7490 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7495 Plain link to protocol-relative URL
7497 [[//www.example.com]]
7499 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7502 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7506 Plain link to protocol-relative URL with link text
7508 [[//www.example.com Link text]]
7510 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7515 Plain link to page with question mark in title
7521 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7522 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7527 # I'm fairly sure the expected result here is wrong.
7528 # We want these to be URL links, not pseudo-pages with URLs for titles....
7529 # However the current output is also pretty screwy.
7532 # I'm changing it to match the current output--it arguably makes more
7533 # sense in the light of the test above. Old expected result was:
7534 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7536 # But I think this test is bordering on "garbage in, garbage out" anyway.
7541 Piped link to URL: [[http://www.example.com|an example URL]]
7543 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7546 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7550 BUG 2: [[page|http://url/]] should link to page, not http://url/
7552 [[Main Page|http://url/]]
7554 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7557 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7560 # Parsoid does not mark self-links, by design.
7562 BUG 337: Escaped self-links should be bold
7566 [[Bug462]] [[Bug462]]
7568 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7571 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7573 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7577 Self-link to section should not be bold
7581 [[Main Page#section]]
7583 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7594 Self-link to numeric title
7600 <p><strong class="selflink">0</strong>
7605 Link to numeric-equivalent title
7611 <p><a href="/wiki/00" title="00">00</a>
7616 <nowiki> inside a link
7618 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7620 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7625 Non-breaking spaces in title
7627 [[ Main Page ]]
7629 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7634 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7640 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7645 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7651 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7656 Internal link with en linktrail: no apostrophes (bug 27473)
7662 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7667 Internal link with ca linktrail with apostrophes (bug 27473)
7673 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7678 Internal link with kaa linktrail with apostrophes (bug 27473)
7684 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7689 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7691 [[User:Foo/Test/63636:Bar|Test]]
7693 <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>
7696 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7700 Purely hash wikilink
7702 title=[[User:test/123]]
7706 <p><a href="#a">b</a>
7709 <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>
7713 1. Interaction of linktrail and template encapsulation
7719 <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>
7723 2. Interaction of linktrail and template encapsulation
7727 {{echo|Some [[Fool]]}}s
7729 <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>
7733 3. Interaction of linktrail and template encapsulation
7737 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7739 <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>
7749 Internal link with is link prefix
7753 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7755 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7766 Internal link with is link trail and link prefix
7770 [[mótmælendatrú|xxx]]ar
7772 mótmælenda[[söfnuður]]
7773 mótmælenda[[söfnuður|söfnuðir]]
7774 mótmælenda[[söfnuður|söfnuðir]]xxx
7776 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7777 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7778 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7779 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7780 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7785 Parsoid link trail escaping
7787 parsoid=html2wt,html2html
7789 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7795 Parsoid link prefix escaping
7798 parsoid=html2wt,html2html
7800 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7802 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7806 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7814 [http://wp.org ''foo'']
7816 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7817 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7818 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7819 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7824 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7828 [[Foo|{{echo|a}} b {{echo|c}}]]
7830 <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>
7834 Link with angle bracket after anchor
7838 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7841 <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>
7845 ### Interwiki links (see maintenance/interwiki.sql)
7849 Inline interwiki link
7851 parsoid=wt2html,wt2wt,html2html
7853 [[MeatBall:SoftSecurity]]
7855 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7858 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7862 Inline interwiki link with empty title (bug 2372)
7864 parsoid=wt2html,wt2wt,html2html
7868 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7871 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7875 Interwiki link encoding conversion (bug 1636)
7877 *[[Wikipedia:ro:Olteniţa]]
7878 *[[Wikipedia:ro:Olteniţa]]
7880 <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>
7881 <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>
7885 <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>
7886 <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>
7891 Interwiki link with fragment (bug 2130)
7893 [[MeatBall:SoftSecurity#foo]]
7895 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7899 # Ideally the wikipedia: prefix here should be proto-relative too
7900 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7901 # define the 'en' prefix, and originally the test used 'wikipedia',
7902 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7905 Different interwiki prefixes mapping to the same URL
7913 [[:wikipedia:Foo|Foo]]
7915 [[wikipedia:en:Foo]]
7917 [[:wikipedia:en:Foo]]
7921 <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>
7923 <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>
7925 <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>
7927 <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>
7929 <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>
7931 <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>
7933 <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>
7937 Interwiki links that cannot be represented in wiki syntax
7940 [[meatball:ok#foo|ok with fragment]]
7941 [[meatball:ok_as_well?|ok ending with ? mark]]
7942 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7943 [http://de.wikipedia.org/wiki/#foo is just fragment]
7946 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7947 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7948 <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>
7949 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7950 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7953 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7954 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7955 <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>
7956 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7957 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7961 Interwiki links: trail
7963 [[wikipedia:Foo|Ba]]r
7965 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7968 <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>
7972 Local interwiki link
7974 parsoid=wt2html,wt2wt,html2html
7976 [[local:Template:Foo]]
7978 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7981 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7984 # Parsoid does not mark self-links, by design.
7986 Local interwiki link: self-link to current page
7989 parsoid=wt2html,wt2wt,html2html
7993 <p><strong class="selflink">local:Main Page</strong>
7996 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8000 Local interwiki link: prefix only (bug 64167)
8002 parsoid=wt2html,wt2wt,html2html
8006 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8009 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8013 Local interwiki link: with additional interwiki prefix (bug 61357)
8015 parsoid=wt2html,wt2wt,html2html
8017 [[local:meatball:Hello]]
8019 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8022 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8026 Multiple local interwiki link prefixes
8028 [[local:local:local:local:mi:local:Foo]]
8030 parsoid=wt2html,wt2wt,html2html
8032 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8035 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8039 ### Interlanguage links
8040 ### Language links (so that searching for '### language' matches..)
8046 parsoid=wt2html,wt2wt,html2html
8054 <p>Blah blah blah</p>
8055 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8059 Interlanguage link with spacing
8061 parsoid=wt2html,wt2wt,html2html
8069 <p>Blah blah blah</p>
8070 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8074 Double interlanguage link
8076 parsoid=wt2html,wt2wt,html2html
8085 <p>Blah blah blah</p>
8086 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8087 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8091 Interlanguage link variations
8093 parsoid=wt2html,wt2wt,html2html
8103 <p>Blah blah blah</p>
8104 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8105 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8106 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8110 Space and question mark encoding in interlanguage links (T95473)
8112 parsoid=wt2html,wt2wt,html2html
8120 <p>Blah blah blah</p>
8121 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8125 Interlanguage link, with prefix links
8135 <p>Blah blah blah</p>
8136 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8140 Double interlanguage link, with prefix links (bug 8897)
8151 <p>Blah blah blah</p>
8152 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8153 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8157 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8165 <p>Blah blah blah</p>
8166 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8170 Parsoid-specific test: Wikilinks with should RT properly
8176 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8181 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8185 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8186 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8188 He&nbsp;llo [[Foo|He&nbsp;llo]]
8190 He&nbsp;llo [[He&nbsp;llo]]
8194 Parsoid: handle constructor well
8200 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8201 </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>
8204 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8206 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8215 # Note that `ko` isn't a known interlanguage prefix
8217 Parsoid: recognize interlanguage links without a target page
8227 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8229 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8232 # Note that `ko` isn't a known interwiki prefix
8234 Parsoid: recognize interwiki links without a target page
8236 parsoid=wt2html,wt2wt,html2html
8242 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8243 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8246 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8247 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8251 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8255 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8258 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8262 Interlanguage link with preceding local interwiki link (bug 68085)
8264 parsoid=wt2html,wt2wt,html2html
8267 [[local:es:Spanish]]
8270 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8274 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8278 Looks like an interlanguage link, but is actually a local interwiki
8280 parsoid=wt2html,wt2wt,html2html
8286 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8290 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8294 ### Redirects, Parsoid-only
8298 1. Simple redirect to page
8300 #REDIRECT [[Main Page]]
8302 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8306 2. Other redirect variants
8308 #REDIRECT [[Main_Page]]
8310 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8313 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8314 # This tests the Parsoid bail-out code.
8316 3. Other redirect variants
8318 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8320 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8324 4. Redirect to a templated destination
8326 #REDIRECT [[{{echo|Foo}}bar]]
8328 <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"}]]}'/>
8334 parsoid=wt2html,wt2wt
8339 <li>REDIRECT [[]]</li></ol>
8343 Optional colon in #REDIRECT
8345 # the colon is archaic syntax. we support it for wt2html, but we
8346 # don't care that it roundtrips back to the modern syntax.
8347 parsoid=wt2html,html2html
8349 #REDIRECT:[[Main Page]]
8351 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8355 Whitespace in #REDIRECT with optional colon
8357 # the colon and gratuitous whitespace is archaic syntax. we support
8358 # it for wt2html, but we don't care that it roundtrips back to the
8359 # modern syntax (without extra whitespace)
8360 parsoid=wt2html,html2html
8367 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8371 Piped link in #REDIRECT
8373 # content after piped link is ignored. we support this syntax,
8374 # but don't care that the piped link is lost when we roundtrip this.
8377 #REDIRECT [[Main Page|bar]]
8379 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8383 Redirect to category (T104502)
8385 parsoid=wt2html,wt2wt
8387 #REDIRECT [[Category:Foo]]
8389 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8393 Redirect to category with URL encoding (T104502)
8397 #REDIRECT [[Category%3AFoo]]
8399 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8403 Redirect to category page
8405 #REDIRECT [[:Category:Foo]]
8407 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8411 Redirect to image page (1)
8413 #REDIRECT [[File:Wiki.png]]
8415 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8419 Redirect to image page (2)
8421 #REDIRECT [[Image:Wiki.png]]
8423 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8426 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8427 # Next test confirms this.
8429 Redirect to language (1) (T104918)
8431 parsoid=wt2html,wt2wt,html2html
8433 #REDIRECT [[en:File:Wiki.png]]
8435 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8439 Redirect to language (2) (T104918)
8441 #REDIRECT [[:en:File:Wiki.png]]
8443 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8447 Redirect to interwiki (T104918)
8449 #REDIRECT [[meatball:File:Wiki.png]]
8451 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8455 Non-English #REDIRECT
8459 #TILVÍSUN [[Main Page]]
8461 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8465 Redirect syntax under text isn't considered a redirect
8468 #redirect [[Main Page]]
8471 <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>
8474 # FIXME: Should hoist the redirect to the top of the page and ensure there
8481 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8501 Broken br tag sanitization
8509 # TODO: Fix html2html mode (bug 51055)!
8511 Parsoid: Broken br tag recognition
8524 Incorrecly removing closing slashes from correctly formed XHTML
8526 <br style="clear:both;" />
8528 <p><br style="clear:both;" />
8533 Failing to transform badly formed HTML into correct XHTML
8535 <br style="clear: left;">
8536 <br style="clear: right;">
8537 <br style="clear: both;">
8539 <p><br style="clear: left;" />
8540 <br style="clear: right;" />
8541 <br style="clear: both;" />
8545 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8546 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8548 Handling html with a div self-closing tag
8557 <p><div title />
8561 <p><div title=bar />
8562 <div title=bar/>
8564 <div title="bar/"></div>
8568 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8569 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8570 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8571 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8572 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8573 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8577 Handling html with a br self-closing tag
8604 Horizontal ruler (should it add that extra space?)
8619 Horizontal ruler -- 4+ dashes render hr
8628 Horizontal ruler -- eats additional dashes on the same line
8637 Horizontal ruler -- does not collapse dashes on consecutive lines
8648 Horizontal ruler -- <4 dashes render as plain text
8657 Horizontal ruler -- Supports content following dashes on same line
8669 ### Block-level elements
8678 <ul><li>Common list</li>
8680 <li>item 3</li></ul>
8691 <ol><li>Numbered list</li>
8693 <li> item 3</li></ol>
8707 ***#Number on level 4
8709 **#Number on level 3
8710 **#Number on level 3
8714 #** Level 3, but ordered
8717 <ol><li> with numbers</li></ol>
8718 <ul><li> and bullets</li></ul>
8719 <ol><li> and numbers</li></ol></li>
8721 <ul><li>bullet level 2
8722 <ul><li>bullet level 3
8723 <ol><li>Number on level 4</li></ol></li></ul></li>
8725 <ol><li>Number on level 3</li>
8726 <li>Number on level 3</li></ol></li></ul>
8727 <ol><li>number level 2</li></ol></li>
8729 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8730 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8741 <ul><li>bar</li></ul></li></ul>
8751 <ul><li><ul><li>foo</li></ul></li>
8757 Nested lists 3 (first element empty)
8763 <ul><li>bar</li></ul></li></ul>
8768 Nested lists 4 (first element empty)
8773 <ul><li><ul><li></li></ul></li>
8779 Nested lists 5 (both elements empty)
8784 <ul><li><ul><li></li></ul></li>
8790 Nested lists 6 (both elements empty)
8796 <ul><li></li></ul></li></ul>
8801 Nested lists 7 (skip initial nesting levels)
8805 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8810 Nested lists 8 (multiple nesting transitions)
8818 <ul><li><ul><li> bar</li></ul></li>
8819 <li> baz</li></ul></li>
8825 Nested lists 9 (extension interaction)
8831 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8835 1. Lists with start-of-line-transparent tokens before bullets: Comments
8848 2. Lists with start-of-line-transparent tokens before bullets: Template close
8853 <ul><li>foo bar</li>
8859 List items are not parsed correctly following a <pre> block (bug 785)
8865 <ul><li> <pre>foo</pre></li>
8866 <li> <pre>bar</pre></li>
8870 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8871 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8876 List items from template
8887 * notSOL{{inner list}}
8890 <ul><li> item 1</li>
8891 <li> item 2</li></ul>
8892 <ul><li> item 0</li>
8894 <li> item 2</li></ul>
8895 <ul><li> item 0</li>
8898 <li> item 2</li></ul>
8903 List interrupted by empty line or heading
8911 <ul><li> foo</li></ul>
8912 <ul><li><ul><li> bar</li></ul></li></ul>
8913 <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>
8914 <ul><li> Another list item</li></ul>
8919 Multiple list tags generated by templates
8940 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8943 <!--This line will NOT split the list-->
8945 <!--This line will NOT split the list either-->
8947 <!--foo--> <!----> <!--This line NOT split the list either-->
8958 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8961 <!--This line will NOT split the list-->
8963 <!--This line will NOT split the list either-->
8965 <!--foo--> <!----> <!--This line NOT split the list
8978 (The PHP parser relies on Tidy for the hack)
8980 parsoid=wt2html,wt2wt
8984 * {{echo|<li>templated li-hack}}
8985 * <!--foo--> <li> unsupported li-hack with preceding comments
8988 <li><li>not a li-hack
8995 <li>templated li-hack</li>
8996 <li>unsupported li-hack with preceding comments</li>
8999 <li>not a li-hack</li>
9004 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9031 Parsoid: Test of whitespace serialization with Templated bullets
9038 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9042 # ------------------------------------------------------------------------
9043 # The next set of tests are about Parsoid's ability to handle badly nested
9044 # tags (parse, minimize scope of fixup, and roundtrip back)
9045 # ------------------------------------------------------------------------
9048 Unbalanced closing block tags break a list
9049 (php parser relies on Tidy to fix up)
9067 # Parsoid fails this test, but it might be tricky to support properly.
9070 Unbalanced closing non-block tags don't break a list
9071 (php parser relies on Tidy to fix up)
9078 <li><span>a</span></li>
9079 <li><span>b</span></li>
9093 Unclosed formatting tags that straddle lists are closed and reopened
9094 (php parser relies on Tidy to fix up)
9096 parsoid=wt2html,wt2wt,html2html
9106 <ol><li> <s> a</s></li>
9107 <li><s> b </s></li></ol>
9112 1. List embedded in a formatting tag
9119 <li><small>foo</small></li>
9129 ## Ugly Parsoid output here
9130 ## Not sure what the right output is.
9132 2. List embedded in a formatting tag
9139 <li><small>a</small></li>
9140 <li><small>b</small></li>
9147 <li><small>b</small></li>
9151 # Ugly Parsoid and PHP parser output here
9152 # Not sure if we want to make this a test!
9155 ## 3. Unclosed formatting tags in list elements
9161 ## <li><small>a</small></li>
9162 ## <li><small><small>b</small></small></li>
9166 ## <li><small>a</small></li>
9168 ## <li><small>b</small></li>
9172 # This is a bug in the PHP parser + tidy combination.
9173 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9174 # and then fostered out of the table by tidy.)
9175 # We believe the Parsoid output to be correct.
9177 Table with missing opening <tr> tag
9179 parsoid=wt2html,wt2wt
9197 # Note that the current date is hard-coded as
9198 # 1970-01-01T00:02:03Z (a Thursday)
9199 # when running parser tests. The timezone is also fixed to GMT, so
9200 # local date will be identical to current date.
9203 Magic Word: {{CURRENTDAY}}
9212 Magic Word: {{CURRENTDAY2}}
9221 Magic Word: {{CURRENTDAYNAME}}
9230 Magic Word: {{CURRENTDOW}}
9239 Magic Word: {{CURRENTMONTH}}
9248 Magic Word: {{CURRENTMONTH1}}
9257 Magic Word: {{CURRENTMONTHABBREV}}
9259 {{CURRENTMONTHABBREV}}
9266 Magic Word: {{CURRENTMONTHNAME}}
9268 {{CURRENTMONTHNAME}}
9275 Magic Word: {{CURRENTMONTHNAMEGEN}}
9277 {{CURRENTMONTHNAMEGEN}}
9284 Magic Word: {{CURRENTTIME}}
9293 Magic Word: {{CURRENTHOUR}}
9302 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9311 Magic Word: {{CURRENTYEAR}}
9320 Magic Word: {{CURRENTTIMESTAMP}}
9322 {{CURRENTTIMESTAMP}}
9329 Magic Words LOCAL (UTC)
9333 * {{LOCALMONTHNAME}}
9334 * {{LOCALMONTHNAMEGEN}}
9335 * {{LOCALMONTHABBREV}}
9344 * {{LOCALTIMESTAMP}}
9359 <li> 19700101000203</li></ul>
9364 Magic Word: {{FULLPAGENAME}}
9366 title=[[User:Ævar Arnfjörð Bjarmason]]
9370 <p>User:Ævar Arnfjörð Bjarmason
9375 Magic Word: {{FULLPAGENAMEE}}
9377 title=[[User:Ævar Arnfjörð Bjarmason]]
9381 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9386 Magic Word: {{TALKSPACE}}
9388 title=[[User:Ævar Arnfjörð Bjarmason]]
9397 Magic Word: {{TALKSPACE}}, same namespace
9399 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9408 Magic Word: {{TALKSPACE}}, main namespace
9410 title=[[Parser Test]]
9419 Magic Word: {{TALKSPACEE}}
9421 title=[[User:Ævar Arnfjörð Bjarmason]]
9430 Magic Word: {{SUBJECTSPACE}}
9432 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9441 Magic Word: {{SUBJECTSPACE}}, same namespace
9443 title=[[User:Ævar Arnfjörð Bjarmason]]
9452 Magic Word: {{SUBJECTSPACE}}, main namespace
9454 title=[[Parser Test]]
9462 Magic Word: {{SUBJECTSPACEE}}
9464 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9473 Magic Word: {{NAMESPACE}}
9475 title=[[User:Ævar Arnfjörð Bjarmason]]
9484 Magic Word: {{NAMESPACEE}}
9486 title=[[User:Ævar Arnfjörð Bjarmason]]
9495 Magic Word: {{NAMESPACENUMBER}}
9497 title=[[User:Ævar Arnfjörð Bjarmason]]
9506 Magic Word: {{SUBPAGENAME}}
9508 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9517 Magic Word: {{SUBPAGENAMEE}}
9519 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9528 Magic Word: {{ROOTPAGENAME}}
9530 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9534 <p>Ævar Arnfjörð Bjarmason
9539 Magic Word: {{ROOTPAGENAMEE}}
9541 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9545 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9550 Magic Word: {{BASEPAGENAME}}
9552 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9556 <p>Ævar Arnfjörð Bjarmason
9561 Magic Word: {{BASEPAGENAMEE}}
9563 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9567 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9572 Magic Word: {{TALKPAGENAME}}
9574 title=[[User:Ævar Arnfjörð Bjarmason]]
9578 <p>User talk:Ævar Arnfjörð Bjarmason
9583 Magic Word: {{TALKPAGENAMEE}}
9585 title=[[User:Ævar Arnfjörð Bjarmason]]
9589 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9594 Magic Word: {{SUBJECTPAGENAME}}
9596 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9600 <p>User:Ævar Arnfjörð Bjarmason
9605 Magic Word: {{SUBJECTPAGENAMEE}}
9607 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9609 {{SUBJECTPAGENAMEE}}
9611 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9616 Magic Word: {{NUMBEROFFILES}}
9625 Magic Word: {{PAGENAME}}
9627 title=[[User:Ævar Arnfjörð Bjarmason]]
9631 <p>Ævar Arnfjörð Bjarmason
9636 Magic Word: {{PAGENAME}} with metacharacters
9638 title=[['foo & bar = baz']]
9642 <p><i>'foo & bar = baz'</i>
9645 <p><i>'foo & bar = baz'</i></p>
9649 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9651 title=[[*RFC 1234 http://example.com/]]
9655 <p>*RFC 1234 http://example.com/
9658 <p>*RFC 1234 http://example.com/</p>
9662 Magic Word: {{PAGENAMEE}}
9664 title=[[User:Ævar Arnfjörð Bjarmason]]
9668 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9673 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9675 title=[[*RFC 1234 http://example.com/]]
9679 <p>*RFC_1234_http://example.com/
9682 <p>*RFC_1234_http://example.com/</p>
9686 Magic Word: {{REVISIONID}}
9695 Magic Word: {{SCRIPTPATH}}
9704 Magic Word: {{STYLEPATH}}
9713 Magic Word: {{SERVER}}
9717 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9722 Magic Word: {{SERVERNAME}}
9731 Magic Word: {{SITENAME}}
9740 Case-sensitive magic words, when cased differently, should just be template transclusions
9747 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9748 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9749 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9750 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9755 Case-insensitive magic words should still work with weird casing.
9765 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9769 # From plwiki:PLOS_ONE
9771 Parsoid: Page property magic word with magic word contents
9773 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9775 <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>"}]]}'/>
9779 Parsoid: Template-generated DISPLAYTITLE
9781 {{{{echo|DISPLAYTITLE}}:Foo}}
9783 <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}}]}'/>
9787 Namespace 1 {{ns:1}}
9796 Namespace 1 {{ns:01}}
9805 Namespace 0 {{ns:0}} (bug 4783)
9813 Namespace 0 {{ns:00}} (bug 4783)
9821 Namespace -1 {{ns:-1}}
9830 Namespace User {{ns:User}}
9839 Namespace User talk {{ns:User_talk}}
9848 Namespace User talk {{ns:uSeR tAlK}}
9857 Namespace File {{ns:File}}
9866 Namespace File {{ns:Image}}
9875 Namespace (lang=de) Benutzer {{ns:User}}
9886 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9892 <p>Benutzer Diskussion
9900 {{urlencode:hi world?!}}
9901 {{urlencode:hi world?!|WIKI}}
9902 {{urlencode:hi world?!|PATH}}
9903 {{urlencode:hi world?!|QUERY}}
9913 Magic Word: prioritize type info over data-parsoid
9917 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9923 Magic Word: serialize on separate line (parsoid)
9925 parsoid=wt2wt,html2wt
9931 foo<meta property="mw:PageProp/notoc"/>bar
9935 Magic Word: rt non-english wikis
9942 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9946 __proto__ is treated as normal wikitext (T105997)
9958 Magic links: internal link to RFC (bug 479)
9962 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9965 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
9969 Magic links: RFC (bug 479)
9973 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9976 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
9980 Magic links: RFC (bug 65278)
9982 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9984 <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.
9987 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
9991 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9993 RFC      822
9997 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10002 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
10008 Magic links: ISBN (bug 1937)
10012 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10015 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10019 Magic links: ISBN (bug 65278)
10021 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10023 <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.
10026 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
10030 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10032 ISBN      978 0 316 09811 3
10038 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10045 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
10053 Magic links: PMID incorrectly converts space to underscore
10057 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10060 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10064 Magic links: PMID (bug 65278)
10066 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10068 <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.
10071 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
10075 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10077 PMID      1234
10081 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10086 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
10096 Nonexistent template
10098 {{thistemplatedoesnotexist}}
10100 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10105 Template with invalid target containing tags
10107 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10109 <p>{{a<b>b</b>|foo|a=b|a = b}}
10114 Template with invalid target containing unclosed tag
10116 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10118 <p>{{a<b>|foo|a=b|a = b}}</b>
10123 Template with invalid target containing wikilink
10127 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10130 <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>
10134 Template with just whitespace in it, bug #68421
10138 <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>
10144 This is a test template
10152 <p>This is a test template
10157 Template with explicit namespace
10161 <p>This is a test template
10169 This is a test template with parameter {{{param}}}
10175 {{paramtest|param=foo}}
10177 <p>This is a test template with parameter foo
10182 Template:paramtestnum
10184 [[{{{1}}}|{{{2}}}]]
10188 Template unnamed parameter
10190 {{paramtestnum|Main Page|the main page}}
10192 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10197 Template:templatesimple
10203 Template:templateredirect
10205 #redirect [[Template:templatesimple]]
10209 Template:templateasargtestnum
10215 Template:templateasargtest
10217 {{template{{{templ}}}}}
10221 Template:templateasargtest2
10227 Template with template name as unnamed argument
10229 {{templateasargtestnum|templatesimple}}
10236 Template with template name as argument
10238 {{templateasargtest|templ=simple}}
10245 Template with template name as argument (2)
10247 {{templateasargtest2|templ=templatesimple}}
10254 Template:templateasargtestdefault
10256 {{{{{templ|templatesimple}}}}}
10266 Template with default value
10268 {{templateasargtestdefault}}
10275 Template with default value (value set)
10277 {{templateasargtestdefault|templ=templa}}
10286 {{templateredirect}}
10291 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10295 Template with argument in separate line
10297 {{ templateasargtest |
10305 Template with complex template as argument
10308 param ={{ templateasargtest |
10309 templ = simple }}}}
10311 <p>This is a test template with parameter (test)
10316 Template with thumb image (with link in description)
10318 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10320 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>
10323 <p>This is a test template with parameter</p>
10324 <div class="thumb tright">
10325 <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>
10326 <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>
10330 <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>
10334 Template:complextemplate
10336 {{{1}}} {{paramtest|
10337 param ={{{param}}}}}
10341 Template with complex arguments
10344 param ={{ templateasargtest |
10345 templ = simple }}|[[Template:complextemplate|link]]}}
10347 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10352 BUG 553: link with two variables in a piped link
10355 |[[{{{1}}}|{{{2}}}]]
10360 <td>[[{{{1}}}|{{{2}}}]]
10366 Magic variable as template parameter
10368 {{paramtest|param={{SITENAME}}}}
10370 <p>This is a test template with parameter MediaWiki
10377 [[{{{param}}}|link]]
10381 Template parameter as link source
10383 {{linktest|param=Main Page}}
10385 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10390 Template:paramtest2
10392 including another template, {{paramtest|param={{{arg}}}}}
10396 Template passing argument to another template
10398 {{paramtest2|arg='hmm'}}
10400 <p>including another template, This is a test template with parameter 'hmm'
10411 Template as link source
10415 [[{{linktest2}}|Main Page]]
10417 [[{{linktest2}}]]Page
10419 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10420 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10421 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10439 Template infinite loop
10443 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10448 Template from main namespace
10467 BUG 529: Template with table, not included at beginning of line
10486 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10506 BUG 41: Template parameters shown as broken links
10515 Template with targets containing wikilinks
10519 {{[[{{echo|foo}}]]}}
10521 {{{{echo|[[foo}}]]}}
10523 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10524 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10536 Templates: Double quotes as template target
10543 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10548 Template:MSGNW test
10550 ''None'' of '''this''' should be
10552 but rather passed unmodified
10560 # hmm, fix this or just deprecate msgnw and document its behavior?
10564 {{msgnw:MSGNW test}}
10566 <p>''None'' of '''this''' should be
10568  but rather passed unmodified
10569 {{test}}
10573 <!-- comment -->
10580 {{int:youhavenewmessages|lots of money|not!}}
10582 <p>You have lots of money (not!).
10587 int keyword - non-existing message
10598 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10602 <includeonly> and <noinclude> being included
10613 <onlyinclude>Foo</onlyinclude>bar
10617 <onlyinclude> being included
10629 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10633 <onlyinclude> and <includeonly> being included
10642 <includeonly> and <noinclude> on a page
10644 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10651 Un-closed <noinclude>
10658 <onlyinclude> on a page
10660 <onlyinclude>Foo</onlyinclude>bar
10667 Un-closed <onlyinclude>
10674 Self-closed noinclude, includeonly, onlyinclude tags
10685 Unbalanced includeonly and noinclude tags
10689 |b</noinclude></noinclude>
10690 |c</noinclude></includeonly>
10691 |d</includeonly></includeonly>
10700 <td>c</includeonly>
10702 <td>d</includeonly></includeonly>
10708 Template:Includeonly section
10711 ==Includeonly section==
10717 Bug 6563: Edit link generation for section shown by <includeonly>
10719 {{includeonly section}}
10721 <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>
10722 <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>
10726 # Uses same input as the contents of [[Template:Includeonly section]]
10728 Bug 6563: Section extraction for section shown by <includeonly>
10733 ==Includeonly section==
10741 Bug 6563: Edit link generation for section suppressed by <includeonly>
10744 ==Includeonly section==
10748 <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>
10753 Bug 6563: Section extraction for section suppressed by <includeonly>
10758 ==Includeonly section==
10766 Un-closed <includeonly>
10773 Includes and comments at SOL
10775 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10779 </noinclude>* stuff
10782 <includeonly>can have stuff</includeonly>=== here ===
10785 <h2><span class="mw-headline" id="hu">hu</span></h2>
10788 <ul><li> stuff</li>
10789 <li> here</li></ul>
10790 <h3><span class="mw-headline" id="here">here</span></h3>
10793 <!-- 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>
10795 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10797 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10798 <li> here</li></ul>
10800 <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>
10804 # TODO: test with DOM fragment reuse!
10806 Parsoid: DOM fragment reuse
10808 parsoid=wt2wt,wt2html
10810 a{{echo|b<table></table>c}}d
10822 <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>
10824 <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">
10825 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10826 </span><p about="#mwt2">cd</p>
10828 <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">
10830 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10832 </span><p about="#mwt3">b</p>
10836 Parsoid: Merge double tds (T52603)
10841 |{{echo|{{!}} foo}}
10845 <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>
10850 Parsoid: Merge double tds in nested transclusion content (T52603)
10856 |{{echo|{{!}} foo}}
10860 <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}}]}'>
10862 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10868 ### <includeonly> and <noinclude> in attributes
10871 0. includeonly around the entire attribute
10873 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10875 <p><span id="v2">bar</span>
10880 1. includeonly in html attr key
10882 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10884 <p><span id="foo">bar</span>
10889 2. includeonly in html attr value
10891 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10892 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10894 <p><span id="v1">bar</span>
10895 <span id="v1">bar</span>
10900 3. includeonly in part of an attr value
10902 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10904 <p><span style="color:red;">bar</span>
10909 4. includeonly in table attributes
10933 ### Token Stream Patcher tests
10935 ### These tests won't always pass wt2wt and other modes because
10936 ### on serialization, the table will be output on a new line.
10937 ### For now, we are blacklisting them, and using this to test selser.
10941 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10943 parsoid=wt2html,wt2wt
10945 {{echo|}}{| width = '100%'
10949 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10950 <tbody><tr><td>foo</td></tr>
10955 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10957 parsoid=wt2html,wt2wt
10959 <includeonly>a</includeonly>{| {{{b}}}
10963 <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}}}":""}}'>
10964 <tbody><tr><td>c</td></tr>
10970 ### Testing parsing of templates where a template arg
10971 ### has the same name as the template itself.
10977 {{{quote|{{{1}}}}}}
10981 Templates: Template Name/Arg clash: 1. Use of positional param
10990 Templates: Template Name/Arg clash: 2. Use of named param
10992 {{quote|quote=foo}}
10999 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11008 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11012 Templates: 1. Simple use
11021 Templates: 2. Inside a block tag
11023 <div>{{echo|Foo}}</div>
11024 <blockquote>{{echo|Foo}}</blockquote>
11027 <blockquote>Foo</blockquote>
11037 Templates: P-wrapping: 1a. Templates on consecutive lines
11048 Templates: P-wrapping: 1b. Templates on consecutive lines
11062 Templates: P-wrapping: 1c. Templates on consecutive lines
11065 {{echo|bar}} <div>baz</div>
11078 Templates: P-wrapping: 1d. Template preceded by comment-only line
11087 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11091 Templates: Inline Text: 1. Multiple template uses
11093 {{echo|Foo}}bar{{echo|baz}}
11100 Templates: Inline Text: 2. Back-to-back template uses
11102 {{echo|Foo}}{{echo|bar}}
11109 Templates: Block Tags: 1. Multiple template uses
11111 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11113 <div>Foo</div><div>bar</div><div>baz</div>
11118 Templates: Block Tags: 2. Back-to-back template uses
11120 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11122 <div>Foo</div><div>bar</div>
11126 # This is an edge case relating to paragraph wrapping.
11128 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11133 <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
11138 Templates: Links: 1. Simple example
11140 {{echo|[[Foo|bar]]}}
11142 <p><a href="/wiki/Foo" title="Foo">bar</a>
11147 Templates: Links: 2. Generation of link href
11149 [[{{echo|Foo}}|bar]]
11151 <p><a href="/wiki/Foo" title="Foo">bar</a>
11156 Templates: Links: 3. Generation of part of a link href
11158 [[Fo{{echo|o}}|bar]]
11160 [[Foo{{echo|bar}}]]
11162 [[Foo{{echo|bar}}baz]]
11164 [[Foo{{echo|bar}}|bar]]
11166 [[:Foo{{echo|bar}}]]
11168 [[:Foo{{echo|bar}}|bar]]
11170 <p><a href="/wiki/Foo" title="Foo">bar</a>
11171 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11172 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11173 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11174 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11175 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11180 Templates: Links: 4. Multiple templates generating link href
11182 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11184 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11189 Templates: Links: 5. Generation of link text
11191 [[Foo|{{echo|bar}}]]
11193 <p><a href="/wiki/Foo" title="Foo">bar</a>
11198 Templates: Links: 5. Nested templates (only outermost template should be marked)
11200 {{echo|[[{{echo|Foo}}|bar]]}}
11202 <p><a href="/wiki/Foo" title="Foo">bar</a>
11207 Templates: HTML Tag: 1. Generation of HTML attr. key
11209 <div {{echo|style}}="color:red;">foo</div>
11211 <div style="color:red;">foo</div>
11216 Templates: HTML Tag: 2. Generation of HTML attr. value
11218 <div style={{echo|'color:red;'}}>foo</div>
11220 <div style="color:red;">foo</div>
11225 Templates: HTML Tag: 3. Generation of HTML attr key and value
11227 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11229 <div style="color:red;">foo</div>
11234 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11236 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11238 <div title="This is a long title with just one piece templated">foo</div>
11243 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11245 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11247 <div title="This is a long title with just one piece templated">foo</div>
11252 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11254 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11256 <div title="This is a long title with just one piece templated">foo</div>
11260 # SSS FIXME: While it is great we added support for all this,
11261 # do we want to make this part of the spec? Maybe we want to
11262 # deprecate this kind of usage in the future?
11264 Templates: HTML Tag: 7. Generation of partial attribute key string
11266 <div st{{echo|yle}}="color:red;">foo</div>
11268 <div style="color:red;">foo</div>
11273 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11275 <div {{echo|1=id="v1"}}>bar</div>
11277 <div id="v1">bar</div>
11282 Templates: HTML Tag: 9. Multiple template-generated attributes
11284 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11286 <div id="v1" title="foo">bar</div>
11291 Templates: Support for templates generating attributes and content
11293 {| {{mixed_attr_content_template}}
11298 <table style="color:red;" title="T48811">
11308 <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|}"]}'>
11317 1. Entities and nowikis inside templated attributes should be handled correctly
11319 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11321 <div style="background:#f9f9f9;">foo</div>
11324 <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>
11328 2. Entities and nowikis inside templated attributes should be handled correctly
11331 |{{table_attribs_3}}
11336 <td style="background:#f9f9f9;">Foo
11341 <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>
11346 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11349 |{{table_attribs_3}}
11354 <td style="background:#f9f9f9;">Foo
11358 <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}}]}'>
11359 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11365 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11368 | {{table_attribs_6}} hi
11373 <td style="background: red;"> hi
11378 <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>
11383 Templates: HTML Tables: 1. Generating start of a HTML table
11385 {{echo|<table><tr><td>foo</td>}}</tr></table>
11387 <table><tr><td>foo</td></tr></table>
11392 Templates: HTML Tables: 2a. Generating middle of a HTML table
11394 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11396 <table><tr><td>foo</td></tr></table>
11401 Templates: HTML Tables: 2b. Generating middle of a HTML table
11403 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11405 <table><tr><td>foo</td></tr></table>
11410 Templates: HTML Tables: 3. Generating end of a HTML table
11412 <table><tr>{{echo|<td>foo</td></tr></table>}}
11414 <table><tr><td>foo</td></tr></table>
11419 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11421 {{echo|<table>}}<tr><td>foo</td></tr></table>
11423 <table><tr><td>foo</td></tr></table>
11428 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11430 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11432 <table><tr><td>foo</td></tr></table>
11437 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11439 <table><tr>{{echo|<td>}}foo</td></tr></table>
11441 <table><tr><td>foo</td></tr></table>
11446 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11448 <table><tr><td>foo{{echo|</td>}}</tr></table>
11450 <table><tr><td>foo</td></tr></table>
11455 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11457 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11459 <table><tr><td>foo</td></tr></table>
11464 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11466 <table><tr><td>foo</td></tr>{{echo|</table>}}
11468 <table><tr><td>foo</td></tr></table>
11473 Templates: HTML Tables: 5. Proper fostering of categories from inside
11475 parsoid=wt2html,wt2wt
11477 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11478 <!--Two categories (Bug 50330)-->
11479 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11481 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11482 <!--Two categories (Bug 50330)-->
11483 <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>
11487 Templates: Wiki Tables: 1a. Fostering of entire template content
11495 <tr><td></td></tr></table>
11507 Templates: Wiki Tables: 1b. Fostering of entire template content
11520 <tr><td></td></tr></table>
11534 Templates: Wiki Tables: 2. Fostering of partial template content
11544 <tr><td></td></tr></table>
11557 Templates: Wiki Tables: 3. td-content via multiple templates
11560 {{echo|{{pipe}}a}}{{echo|b}}
11571 Templates: Wiki Tables: 4. Templated tags, no content
11577 <tr><td></td></tr></table>
11582 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11596 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11609 ## This test case is very specific to Parsoid's internals
11610 ## and is hence only tested for Parsoid's code. Parsoid uses
11611 ## a <meta> marker tag for <ref> tags and they are expanded
11612 ## much later. We are verifying that this <meta> tag usage
11613 ## doesn't prevent foster parenting.
11615 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11617 {{PartialTable}}<ref>foo</ref>
11622 <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">
11626 <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>
11630 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11640 <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{{!}}}"]}'>
11641 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11645 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11650 Templates: Lists: Multi-line list-items via templates
11652 *{{echo|a {{nonexistent|
11654 *{{echo|b {{nonexistent|
11657 <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>
11658 <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>
11663 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11665 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11667 <p><i>ab</i>c<i>d</i>e
11672 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11673 (PHP parser generates misnested html)
11675 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11677 <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>
11681 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11682 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11684 parsoid=wt2html,wt2wt
11686 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11688 <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>
11689 <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>
11690 <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>
11694 Templates: Ugly nesting: 4. Divs opened/closed across templates
11696 a<div>b{{echo|c</div>d}}e
11707 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11713 |{{echo|foo</table>}}
11717 <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|}"]}'>
11721 <td>foo</td></tr></tbody></table><span about="#mwt1">
11722 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11727 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11737 <td>1. {{echo|foo </table>}}</td>
11739 <td>2. {{echo|baz </table>}}</td>
11752 <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>"]}'>
11757 <td>1. foo </td></tr></tbody></table></td>
11759 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11760 </span><span about="#mwt2">
11761 </span><span about="#mwt2">
11762 </span><span about="#mwt2">abc</span><span about="#mwt2">
11763 </span><span about="#mwt2">
11764 </span><span about="#mwt2">
11765 </span><span about="#mwt2">
11766 </span><span about="#mwt2">
11767 </span><span about="#mwt2">
11768 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11769 </span><span about="#mwt2">
11774 Templates: Ugly templates: 3. newline-only template parameter
11783 # This looks like a bug: a single newline triggers p/br for some reason.
11785 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11794 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11795 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11797 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11803 <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
11804 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11808 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11809 # that are "identical" and generate nesting cycles in the algorithm
11811 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11813 {{echo|<table><tr><td><table>}}
11817 <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"}'>
11818 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11819 </table></td></tr></tbody></table>
11823 Parser Functions: 1. Simple example
11832 Parser Functions: 2. Nested use (only outermost should be marked up)
11841 ### Pre-save transform tests
11844 pre-save transform: subst:
11850 This is a test template
11854 pre-save transform: normal template
11864 pre-save transform: nonexistent template
11868 {{thistemplatedoesnotexist}}
11870 {{thistemplatedoesnotexist}}
11874 pre-save transform: subst magic variables
11883 # This is bug 89, which I fixed. -- wtm
11885 pre-save transform: subst: templates with parameters
11889 {{subst:paramtest|param="something else"}}
11891 This is a test template with parameter "something else"
11895 Template:nowikitest
11897 <nowiki>'''not wiki'''</nowiki>
11901 pre-save transform: nowiki in subst (bug 1188)
11905 {{subst:nowikitest}}
11907 <nowiki>'''not wiki'''</nowiki>
11911 Template:commenttest
11913 This template has <!-- a comment --> in it.
11917 pre-save transform: comment in subst (bug 1936)
11921 {{subst:commenttest}}
11923 This template has <!-- a comment --> in it.
11927 pre-save transform: unclosed tag
11931 <nowiki>'''not wiki'''
11933 <nowiki>'''not wiki'''
11937 pre-save transform: mixed tag case
11941 <NOwiki>'''not wiki'''</noWIKI>
11943 <NOwiki>'''not wiki'''</noWIKI>
11947 pre-save transform: unclosed comment in <nowiki>
11951 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11953 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11956 # Leading @ in this template definition works around a limitation
11957 # in parsoid's parserTests which otherwise strips the <span> from the
11958 # result (confusing it for a template wrapper)
11962 @<span onmouseover="alert('crap')">Oh no</span>
11966 (confirming safety of fix for subst bug 1936)
11968 {{Template:dangerous}}
11970 <p>@<span>Oh no</span>
11975 pre-save transform: comment containing gallery (bug 5024)
11979 <!-- <gallery>data</gallery> -->
11981 <!-- <gallery>data</gallery> -->
11985 pre-save transform: comment containing extension
11989 <!-- <tag>data</tag> -->
11991 <!-- <tag>data</tag> -->
11995 pre-save transform: comment containing nowiki
11999 <!-- <nowiki>data</nowiki> -->
12001 <!-- <nowiki>data</nowiki> -->
12005 pre-save transform: <noinclude> in subst (bug 3298)
12015 pre-save transform: <onlyinclude> in subst (bug 3298)
12019 {{subst:Includes2}}
12027 {{<includeonly>subst:</includeonly>Includes}}
12031 Template:SafeSubstTest
12033 {{<includeonly>safesubst:</includeonly>Includes}}
12037 bug 22297: safesubst: works during PST
12041 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12047 bug 22297: safesubst: works during normal parse
12056 subst: does not work during normal parse
12060 <p>{{subst:Includes}}
12065 pre-save transform: context links ("pipe trick")
12069 [[Article (context)|]]
12072 [[Bar:Article (context)|]]
12073 [[:Bar:Article (context)|]]
12075 [[|Article (context)]]
12079 [[Article (context)|Article]]
12080 [[Bar:Article|Article]]
12081 [[:Bar:Article|Article]]
12082 [[Bar:Article (context)|Article]]
12083 [[:Bar:Article (context)|Article]]
12085 [[Article (context)]]
12086 [[Bar:X (Y) Z|X (Y) Z]]
12087 [[:Bar:X (Y) Z|X (Y) Z]]
12091 pre-save transform: context links ("pipe trick") with interwiki prefix
12095 [[interwiki:Article|]]
12096 [[:interwiki:Article|]]
12097 [[interwiki:Bar:Article|]]
12098 [[:interwiki:Bar:Article|]]
12100 [[interwiki:Article|Article]]
12101 [[:interwiki:Article|Article]]
12102 [[interwiki:Bar:Article|Bar:Article]]
12103 [[:interwiki:Bar:Article|Bar:Article]]
12107 pre-save transform: context links ("pipe trick") with parens in title
12109 pst title=[[Somearticle (context)]]
12113 [[Article (context)|Article]]
12117 pre-save transform: context links ("pipe trick") with comma in title
12119 pst title=[[Someplace, Somewhere]]
12122 [[Otherplace, Elsewhere|]]
12123 [[Otherplace, Elsewhere, Anywhere|]]
12125 [[Otherplace, Somewhere|Otherplace]]
12126 [[Otherplace, Elsewhere|Otherplace]]
12127 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12131 pre-save transform: context links ("pipe trick") with parens and comma
12133 pst title=[[Someplace (IGNORED), Somewhere]]
12136 [[Otherplace (place), Elsewhere|]]
12138 [[Otherplace, Somewhere|Otherplace]]
12139 [[Otherplace (place), Elsewhere|Otherplace]]
12143 pre-save transform: context links ("pipe trick") with comma and parens
12145 pst title=[[Who, me? (context)]]
12148 [[Me, Myself, and I (1937 song)|]]
12150 [[Yes, you. (context)|Yes, you.]]
12151 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12155 pre-save transform: context links ("pipe trick") with namespace
12157 pst title=[[Ns:Somearticle]]
12161 [[Ns:Article|Article]]
12165 pre-save transform: context links ("pipe trick") with namespace and parens
12167 pst title=[[Ns:Somearticle (context)]]
12171 [[Ns:Article (context)|Article]]
12175 pre-save transform: context links ("pipe trick") with namespace and comma
12177 pst title=[[Ns:Somearticle, Context, Whatever]]
12181 [[Ns:Article, Context, Whatever|Article]]
12185 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12187 pst title=[[Ns:Somearticle, Context (context)]]
12191 [[Ns:Article (context)|Article]]
12195 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12197 pst title=[[Ns:Somearticle (IGNORED), Context]]
12201 [[Ns:Article, Context|Article]]
12205 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12209 [[Article(context)|]]
12210 [[Bar:Article(context)|]]
12211 [[:Bar:Article(context)|]]
12212 [[|Article(context)]]
12216 [[Article(context)|Article]]
12217 [[Bar:Article(context)|Article]]
12218 [[:Bar:Article(context)|Article]]
12219 [[Article(context)]]
12220 [[Bar:X(Y)Z|X(Y)Z]]
12221 [[:Bar:X(Y)Z|X(Y)Z]]
12225 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12229 [[Article (context)|]]
12230 [[Bar:Article (context)|]]
12231 [[:Bar:Article (context)|]]
12232 [[|Article (context)]]
12236 [[Article (context)|Article]]
12237 [[Bar:Article (context)|Article]]
12238 [[:Bar:Article (context)|Article]]
12239 [[Article (context)]]
12240 [[Bar:X (Y) Z|X (Y) Z]]
12241 [[:Bar:X (Y) Z|X (Y) Z]]
12245 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12249 [[Article(context)|]]
12250 [[Bar:Article(context)|]]
12251 [[:Bar:Article(context)|]]
12252 [[|Article(context)]]
12256 [[Article(context)|Article]]
12257 [[Bar:Article(context)|Article]]
12258 [[:Bar:Article(context)|Article]]
12259 [[Article(context)]]
12260 [[Bar:X(Y)Z|X(Y)Z]]
12261 [[:Bar:X(Y)Z|X(Y)Z]]
12265 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12269 [[Article (context), context|]]
12270 [[Article (context),context|]]
12271 [[Bar:Article (context), context|]]
12272 [[Bar:Article (context),context|]]
12273 [[:Bar:Article (context), context|]]
12274 [[:Bar:Article (context),context|]]
12276 [[Article (context), context|Article]]
12277 [[Article (context),context|Article]]
12278 [[Bar:Article (context), context|Article]]
12279 [[Bar:Article (context),context|Article]]
12280 [[:Bar:Article (context), context|Article]]
12281 [[:Bar:Article (context),context|Article]]
12285 pre-save transform: trim trailing empty lines
12289 Empty lines are trimmed
12295 Empty lines are trimmed
12299 pre-save transform: Signature expansion
12304 * <noinclude>~~~</noinclude>
12305 * <includeonly>~~~</includeonly>
12306 * <onlyinclude>~~~</onlyinclude>
12308 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12309 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12310 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12311 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12316 pre-save transform: Signature expansion in nowiki tags (bug 93)
12322 <nowiki>~~~~</nowiki>
12324 <includeonly><nowiki>~~~~</nowiki></includeonly>
12326 <noinclude><nowiki>~~~~</nowiki></noinclude>
12328 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12330 {{subst:Foo}} shall be converted to FOO
12332 As well as inside noinclude/onlyinclude
12333 <noinclude>{{subst:Foo}}</noinclude>
12334 <onlyinclude>{{subst:Foo}}</onlyinclude>
12336 But not inside includeonly
12337 <includeonly>{{subst:Foo}}</includeonly>
12341 <nowiki>~~~~</nowiki>
12343 <includeonly><nowiki>~~~~</nowiki></includeonly>
12345 <noinclude><nowiki>~~~~</nowiki></noinclude>
12347 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12349 FOO shall be converted to FOO
12351 As well as inside noinclude/onlyinclude
12352 <noinclude>FOO</noinclude>
12353 <onlyinclude>FOO</onlyinclude>
12355 But not inside includeonly
12356 <includeonly>{{subst:Foo}}</includeonly>
12360 Parsoid: Recognize nowiki with trailing space in tags
12364 <nowiki ><div>[[foo]]</nowiki >
12372 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12379 Parsoid: Recognize nowiki with odd capitalization
12383 <noWikI ><div>[[foo]]</Nowiki >
12385 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12390 Parsoid: Escape nowiki with trailing space in tags
12394 <p><nowiki > foo </nowiki ></p>
12395 <p>a<nowiki />b</p>
12396 <p>c<nowiki/ >d</p>
12398 <nowiki > foo </nowiki >
12406 Parsoid: Escape weird noWikI capitalizations
12410 <p><noWikI > foo </NoWikI ></p>
12412 <noWikI > foo </NoWikI >
12416 ### Message transform tests
12419 message transform: magic variables
12429 message transform: should not transform wiki markup
12439 message transform: <noinclude> in transcluded template (bug 4926)
12449 message transform: <onlyinclude> in transcluded template (bug 4926)
12459 {{#special:}} page name, known
12463 {{#special:Recentchanges}}
12465 Special:RecentChanges
12469 {{#special:}} page name with subpage, known
12473 {{#special:Recentchanges/param}}
12475 Special:RecentChanges/param
12479 {{#special:}} page name, unknown
12483 {{#special:foobar nonexistent}}
12485 Special:Foobar nonexistent
12489 {{#speciale:}} page name, known
12493 {{#speciale:Recentchanges}}
12495 Special:RecentChanges
12499 {{#speciale:}} page name with subpage, known
12503 {{#speciale:Recentchanges/param}}
12505 Special:RecentChanges/param
12509 {{#speciale:}} page name, unknown
12513 {{#speciale:foobar nonexistent}}
12515 Special:Foobar_nonexistent
12521 ### For Parsoid-specific tests, see
12522 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12527 parsoid=wt2html,wt2wt,html2html
12529 [[Image:foobar.jpg]]
12531 <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>
12534 <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>
12538 Simple image (using File: namespace, now canonical)
12540 [[File:Foobar.jpg]]
12542 <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>
12545 <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>
12549 Right-aligned image
12551 [[File:Foobar.jpg|right]]
12553 <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>
12556 <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>
12562 [[File:Foobar.jpg|right|Caption text]]
12564 <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>
12567 <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>
12571 Image with caption, bug 53312 #1
12573 [[File:Foobar.jpg|right|Caption page stuff]]
12575 <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>
12578 <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>
12582 Image with caption, bug 53312 #2
12584 [[File:Foobar.jpg|right|Caption page=]]
12586 <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>
12589 <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>
12593 Image with caption, bug 53312 #3
12595 [[File:Foobar.jpg|right|Caption page=stuff]]
12597 <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>
12600 <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>
12604 Allow empty links in image captions (Bug 60753)
12608 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12613 <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>
12616 <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>
12618 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12619 </figcaption></figure>
12623 Titles in unlinked images (T23454)
12625 [[File:Foobar.jpg|link=|stuff]]
12627 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12632 Link with empty target
12641 Image with link trail
12643 Linktrails should not work for images: [[File:Foobar.jpg]]s
12645 <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
12648 <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>
12652 Image with empty attribute
12654 parsoid=wt2html,wt2wt,html2html
12656 [[File:Foobar.jpg|right||Caption text]]
12658 <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>
12661 <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>
12665 1. Block image with individual attributes from templates
12667 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12669 <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>
12672 <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>
12676 2. Block Image with individual attributes from templates
12678 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12680 <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>
12683 <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>
12687 3. Inline image with individual attributes from templates
12689 [[File:Foobar.jpg|{{echo|50px}}]]
12691 <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>
12694 <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>
12697 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12698 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12700 Image with multiple attributes from the same template
12702 [[File:Foobar.jpg|{{image_attribs}}]]
12704 <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>
12707 <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>
12711 Image with link tails
12715 123[[File:Foobar.jpg]]456
12716 123[[File:Foobar.jpg|right]]456
12717 123[[File:Foobar.jpg|thumb]]456
12719 <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
12721 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
12722 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
12725 <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>
12727 <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>
12729 <div class="thumb tright">
12730 <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>
12731 <div class="thumbcaption">
12732 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12738 <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>
12739 <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>
12740 <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>
12744 Image with multiple captions -- only last one is accepted
12746 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12748 <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>
12751 <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>
12755 Image with multiple widths -- use last
12757 [[File:Foobar.jpg|200px|300px|caption]]
12759 <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>
12762 <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>
12766 Image with multiple alignments -- use first (bug 48664)
12770 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12772 [[File:Foobar.jpg|middle|text-top|caption]]
12774 <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>
12775 <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>
12778 <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>
12779 <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>
12783 Image with width attribute at different positions
12785 [[File:Foobar.jpg|200px|right|Caption]]
12786 [[File:Foobar.jpg|right|200px|Caption]]
12787 [[File:Foobar.jpg|right|Caption|200px]]
12789 <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>
12790 <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>
12791 <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>
12794 <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>
12795 <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>
12796 <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>
12799 # a sad bit of backward-compatibility
12801 Image with size specified with pxpx (bug 13500, 51628)
12803 parsoid=wt2html,wt2wt,html2html
12805 [[File:Foobar.jpg|20pxpx]]
12806 [[File:Foobar.jpg|200x20pxpx]]
12808 <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>
12809 <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>
12812 <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>
12816 Image with link parameter, wiki target
12818 [[File:Foobar.jpg|link=Main Page]]
12820 <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>
12823 <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>
12826 # parsoid bug 49293 (part 1)
12828 Image with link parameter, URL target
12830 [[File:Foobar.jpg|link=http://example.com/]]
12832 <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>
12835 <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>
12838 # parsoid bug 49293 (part 2)
12840 Image with link parameter, protocol-less URL target
12842 [[File:Foobar.jpg|link=//example.com/]]
12844 <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>
12847 <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>
12851 Escaping non-block captions (T107435)
12854 "modes": ["wt2wt"],
12856 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
12860 [[Image:Foobar.jpg|caption]]
12862 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
12866 Image with link parameter, wgExternalLinkTarget
12868 [[Image:foobar.jpg|link=http://example.com/]]
12870 wgExternalLinkTarget='foobar'
12872 <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>
12877 Image with link parameter, wgNoFollowLinks set to false
12879 [[Image:foobar.jpg|link=http://example.com/]]
12881 wgNoFollowLinks=false
12883 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12888 Image with link parameter, wgNoFollowDomainExceptions
12890 [[Image:foobar.jpg|link=http://example.com/]]
12892 wgNoFollowDomainExceptions='example.com'
12894 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12899 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12901 [[Image:foobar.jpg|link=http://example.com/|Title]]
12903 wgExternalLinkTarget='foobar'
12905 <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>
12910 Image with empty link parameter
12912 [[File:Foobar.jpg|link=]]
12914 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12917 <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>
12921 Image with link parameter (wiki target) and unnamed parameter
12923 [[File:Foobar.jpg|link=Main_Page|Title]]
12925 <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>
12928 <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>
12932 Image with link parameter (URL target) and unnamed parameter
12934 [[File:Foobar.jpg|link=http://example.com/|Title]]
12936 <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>
12939 <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>
12943 Thumbnail image with link parameter
12946 parsoid=wt2html,wt2wt,html2html
12948 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12950 <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>
12953 <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>
12957 Manually-specified thumbnail image
12961 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12963 <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>
12966 <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>
12970 Manually-specified thumbnail image with explicit link to wiki page
12973 parsoid=wt2html,wt2wt,html2html
12975 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12977 <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>
12980 <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>
12984 Manually-specified thumbnail image with explicit link to url
12987 parsoid=wt2html,wt2wt,html2html
12989 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12991 <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>
12994 <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>
12998 Manually-specified thumbnail image with explicit no link
13001 parsoid=wt2html,wt2wt,html2html
13003 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13005 <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>
13008 <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>
13012 Manually-specified thumbnail image with explicit link and alt text
13015 parsoid=wt2html,wt2wt,html2html
13017 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13019 <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>
13022 <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>
13026 Image with frame and link
13028 parsoid=wt2html,wt2wt,html2html
13030 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13032 <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>
13035 <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>
13039 Image with frame and link and explicit alt
13041 parsoid=wt2html,wt2wt,html2html
13043 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13045 <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>
13048 <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>
13052 Image with wiki markup in implicit alt
13054 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13056 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13058 <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>
13059 </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>
13062 <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>
13063 <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>
13067 Alt image option should handle most kinds of wikitext without barfing
13069 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13071 <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>
13074 <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>
13077 ###################
13078 # Conflicting image format options.
13079 # First option specified should 'win'.
13080 # All three cases in each test should be identical.
13083 Image with 'frameless' first.
13085 parsoid=wt2html,wt2wt,html2html
13087 [[File:Foobar.jpg|frameless|caption]]
13089 [[File:Foobar.jpg|frameless|frame|caption]]
13091 [[File:Foobar.jpg|frameless|thumb|caption]]
13093 <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>
13094 </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>
13095 </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>
13098 <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>
13099 <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>
13100 <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>
13104 Image with 'frame' first.
13106 parsoid=wt2html,wt2wt,html2html
13108 [[File:Foobar.jpg|frame|caption]]
13109 [[File:Foobar.jpg|frame|frameless|caption]]
13110 [[File:Foobar.jpg|frame|thumb|caption]]
13112 <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>
13113 <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>
13114 <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>
13117 <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>
13118 <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>
13119 <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>
13123 Image with 'thumb' first.
13125 parsoid=wt2html,wt2wt,html2html
13127 [[File:Foobar.jpg|thumb|caption]]
13128 [[File:Foobar.jpg|thumb|frameless|caption]]
13129 [[File:Foobar.jpg|thumb|frame|caption]]
13131 <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>
13132 <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>
13133 <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>
13136 <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>
13137 <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>
13138 <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>
13141 ###################
13143 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13144 # and https://phabricator.wikimedia.org/T64258
13145 # Foobar has actual size of 1941x220
13146 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13147 # a scalable format.
13148 # 2. Framed images always ignore size options; always render at default size.
13149 # 3. "Unspecified format" and border are the only types which can be
13153 Image: "unspecified format" and border enlarge
13155 parsoid=wt2html,wt2wt,html2html
13157 [[File:Foobar.jpg|2000px]]
13159 [[File:Foobar.jpg|border|2000px]]
13161 <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>
13162 </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>
13165 <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>
13166 <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>
13170 Image: "unspecified format" and border reduce
13172 parsoid=wt2html,wt2wt,html2html
13174 [[File:Foobar.jpg|1000px]]
13176 [[File:Foobar.jpg|border|1000px]]
13178 <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>
13179 </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>
13182 <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>
13183 <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>
13187 Image: thumbs reduce
13189 parsoid=wt2html,wt2wt,html2html
13191 [[File:Foobar.jpg|thumb|50px]]
13193 <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>
13196 <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>
13200 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13202 parsoid=wt2html,wt2wt,html2html
13204 [[File:Foobar.jpg|thumb|2000px]]
13206 [[File:Foobar.svg|thumb|2000px]]
13208 <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>
13209 <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>
13212 <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>
13213 <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>
13217 Image: frameless can reduce in size
13219 parsoid=wt2html,wt2wt,html2html
13221 [[File:Foobar.jpg|frameless|50px]]
13223 <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>
13226 <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>
13230 Image: bitmap frameless can't be enlarged past original size, but vector can
13232 parsoid=wt2html,wt2wt,html2html
13234 [[File:Foobar.jpg|frameless|2000px]]
13236 [[File:Foobar.svg|frameless|2000px]]
13238 <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>
13239 </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>
13242 <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>
13243 <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>
13247 Image: framed images are always unscaled.
13249 parsoid=wt2html,wt2wt,html2html
13251 [[File:Foobar.jpg|frame]]
13253 [[File:Foobar.jpg|frame|50px]]
13255 [[File:Foobar.jpg|frame|50x50px]]
13257 [[File:Foobar.jpg|frame|2000px]]
13259 <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>
13260 <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>
13261 <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>
13262 <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>
13265 <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>
13266 <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>
13267 <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>
13268 <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>
13271 ###################
13274 Link to image page- image page normally doesn't exists, hence edit link
13275 Add test with existing image page
13276 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13280 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13285 bug 18784 Link to non-existent image page with caption should use caption as link text
13287 [[:Image:test|caption]]
13289 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13294 Frameless image caption with a free URL
13296 [[File:Foobar.jpg|http://example.com]]
13298 <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>
13301 <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>
13305 Thumbnail image caption with a free URL
13309 [[File:Foobar.jpg|thumb|http://example.com]]
13311 <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>
13314 <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>
13318 Thumbnail image caption with a free URL and explicit alt
13321 parsoid=wt2html,wt2wt,html2html
13323 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13325 <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>
13328 <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>
13332 SVG thumbnails with no language set
13335 [[File:Foobar.svg|thumb|caption]]
13337 <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>
13340 <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>
13344 SVG thumbnails with language de
13346 parsoid=wt2html,wt2wt,html2html
13348 [[File:Foobar.svg|thumb|caption|lang=de]]
13350 <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>
13353 <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>
13357 SVG thumbnails with invalid language code
13359 parsoid=wt2html,wt2wt,html2html
13361 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13363 <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>
13366 <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>
13370 BUG 1887: A ISBN with a thumbnail
13372 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13374 <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>
13377 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
13381 BUG 1887: A RFC with a thumbnail
13383 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13385 <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>
13388 <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>
13392 BUG 1887: A mailto link with a thumbnail
13394 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13396 <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>
13399 <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>
13402 # Pending resolution to bug 368
13404 BUG 648: Frameless image caption with a link
13406 [[File:Foobar.jpg|text with a [[link]] in it]]
13408 <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>
13411 <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>
13415 BUG 648: Frameless image caption with a link (suffix)
13417 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13419 <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>
13422 <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>
13426 BUG 648: Frameless image caption with an interwiki link
13428 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13430 <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>
13433 <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>
13437 BUG 648: Frameless image caption with a piped interwiki link
13439 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13441 <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>
13444 <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>
13448 T107474: Frameless image caption with <nowiki>
13450 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13452 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid=\"{&quot;dsr&quot;:[18,75,8,9]}\">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>
13456 Escape HTML special chars in image alt text
13458 [[File:Foobar.jpg|& < > "]]
13460 <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>
13463 <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>
13467 BUG 499: Alt text should have Ӓ, not &1234;
13469 [[File:Foobar.jpg|♀]]
13471 <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>
13474 <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>
13478 Broken image caption with link
13480 parsoid=wt2html,wt2wt,html2html
13482 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13484 <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.
13487 <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>
13491 Image caption containing another image
13493 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13495 <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>
13498 <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>
13502 Image: caption containing a newline
13504 [[File:Foobar.jpg|This
13507 <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>
13510 <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>
13514 Image: caption containing leading space
13515 (The leading space should not trigger nowiki escaping in wt2wt mode)
13517 [[File:Foobar.jpg|thumb| bar]]
13519 <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>
13522 <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>
13526 Image: caption containing a table
13528 parsoid=wt2html,wt2wt,html2html
13530 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13536 and some more text.]]
13538 <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>
13541 <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
13544 <tr><th>Foo </th><th>Bar</th></tr>
13547 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13551 Bug 3090: External links other than http: in image captions
13553 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13555 <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>
13558 <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>
13564 parsoid=wt2html,wt2wt,html2html
13566 [[Image:foobar.jpg|a|class=b]]
13568 <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>
13571 <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>
13575 Localized image handling (1).
13577 parsoid=wt2html,wt2wt,html2html
13580 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13582 <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>
13585 <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>
13589 Localized image handling (2).
13592 parsoid=wt2html,wt2wt,html2html
13595 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13597 <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>
13600 <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>
13604 "border", "frameless" and "class" attributes on an image.
13607 parsoid=wt2html,wt2wt,html2html
13609 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13611 <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>
13614 <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>
13617 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13619 Invalid image attributes (bug 62500)
13622 parsoid=wt2html,wt2wt,html2html
13624 [[File:Foobar.jpg|thumb|float|left|caption]]
13626 [[File:Foobar.jpg|thumb|righ|caption]]
13628 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13630 <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>
13631 <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>
13632 <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>
13635 <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>
13636 <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>
13637 <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>
13643 #REDIRECT [[File:Barfoo.jpg]]
13646 # FIXME: Parsoid should run this test -- but we'd need to teach the
13647 # mockAPI about the redirected Barfoo.jpg image.
13651 [[Image:Barfoo.jpg]]
13653 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13658 Missing image with uploads disabled
13662 [[File:Foobaz.jpg]]
13664 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13667 <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>
13670 # Parsoid-specific testing for images
13671 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13672 # Currently imperfect due to a flaw in the Parsoid testrunner
13674 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13678 Parsoid-specific image handling - simple image with size and middle alignment
13680 [[File:Foobar.jpg|middle|50px]]
13682 <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>
13686 Parsoid-specific image handling - simple image with size, middle alignment,
13687 non-standard namespace alias
13689 parsoid=wt2wt,wt2html,html2html
13691 [[Image:Foobar.jpg|middle|50px]]
13693 <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>
13697 Parsoid-specific image handling - simple image with size and middle alignment
13700 [[File:Foobar.jpg|50px|middle]]
13702 <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>
13706 Parsoid-specific image handling - simple image with size and middle alignment
13707 and non-standard namespace name
13709 parsoid=wt2html,wt2wt,html2html
13711 [[Image:Foobar.jpg|50px|middle]]
13713 <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>
13717 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13719 [[File:Foobar.jpg|500x10px|baseline|caption]]
13721 <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>
13725 Parsoid-specific image handling - simple image with border and size spec
13727 [[File:Foobar.jpg|50px|border|caption]]
13729 <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>
13733 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13735 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13737 <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>
13741 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13744 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13746 <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>
13750 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13752 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13754 <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>
13758 Parsoid-specific image handling - thumbnail with specific size, halign,
13759 valign, and caption (existing content)
13761 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13763 <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>
13767 Parsoid-specific image handling - framed image with specific size and caption
13770 parsoid=wt2html,wt2wt,html2html
13772 [[File:Foobar.jpg|frame|500x50px|caption]]
13774 <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>
13778 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13781 parsoid=wt2html,wt2wt,html2html
13783 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13785 <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>
13789 Parsoid-specific image handling - frameless image with specific size, border, and caption
13791 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13793 <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>
13797 Parsoid-specific image handling - simple image with a formatted caption
13799 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13801 <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>
13805 Parsoid-specific image handling - caption with a template in it
13807 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13809 <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>
13813 Parsoid-specific image handling - caption with unbalanced tags in it
13815 parsoid=wt2html,wt2wt,html2html
13818 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13822 <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>
13827 Parsoid-specific image handling - empty caption (1)
13829 parsoid=wt2html,wt2wt
13831 [[File:Foobar.jpg|thumb|]]
13833 <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>
13836 # empty captions don't get serialized unless we're in the "round trip" case
13838 Parsoid-specific image handling - empty caption (2)
13842 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13843 <a href="./File:Foobar.jpg">
13844 <img resource="./File:Foobar.jpg"
13845 src="//example.com/images/3/3a/Foobar.jpg"
13846 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13847 height="25" width="220"/>
13849 <figcaption></figcaption>
13852 [[File:Foobar.jpg|thumb]]
13856 Parsoid-specific image handling - whitespace caption
13858 [[File:Foobar.jpg|thumb| ]]
13860 <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>
13864 Parsoid-specific image handling - lang option
13867 [[File:Foobar.svg|lang=de|caption]]
13871 <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>
13875 ## Edge case bugs in Parsoid from T93580
13877 T93580: 1. Templated <ref> inside block images
13879 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
13883 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
13885 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
13889 T93580: 2. <ref> inside inline images
13891 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
13895 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid=\"{&quot;dsr&quot;:[64,78,5,6]}\" data-mw=\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;id&quot;:&quot;mw-reference-text-cite_note-1&quot;},&quot;attrs&quot;:{}}\"><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid=\"{&quot;group&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;content&quot;:&quot;foo&quot;,&quot;hasRefInRef&quot;:false,&quot;dsr&quot;:[64,78,5,6],&quot;tmp&quot;:{}}\" data-mw=\"{}\">"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13897 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
13901 T93580: 3. Templated <ref> inside inline images
13903 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
13907 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid=\"{&quot;dsr&quot;:[64,96,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;<ref>{{echo|foo}}</ref>&quot;}},&quot;i&quot;:0}}]}\"><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid=\"{&quot;group&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;content&quot;:&quot;foo&quot;,&quot;hasRefInRef&quot;:false,&quot;dsr&quot;:[64,96,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;tmp&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;<ref>{{echo|foo}}</ref>&quot;}},&quot;i&quot;:0}}]}\">"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13909 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
13916 Subpage test/subpage
13924 subpage title=[[Subpage test]]
13928 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13933 Subpage noslash link
13935 subpage title=[[Subpage test]]
13939 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13944 Subpage test/1/2/subpage
13950 Relative subpage noslash link
13952 parsoid=wt2wt,wt2html,html2html
13953 subpage title=[[Subpage test/1/2/3/4]]
13959 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13960 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13963 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13964 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13968 Parsoid: dot-slash prefixed wikilinks
13978 </p><p>[[././baz/]]
13983 </p><p>[[././baz/]]
13988 Render invalid page names as plain text (bug 51090)
14001 [[{{echo|./../foo}}|bar]]
14002 [[{{echo|foo/.}}|bar]]
14003 [[{{echo|foo/..}}|bar]]
14004 [[{{echo|foo~~~~bar}}]]
14005 [[{{echo|foo>bar}}]]
14006 [[{{echo|foo././bar}}]]
14007 [[{{echo|foo{bar}}]]
14008 [[{{echo|foo}bar}}]]
14009 [[{{echo|foo[bar}}]]
14010 [[{{echo|foo]bar}}]]
14011 [[{{echo|foo<bar}}]]
14013 <p>[[./../foo|bar]]
14023 </p><p>[[./../foo|bar]]
14036 <p>[[./../foo|bar]]
14047 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14048 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14049 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14050 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14051 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14052 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14053 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14054 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14055 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14056 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14057 [[<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>
14065 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14070 BUG 561: {{/Subpage}}
14072 subpage title=[[Page]]
14076 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14084 Category:MediaWiki User's Guide
14092 [[:Category:MediaWiki User's Guide]]
14094 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14103 [[Category:MediaWiki User's Guide]]
14105 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14109 PAGESINCATEGORY invalid title fatal (r33546 fix)
14111 {{PAGESINCATEGORY:<bogus>}}
14118 Category with different sort key
14122 [[Category:MediaWiki User's Guide|Foo]]
14124 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14128 Category with identical sort key
14132 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14134 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14138 Category with empty sort key
14143 [[Category:MediaWiki User's Guide|]]
14145 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14149 Category with empty sort key and parentheses
14154 [[Category:Foo (bar)|]]
14156 [[Category:Foo (bar)|Foo]]
14160 Category with link tail
14165 123[[Category:Foo]]456
14167 123[[Category:Foo]]456
14171 Category with template
14176 [[Category:{{echo|Foo}}]]
14178 [[Category:{{echo|Foo}}]]
14182 Category with template in sort key
14187 [[Category:Foo|{{echo|Bar}}]]
14189 [[Category:Foo|{{echo|Bar}}]]
14193 Category with template in sort key and title
14198 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14200 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14204 Category / paragraph interactions
14206 Foo [[Category:Baz]] Bar
14208 Foo [[Category:Baz]]
14216 [[Category:Baz]] Bar
14229 {{echo|[[Category:Baz]]}}
14243 ## The whitespace on the empty line is part of the test. Please do not delete
14245 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14247 parsoid=wt2html,wt2wt
14251 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14253 {{echo|[[Category:Foo]] and so should this!}}
14255 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14260 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14262 <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>
14265 ## Parsoid will not try to wt2wt this while preserving newlines because
14266 ## it suppresses excess newlines within list items -- and we don't want to
14267 ## introduce a special case just for categories, which is, in reality somewhat
14268 ## odd behavior -- categories are unlikely to be used in list items like this
14269 ## in top-level pages and are only likely to show up in template-generated
14270 ## list items where this RT-ing is a non-issue.
14272 ## The whitespace on the empty line is part of the test. Please do not delete
14274 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14280 [[Category:Foo]] and this should be part of the same list item
14283 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14285 <ul><li>This and this should be part of the same list item</li>
14286 <li>So should this and this should be part of the same list item</li></ul>
14289 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14290 <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>
14294 ## Newlines and categories that follow the last item of a list
14295 ## are treated differently because this (list followed by categories)
14296 ## is an extremely common pattern on wikis.
14298 3. Categories and newlines: newline suppression for last list item should RT properly
14311 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14313 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14314 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14318 4. Categories and newlines: newline suppression for last list item should RT properly
14326 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14328 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14331 ## only wt2html for this to make sure the algo only applies to the rightmost path
14333 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14346 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14348 <ul><li> d</li></ul></li></ul>
14349 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14353 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14355 * a [[Category:Foo]]
14357 <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>
14360 # This test also demonstrates because of newline+category tunneling
14361 # through the list hander, template wrapping doesn't expand to the
14362 # containing list when the list item swallows the category.
14364 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14369 <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">
14370 </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>
14374 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14378 {{echo|[[Category:Foo]]
14382 <ul><li> a</li></ul>
14384 <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">
14385 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14386 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14390 Parsoid: Serialize link to category page with colon escape
14396 [[:Category:Foo|Bar]]
14399 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14400 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14404 # html2wt localizes the "Category" namespace.
14405 # XXX the <link> element needs an empty data-parsoid attribute, or
14406 # else the html2html test fails because spaces are inserted.
14408 Link prefix/suffixes aren't applied to category links
14410 parsoid=wt2html,wt2wt,html2html
14418 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14422 Parsoid: Serialize link to file page with colon escape
14428 [[:File:Foo.png|Bar]]
14431 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14432 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14437 Parsoid: Serialize a genuine category link without colon escape
14442 [[Category:Foo|Bar]]
14444 <link rel="mw:PageProp/Category" href="./Category:Foo">
14445 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14449 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14453 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14455 [[Category:Toxine bactérienne]]
14459 Parsoid: Defaultsort
14461 {{DEFAULTSORT:Foo}}
14463 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14467 Parsoid: Defaultsort (template-generated)
14469 {{{{echo|DEFAULTSORT}}:Foo}}
14471 <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}}]}'/>
14475 ### Inter-language links
14478 Interlanguage links
14486 es:Alimento fr:Nourriture zh:食品
14488 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14489 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14490 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14494 Duplicate interlanguage links (bug 24502)
14505 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14506 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14507 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14508 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14515 Basic section headings
14522 ===Smaller headline===
14525 <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>
14528 <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>
14531 <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>
14537 Section headings with TOC
14540 === Subheadline 1 ===
14541 ===== Skipping a level =====
14542 ====== Skipping a level ======
14546 ===Another headline===
14548 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14550 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14552 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14554 <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>
14556 <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>
14563 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14565 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14571 <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>
14572 <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>
14573 <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>
14574 <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>
14575 <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>
14578 <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>
14583 TOC anchors don't collide
14591 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14593 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14594 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14595 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14596 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14600 <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>
14601 <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>
14602 <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>
14603 <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>
14607 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14609 Handling of sections up to level 6 and beyond
14612 == Level 2 Heading==
14613 === Level 3 Heading===
14614 ==== Level 4 Heading====
14615 ===== Level 5 Heading=====
14616 ====== Level 6 Heading======
14617 ======= Level 7 Heading=======
14618 ======== Level 8 Heading========
14619 ========= Level 9 Heading=========
14620 ========== Level 10 Heading==========
14622 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14624 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14626 <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>
14628 <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>
14630 <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>
14632 <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>
14634 <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>
14635 <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>
14636 <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>
14637 <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>
14638 <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>
14652 <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>
14653 <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>
14654 <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>
14655 <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>
14656 <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>
14657 <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>
14658 <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>
14659 <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>
14660 <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>
14661 <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>
14666 TOC regression (T11764)
14670 ==== title 1.1.1 ====
14675 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14677 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14679 <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>
14681 <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>
14684 <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>
14687 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14689 <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>
14695 <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>
14696 <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>
14697 <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>
14698 <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>
14699 <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>
14700 <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>
14705 TOC for heading containing <span id="..."></span> (T96153)
14708 ==<span id="old-anchor"></span>New title==
14710 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14712 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14716 <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>
14721 TOC with wgMaxTocLevel=3 (bug 6204)
14727 ==== title 1.1.1 ====
14732 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14734 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14736 <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>
14737 <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>
14740 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14742 <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>
14748 <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>
14749 <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>
14750 <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>
14751 <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>
14752 <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>
14753 <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>
14758 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14764 ====Section 1.1.1====
14765 ====Section 1.1.1.1====
14768 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14770 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14772 <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>
14775 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14779 <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>
14780 <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>
14781 <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>
14782 <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>
14783 <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>
14789 Resolving duplicate section names
14794 <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>
14795 <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>
14800 Resolving duplicate section names with differing case (bug 10721)
14805 <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>
14806 <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>
14818 Template with sections, __NOTOC__
14825 <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>
14826 <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>
14827 <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>
14828 <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>
14833 __NOEDITSECTION__ keyword
14839 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14840 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14845 Link inside a section heading
14847 ==Section with a [[Main Page|link]] in it==
14849 <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>
14854 TOC regression (T14077)
14861 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14863 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14865 <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>
14868 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14872 <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>
14873 <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>
14874 <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>
14879 BUG 1219 URL next to image (good)
14881 http://example.com [[File:Foobar.jpg]]
14883 <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>
14886 <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>
14890 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14893 The line above must have a trailing space!
14896 But just in case it doesn't...
14898 <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>
14899 <p>The line above must have a trailing space!
14901 <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>
14902 <p>But just in case it doesn't...
14907 Header with special characters (bug 25462)
14909 The tooltips shall not show entities to the user (ie. be double escaped)
14926 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14928 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14930 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14931 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14932 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14933 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14934 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14938 <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>
14941 <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>
14944 <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>
14947 <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>
14950 <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>
14956 Header with space, plus and underscore as entity
14958 Id should not contain + for spaces
14960 == Space between Text ==
14963 == Space-Entity between Text ==
14966 == Plus+between+Text ==
14969 == Plus-Entity+between+Text ==
14972 == Underscore_between_Text ==
14975 == Underscore-Entity_between_Text ==
14978 [[#Space between Text]]
14979 [[#Space-Entity between Text]]
14980 [[#Plus+between+Text]]
14981 [[#Plus-Entity+between+Text]]
14982 [[#Underscore_between_Text]]
14983 [[#Underscore-Entity_between_Text]]
14985 <p>Id should not contain + for spaces
14987 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14989 <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>
14990 <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>
14991 <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>
14992 <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>
14993 <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>
14994 <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>
14998 <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>
15001 <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>
15004 <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>
15007 <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>
15010 <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>
15013 <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>
15015 </p><p><a href="#Space_between_Text">#Space between Text</a>
15016 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15017 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15018 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15019 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15020 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15025 Headers with excess '=' characters
15026 (Are similar tests necessary beyond the 1st level?)
15030 =''italic'' heading==
15031 ==''italic'' heading=
15033 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15035 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15036 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15037 <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>
15038 <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>
15042 <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>
15043 <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>
15044 <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>
15045 <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>
15050 HTML headers vs TOC (bug 23393)
15051 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15063 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15065 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15067 <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>
15068 <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>
15071 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15073 <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>
15074 <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>
15080 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15081 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15082 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15083 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15084 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15085 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15090 Single-line or multiline-comments can follow headings
15092 parsoid=wt2html,wt2wt
15100 <h2><span class="mw-headline" id="foo">foo</span></h2>
15101 <h2><span class="mw-headline" id="bar">bar</span></h2>
15102 <h2><span class="mw-headline" id="baz">baz</span></h2>
15107 BUG 1219 URL next to image (broken)
15109 http://example.com[[File:Foobar.jpg]]
15111 <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>
15114 <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>
15118 Bug 1186 news: in the middle of text
15120 http://en.wikinews.org/wiki/Wikinews:Workplace
15122 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15128 Namespaced link must have a title
15137 Namespaced link must have a title (bad fragment version)
15139 [[Project:#fragment]]
15141 <p>[[Project:#fragment]]
15147 ### HTML tags and HTML attributes
15151 div with no attributes
15153 <div>HTML rocks</div>
15155 <div>HTML rocks</div>
15160 div with double-quoted attribute
15162 <div id="rock">HTML rocks</div>
15164 <div id="rock">HTML rocks</div>
15169 div with single-quoted attribute
15171 <div id='rock'>HTML rocks</div>
15173 <div id="rock">HTML rocks</div>
15178 div with unquoted attribute
15180 <div id=rock>HTML rocks</div>
15182 <div id="rock">HTML rocks</div>
15187 div with illegal double attributes
15189 <div id="a" id="b">HTML rocks</div>
15191 <div id="b">HTML rocks</div>
15195 # FIXME: produce empty string instead of "class" in the PHP parser, following
15198 div with empty attribute value, space before equals
15202 <div class =>HTML rocks</div>
15204 <div class="">HTML rocks</div>
15209 div with multiple empty attribute values
15213 <div id= title=>HTML rocks</div>
15215 <div id="" title="">HTML rocks</div>
15220 table with multiple empty attribute values
15228 <table title="" id="">
15229 <tbody><tr><td> hi</td></tr>
15234 div with braces in attribute value
15236 <div title="{}">Foo</div>
15238 <div title="{}">Foo</div>
15241 <div title="{}">Foo</div>
15244 # This it very inconsistent in the PHP parser: it returns
15245 # class="class" if there is a space between the name and the equal sign (see
15246 # 'div with empty attribute value, space before equals'), but strips the
15247 # attribute completely if the space is missing. We hope that not much content
15248 # depends on this, so are implementing the behavior below in Parsoid for
15249 # consistencies' sake.
15250 # FIXME: fix this behavior in the PHP parser?
15252 div with empty attribute value, no space before equals
15254 parsoid=wt2html,html2html
15256 <div class=>HTML rocks</div>
15258 <div>HTML rocks</div>
15261 <div class="">HTML rocks</div>
15265 HTML multiple attributes correction
15267 <p class="error" class="awesome">Awesome!</p>
15269 <p class="awesome">Awesome!</p>
15274 Table multiple attributes correction
15277 !+ class="error" class="awesome"| status
15282 <th class="awesome"> status
15290 <DIV ID="x">HTML ROCKS</DIV>
15292 <div id="x">HTML ROCKS</div>
15297 Non-ASCII pseudo-tags are rendered as text
15306 Pseudo-tag with URL 'name' renders as url link
15308 <http://example.com/>
15310 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15315 text with amp in the middle of nowhere
15319 <p>Remember AT&T?
15324 text with character entity: eacute
15326 I always thought é was a cute letter.
15328 <p>I always thought é was a cute letter.
15331 <p>I always thought é was a cute letter.</p>
15335 text with entity-escaped character entity-like string: eacute
15337 I always thought &eacute; was a cute letter.
15339 <p>I always thought &eacute; was a cute letter.
15344 text with undefined character entity: xacute
15346 I always thought &xacute; was a cute letter.
15348 <p>I always thought &xacute; was a cute letter.
15355 <data value="5">five</data>
15356 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15357 <mark>This highlighted text</mark>
15359 <p><data value="5">five</data>
15360 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15361 <mark>This highlighted text</mark>
15366 HTML tag with leading space is parsed as text
15370 <p>< div>foo< /div>
15375 ### Nesting tests (see bug 41545, 50604, 51081)
15378 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15379 # Note that html2wt is considerably more difficult if we use <b> in
15380 # the test case, instead of <big>
15382 Ensure that HTML adoption agency algorithm is properly implemented.
15384 <big>X<big>Y</big>Z</big>
15386 <p><big>X<big>Y</big>Z</big>
15390 # This was bug 41545 in the PHP parser.
15391 # Note that tidy doesn't handle this correctly.
15395 <kbd>X<kbd>Y</kbd>Z</kbd>
15397 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15401 # The following cases were bug 51081 in the PHP parser.
15402 # Note that there are some other nestable tags (b, i, etc) which are
15403 # not covered; see bug 51081 for discussion.
15405 # Note that tidy doesn't handle this correctly.
15409 <em>X<em>Y</em>Z</em>
15411 <p><em>X<em>Y</em>Z</em>
15415 # Note that tidy doesn't handle this correctly.
15417 Nesting of <strong>
15419 <strong>X<strong>Y</strong>Z</strong>
15421 <p><strong>X<strong>Y</strong>Z</strong>
15430 <p><q>X<q>Y</q>Z</q></p>
15433 # Note that tidy doesn't handle this correctly.
15437 <ruby>X<ruby>Y</ruby>Z</ruby>
15439 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15443 # Note that tidy doesn't handle this correctly.
15447 <bdo>X<bdo>Y</bdo>Z</bdo>
15449 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15461 [[Media:Foobar.jpg]]
15463 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15468 Media link with text
15470 [[Media:Foobar.jpg|A neat file to look at]]
15472 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15476 # FIXME: this is still bad HTML tag nesting
15477 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15479 Media link with nasty text
15481 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15483 <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>
15486 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15487 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15491 Media link to nonexistent file (bug 1702)
15493 [[Media:No such.jpg]]
15495 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15500 Image link to nonexistent file (bug 1850 - good)
15502 [[File:No_such.jpg]]
15504 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15507 <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>
15511 :Image link to nonexistent file (bug 1850 - bad)
15513 [[:Image:No such.jpg]]
15515 <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>
15518 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15524 Character reference normalization in link text (bug 1938)
15526 [[Main Page|this&that]]
15528 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15535 Test for unicode normalization
15537 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15541 (bug 19451) Links should refer to the normalized form.
15549 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15550 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15551 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15552 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15553 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15558 Empty attribute crash test (bug 2067)
15560 <font color="">foo</font>
15562 <p><font color="">foo</font>
15567 Empty attribute crash test single-quotes (bug 2067)
15569 <font color=''>foo</font>
15571 <p><font color="">foo</font>
15576 Attribute test: equals, then nothing
15578 <font color=>foo</font>
15580 <p><font>foo</font>
15585 Attribute test: unquoted value
15587 <font color=x>foo</font>
15589 <p><font color="x">foo</font>
15594 Attribute test: unquoted but illegal value (hash)
15596 <font color=#x>foo</font>
15598 <p><font color="#x">foo</font>
15602 # Parsoid does not serialize to empty attribute syntax,
15603 # so wt2wt and html2wt cases are skipped
15605 Attribute test: no value (T54330)
15607 parsoid=wt2html,html2html
15609 <font color>foo</font>
15611 <p><font color="">foo</font>
15614 <p><font color="">foo</font></p>
15618 Bug 2095: link with three closing brackets
15622 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15625 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15629 Bug 2095: link with pipe and three closing brackets
15631 [[Main Page|link]]]
15633 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15636 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15640 Bug 2095: link with pipe and three closing brackets, version 2
15642 [[Main Page|[http://example.com/]]]
15644 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15647 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15656 Template:Dangerous attribute
15658 " onmouseover="alert(document.cookie)
15662 Template:Dangerous style attribute
15664 border-size: expression(alert(document.cookie))
15670 <div style="float: right; {{{1}}}">Magic div</div>
15674 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15676 <div title="{{test}}"></div>
15678 <div title="This is a test template"></div>
15682 # Parsoid has enough context to handle this case
15684 Bug 2304: HTML attribute safety (dangerous template; 2309)
15686 <div title="{{dangerous attribute}}"></div>
15688 <div title=""></div>
15691 <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>
15695 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15697 <div style="{{dangerous style attribute}}"></div>
15699 <div style="/* insecure input */"></div>
15704 Bug 2304: HTML attribute safety (safe parameter; 2309)
15706 {{div style|width: 200px}}
15708 <div style="float: right; width: 200px">Magic div</div>
15713 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15715 {{div style|width: expression(alert(document.cookie))}}
15717 <div style="/* insecure input */">Magic div</div>
15722 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15724 {{div style|"><script>alert(document.cookie)</script>}}
15726 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15731 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15733 {{div style|" ><script>alert(document.cookie)</script>}}
15735 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15740 Bug 2304: HTML attribute safety (link)
15742 <div title="[[Main Page]]"></div>
15744 <div title="[[Main Page]]"></div>
15749 Bug 2304: HTML attribute safety (italics)
15751 <div title="''foobar''"></div>
15753 <div title="''foobar''"></div>
15758 Bug 2304: HTML attribute safety (bold)
15760 <div title="'''foobar'''"></div>
15762 <div title="'''foobar'''"></div>
15768 Bug 2304: HTML attribute safety (ISBN)
15770 <div title="ISBN 1234567890"></div>
15772 <div title="ISBN 1234567890"></div>
15777 Bug 2304: HTML attribute safety (RFC)
15779 <div title="RFC 1234"></div>
15781 <div title="RFC 1234"></div>
15786 Bug 2304: HTML attribute safety (PMID)
15788 <div title="PMID 1234567890"></div>
15790 <div title="PMID 1234567890"></div>
15795 Bug 2304: HTML attribute safety (web link)
15797 <div title="http://example.com/"></div>
15799 <div title="http://example.com/"></div>
15804 Bug 2304: HTML attribute safety (named web link)
15806 <div title="[http://example.com/ link]"></div>
15808 <div title="[http://example.com/ link]"></div>
15813 Bug 3244: HTML attribute safety (extension; safe)
15815 <div style="<nowiki>background:blue</nowiki>"></div>
15817 <div style="background:blue"></div>
15822 Bug 3244: HTML attribute safety (extension; unsafe)
15824 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15826 <div style="/* insecure input */"></div>
15830 # More MSIE fun discovered by Tom Gilder
15833 MSIE CSS safety test: spurious slash
15835 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15837 <div style="/* insecure input */">evil</div>
15842 MSIE CSS safety test: hex code
15844 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15846 <div style="/* insecure input */">evil</div>
15851 MSIE CSS safety test: comment in url
15853 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15855 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15860 MSIE CSS safety test: comment in expression
15862 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15864 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15869 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15871 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15873 <p style="/* invalid control char */">A</p>
15878 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15880 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15881 <div style="top:EXPRESSION(alert())">B</div>
15883 <p style="/* insecure input */">A</p>
15884 <div style="/* insecure input */">B</div>
15889 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15891 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15892 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15894 <div style="/* insecure input */">A</div>
15895 <p style="/* insecure input */">B</p>
15900 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15902 <div style="background-image:url⁽javascript:alert())">A</div>
15903 <div style="background-image:url₍javascript:alert())">B</div>
15904 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15906 <div style="/* insecure input */">A</div>
15907 <div style="/* insecure input */">B</div>
15908 <p style="/* insecure input */">C</p>
15912 # FIXME: Parsoid fails to sanitize this! See T58846.
15917 title="data:text/html,<img src=1 onerror=alert(1)>"
15918 style="-o-link:attr(title);-o-link-source:current">X</div>
15920 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15925 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15927 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15928 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15929 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15930 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15931 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15932 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15933 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15935 <p style="/* insecure input */">A</p>
15936 <p style="/* insecure input */">B</p>
15937 <p style="/* insecure input */">C</p>
15938 <p style="/* insecure input */">D</p>
15939 <p style="/* insecure input */">E</p>
15940 <p style="/* insecure input */">F</p>
15941 <p style="/* insecure input */">G</p>
15946 Table attribute legitimate extension
15949 !+ style="<nowiki>color:blue</nowiki>"| status
15954 <th style="color:blue"> status
15960 Table attribute safety
15963 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15968 <th style="/* insecure input */"> status
15974 CSS line continuation 1
15976 <div style="background-image: u\ rl(test.jpg);"></div>
15978 <div style="/* insecure input */"></div>
15983 CSS line continuation 2
15985 <div style="background-image: u\ rl(test.jpg); "></div>
15987 <div style="/* invalid control char */"></div>
15998 Expansion of multi-line templates in attribute values (bug 6255)
16000 <div style="background: {{identity|#00FF00}}">-</div>
16002 <div style="background: #00FF00">-</div>
16008 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16010 <div style="background:
16013 <div style="background: #00FF00">-</div>
16016 <div style="background:
16021 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16023 <div style="background: #00FF00">-</div>
16025 <div style="background: #00FF00">-</div>
16030 evil <math>-wiki-tags without Extension:Math enabled
16032 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16034 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16038 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16041 Parser hook: empty input
16054 Parser hook: empty input using terminated empty elements
16067 Parser hook: empty input using terminated empty elements (space before)
16080 Parser hook: basic input
16094 Parser hook: case insensitive
16108 Parser hook: case insensitive, redux
16121 Parser hook: nested tags
16125 <tag><tag></tag></tag>
16136 Parser hook: basic arguments
16138 <tag width=200 height = "100" depth = '50' square></tag>
16153 Parser hook: argument containing a forward slash (bug 5344)
16155 <tag filename='/tmp/bla'></tag>
16160 'filename' => '/tmp/bla',
16167 Parser hook: empty input using terminated empty elements (bug 2374)
16180 # </tag> should be output literally since there is no matching tag that begins it
16182 Parser hook: basic arguments using terminated empty elements (bug 2374)
16184 <tag width=200 height = "100" depth = '50' square/>
16203 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16207 Parser hook: static parser hook not inside a comment
16209 <statictag>hello, world</statictag>
16210 <statictag action=flush/>
16218 Parser hook: static parser hook inside a comment
16220 <!-- <statictag>hello, world</statictag> -->
16221 <statictag action=flush/>
16227 # Nested template calls; this case was broken by Parser.php rev 1.506,
16231 Template:One-parameter
16233 (My parameter is: {{{1}}})
16237 Template:Map-one-parameter
16239 {{{{{1}}}|{{{2}}}}}
16243 Nested template calls
16245 {{Map-one-parameter|One-parameter|param}}
16247 <p>(My parameter is: param)
16256 # HTML+Tidy effectively strips out the empty tags completely
16257 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16258 # which Tidy would have done for the PHP parser had there been content inside it.
16260 Sanitizer: Closing of open tags
16262 <s></s><table></table>
16264 <s></s><table></table>
16267 <p><s></s></p><table></table>
16271 Sanitizer: Closing of open but not closed tags
16280 Sanitizer: Closing of closed but not open tags
16290 Sanitizer: Closing of closed but not open table tags
16294 Table not started</td></tr></table>
16296 <p>Table not started</p>
16298 <p>Table not started</p>
16302 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16304 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16306 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16310 # In HTML5, the restrictions are that id must contain at least one character,
16311 # and must not contain any space characters.
16313 Sanitizer: Validating the contents of the id attribute (bug 4515)
16317 <br id="" /><br id="a space" />
16322 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16324 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16328 <br id="foo" /><br id="foo" />
16330 Something need to be done. foo-2 ?
16334 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16337 <meta itemprop="hello" content="world">
16338 <meta http-equiv="refresh" content="5">
16339 <meta itemprop="hello" http-equiv="refresh" content="5">
16340 <link itemprop="hello" href="{{SERVER}}">
16341 <link rel="stylesheet" href="{{SERVER}}">
16342 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16346 <p> <meta itemprop="hello" content="world" />
16347 <meta http-equiv="refresh" content="5">
16348 <meta itemprop="hello" content="5" />
16350 <link itemprop="hello" href="http://example.org" />
16351 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16352 <link itemprop="hello" href="http://example.org" />
16358 Language converter: output gets cut off unexpectedly (bug 5757)
16362 this bit is safe: }-
16364 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16366 then we get cut off here: }-
16368 all additional text is vanished
16370 <p>this bit is safe: }-
16371 </p><p>but if we add a conversion instance: xxx
16372 </p><p>then we get cut off here: }-
16373 </p><p>all additional text is vanished
16378 Self closed html pairs (bug 5487)
16381 <center><font id="bug" />Centered text</center>
16382 <div><font id="bug2" />In div text</div>
16384 <center><font id="bug" />Centered text</center>
16385 <div><font id="bug2" />In div text</div>
16394 Punctuation: nbsp before exclamation
16398 <p>C'est grave !
16403 Punctuation: CSS !important (bug 11874)
16405 <div style="width:50% !important">important</div>
16407 <div style="width:50% !important">important</div>
16412 Punctuation: CSS ! important (bug 11874; with space after)
16414 <div style="width:50% ! important">important</div>
16416 <div style="width:50% ! important">important</div>
16421 HTML bullet list, closed tags (bug 5497)
16434 <ul data-parsoid='{"stx":"html"}'>
16435 <li data-parsoid='{"stx":"html"}'>One</li>
16436 <li data-parsoid='{"stx":"html"}'>Two</li>
16442 HTML bullet list, unclosed tags (bug 5497)
16454 <ul data-parsoid='{"stx":"html"}'>
16455 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16456 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16462 HTML ordered list, closed tags (bug 5497)
16475 <ol data-parsoid='{"stx":"html"}'>
16476 <li data-parsoid='{"stx":"html"}'>One</li>
16477 <li data-parsoid='{"stx":"html"}'>Two</li>
16483 HTML ordered list, unclosed tags (bug 5497)
16496 <ol data-parsoid='{"stx":"html"}'>
16497 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16498 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16504 HTML nested bullet list, closed tags (bug 5497)
16529 HTML nested bullet list, open tags (bug 5497)
16566 HTML nested ordered list, closed tags (bug 5497)
16591 HTML nested ordered list, open tags (bug 5497)
16628 HTML ordered list item with parameters oddity
16630 <ol><li id="fragment">One</li>
16633 <ol><li id="fragment">One</li>
16638 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16640 bug 5918: autonumbering
16642 [http://first/] [http://second] [ftp://ftp]
16646 [mailto:enclosed@mail.tld With target]
16648 [mailto:enclosed@mail.tld]
16650 mailto:inline@mail.tld
16652 <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>
16653 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16654 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16655 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16656 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16659 <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>
16660 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16661 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16662 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16663 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16668 # Security and HTML correctness
16669 # From Nick Jenkins' fuzz testing
16673 Fuzz testing: Parser13
16688 Fuzz testing: Parser14
16693 <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>
16694 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16696 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16702 <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>
16704 <div id="toc" class="toc">
16705 <div id="toctitle">
16709 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16716 Fuzz testing: Parser14-table
16721 <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>
16722 <table style="__TOC__">
16727 <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>
16728 <table style="__TOC__">
16735 # Known to produce bogus xml (extra </td>)
16737 Fuzz testing: Parser16
16766 Fuzz testing: Parser21
16769 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16774 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16784 Fuzz testing: Parser22
16786 http://===r:::https://b
16790 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16798 # Known to produce bad XML for now
16800 Fuzz testing: Parser24
16807 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16808 <br style="onmouseover='alert(document.cookie);' " />
16810 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16815 <u class="|">}}}} >
16816 <br style="onmouseover='alert(document.cookie);'" />
16818 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16827 # Note: the current result listed for this is not what the original one was,
16828 # but the original bug was JavaScript injection, which is fixed in any case.
16829 # It's not clear that the original result listed was any more correct than the
16830 # current one. Original result:
16833 # <li class="||">
16834 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16836 Fuzz testing: Parser25 (bug 6055)
16842 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16844 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16849 Fuzz testing: URL adjacent extension (with space, clean)
16851 http://example.com <nowiki>junk</nowiki>
16853 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16856 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16860 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16862 http://example.com<nowiki>junk</nowiki>
16864 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16867 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16871 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16873 http://example.com<pre>junk</pre>
16875 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16878 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16883 <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>
16887 Fuzz testing: image with bogus manual thumbnail
16889 [[Image:foobar.jpg|thumbnail= ]]
16891 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16894 <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>
16898 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16900 <pre dir=" "></pre>
16902 <pre dir=" "></pre>
16907 Parsing optional HTML elements (Bug 6171)
16912 <td> Some tabular data</td>
16913 <td> More tabular data ...
16914 <td> And yet som tabular data</td>
16920 <td> Some tabular data</td>
16921 <td> More tabular data ...
16922 </td><td> And yet som tabular data</td>
16929 Correct handling of <td>, <tr> (Bug 6171)
16934 <td> Some tabular data</td>
16935 <td> More tabular data ...</td>
16936 <td> And yet som tabular data</td>
16942 <td> Some tabular data</td>
16943 <td> More tabular data ...</td>
16944 <td> And yet som tabular data</td>
16952 Parsing crashing regression (fr:JavaScript)
16956 <p></body></x>
16961 Inline wiki vs wiki block nesting
16967 <p><b>Bold paragraph</b>
16968 </p><p>New wiki paragraph
16972 # FIXME: The current php output is documented
16973 # and desired output is the parsoid target.
16975 Inline HTML vs wiki block nesting
16981 <p><b>Bold paragraph
16982 </p><p>New wiki paragraph</b>
16985 <p><b>Bold paragraph</b>
16986 </p><p>New wiki paragraph
16990 # Original result was this:
16991 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16993 # While that might be marginally more intuitive, maybe, the six-apostrophe
16994 # construct is clearly pathological and the result stated here (which is what
16995 # the parser actually does) is about as reasonable as anything.
16997 Mixing markup for italics and bold
17000 '''bold''''''bold''bolditalics'''''
17002 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17010 Article for special page transclusion test
17014 Special page transclusion
17017 {{Special:Prefixindex/Xyzzyx}}
17019 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
17024 Special page transclusion twice (bug 5021)
17027 {{Special:Prefixindex/Xyzzyx}}
17028 {{Special:Prefixindex/Xyzzyx}}
17030 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
17031 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
17036 Transclusion of default MediaWiki message
17038 {{MediaWiki:Mainpage}}
17045 Transclusion of nonexistent MediaWiki message
17047 {{MediaWiki:Mainpagexxx}}
17049 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17054 Transclusion of MediaWiki message with underscore
17056 {{MediaWiki:history_short}}
17063 Transclusion of MediaWiki message with space
17065 {{MediaWiki:history short}}
17072 Invalid header with following text
17082 Section extraction test (section 0)
17102 Section extraction test (section 1)
17124 Section extraction test (section 2)
17145 Section extraction test (section 3)
17165 Section extraction test (section 4)
17189 Section extraction test (section 5)
17209 Section extraction test (section 6)
17230 Section extraction test (section 7)
17250 Section extraction test (section 8)
17270 Section extraction test (section 9)
17291 Section extraction test (section 10)
17311 Section extraction test (nonexistent section 11)
17330 Section extraction test with bogus heading (section 1)
17335 ==bogus== not a legal section
17339 ==bogus== not a legal section
17343 Section extraction test with bogus heading (section 2)
17348 ==bogus== not a legal section
17355 Section extraction test with comment after heading (section 1)
17367 Section extraction test with comment after heading (section 2)
17379 Section extraction test with bogus <nowiki> heading (section 1)
17384 ==bogus== <nowiki>not a legal section</nowiki>
17388 ==bogus== <nowiki>not a legal section</nowiki>
17392 Section extraction test with bogus <nowiki> heading (section 2)
17397 ==bogus== <nowiki>not a legal section</nowiki>
17403 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17404 # instead of respecting commented sections
17406 Section extraction prefixed by comment (section 1)
17417 Section extraction prefixed by comment (section 2)
17427 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17428 # instead of respecting HTML-style headings
17430 Section extraction, mixed wiki and html (section 1)
17446 Section extraction, mixed wiki and html (section 2)
17462 # Formerly testing for bug 3342
17464 Section extraction, heading surrounded by <noinclude>
17468 <noinclude>==unmarked==</noinclude>
17474 # Test behavior of bug 19910
17476 Sectiion with all-equals
17481 The line above must have a trailing space
17484 But just in case it doesn't...
17488 But just in case it doesn't...
17492 Section replacement test (section 0)
17523 Section replacement test (section 1)
17552 Section replacement test (section 2)
17582 Section replacement test (section 3)
17613 Section replacement test (section 4)
17640 Section replacement test (section 5)
17671 Section replacement test (section 6)
17701 Section replacement test (section 7)
17732 Section replacement test (section 8)
17763 Section replacement test (section 9)
17792 Section replacement test (section 10)
17822 Section replacement test with initial whitespace (bug 13728)
17826 Preformatted initial line
17830 Preformatted initial line
17837 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17849 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17862 Section extraction, <pre> around bogus header (bug 10309)
17879 Section replacement, <pre> around bogus header (bug 10309)
17881 noxml replace=2,"xxx"
17901 Handling of 
 in URLs
17905 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17908 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17910 a</a></li></ul></li></ul>
17914 Handling of %0A in URLs
17918 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17921 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17925 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17927 5 quotes, code coverage +1 line
17934 <p><b><i></i></b></p>
17937 # same html as previous, but wikitext adjusted to match parsoid html2wt
17938 # note that wt2html and html2html will put the <i> before the <b>
17940 5 quotes, code coverage +1 line w/ nowiki (1)
17942 parsoid=wt2wt,html2wt
17944 '''''<nowiki/>'''''
17949 <p><b><i></i></b></p>
17952 # same as previous, just swapping the <i> and <b>
17954 5 quotes, code coverage +1 line w/ nowiki (2)
17956 '''''<nowiki/>'''''
17961 <p><i><b></b></i></p>
17965 Special:Search page linking.
17969 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17974 {{!}} is a magic word
17976 {{!}} is a magic word there and {{!}} is still a magic word here
17978 <p>| is a magic word there and | is still a magic word here
17981 <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>
17987 title=[[Parser test]]
17992 * {{FULLPAGENAMEE}}
17994 * {{BASEPAGENAMEE}}
17998 * {{ROOTPAGENAMEE}}
18000 * {{TALKPAGENAMEE}}
18001 * {{SUBJECTPAGENAME}}
18002 * {{SUBJECTPAGENAMEE}}
18005 * {{NAMESPACENUMBER}}
18009 * {{SUBJECTSPACEE}}
18010 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18012 <ul><li> Parser test</li>
18013 <li> Parser_test</li>
18014 <li> Parser test</li>
18015 <li> Parser_test</li>
18016 <li> Parser test</li>
18017 <li> Parser_test</li>
18018 <li> Parser test</li>
18019 <li> Parser_test</li>
18020 <li> Parser test</li>
18021 <li> Parser_test</li>
18022 <li> Talk:Parser test</li>
18023 <li> Talk:Parser_test</li>
18024 <li> Parser test</li>
18025 <li> Parser_test</li>
18033 <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>
18036 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18046 image4 |300px| centre
18047 image5.svg| http://///////
18052 <ul class="gallery mw-gallery-traditional">
18053 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18054 <div class="thumb" style="height: 150px;">Image1.png</div>
18055 <div class="gallerytext">
18058 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18059 <div class="thumb" style="height: 150px;">Image2.gif</div>
18060 <div class="gallerytext">
18065 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18066 <div class="thumb" style="height: 150px;">Image3</div>
18067 <div class="gallerytext">
18070 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18071 <div class="thumb" style="height: 150px;">Image4</div>
18072 <div class="gallerytext">
18077 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18078 <div class="thumb" style="height: 150px;">Image5.svg</div>
18079 <div class="gallerytext">
18080 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18084 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18085 <div class="thumb" style="height: 150px;">* image6</div>
18086 <div class="gallerytext">
18094 Gallery (with options)
18096 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18097 File:Nonexistent.jpg|caption
18098 File:Nonexistent.jpg
18099 image:foobar.jpg|some '''caption''' [[Main Page]]
18101 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18104 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18105 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18106 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18107 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18108 <div class="gallerytext">
18113 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18114 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18115 <div class="gallerytext">
18118 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18119 <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>
18120 <div class="gallerytext">
18121 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18125 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18126 <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>
18127 <div class="gallerytext">
18130 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18131 <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>
18132 <div class="gallerytext">
18142 Gallery with link that has fragment
18145 image:foobar.jpg|link=Main_Page
18146 image:foobar.jpg|link=Main_Page#section
18147 image:foobar.jpg|link=Main Page#section|caption
18150 <ul class="gallery mw-gallery-traditional">
18151 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18152 <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>
18153 <div class="gallerytext">
18156 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18157 <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>
18158 <div class="gallerytext">
18161 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18162 <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>
18163 <div class="gallerytext">
18173 Gallery with wikitext inside caption
18176 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18177 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18180 <ul class="gallery mw-gallery-traditional">
18181 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18182 <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>
18183 <div class="gallerytext">
18184 <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>
18188 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18189 <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>
18190 <div class="gallerytext">
18191 <p>This is a test template
18200 gallery (with showfilename option)
18202 <gallery showfilename>
18203 File:Nonexistent.jpg|caption
18204 File:Nonexistent.jpg
18205 image:foobar.jpg|some '''caption''' [[Main Page]]
18209 <ul class="gallery mw-gallery-traditional">
18210 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18211 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18212 <div class="gallerytext">
18213 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18218 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18219 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18220 <div class="gallerytext">
18221 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18225 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18226 <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>
18227 <div class="gallerytext">
18228 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18229 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18233 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18234 <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>
18235 <div class="gallerytext">
18236 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18245 Gallery (with namespace-less filenames)
18248 File:Nonexistent.jpg
18254 <ul class="gallery mw-gallery-traditional">
18255 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18256 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18257 <div class="gallerytext">
18260 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18261 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18262 <div class="gallerytext">
18265 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18266 <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>
18267 <div class="gallerytext">
18270 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18271 <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>
18272 <div class="gallerytext">
18280 HTML Hex character encoding (spells the word "JavaScript")
18282 parsoid=wt2html,wt2wt,html2html
18284 JavaScript
18286 <p>JavaScript
18291 <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>
18295 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18299 <p>&#xsee;&#XSEE;
18302 <p>&#xsee;&#XSEE;</p>
18306 HTML Hex character encoding mixed case
18308 parsoid=wt2html,wt2wt,html2html
18317 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18320 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18321 # Note that U+000C (form feed) is not a valid XML character, so
18322 # it is banned even though allowed in HTML5.
18324 Illegal character references (T106578)
18329 ; Control (low): 
18330 ; Control (high):  Ÿ
18331 ; Surrogate: ��
18332 ; This is an okay astral character: 💩
18341 <dt>Control (low)</dt>
18343 <dt>Control (high)</dt>
18344 <dd>&#x7F; &#x9F;</dd>
18346 <dd>&#xD83D;&#xDCA9;</dd>
18347 <dt>This is an okay astral character</dt>
18353 __FORCETOC__ override
18365 ISBN 978-0-1234-56 789
18367 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18370 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18372 <p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
18376 ISBN followed by 5 spaces
18387 ISBN ISBN 1234567890
18389 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18392 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18395 # Uppercase X and lowercase x as well
18406 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18407 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18408 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18409 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18410 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18411 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18414 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18415 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18416 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18417 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18418 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18419 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18423 ISBN with empty prefix (parsoid test)
18427 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18430 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18434 Bug 22905: <abbr> followed by ISBN followed by </a>
18436 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18438 <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>
18441 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
18449 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18454 Double RFC with a wiki link
18458 <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>
18467 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18470 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18474 Centre-aligned image
18476 [[Image:foobar.jpg|centre]]
18478 <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>
18485 [[Image:foobar.jpg|none]]
18487 <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>
18492 Width + Height sized image (using px) (height is ignored)
18494 [[Image:foobar.jpg|640x480px]]
18496 <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>
18501 Width-sized image (using px, no following whitespace)
18503 [[Image:foobar.jpg|640px]]
18505 <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>
18510 Width-sized image (using px, with following whitespace - test regression from r39467)
18512 [[Image:foobar.jpg|640px ]]
18514 <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>
18519 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18521 [[Image:foobar.jpg| 640px]]
18523 <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>
18528 Image with page parameter
18532 [[File:LoremIpsum.djvu|page=2]]
18534 <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>
18537 <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>
18541 Another italics / bold test
18549 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18555 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18558 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18563 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18565 Images with the "|" character in the comment
18567 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18569 <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>
18572 <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>
18576 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18578 <html><script>alert(1);</script></html>
18580 <p><html><script>alert(1);</script></html>
18585 HTML with raw HTML ($wgRawHtml==true)
18589 <html><script>alert(1);</script></html>
18591 <p><script>alert(1);</script>
18596 Parents of subpages, one level up
18598 subpage title=[[Subpage test/L1/L2/L3]]
18602 <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>
18608 Parents of subpages, one level up, not named
18610 subpage title=[[Subpage test/L1/L2/L3]]
18614 <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>
18621 Parents of subpages, two levels up
18623 subpage title=[[Subpage test/L1/L2/L3]]
18629 <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
18630 </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>
18635 Parents of subpages, two levels up, without trailing slash or name.
18637 subpage title=[[Subpage test/L1/L2/L3]]
18646 Parents of subpages, two levels up, with lots of extra trailing slashes.
18648 subpage title=[[Subpage test/L1/L2/L3]]
18652 <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>
18657 Subpage test/L1/L2/L3Sibling
18663 Transclusion of a sibling page (one level up)
18665 subpage title=[[Subpage test/L1/L2/L3]]
18674 Transclusion of a child page
18676 subpage title=[[Subpage test/L1/L2]]
18685 Non-transclusion because of too many up levels
18687 subpage title=[[Subpage test/L1/L2/L3]]
18689 {{../../../../More than parent}}
18691 <p>{{../../../../More than parent}}
18696 Definition list code coverage
18702 <dl><dt> title  </dt>
18704 <dt> title </dt>
18710 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18711 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18712 <dt>title</dt><dd> def</dd></dl>
18716 Don't fall for the self-closing div
18718 <div>hello world</div/>
18720 <div>hello world</div>
18729 <p>[[:Template:Msg]]
18738 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18742 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18744 Always escape literal '>' in output, not just after '<'
18758 <p>This is a test template
18759 This is a test template
18771 Inclusion of !userCanEdit() content
18775 <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>
18781 Out-of-order TOC heading levels
18790 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18792 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18794 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18795 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18798 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18800 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18801 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18807 <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>
18808 <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>
18809 <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>
18810 <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>
18811 <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>
18812 <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>
18818 ISBN with a dummy number
18828 ISBN with space-delimited number
18832 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18838 ISBN with multiple spaces, no number
18857 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18858 </p><p>ISBN 12345678901
18864 ISBN with trailing year (bug 8110)
18866 ISBN 1-234-56789-0 - 2006
18868 ISBN 1 234 56789 0 - 2006
18870 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18871 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18879 {{anchorencode:foo bar©#%n}}
18881 <p>foo_bar.C2.A9.23.25n
18886 anchorencode trims spaces
18888 {{anchorencode: __pretty__please__}}
18895 anchorencode deals with links
18897 {{anchorencode: [[hello|world]] [[hi]]}}
18904 anchorencode deals with templates
18906 {{anchorencode: {{Foo}} }}
18913 anchorencode encodes like the TOC generator: (bug 18431)
18915 === _ +:.3A%3A&&]] ===
18916 {{anchorencode: _ +:.3A%3A&&]] }}
18919 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18920 <p>.2B:.3A.253A.26.26.5D.5D
18925 Bug 6200: blockquotes and paragraph formatting
18946 Bug 8293: Use of center tag ruins paragraph formatting
18967 Parsing of overlapping (improperly nested) inline html tags
18969 <span><s>x</span></s>
18971 <p><span><s>x</span></s></span>
18974 <p><span><s>x</s></span>
18979 ### Language variants related tests
18982 Self-link in language variants
18984 title=[[Dunav]] language=sr
18986 Both [[Dunav]] and [[Дунав]] are names for this river.
18988 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18999 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19001 title=[[Duna]] language=sr
19003 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19005 <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.
19010 Link to a section of a variant of this title shouldn't be parsed as self-link
19012 title=[[Duna]] language=sr
19014 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19016 <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.
19021 Link to pages in language variants
19025 Main Page can be written as [[Маин Паге]]
19027 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19033 Multiple links to pages in language variants
19037 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19039 <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>.
19045 Simple template in language variants
19051 <p>This is a test template
19057 Template with explicit namespace in language variants
19063 <p>This is a test template
19069 Basic test for template parameter in language variants
19073 {{парамтест|param=foo}}
19075 <p>This is a test template with parameter foo
19081 Simple category in language variants
19085 [[Category:МедиаWики Усер'с Гуиде]]
19087 <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>
19104 Don't convert blue categorylinks to another variant (bug 33210)
19108 [[A]][[Category:分类]]
19110 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19115 Stripping -{}- tags (language variants)
19119 Latin proverb: -{Ne nuntium necare}-
19121 <p>Latin proverb: Ne nuntium necare
19127 Prevent conversion with -{}- tags (language variants)
19129 language=sr variant=sr-ec
19131 Latinski: -{Ne nuntium necare}-
19133 <p>Латински: Ne nuntium necare
19139 Prevent conversion of text with -{}- tags (language variants)
19141 language=sr variant=sr-ec
19143 Latinski: -{Ne nuntium necare}-
19145 <p>Латински: Ne nuntium necare
19151 Prevent conversion of links with -{}- tags (language variants)
19153 language=sr variant=sr-ec
19157 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19163 -{}- tags within headlines (within html for parserConvert())
19165 language=sr variant=sr-ec
19169 <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>
19175 Explicit definition of language variant alternatives
19177 language=zh variant=zh-tw
19179 -{zh:China;zh-tw:Taiwan}-, not China
19181 <p>Taiwan, not China
19187 Conversion around HTML tags
19189 language=sr variant=sr-ec
19191 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19192 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19195 <span title="ЛаCтин">ски</span>
19201 Explicit session-wise language variant mapping (A flag and - flag)
19203 language=zh variant=zh-tw
19205 Taiwan is not China.
19206 But -{A|zh:China;zh-tw:Taiwan}- is China,
19207 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19208 and -{China}- is China.
19210 <p>Taiwan is not China.
19211 But Taiwan is Taiwan,
19212 (This should be stripped!)
19213 and China is China.
19218 Explicit session-wise language variant mapping (H flag for hide)
19220 language=zh variant=zh-tw
19222 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19225 <p>(This should be stripped!)
19231 Adding explicit conversion rule for title (T flag)
19233 language=zh variant=zh-tw showtitle
19235 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19238 <p>Should be stripped!
19243 Testing that changing the language variant here in the tests actually works
19245 language=zh variant=zh showtitle
19247 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19250 <p>Should be stripped!
19255 Recursive conversion of alt and title attrs shouldn't clear converter state
19257 language=zh variant=zh-cn showtitle
19259 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19260 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19264 Should be stripped<span title="Exclamation">!</span>
19269 Bug 24072: more test on conversion rule for title
19271 language=zh variant=zh-tw showtitle
19273 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19274 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19277 <p>This should be stripped!
19278 This won't take interferes with the title rule.
19283 Partly disable title conversion if variant == main language code
19285 language=zh variant=zh title=[[ZH]] showtitle
19287 -{T|zh-cn:CN;zh-tw:TW}-
19295 Partly disable title conversion if variant == main language code, more
19297 language=zh variant=zh title=[[ZH]] showtitle
19307 Raw output of variant escape tags (R flag)
19309 language=zh variant=zh-tw
19311 Raw: -{R|zh:China;zh-tw:Taiwan}-
19313 <p>Raw: zh:China;zh-tw:Taiwan
19318 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19320 language=zh variant=zh-cn
19322 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19329 Conversion rules from [numeric-only string] to [something else] (T48634)
19331 language=zh variant=zh-cn
19333 -{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
19340 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19342 language=zh variant=zh-cn
19344 -{H|zh-cn:foo;zh-tw:;}-foobar
19351 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19353 language=zh variant=zh-cn
19355 -{H|=>zh-cn:foo;}-foobar
19362 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19364 language=zh variant=zh-cn
19373 Nested using of manual convert syntax
19375 language=zh variant=zh-hk
19377 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19379 <p>Nested: Hello Hong Kong!
19384 Proper conversion of text in external links
19386 language=sr variant=sr-ec
19388 http://www.google.com
19389 gopher://www.google.com
19390 [http://www.google.com http://www.google.com]
19391 [gopher://www.google.com gopher://www.google.com]
19392 [https://www.google.com irc://www.google.com]
19393 [ftp://www.google.com www.google.com/ftp://dir]
19394 [//www.google.com www.google.com]
19396 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19397 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19398 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19399 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19400 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19401 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19402 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19407 Do not convert roman numbers to language variants
19409 language=sr variant=sr-ec
19413 <p>Фридрих IV је цар.
19418 Unclosed language converter markup "-{"
19429 Don't convert raw rule "-{R|=>}-" to "=>"
19440 Don't break link parsing if language converter markup is in the caption.
19442 language=sr variant=sr-ec
19444 [[Main Page|-{R|main page}-]]
19446 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19450 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19452 Don't break image parsing if language converter markup is in the caption.
19456 [[File:Foobar.jpg|-{R|caption}-]]
19458 <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>
19462 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19464 Don't break list handling if language converter markup is in the item.
19466 language=zh variant=zh-cn
19468 ;-{zh-cn:AAA;zh-tw:BBB}-
19470 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19477 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19479 Don't break table handling if language converter markup is in the cell.
19481 language=sr variant=sr-ec
19504 Bug 529: Uncovered bullet
19513 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19514 # Templates in Wikipedia rely on this behavior, as tidy has always been
19515 # enabled there. These tests are normally run *without* tidy, so specify the
19516 # full output here.
19517 # To test realistic parsing behavior, apply a tidy-like transformation to both
19518 # the expected output and your parser's output.
19520 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19522 ******* Foo {{bullet}}
19524 <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>
19530 Bug 529: Uncovered table already at line-start
19553 Bug 529: Uncovered bullet in parser function result
19555 * Foo {{lc:{{bullet}} }}
19563 Bug 5678: Double-parsed template argument
19565 {{lc:{{{1}}}|hello}}
19572 Bug 5678: Double-parsed template invocation
19574 {{lc:{{paramtest {{!}} param = hello }} }}
19576 <p>{{paramtest | param = hello }}
19581 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19584 title=[[Main Page]]
19586 {{PRVNÍVELKÉ:ěščř}}
19587 {{prvnívelké:ěščř}}
19607 Morwen/13: Unclosed link followed by heading
19614 <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>
19619 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19626 <h1><span class="mw-headline" id="heading">heading</span></h1>
19631 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19638 <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>
19653 Paragraphs inside divs (no extra line breaks)
19665 Paragraphs inside divs (extra line break on open)
19680 Paragraphs inside divs (extra line break on close)
19695 Paragraphs inside divs (extra line break on open and close)
19712 Nesting tags, paragraphs on lines which begin with <div>
19714 <div></div><strong>A
19717 <p><strong>A</strong></p>
19718 <p><strong>B</strong></p>
19726 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19728 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19730 <blockquote>Line one
19732 Line two</blockquote>
19734 <blockquote>Line one
19735 Line two</blockquote>
19739 <p>Line one Line two</p>
19744 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19749 Line two</blockquote>
19754 Line two</blockquote>
19759 Line two</blockquote>
19763 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19765 <blockquote>Line one
19770 <blockquote>Line one
19783 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19805 Paragraphs inside blockquotes/divs (no extra line breaks)
19807 <blockquote><div>Line one
19809 Line two</div></blockquote>
19811 <blockquote><div>Line one
19812 Line two</div></blockquote>
19817 Paragraphs inside blockquotes/divs (extra line break on open)
19822 Line two</div></blockquote>
19827 Line two</div></blockquote>
19832 Paragraphs inside blockquotes/divs (extra line break on close)
19834 <blockquote><div>Line one
19837 </div></blockquote>
19839 <blockquote><div>Line one
19842 </div></blockquote>
19847 Paragraphs inside blockquotes/divs (extra line break on open and close)
19853 </div></blockquote>
19859 </div></blockquote>
19864 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19866 wgLinkHolderBatchSize=0
19872 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19873 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19874 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19879 Free external link invading image caption
19881 [[Image:Foobar.jpg|thumb|http://x|hello]]
19883 <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>
19888 Bug 15196: localised external link numbers
19892 [http://en.wikipedia.org/]
19894 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19897 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19901 Multibyte character in padleft
19903 {{padleft:-Hello|7|Æ}}
19910 Multibyte character in padright
19912 {{padright:Hello-|7|Æ}}
19919 formatdate parser function
19921 {{#formatdate:2009-03-24}}
19923 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19928 formatdate parser function, with default format
19930 {{#formatdate:2009-03-24|mdy}}
19932 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19937 Spacing of numbers in formatted dates
19939 {{#formatdate:January 15}}
19941 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19946 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
19948 language=nl title=[[MediaWiki:Common.css]]
19950 {{#formatdate:2009-03-24|dmy}}
19952 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19965 Edit comment with link
19969 I like the [[Main Page]] a lot
19971 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19975 Edit comment with link and link text
19979 I like the [[Main Page|best pages]] a lot
19981 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19985 Edit comment with link and link text with suffix
19989 I like the [[Main Page|best page]]s a lot
19991 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19995 Edit comment with section link (non-local, eg in history list)
19997 comment title=[[Main Page]]
19999 /* External links */ removed bogus entries
20001 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20005 Edit comment with section link and text before it (non-local, eg in history list)
20007 comment title=[[Main Page]]
20009 pre-comment text /* External links */ removed bogus entries
20011 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>
20015 Edit comment with section link (local, eg in diff view)
20017 comment local title=[[Main Page]]
20019 /* External links */ removed bogus entries
20021 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20025 Edit comment with subpage link (bug 14080)
20029 title=[[Subpage test]]
20031 Poked at a [[/subpage]] here...
20033 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20037 Edit comment with subpage link and link text (bug 14080)
20041 title=[[Subpage test]]
20043 Poked at a [[/subpage|neat little page]] here...
20045 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20049 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20052 title=[[Subpage test]]
20054 Poked at a [[/subpage]] here...
20056 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20060 Edit comment with bare anchor link (local, as on diff)
20064 title=[[Main Page]]
20068 <a href="#section">#section</a>
20072 Edit comment with bare anchor link (non-local, as on history)
20075 title=[[Main Page]]
20079 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20083 Anchor starting with underscore
20087 <p><a href="#_ref">One</a>
20092 Id starting with underscore
20094 <div id="_ref"></div>
20096 <div id="_ref"></div>
20101 Space normalisation on autocomment (bug 22784)
20104 title=[[Main Page]]
20106 /* __hello__world__ */
20108 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20112 percent-encoding and + signs in comments (Bug 26410)
20116 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20118 <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>
20121 # Parsoid doesn't support this yet: see bug 73581
20122 # but it *should* omit the 'src' attribute if the image is bad.
20123 # PHP side of tests was disabled in
20124 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20125 # because of issues in the PHP parserTests infrastructure
20126 # (but the output below is indeed what the PHP side emits)
20128 Bad images - basic functionality
20131 !! DISABLED/html/php
20133 <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>
20137 Bad images - bug 16039: text after bad image disappears
20142 !! DISABLED/html/php
20148 <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>
20153 Verify that displaytitle works (bug #22501) no displaytitle
20157 wgAllowDisplayTitle=true
20158 wgRestrictDisplayTitle=false
20160 this is not the the title
20163 <p>this is not the the title
20168 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20173 wgAllowDisplayTitle=true
20174 wgRestrictDisplayTitle=false
20176 this is not the the title
20177 {{DISPLAYTITLE:whatever}}
20180 <p>this is not the the title
20185 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20190 wgAllowDisplayTitle=true
20191 wgRestrictDisplayTitle=true
20193 this is not the the title
20194 {{DISPLAYTITLE:whatever}}
20197 <p>this is not the the title
20202 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20207 wgAllowDisplayTitle=true
20208 wgRestrictDisplayTitle=true
20210 this is not the the title
20211 {{DISPLAYTITLE:screen}}
20214 <p>this is not the the title
20219 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20224 wgAllowDisplayTitle=false
20226 this is not the the title
20227 {{DISPLAYTITLE:screen}}
20230 <p>this is not the the title
20231 <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>
20236 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20241 wgAllowDisplayTitle=false
20243 this is not the the title
20246 <p>this is not the the title
20251 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20256 wgAllowDisplayTitle=true
20257 wgRestrictDisplayTitle=true
20259 this is not the the title
20260 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20262 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20263 <p>this is not the the title
20268 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20273 wgAllowDisplayTitle=true
20274 wgRestrictDisplayTitle=true
20276 this is not the the title
20277 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20279 <span style="color: red;">s</span>creen
20280 <p>this is not the the title
20285 Page status indicators: Empty name is invalid
20289 <indicator name=" "></indicator>
20290 <indicator></indicator>
20292 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20293 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20298 Page status indicators: Weird syntaxes that are okay
20302 <indicator name="empty" />
20303 <indicator name="name"></indicator>
20312 Page status indicators: Torture test
20316 <indicator name="01">hello world</indicator>
20317 <indicator name="02">[[Main Page]]</indicator>
20318 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20319 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20320 <indicator name="05">* foo
20322 <indicator name="06"><nowiki>foo</nowiki></indicator>
20323 <indicator name="07"> Preformatted</indicator>
20324 <indicator name="08"><div>Broken tag</indicator>
20325 <indicator name="09">{| class=wikitable
20328 <indicator name="10">Two
20330 paragraphs</indicator>
20333 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20334 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" />
20335 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>
20336 05=<ul><li> foo</li>
20340 07=<pre>Preformatted
20342 08=<div>Broken tag</div>
20344 09=<table class="wikitable">
20361 preload: check <noinclude> and <includeonly>
20365 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20371 preload: check <onlyinclude>
20375 Goodbye <onlyinclude>Hello world</onlyinclude>
20381 preload: can pass tags through if we want to
20385 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20387 <includeonly>Hello world</includeonly>
20391 preload: check that it doesn't try to do tricks
20395 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20397 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20401 Play a bit with r67090 and bug 3158
20403 <div style="width:50% !important"> </div>
20404 <div style="width:50% !important"> </div>
20405 <div style="width:50% !important"> </div>
20406 <div style="border : solid;"> </div>
20408 <div style="width:50% !important"> </div>
20409 <div style="width:50% !important"> </div>
20410 <div style="width:50% !important"> </div>
20411 <div style="border : solid;"> </div>
20414 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20415 <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>
20416 <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>
20417 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20422 HTML5 data attributes
20424 <span data-foo="bar">Baz</span>
20425 <p data-abc-def_hij="">Quuz</p>
20427 <p><span data-foo="bar">Baz</span>
20429 <p data-abc-def_hij="">Quuz</p>
20434 percent-encoding and + signs in internal links (Bug 26410)
20436 [[User:+%]] [[Page+title%]]
20437 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20438 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20439 [[%33%45]] [[%33%45+]]
20441 <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>
20442 <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>
20443 <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>
20444 <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>
20447 <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>
20448 <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>
20449 <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>
20450 <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>
20454 Special characters in embedded file links (bug 27679)
20456 [[File:Contains & ampersand.jpg]]
20457 [[File:Does not exist.jpg|Title with & ampersand]]
20459 <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>
20460 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20463 <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>
20464 <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>
20468 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20470 Text's been normalized?
20472 <p>Text's been normalized?
20477 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20479 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20481 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20486 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20488 [http://www.example.org/ ideograms]
20490 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20495 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20497 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20499 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20523 Bug 31098 Template which includes system messages which includes the template
20527 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20528 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20533 Bug31490 Turkish: ucfirst 'blah'
20544 Bug31490 Turkish: ucfirst 'ix'
20555 Bug31490 Turkish: lcfirst 'BLAH'
20566 Bug31490 Turkish: ucfırst (with a dotless i)
20572 <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>
20577 Bug31490 ucfırst (with a dotless i) with English language
20583 <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>
20588 Bug 26375: TOC with italics
20590 title=[[Main Page]]
20593 == ''Lost'' episodes ==
20595 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20597 <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>
20601 <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>
20606 Bug 26375: TOC with bold
20608 title=[[Main Page]]
20611 == '''should be bold''' then normal text ==
20613 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20615 <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>
20619 <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>
20624 Bug 33845: Headings become cursive in TOC when they contain an image
20626 title=[[Main Page]]
20629 == Image [[Image:foobar.jpg]] ==
20631 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20633 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20637 <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>
20642 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20644 title=[[Main Page]]
20647 == <blockquote>Quote</blockquote> ==
20649 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20651 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20655 <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>
20659 <div id="toc" class="toc">
20660 <div id="toctitle">
20664 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20668 <h2><span class="mw-headline" id="Quote"></span></h2>
20670 <p><span class="mw-headline" id="Quote">Quote</span></p>
20672 <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>
20676 Unclosed tags in TOC
20678 title=[[Main Page]]
20682 <small>Hanc marginis exiguitas non caperet.</small>
20685 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20687 <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>
20691 <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>
20692 <p><small>Hanc marginis exiguitas non caperet.</small>
20698 Multiple tags in TOC
20701 == <i>Foo</i> <b>Bar</b> ==
20703 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20705 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20707 <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>
20708 <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>
20712 <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>
20713 <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>
20717 <div id="toc" class="toc">
20718 <div id="toctitle">
20722 <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>
20723 <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>
20727 <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>
20728 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20730 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20732 <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>
20735 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
20736 # html5 tag parsing.
20738 Tags with parameters in TOC
20743 == <sup class="in-h2">Hello</sup> ==
20745 == <sup class="a > b">Evilbye</sup> ==
20747 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20749 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20750 <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>
20754 <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>
20755 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup class="a"> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
20758 <meta property="mw:PageProp/toc" />
20759 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
20761 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
20765 span tags with directionality in TOC
20768 == <span dir="ltr">C++</span> ==
20770 == <span dir="rtl">זבנג!</span> ==
20772 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20774 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20776 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20778 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20780 <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>
20781 <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>
20782 <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>
20783 <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>
20784 <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>
20788 <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>
20789 <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>
20790 <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>
20791 <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>
20792 <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>
20797 Bug 72884: bdi element in ToC
20800 == <bdi>test</bdi> ==
20802 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20804 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20808 <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>
20812 # Note that the html output does not have the <p></p>, but the
20813 # html+tidy output *does*. This is because the empty <p></p> is
20814 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20816 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20821 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20823 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20827 <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>
20831 <div id="toc" class="toc">
20832 <div id="toctitle">
20836 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20840 <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>
20846 == {{int:headline_sample}} ==
20850 Bug 32057: Title needed when expanding <h> nodes.
20852 title=[[Main Page]]
20856 <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>
20861 Strip marker in urlencode
20863 {{urlencode:x<nowiki/>y}}
20864 {{urlencode:x<nowiki/>y|wiki}}
20865 {{urlencode:x<nowiki/>y|path}}
20866 {{urlencode:x<pre id="one">two</pre>y}}
20894 Strip marker in formatNum
20896 {{formatnum:1<nowiki/>2}}
20897 {{formatnum:1<nowiki/>2|R}}
20905 Check noCommafy in formatNum
20909 {{formatnum:123456.78}}
20910 {{formatnum:123456.78|NOSEP}}
20918 Wrong option for formatNum (bug 56199)
20920 {{formatnum:1,234.56|Random}}
20921 {{formatnum:1,234.56|EVERYTHING}}
20922 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20931 Strip marker in grammar
20935 {{grammar:elative|foo<nowiki/>bar}}
20942 Strip marker in padleft
20944 {{padleft:|2|x<nowiki/>y}}
20951 Strip marker in padright
20953 {{padright:|2|x<nowiki/>y}}
20960 Strip marker in anchorencode
20962 {{anchorencode:x<nowiki/>y}}
20969 nowiki inside link inside heading (bug 18295)
20971 ==[[foo|x<nowiki>y</nowiki>z]]==
20973 <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>
20978 new support for bdi element (bug 31817)
20980 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20982 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20987 Ignore pipe between table row attributes
20991 |- id=foo | style='color: red'
20999 <tr id="foo" style="color: red">
21006 Gallery override link with WikiLink (bug 34852)
21009 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21012 <ul class="gallery mw-gallery-traditional">
21013 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21014 <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>
21015 <div class="gallerytext">
21025 Gallery override link with absolute external link (bug 34852)
21028 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21031 <ul class="gallery mw-gallery-traditional">
21032 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21033 <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>
21034 <div class="gallerytext">
21044 Gallery override link with malicious javascript (bug 34852)
21047 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21050 <ul class="gallery mw-gallery-traditional">
21051 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21052 <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>
21053 <div class="gallerytext">
21063 Gallery with invalid title as link (bug 43964)
21066 File:foobar.jpg|link=<
21069 <ul class="gallery mw-gallery-traditional">
21070 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21071 <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>
21072 <div class="gallerytext">
21080 Language parser function
21089 Padleft and padright as substr
21091 {{padleft:|3|abcde}}
21092 {{padright:|3|abcde}}
21100 Special parser function
21102 {{#special:RandomPage}}
21103 {{#special:BaDtItLe}}
21104 {{#special:Foobar}}
21113 Bug 34939 - Case insensitive link parsing ([HttP://])
21115 [HttP://MediaWiki.Org/]
21117 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21120 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21124 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21126 [HttP://MediaWiki.Org/ MediaWiki]
21128 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21133 Bug 34939 - Case insensitive link parsing (HttP://)
21135 HttP://MediaWiki.Org/
21137 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21140 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21158 <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>
21159 <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>
21160 <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>
21161 <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>
21162 <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>
21168 ### Parsoid-specific tests
21169 ### Parsoid-PHP parser incompatibilities
21172 1. SOL-sensitive wikitext tokens as template-args
21174 parsoid=wt2html,wt2wt
21180 <span about="#mwt1" typeof="mw:Transclusion">
21181 </span><ul about="#mwt1"><li>a</li>
21183 <span about="#mwt2" typeof="mw:Transclusion">
21184 </span><ol about="#mwt2"><li>a</li>
21186 <span about="#mwt3" typeof="mw:Transclusion">
21187 </span><dl about="#mwt3"><dd>a</dd>
21191 #### -----------------------------------------------------------------
21192 #### Parsoid-specific functionality tests
21193 #### -----------------------------------------------------------------
21195 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21196 # We know wt2wt will fail, but we expect selser to pass.
21197 # Due to the nature of our testing, wt2wt and selser tests will enter the
21198 # blacklist and we'll catch selser regressions based on changes to the
21199 # blacklist entries for selser tests.
21201 1. Bad treebuilder fixup of formatting elt is cleaned up
21203 parsoid=wt2html,wt2wt
21208 [[Image:Foobar.jpg|right|Test]]
21215 <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>
21222 2. Bad treebuilder fixup of formatting elt is cleaned up
21224 parsoid=wt2html,wt2wt
21226 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21228 <small>[[Image:Foobar.jpg|right|300px]]</small>
21232 <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>
21234 <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>
21238 3. Bad treebuilder fixup of formatting elt is cleaned up
21240 parsoid=wt2html,wt2wt
21242 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21244 <p><small><b>foo</b></small></p>
21245 <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>
21246 <p><small><b>bar</b></small></p>
21250 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21252 parsoid=wt2html,wt2wt
21254 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21256 <p><b><small></small></b></p>
21257 <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>
21261 #### ----------------------------------------------------------------
21262 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21263 #### tags. Parsoid's output for these tags differs from that of the
21265 #### ----------------------------------------------------------------
21268 Ref: 1. ref-location should be replaced with an index span
21273 B <ref name="x">foo</ref>
21277 <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>
21278 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>
21279 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>
21280 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21281 <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>
21282 <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>
21283 <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>
21288 Ref: 2. ref-tags with identical names should all get the same index
21292 A <ref name="x">foo</ref>
21296 <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>
21297 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>
21298 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21299 <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>
21304 Ref: 3. spaces in ref-names should be ignored
21308 A <ref name="x">foo</ref>
21309 B <ref name=" x " />
21313 <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>
21314 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>
21315 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>
21316 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21317 <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>
21321 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21323 Ref: 4. 'constructor' should be accepted as a valid ref-name
21327 A <ref name="constructor">foo</ref>
21330 <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>
21331 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21332 <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>
21337 Ref: 5. body should accept generic wikitext
21342 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21347 <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>
21349 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21350 <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>
21356 Ref: 6. indent-pres should not be output in ref-body
21368 <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>
21370 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21371 <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
21379 Ref: 7. No p-wrapping in ref-body
21398 <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>
21400 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21401 <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
21416 Ref: 8. transclusion wikitext has lower precedence
21420 A <ref> foo {{echo|</ref> B C}}
21424 <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>
21425 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21426 <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>
21431 Ref: 9. unclosed comments should not leak out of ref-body
21435 A <ref> foo <!--</ref> B C
21438 <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>
21439 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21440 <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>
21445 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21449 A <ref> <b> foo </ref> B C
21453 <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>
21456 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21457 <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>
21462 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21470 <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
21471 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>
21472 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21473 <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>
21474 <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>
21479 Ref: 12. ref-tags act as trailing newline migration barrier
21481 <!--the newline at the end of this line moves out of the p tag-->a
21483 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21489 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21492 <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>
21493 <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>
21496 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21497 <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>
21498 <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>
21502 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21511 <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
21512 <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>
21513 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21514 <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>
21515 <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
21521 Ref: 14. A nested ref-tag should be emitted as plain text
21525 <ref>foo <ref>bar</ref> baz</ref>
21529 <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>
21531 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21532 <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>
21537 Ref: 15. ref-tags with identical names should get identical indexes
21541 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21542 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21546 <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>
21547 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>
21549 <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>
21553 ## We don't bother wt2wt-ing non-standard whitespace
21555 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21563 <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>
21564 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21565 <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>
21569 Ref: 17. Generate valid HTML5 id/about attributes
21573 <ref name="a b">foo</ref>
21577 <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>
21580 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21581 <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>
21586 Ref: 18. T58916: Extension attributes should be parsed as plain text
21590 <ref name="{{echo|a}}">foo</ref>
21594 <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>
21597 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21598 <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>
21603 Ref: 19. ref-tags with identical name encodings should get identical indexes
21607 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21611 <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>
21613 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21614 <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>
21619 Ref: 20. ref-tags with identical names but different content should keep it
21623 A <ref name="foo">Foo one</ref>
21624 B <ref name="foo">Foo two</ref>
21625 C <ref name="foo" />
21629 <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>
21630 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>
21631 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>
21633 <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>
21638 References: 1. references tag without any refs should be handled properly
21642 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21646 References: 2. references tag with group only outputs references from that group
21648 A <ref group="a">foo</ref>
21649 B <ref group="b">bar</ref>
21652 <references group="a" />
21654 <references group="b" />
21656 <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>
21657 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>
21658 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>
21660 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21661 <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>
21663 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21664 <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>
21666 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21667 <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>
21672 References: 3. ref list should be cleared after processing references
21682 <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>
21684 <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>
21687 <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>
21689 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21690 <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>
21695 References: 4. only referenced group should be cleared after processing references
21697 A <ref group="a">afoo</ref>
21700 <references group="a" />
21706 <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>
21707 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>
21709 <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>
21712 <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>
21714 <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>
21719 References: 5. ref tags in references should be processed while ignoring all other content
21722 B <ref name="b">bar</ref>
21725 <ref name="a">foo</ref>
21726 This should just get lost.
21729 <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>
21730 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>
21733 <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>
21738 References: 6. <references /> from a transclusion
21740 <ref>Foo</ref> {{echo|<references />}}
21742 <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>
21747 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21749 A <ref>foo bar for a</ref>
21750 B <ref group="X" name="b" />
21754 <references group="X">
21755 <ref name="b">foo</ref>
21758 <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>
21759 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>
21762 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21763 <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>
21766 <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"}}'>
21767 <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>
21772 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21774 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21777 <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>
21778 <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>
21782 # This test only works in wt2html now as the <references /> are always generated
21783 # unless selser is active. Once T72722 is fixed, we should add a changes test
21784 # here to ensure that unrelated changes don't add the new <references /> in
21787 References: 9. Generate missing references list at the end
21790 B <ref group="inexistent">bar</ref>
21792 <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>
21793 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21794 <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>
21796 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21797 <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>
21802 References: 10. New <references/> shouldn't be added for unrelated edits.
21805 "modes": ["selser"],
21806 "changes": [["#x", "remove"]],
21810 Unrelated text<span id="x"> that's going to disappear</span>.
21818 Entities in ref name
21820 <ref name="test & me">hi</ref>
21823 <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>
21824 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21825 <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>
21829 # This test is wt2html only because we're permitting the serializer to produce
21830 # dirty diffs, normalizing the unclosed references to the self-closed version.
21832 Generate references for unclosed references tag
21840 <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>
21841 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21842 <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>
21846 New reference serializes on its own line
21848 parsoid=wt2wt,html2wt
21853 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21856 #### ----------------------------------------------------------------
21857 #### Parsoid-only testing of Parsoid's impl of LST
21858 #### Not implemented yet, see
21859 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21860 #### ----------------------------------------------------------------
21863 LST Sections: 1. Simple section start and end
21865 <section begin="2011-05-16" />
21866 <section end="2014-04-10 (MW 1.23wmf22)" />
21868 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21869 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21872 #--------- Test stripping of empty nodes in template content ----------
21874 Empty LI and TR nodes should be stripped from template content
21879 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21883 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21896 Empty LI and TR nodes should not be stripped from top-level content
21923 Empty TR nodes should not be stripped if they have any attributes set
21925 {{EmptyTRWithHTMLAttrTest}}
21927 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21928 <tr align="center"></tr>
21929 <tr><td>foo</td></tr>
21930 <tr align="center"></tr>
21931 <tr><td>bar</td></tr>
21935 #### ----------------------------------------------------------------
21936 #### The following section of tests are primarily to test
21937 #### wikitext escaping capabilities of Parsoid. Given that
21938 #### escaping can be done any number of ways, the wikitext (input)
21939 #### is always adjusted to reflect how Parsoid adds nowiki
21942 #### We are marking several tests as parsoid-only since the
21943 #### HTML in the result section is different from what the
21944 #### PHP parser generates for it.
21945 #### ----------------------------------------------------------------
21948 #### --------------- Headings ---------------
21950 #### 1. Nested inside html <h1>=foo=</h1>
21951 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21952 #### 3. Nested inside html with wikitext split by html tags
21953 #### 4. No escape needed
21954 #### 5. Empty headings <h1></h1>
21955 #### 6. Heading chars in SOL context
21956 #### ----------------------------------------
21958 Headings: 0. Unnested
21968 <p>=foo<i>a</i>=</p>
21970 <nowiki>=foo=</nowiki>
21972 <nowiki> </nowiki>=foo=
21974 <nowiki>=foo=</nowiki>
21976 =foo''a''<nowiki>=</nowiki>
21979 # New headings and existing headings are handled differently
21981 Headings: 1. Nested inside html
21989 <h1 data-parsoid=''>=foo=</h1>
21990 <h2 data-parsoid=''>=foo=</h2>
21991 <h3 data-parsoid=''>=foo=</h3>
21992 <h4 data-parsoid=''>=foo=</h4>
21993 <h5 data-parsoid=''>=foo=</h5>
21994 <h6 data-parsoid=''>=foo=</h6>
22002 =<nowiki>=foo=</nowiki>=
22003 ==<nowiki>=foo=</nowiki>==
22004 ===<nowiki>=foo=</nowiki>===
22005 ====<nowiki>=foo=</nowiki>====
22006 =====<nowiki>=foo=</nowiki>=====
22007 ======<nowiki>=foo=</nowiki>======
22012 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22021 <nowiki>*</nowiki>bar
22027 <nowiki>=bar=</nowiki>
22031 Headings: 3. Nested inside html with wikitext split by html tags
22035 <h1>=<b>bold</b>foo=</h1>
22037 = ='''bold'''<nowiki>foo=</nowiki> =
22041 Headings: 4a. No escaping needed (testing just h1 and h2)
22052 <h1><i>=</i>foo=</h1>
22072 Headings: 4b. No escaping needed (inside p-tags)
22087 Headings: 5. Empty headings
22091 <h1 data-parsoid='{}'></h1>
22093 <h2 data-parsoid='{}'></h2>
22095 <h3 data-parsoid='{}'></h3>
22097 <h4 data-parsoid='{}'></h4>
22099 <h5 data-parsoid='{}'></h5>
22101 <h6 data-parsoid='{}'></h6>
22111 =====<nowiki/>=====
22113 ======<nowiki/>======
22117 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22127 <nowiki>=a=</nowiki>
22129 <nowiki>=a=</nowiki>
22131 <nowiki>=a=</nowiki>
22135 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22148 <nowiki>=a=</nowiki>
22151 <nowiki>=a=</nowiki>
22154 <nowiki>=a=</nowiki>
22159 Headings: 6c. Heading chars in SOL context (leading newline break)
22167 <nowiki>=b=</nowiki>
22171 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22175 <!--c0--><p>=a=</p>
22177 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22179 <!--c0--><nowiki>=a=</nowiki>
22181 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22185 Headings: 6d. Heading chars in SOL context (No escaping needed)
22195 Headings: 7. Insert a newline between new content and headings
22201 <h2 data-parsoid='{}'>A</h2>
22202 <p data-parsoid='{}'>a</p>
22212 #### --------------- Lists ---------------
22213 #### 0. Outside nests (*foo, etc.)
22214 #### 1. Nested inside html <ul><li>*foo</li></ul>
22215 #### 2. Inside definition lists
22216 #### 3. Only bullets at start should be escaped
22217 #### 4. No escapes needed
22218 #### 5. No unnecessary escapes
22219 #### 6. Escape bullets in SOL position
22220 #### 7. Escape bullets in a multi-line context
22221 #### ----------------------------------------
22224 Lists: 0. Outside nests
22234 <nowiki>*</nowiki>foo
22236 <nowiki>#</nowiki>foo
22238 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22242 Lists: 1. Nested inside html
22246 <ul><li>*foo</li></ul>
22247 <ul><li>#foo</li></ul>
22248 <ul><li>:foo</li></ul>
22249 <ul><li>;foo</li></ul>
22250 <ol><li>*foo</li></ol>
22251 <ol><li>#foo</li></ol>
22252 <ol><li>:foo</li></ol>
22253 <ol><li>;foo</li></ol>
22256 *<nowiki>*foo</nowiki>
22258 *<nowiki>#foo</nowiki>
22260 *<nowiki>:foo</nowiki>
22262 *<nowiki>;foo</nowiki>
22264 #<nowiki>*foo</nowiki>
22266 #<nowiki>#foo</nowiki>
22268 #<nowiki>:foo</nowiki>
22270 #<nowiki>;foo</nowiki>
22274 Lists: 2. Inside definition lists
22278 <dl><dt>;foo</dt></dl>
22279 <dl><dt>:foo</dt></dl>
22282 <dl><dd>:foo</dd></dl>
22285 ;<nowiki>;foo</nowiki>
22287 ;<nowiki>:foo</nowiki>
22289 ;<nowiki>:foo</nowiki>
22292 :<nowiki>:foo</nowiki>
22296 Lists: 3. Only bullets at start of text should be escaped
22300 <ul><li>*foo*bar</li></ul>
22301 <ul><li>*foo<i>it</i>*bar</li></ul>
22304 *<nowiki>*foo*bar</nowiki>
22306 *<nowiki>*foo</nowiki>''it''*bar
22310 Lists: 4. No escapes needed
22323 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22327 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22341 Lists: 5. No unnecessary escapes
22345 <ul><li> bar <span>[[foo]]</span></li></ul>
22346 <ul><li> =bar <span>[[foo]]</span></li></ul>
22347 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22348 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22349 <ul><li> =bar <span>foo]]</span>=</li></ul>
22350 <ul><li> <s></s>: a</li></ul>
22351 <ul><li> <i>* foo</i></li></ul>
22354 * bar <span><nowiki>[[foo]]</nowiki></span>
22356 * =bar <span><nowiki>[[foo]]</nowiki></span>
22358 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22360 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22362 * =bar <span>foo]]</span>=
22370 Lists: 6. Escape bullets in SOL position
22374 <p><!--cmt-->*foo</p>
22376 <!--cmt--><nowiki>*</nowiki>foo
22380 Lists: 7. Escape bullets in a multi-line context
22389 <nowiki>*</nowiki>b
22393 Lists: 8. Escape colons only if not present in tags
22397 <dl><dt>a:b<i>c:d</i></dt></dl>
22399 ; <nowiki>a:b</nowiki>''c:d''
22402 #### --------------- HRs ---------------
22403 #### 1. Single line
22404 #### -----------------------------------
22407 HRs: 1. Single line
22415 ----<nowiki>----</nowiki>
22420 #### --------------- Tables ---------------
22421 #### 1a. Simple example
22422 #### 1b. No escaping needed (!foo)
22423 #### 1c. No escaping needed (|foo)
22424 #### 1d. No escaping needed (|}foo)
22426 #### 2a. Nested in td (<td>foo|bar</td>)
22427 #### 2b. Nested in td (<td>foo||bar</td>)
22428 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22430 #### 3a. Nested in th (<th>foo!bar</th>)
22431 #### 3b. Nested in th (<th>foo!!bar</th>)
22432 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22436 #### 4c. No escaping needed
22437 #### --------------------------------------
22440 Tables: 1a. Simple example
22448 <nowiki>{|</nowiki>
22453 Tables: 1b. No escaping needed
22464 Tables: 1c. No escaping needed
22475 Tables: 1d. No escaping needed
22486 Tables: 2a. Nested in td
22491 <td>foo|bar</td></tr>
22492 <tr><td>x<div>a|b</div></td>
22496 |<nowiki>foo|bar</nowiki>
22498 |x<div><nowiki>a|b</nowiki></div>
22514 Tables: 2b. Nested in td
22520 <td>a<i>b||c</i></td>
22521 <td>a<i><div>b||c</div></i></td>
22522 </tr></tbody></table>
22525 |<nowiki>foo||bar</nowiki>
22526 |a''<nowiki>b||c</nowiki>''
22527 |a''<div><nowiki>b||c</nowiki></div>''
22536 <td>a<i><div>b||c</div></i>
22542 Tables: 2c. Nested in td -- no escaping needed
22560 Tables: 3a. Nested in th
22578 Tables: 3b. Nested in th
22583 <tr><th>foo!!bar</th>
22584 <th><i>foo|bar</i></th>
22585 <th><i>foo!!bar</i></th>
22586 <th><i><span>foo!!bar</span></i></th>
22587 </tr></tbody></table>
22590 !<nowiki>foo!!bar</nowiki>
22591 !''<nowiki>foo|bar</nowiki>''
22592 !''<nowiki>foo!!bar</nowiki>''
22593 !''<span><nowiki>foo!!bar</nowiki></span>''
22602 <th><i>foo!!bar</i>
22604 <th><i><span>foo!!bar</span></i>
22610 Tables: 3c. Nested in th
22615 <tr><th>foo||bar</th>
22616 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22617 </tr></tbody></table>
22620 !<nowiki>foo||bar</nowiki>
22621 !<nowiki>foo||bar</nowiki>
22634 Tables: 4a. Escape -
22653 |<nowiki>-bar</nowiki>
22658 Tables: 4b. Escape +
22677 |<nowiki>+bar</nowiki>
22682 Tables: 4c. No escaping needed
22687 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22688 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22694 <div>a|b</div></td>
22739 Tables: 4d. No escaping needed
22744 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22745 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22746 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22757 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22767 T97430: Don't emit empty nowiki pairs around marker meta tags
22771 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22772 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22774 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22775 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22779 Unclosed xmlish element in table line shouldn't eat end delimiters
22784 <tbody><tr><td> <foo</td>
22785 <td> bar></td></tr>
22802 #### --------------- Links ----------------
22803 #### 1. Quote marks in link text
22804 #### 2. Wikilinks: Escapes needed
22805 #### 3. Wikilinks: No escapes needed
22806 #### 4. Extlinks: Escapes needed
22807 #### 5. Extlinks: No escapes needed
22808 #### --------------------------------------
22810 Links 1. WikiLinks: No escapes needed
22814 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22815 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22816 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22820 [[Foo|x [Foobar] x]]
22822 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22823 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22824 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22829 Links 2. WikiLinks: Escapes needed
22833 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22834 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22835 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22836 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22837 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22838 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22839 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22840 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22841 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22842 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22844 [[Foo|<nowiki>Foobar]</nowiki>]]
22845 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22846 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22847 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22848 [[Foo|<nowiki>|Bar</nowiki>]]
22849 [[Foo|<nowiki>]]bar</nowiki>]]
22850 [[Foo|<nowiki>[[bar</nowiki>]]
22851 [[Foo|<nowiki>x [[ y</nowiki>]]
22852 [[Foo|<nowiki>x ]] y</nowiki>]]
22853 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22855 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22856 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22857 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22858 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22859 <a href="/wiki/Foo" title="Foo">|Bar</a>
22860 <a href="/wiki/Foo" title="Foo">]]bar</a>
22861 <a href="/wiki/Foo" title="Foo">[[bar</a>
22862 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22863 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22864 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22869 Links 3. WikiLinks: No escapes needed
22873 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22874 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22879 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22880 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22885 Links 4. ExtLinks: Escapes needed
22889 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22890 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22891 <p>[http://google.com]</p>
22892 <p>[http://google.com google]</p>
22894 [http://google.com <nowiki>[google]</nowiki>]
22895 [http://google.com <nowiki>google]</nowiki>]
22897 <nowiki>[http://google.com]</nowiki>
22899 <nowiki>[http://google.com google]</nowiki>
22902 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22903 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22904 </p><p>[http://google.com]
22905 </p><p>[http://google.com google]
22910 Links 5. ExtLinks: No escapes needed
22914 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22916 [http://google.com [google]
22918 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22923 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22927 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22928 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22929 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22930 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22931 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22932 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22933 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22934 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
22935 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22936 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
22937 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
22938 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
22939 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22942 x<nowiki/>http://example.com<nowiki/>y
22943 http://example.com<nowiki/>?x
22944 http://example.com<nowiki/>&x
22945 http://example.com<nowiki/>'x
22946 http://example.com<nowiki/>,x
22947 http://example.com<nowiki/>.x
22948 http://example.com<nowiki/>;x
22949 http://example.com<nowiki/>:x
22950 http://example.com<nowiki/>;x
22951 http://example.com<nowiki/>!x
22952 http://example.com<nowiki/>=x
22953 http://example.com<nowiki/>(x)
22954 http://example.com(x<nowiki/>)
22958 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22963 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22965 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22966 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22967 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22968 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22969 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22975 "http://example.com"
22976 (http://example.com)
22977 (http://example.com) foo
22978 http://example.com,
22979 http://example.com, foo
22982 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22984 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22985 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22986 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22987 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22988 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22993 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22997 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22998 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23000 http://example.com.,;:!?\
23001 -http://example.com:
23003 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23004 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23009 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23013 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23014 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23015 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23019 X<nowiki/>RFC 123<nowiki/>y
23023 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23027 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23028 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23029 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23036 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23037 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23038 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23043 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23047 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23048 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23049 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23053 X<nowiki/>PMID 123<nowiki/>y
23057 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23061 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23062 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23063 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23070 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23071 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23072 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23077 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23081 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23082 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23083 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23086 ISBN 1234567890<nowiki/>1
23087 ISBN 1234567890<nowiki/>x
23088 a<nowiki/>ISBN 1234567890<nowiki/>b
23092 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23096 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23100 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23105 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23109 <p>this is not a link: http://example.com
23112 <nowiki>this is not a link: http://example.com</nowiki>
23116 Links 15. Link trails can't become link prefixes.
23121 <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>
23123 [[Söfnuður]]-[[00]]
23125 <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>
23129 #### --------------- Quotes ---------------
23130 #### 1. Quotes inside <b> and <i>
23131 #### 2. Link fragments separated by <i> and <b> tags
23132 #### 3. Link fragments inside <i> and <b>
23133 #### 4. No escaping needed
23134 #### --------------------------------------
23136 1a. Quotes inside <b> and <i>
23147 <b>foo'<i>bar'</i>baz</b>
23156 <i>fools'<span> errand</span></i>
23157 <i><span>fool</span>'s errand</i>
23158 '<i>foo</i> bar '<i>baz</i>
23159 a|!*#-:;+-~[]{}b'<i>x</i>
23163 ''<nowiki>''foo''</nowiki>''
23164 ''<nowiki>'''foo'''</nowiki>''
23166 '''<nowiki/>'foo''''
23167 '''<nowiki>''foo''</nowiki>'''
23168 '''<nowiki>'''foo'''</nowiki>'''
23169 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23170 '''foo'''<nowiki/>'s
23176 '''foo'''<nowiki/>'
23177 ''''foo'''<nowiki/>'
23178 ''fools'<span> errand</span>''
23179 ''<span>fool</span>'s errand''
23180 '<nowiki/>''foo'' bar '''baz''
23181 a|!*#-:;+-~[]{}b'''x''
23185 1b. Quotes inside <b> and <i> with other tags on same line
23189 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23190 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23191 <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>
23192 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23193 '<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>
23194 '<i>foo</i> <div title="name">test</div>
23195 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23196 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23197 <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>
23200 '''a'' foo ''[[bar]]''
23201 ''a''' foo ''[[bar]]''
23202 ''a''' foo '''{{echo|[[bar]]}}'''
23203 [[foo]] x'''[[bar]]''
23204 '''foo'' <ref>test</ref>
23205 '''foo'' <div title="name">test</div>
23206 '''foo'' and <br> bar
23211 2. Link fragments separated by <i> and <b> tags
23215 <p>[[<i>foo</i>hello]]</p>
23216 <p>[[<b>foo</b>hello]]</p>
23218 [[''foo''<nowiki>hello]]</nowiki>
23220 [['''foo'''<nowiki>hello]]</nowiki>
23223 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23224 # this is one of the shortcomings of this format
23226 3. Link fragments inside <i> and <b>
23230 <p><i>[[foo</i>]]</p>
23231 <p><b>[[foo</b>]]</p>
23233 ''[[foo''<nowiki>]]</nowiki>
23235 '''[[foo'''<nowiki>]]</nowiki>
23239 4. No escaping needed
23243 <p>'<span><i>bar</i></span>'
23244 '<span><b>bar</b></span>'
23248 '<span>''bar''</span>'
23249 '<span>'''bar'''</span>'
23253 #### ----------- Paragraphs ---------------
23254 #### 1. No unnecessary escapes
23255 #### --------------------------------------
23258 1. No unnecessary escapes
23262 <p>bar <span>[[foo]]</span>
23263 </p><p>=bar <span>[[foo]]</span>
23264 </p><p>[[bar <span>[[foo]]</span>
23265 </p><p>]]bar <span>[[foo]]</span>
23266 </p><p>=bar <span>foo]]</span>=
23269 bar <span><nowiki>[[foo]]</nowiki></span>
23271 =bar <span><nowiki>[[foo]]</nowiki></span>
23273 [[bar <span><nowiki>[[foo]]</nowiki></span>
23275 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23277 =bar <span>foo]]</span><nowiki>=</nowiki>
23280 #### ----------------------- PRE --------------------------
23281 #### 1. Leading whitespace in SOL context should be escaped
23282 #### ------------------------------------------------------
23284 1. Leading whitespace in SOL context should be escaped
23307 <nowiki> </nowiki>a
23309 <nowiki> </nowiki> a
23313 <nowiki> </nowiki> a
23315 <nowiki> </nowiki>a
23318 <nowiki> </nowiki>b
23341 2. Leading whitespace in non-indent-pre contexts should not be escaped
23345 <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>
23346 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23347 <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>
23357 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23376 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23380 <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>
23382 [[File:Foobar.jpg|thumb|caption]]
23386 5. Nowiki escaping should account for indent-pres
23396 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23409 #### --------------- Behavior Switches --------------------
23412 1. Valid behavior switches should be escaped
23419 <nowiki>__TOC__</nowiki>
23420 ''<nowiki>__TOC__</nowiki>''
23424 2. Invalid behavior switches should not be escaped
23435 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23437 Behavior switches should be SOL-transparent
23441 <meta property="mw:PageProp/toc" />
23443 <!-- this one's bogus -->
23446 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23448 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23452 <!-- this one's bogus -->
23460 #### --------------- HTML tags ---------------
23463 #### 3. multi-line html tag
23464 #### 4. extension tags
23465 #### -----------------------------------------
23471 <a href="http://google.com">google</a>
23473 <a href="http://google.com">google</a>
23481 <ul><li> <div>foo</div></li>
23482 <li> <div style="color:red">foo</div></li>
23483 <li> <td></li></ul>
23486 * <nowiki><div>foo</div></nowiki>
23487 * <nowiki><div style="color:red">foo</div></nowiki>
23488 * <nowiki><td></nowiki>
23492 3. multi-line html tag
23511 <p><ref>foo</ref>
23512 </p><p><ref>bar
23513 </p><p>baz</ref>
23516 <nowiki><ref>foo</ref></nowiki>
23518 <nowiki><ref>bar</nowiki>
23520 baz<nowiki></ref></nowiki>
23523 #### --------------- Others ---------------
23529 <p><nowiki>foo</nowiki>
23532 <nowiki>foo</nowiki>
23535 ## The quote-char in the input is necessary for triggering the bug
23537 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23546 #----------- End of wikitext escaping tests --------------
23550 Tag-like HTML structures are passed through as text
23572 </p><p>1<d e>f
23577 HTML tag with necessary entities in attributes
23579 <span title="&amp;">foo</span>
23581 <p><span title="&amp;">foo</span>
23586 HTML tag with 'unnecessary' entity encoding in attributes
23588 <span title="&">foo</span>
23590 <p><span title="&">foo</span>
23595 HTML tag with broken attribute value quoting
23597 <span title="Hello world>Foo</span>
23599 <p><span title="Hello world">Foo</span>
23602 <p><span title="Hello world">Foo</span>
23607 Table with broken attribute value quoting
23610 | title="Hello world|Foo
23615 <td title="Hello world">Foo
23621 <td title="Hello world">Foo
23627 Table with broken attribute value quoting on consecutive lines
23630 | title="Hello world|Foo
23631 | style="color:red|Bar
23636 <td title="Hello world">Foo
23638 <td style="color:red">Bar
23644 <td title="Hello world">Foo
23645 </td><td style="color: red">Bar
23646 </td></tr></tbody></table>
23651 2. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23661 1. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23671 Accept empty td cell attribute
23674 | align="center" | foo || |
23679 <td align="center"> foo </td>
23686 Non-empty attributes in th-cells
23689 ! Foo !! style="color: red" | Bar
23695 <th style="color: red"> Bar
23701 Accept empty attributes in th-cells
23716 Empty table rows go away
23737 ### Parsoid-centric tests for testing RTing of inter-element separators
23738 ### Edge cases not tested by existing parser tests and specific to
23739 ### Parsoid-specific serialization strategies.
23743 RT-ed inter-element separators should be valid separators
23755 # Parsoid-only since PHP parser relies on Tidy for correct output
23757 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23771 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23772 <p>bar</p></small></td></tr>
23776 <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>
23780 # Note that the "style" attribute is really a template parameter here.
23781 # The = would have to be {{=}} if you wanted the literal.
23783 Empty TD followed by TD with tpl-generated attribute
23788 |{{echo|style='color:red'}}|foo
23802 Indented table with an empty td
23820 ## We have some newline diffs RT-ing this edge case
23821 ## and it is not important enough -- we seem to be emitting
23822 ## at most 2 newlines after a </tr> and this is unrelated to
23823 ## the issue from T85627 that this is testing.
23825 Indented table with blank lines in between (T85627)
23844 Indented block & table
23858 <div data-parsoid='{"stx":"html"}'>foo</div>
23860 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23865 Indent and comment before table row
23880 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23881 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23885 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23887 Empty TR followed by a template-generated TR
23893 {{echo|<tr><td>foo</td></tr>}}
23899 <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}}]}'>
23904 ## PHP and parsoid output differ for this, and since this is primarily
23905 ## for testing Parsoid's serializer, marking this Parsoid only
23907 Empty TR followed by mixed-ws-comment line should RT correctly
23923 <!--c--> </tr><!--d-->
23929 Multi-line image caption generated by templates with/without trailing newlines
23931 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23932 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23934 <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>
23935 <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>
23939 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23943 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23945 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23947 <includeonly>foo</includeonly>
23955 ## PHP emits broken html for this, and since this is primarily
23956 ## a Parsoid serializer test, marking this Parsoid only
23958 Improperly nested inline or quotes tags with whitespace in between
23960 <span> <s>x</span> </s>
23963 <p><span> <s>x</s></span><s> </s>
23964 <b> <i>x</i></b><i> </i>
23969 Encapsulate protected attributes from wt
23971 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23973 <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>
23977 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23978 ## Having nested or stray pre tags results in the attempt to add duplicates,
23979 ## causing an assertion fail. This test tries to prevent that situation.
23981 Ensure ParagraphWrapper can deal with stray closing pre tags
23991 1. Ensure fostered text content is wrapped in element nodes
23995 <table>hi</table><table>ho</table>
24004 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24006 parsoid=wt2html,wt2wt
24015 <tbody><tr><td> a</td></tr>
24020 Encapsulation properly handles null DSR information from foster box
24022 parsoid=wt2html,wt2wt
24024 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24026 <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>
24030 1. Encapsulate foster-parented transclusion content
24032 parsoid=wt2wt,wt2html
24034 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24036 <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>
24046 2. Encapsulate foster-parented transclusion content
24048 parsoid=wt2wt,wt2html
24050 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24052 <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>
24063 3. Encapsulate foster-parented transclusion content
24065 parsoid=wt2wt,wt2html
24067 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24069 <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>"]}">
24082 4. Encapsulate foster-parented transclusion content
24084 parsoid=wt2wt,wt2html
24086 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24088 <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>"]}">
24101 5. Encapsulate foster-parented transclusion content
24103 parsoid=wt2wt,wt2html
24105 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24107 <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>
24122 6. Encapsulate foster-parented transclusion content
24124 parsoid=wt2wt,wt2html
24126 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24128 <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>
24144 7. Encapsulate foster-parented transclusion content
24146 parsoid=wt2wt,wt2html
24148 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24150 <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>
24160 # Note that the wt is broken on purpose: the = should be {{=}} if you
24161 # don't want it to be a template parameter key.
24163 8. Encapsulate foster-parented transclusion content
24165 parsoid=wt2wt,wt2html
24168 }}{|{{echo|style='color:red'}}
24173 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24175 <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>
24186 9. Encapsulate foster-parented transclusion content
24188 parsoid=wt2wt,wt2html
24190 <table>{{echo|hi</table>hello}}
24192 <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>
24196 Table in fosterable position
24198 parsoid=wt2html,wt2wt
24207 <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">
24209 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24215 # Parsoid only for bug 64747
24217 Properly encapsulate empty-content transclusions in fosterable positions
24225 <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":["","","",""]}]]}'>
24231 Support <object> element with .data attribute
24235 <object data="test.swf"></object>
24237 <object data="test.swf"></object>
24241 Don't block XML namespace declaration
24243 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24245 <p><span>MediaWiki</span>
24248 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24251 # -----------------------------------------------------------------
24252 # The following section of tests are primarily to spec requirements
24253 # around serialization of new/edited content.
24255 # All these tests are marked Parsoid html2wt and html2html only
24256 # ----------------------------------------------------------------
24258 # 'mi' is a localinterwiki prefix as well as a language
24260 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24264 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24271 New wikilinks should be serialized properly
24275 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24276 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24283 New wiki links (href variations)
24287 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24288 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24289 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24290 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24295 [[Toxine bactérienne]]
24299 New wiki links (content string variations)
24303 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24304 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24305 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24309 [[Foo_bar|./Foo_bar]]
24313 New category links (href variations)
24317 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24318 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24319 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24321 [[Category:Toxine bactérienne]]
24322 [[Category:Toxine bactérienne]]
24323 [[Category:Toxine bactérienne]]
24327 New sol transparent links don't need indent-pre nowiki protection
24332 <link rel="mw:PageProp/redirect" href="./Main_Page">
24333 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24334 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24336 #WEITERLEITUNG [[Main Page]]
24337 <!-- this is good --> [[Category:Good]]
24338 <!-- this is great --> [[Kategorie:Great]]
24342 New interlanguage links (href variations)
24346 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24347 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24348 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24350 [[es:Toxine bactérienne]]
24351 [[es:Toxine_bactérienne]]
24352 [[es:Toxine_bactérienne]]
24356 Image: Modifying size of an image (1)
24359 "modes": ["wt2wt"],
24361 ["img[height]", "attr", "height", "22"],
24362 ["img[width]", "attr", "width", "200"]
24366 [[Image:Foobar.jpg|230x230px]]
24368 [[Image:Foobar.jpg|200x200px]]
24372 Image: Modifying size of an image (2)
24375 "modes": ["wt2wt"],
24377 ["img[height]", "attr", "height", "100"],
24378 ["img[width]", "attr", "width", "500"]
24382 [[Image:Foobar.jpg|230x230px]]
24384 [[Image:Foobar.jpg|500x500px]]
24387 # Change in size is ignored so long as class='mw-default-size'
24389 Image: Modifying size of an image (3)
24392 "modes": ["wt2wt"],
24394 ["figure[class]", "removeClass", "mw-default-size"],
24395 ["figure img", "attr", "height", "19"],
24396 ["figure img", "attr", "width", "170"]
24400 [[Image:Foobar.jpg|thumb]]
24402 [[Image:Foobar.jpg|thumb|170x170px]]
24406 Image: Modifying alignment of an image (bug 48665)
24409 "modes": ["wt2wt"],
24411 ["figure[class]", "removeClass", "mw-halign-right"],
24412 ["figure[class]", "addClass", "mw-halign-left"]
24416 [[Image:Foobar.jpg|thumb|caption|right]]
24418 [[Image:Foobar.jpg|thumb|caption|left]]
24422 Image: Modifying mw-default-size of an frameless image (bug 62805)
24425 "modes": ["wt2wt"],
24427 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24431 [[Image:Foobar.jpg|frameless|right]]
24433 [[Image:Foobar.jpg|frameless|right|220x220px]]
24437 Image: Modifying valign of an image (bug 49221)
24440 "modes": ["wt2wt"],
24442 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24443 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24447 [[File:Foobar.jpg|20px|middle]]
24449 [[File:Foobar.jpg|20px|text-top]]
24453 Image: Modifying alt attribute of an image (bug 56400)
24456 "modes": ["wt2wt"],
24458 ["img[alt]", "attr", "alt", "some alternate edited text"]
24462 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24464 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24468 Image: Modifying caption of an image
24471 "modes": ["wt2wt"],
24473 ["figcaption", "text", "new caption"]
24477 [[Image:Foobar.jpg|thumb|original caption]]
24479 [[Image:Foobar.jpg|thumb|new caption]]
24483 Image: empty alt attribute (bug 48924)
24487 [[File:Foobar.jpg|thumb|alt=|bar]]
24489 <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>
24493 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24499 <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>
24501 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24505 Image: Block level image should have \n before and after
24508 [[File:Foobar.jpg|right|thumb|150x150px]]
24512 <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>
24517 Image: New block level image should have \n before and after (existing content)
24520 [[File:Foobar.jpg|right|thumb|150x150px]]
24524 <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>
24529 Image: upright option (parsoid)
24531 [[File:Foobar.jpg|thumb|upright|caption]]
24532 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24533 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24535 <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>
24536 <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>
24537 <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>
24541 Image: upright option is ignored on inline and frame images (parsoid)
24543 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24545 <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>
24549 Image: from basic HTML (1)
24553 <span typeof="mw:Image">
24554 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24557 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24561 Image: from basic HTML (2)
24565 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24567 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24571 Image: from basic HTML (3)
24575 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24577 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24581 Image: from basic HTML (4)
24585 <img src="./File:Foobar.jpg">
24587 [[File:Foobar.jpg|link=]]
24591 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24596 <li><p>foo</p></li>
24603 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24607 <ul> <li>foo</li></ul>
24613 Don't strip leading whitespace when handling indent-pre suppressing tags
24618 <tr><td> indented row</td></tr>
24621 <b>This is very bold of you!</b>
24624 indented cell (no pre-wrapping!)
24634 '''This is very bold of you!'''
24638 indented cell (no pre-wrapping!)
24646 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24664 <nowiki> </nowiki><span>bar</span>
24667 <nowiki> </nowiki></span>bar2
24670 <nowiki> </nowiki><span>bar</span>
24673 <nowiki> </nowiki><span>foo</span>
24678 Lists: Dont insert newlines in a serialized list item.
24682 <ul><li>a<br>b</li><li>c</li></ul>
24689 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24692 "modes": ["html2wt"],
24693 "scrubWikitext": false
24696 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24697 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24699 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24700 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24702 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
24704 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24706 == hello there [[Category:A1]] ==
24708 == [[Category:A2]] hi pal ==
24710 == <!--foo--> [[Category:A3]] how goes it ==
24712 == it goes well [[Category:A4]] <!--bar--> ==
24714 ==howdy [[Category:A5]] ==
24720 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24723 "modes": ["html2wt"],
24724 "scrubWikitext": true
24727 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24728 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24730 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24731 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24733 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24741 <!--foo--> [[Category:A3]]
24746 [[Category:A4]] <!--bar-->
24754 Headings: Don't hoist metas that come from templates
24757 "modes": ["html2wt"],
24758 "scrubWikitext": true
24761 <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>
24763 == {{echo|foo [[Category:Foo]]}} ==
24767 Headings: Category in ref isn't hoisted
24770 "modes": ["html2wt"],
24771 "scrubWikitext": true
24774 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
24776 <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>
24779 [[Category:Baz]] </ref> ==
24785 Parsoid: Serialize positional parameters with = in them as named parameter
24789 <p about="#mwt1" typeof="mw:Transclusion"
24790 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24792 <p about="#mwt1" typeof="mw:Transclusion"
24793 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24795 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24796 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24797 <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>
24801 {{echo|1 = f=oo|2 = bar}}
24803 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24804 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24805 {{echo|<nowiki>f=oo</nowiki>|bar}}
24809 Parsoid: Serialize positional parameters with = in extlink as named parameter
24813 <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>
24815 {{echo|1 = http://stuff?is=ok}}
24819 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24823 <div>a<p>b</p></div>
24844 Substrings resembling wikitext in hrefs should not get nowiki escapes
24848 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24854 Enforce single-line context in the serializer
24861 <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">
24862 </span><span about="#mwt1">you</span> </h2>
24864 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
24866 <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
24867 there</span></li></ol>
24879 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
24886 </tbody></table></dd></dl>
24890 == hi {{bogus|there
24901 * foo '''bar''' baz
24913 Serialize new placeholder space without spans
24917 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24919 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24921 <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>
24927 <ref>foo : bar</ref>ok
24931 #-----------------------
24932 # Tag minimization tests
24933 #-----------------------
24936 1. I/B quote minimization: wikitext-only tags should be combined
24940 <p><i>A</i><i>B</i></p>
24941 <p><b>A</b><b>B</b></p>
24942 <p><i>A</i><b><i>B</i></b></p>
24943 <p><b>A</b><i><b>B</b></i></p>
24944 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24945 <p><i><b>A</b></i><i><b>B</b></i></p>
24946 <p><i><b>A</b></i><b><i>B</i></b></p>
24947 <p><b><i>A</i></b><i><b>B</b></i></p>
24967 2. I/B quote minimization: wikitext and html tags should not be combined
24971 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24972 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24976 ''A''<nowiki/>'''<i>B</i>'''
24980 3. I/B quote minimization: templated content stops minimization
24984 <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>
24985 <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>
24987 ''A''{{echo|''B''}}
24989 ''A''{{echo|'''''B'''''}}
24993 4. I/B quote minimization: new content should be mimimized with adjacent old content
24997 <p><i>A</i><i>B</i></p>
24998 <p><b>A</b><b>B</b></p>
24999 <p><i>A</i><b><i>B</i></b></p>
25009 5a. Merge adjacent quote nodes if they've been edited
25012 "modes": ["wt2wt", "selser"],
25014 ["p", "contents", "remove", ":contains('b')"]
25024 5b. Merge adjacent quote nodes if they've been edited
25027 "modes": ["wt2wt", "selser"],
25033 ''a''<span id="x">b</span>''c''
25039 1. Merge adjacent link nodes as long as at least one element is new
25042 "modes": ["html2wt"],
25043 "scrubWikitext": true
25046 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25047 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25048 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25052 [[Football|Foot]][[Football|ball]]
25056 2. Merge adjacent link nodes and enable additional normalizations
25059 "modes": ["html2wt"],
25060 "scrubWikitext": true
25063 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25065 [[Football|''Football'']]
25069 3. Don't merge adjacent link nodes if scrubWikitext is false
25072 "modes": ["html2wt"],
25073 "scrubWikitext": false
25076 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25078 [[Football|Foot]][[Football|ball]]
25081 #------------------------------
25082 # End of tag minimization tests
25083 #------------------------------
25086 Bug 54262: New entities
25090 <span typeof="mw:Entity"> </span>
25095 ## Note that there is no wikitext output for 'unknownproperty' ##
25096 ## Unknown magic words are silently dropped ##
25103 <meta property='mw:PageProp/toc' />
25104 <meta property='mw:PageProp/notoc' />
25105 <meta property='mw:PageProp/forcetoc' />
25106 <meta property='mw:PageProp/index' />
25107 <meta property='mw:PageProp/noindex' />
25108 <meta property='mw:PageProp/nogallery' />
25109 <meta property='mw:PageProp/noeditsection' />
25110 <meta property='mw:PageProp/notitleconvert' />
25111 <meta property='mw:PageProp/nocontentconvert' />
25112 <meta property='mw:PageProp/unknownproperty' />
25122 __NOCONTENTCONVERT__
25126 Consecutive <pre>s should not get merged
25128 parsoid=html2wt,html2html
25130 <pre>a</pre><pre>b</pre>
25158 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25162 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25164 [[Special:BookSources/1234567890|ISBN 1234567895]]
25168 Edited RFC links not serializable as RFC links should serialize as extlinks
25172 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25174 [//tools.ietf.org/html/rfc123 New RFC]
25178 Edited PMID links not serializable as PMID links should serialize as extlinks
25182 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25184 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25188 WTS of autolinks with trailing/surrounding context
25192 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25193 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25194 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25195 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25196 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25197 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25199 http://cscott.net<nowiki/>'''foo'''
25201 http://cscott.net<b>foo</b>
25203 '''http://cscott.net<nowiki/>'''
25205 '''http://cscott.net '''
25207 '''http://cscott.net<nowiki/>x'''
25209 http://cscott.net<nowiki/>x
25213 WTS of autolinks with nowikis (round-trip)
25215 x<nowiki/>http://cscott.net<nowiki/>x
25217 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25220 # this is the "easy" test because it leaves in place all the
25221 # data-parsoid information indicating this is an autolink
25223 WTS of autolinks with escapes (editing)
25226 "modes": ["wt2wt"],
25228 [ "meta", "remove" ]
25232 x<nowiki/>http://cscott.net<nowiki/>x
25234 x<nowiki/>http://cscott.net<nowiki/>x
25238 WTS of edited autolink-like text (T103364)
25241 "modes": ["wt2wt"],
25243 [ "span[typeof]", "removeAttr", "typeof" ]
25247 Not a link: <nowiki>http://example.com</nowiki>.
25249 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25253 WTS of newly-authored autolink-like text (T103364)
25257 <p>http://example.com is not a link.</p>
25259 <nowiki>http://example.com is not a link.</nowiki>
25263 WTS of autolink-like text after an autolink (T108563)
25267 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25269 http://example.com<nowiki> http://example.com is not a link.</nowiki>
25273 Magic links inside links (not autolinked)
25275 [[Foo|http://example.com]]
25278 [[Foo|ISBN 123456789x]]
25280 [http://foo.com http://example.com]
25281 [http://foo.com RFC 1234]
25282 [http://foo.com PMID 1234]
25283 [http://foo.com ISBN 123456789x]
25285 <p><a href="/wiki/Foo" title="Foo">http://example.com</a> <a href="/wiki/Foo" title="Foo">RFC 1234</a> <a href="/wiki/Foo" title="Foo">PMID 1234</a> <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a></p>
25286 <p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a> <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
25288 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25289 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25290 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25291 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25293 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25294 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25295 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25296 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25300 Magic links inside image captions (autolinked)
25302 [[File:Foobar.jpg|thumb|http://example.com]]
25303 [[File:Foobar.jpg|thumb|RFC 1234]]
25304 [[File:Foobar.jpg|thumb|PMID 1234]]
25305 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25307 <div class="thumb tright">
25308 <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>
25309 <div class="thumbcaption">
25310 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25311 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25314 <div class="thumb tright">
25315 <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>
25316 <div class="thumbcaption">
25317 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25318 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25321 <div class="thumb tright">
25322 <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>
25323 <div class="thumbcaption">
25324 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25325 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25328 <div class="thumb tright">
25329 <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>
25330 <div class="thumbcaption">
25331 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25332 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25336 <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>
25337 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
25338 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></figcaption></figure>
25339 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
25343 WTS of magic word text (T109371)
25348 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25349 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25351 <nowiki>RFC 1234</nowiki>
25353 [http://foo.com RFC 1234]
25359 Edited Redirect link should emit a non-piped wikitext link
25363 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25369 T75121: Infer extension name from typeOf if data-mw is not present
25373 <div typeOf="mw:Extension/foo"></div>
25378 # Note that the <p> wrapping isn't present in PHP parser output
25379 # The important thing for this test is that P-wrapping doesn't
25380 # interfere with the <nowiki> protection for leading - in <td>
25381 # (which isn't necessary for <th>).
25383 T88318: p-wrapped dash in table.
25385 parsoid=html2wt,wt2wt
25388 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25389 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25390 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25397 |<nowiki>-</nowiki>
25398 |<nowiki>- </nowiki>
25417 <td><small>-</small></td>
25429 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25434 <td id='mwAc'>foo</td>
25435 <td id='serialize-this'>bar</td>
25440 | id="serialize-this" |bar
25445 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25449 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25451 <div id="hello">ok</div>
25458 "modes": ["wt2wt"],
25460 [ "#xyz", "before", "<b>before</b> stuff " ],
25461 [ "#xyz", "after", " stuff <i>after</i>" ],
25462 [ "#xyz", "html", "x <b>y</b> z" ]
25466 <span id="xyz">hello</span>
25468 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25472 Never serialize a-tag as html, regardless of what data-parsoid has to say
25476 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25481 ## SSS FIXME: This is broken output nevertheless.
25482 ## What might be a reasonable non-broken output for this?
25483 ## This is an edge case unlikely to be seen in production
25484 ## that I am not wasting more time on this right now.
25486 Never serialize a-tag as html, no matter what attributes it has
25490 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25492 [http://boo.org http://boohoo.org]
25495 # Misnested is an indication that selser can reuse the source but these have
25496 # shown to sneak through on occasion. See T101768.
25497 # The original wikitext here is: [http://test.com [[one]] two three]
25499 Strip span tags added to mark as misnested
25503 <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>
25505 [http://test.com][[one]] two three
25508 # --------------------------------------------
25509 # Tests spec'ing wikitext serialization norms |
25510 # --------------------------------------------
25513 Lists: Add space after bullets
25520 <li><span> baz</span></li>
25525 * <span> baz</span>
25529 1. Headings: Add space before/after == (T53744)
25536 <h2><span> baz</span></h2>
25544 == <span> baz</span> ==
25548 2. Headings: Add space before/after == even after hoisted content
25551 "modes": ["html2wt"],
25552 "scrubWikitext": true
25555 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
25563 1. Headings: suppress newly created empty headings
25566 "modes": ["html2wt"],
25567 "scrubWikitext": true
25575 2. Headings: don't suppress empty headings if scrubWikitext is false
25585 3. Headings: suppress empty headings on edits
25588 "modes": ["selser"],
25589 "scrubWikitext": true,
25595 ==<span id="x">foo</span>==
25600 1. WT Quote Tags: suppress newly created empty style tags
25603 "modes": ["html2wt"],
25604 "scrubWikitext": true
25612 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
25618 ''<nowiki/>'''''<nowiki/>'''
25622 3. WT Quote Tags: suppress empty style tags on edits
25625 "modes": ["selser"],
25626 "scrubWikitext": true,
25632 '''<span id="x">foo</span>'''
25637 1. Anchors: suppress newly created empty anchors
25640 "modes": ["html2wt"],
25641 "scrubWikitext": true
25644 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25649 2. Anchors: don't suppress empty anchors if scrubWikitext is false
25652 "modes": ["html2wt"],
25653 "scrubWikitext": false
25656 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25662 3. Anchors: suppress empty anchors on edits
25665 "modes": ["selser"],
25666 "scrubWikitext": true,
25672 [[Test|<span id="x">foo</span>]]
25677 3a. Anchors: do not suppress numbered extlinks
25680 "modes": ["wt2wt"],
25681 "scrubWikitext": true
25686 <a rel="mw:ExtLink" href="http://foo.com"></a>
25690 3b. Anchors: do not suppress numbered extlinks
25693 "modes": ["wt2wt"],
25694 "scrubWikitext": true,
25700 [http://foo.com <span id="x">foo</span>]
25706 Normalizations should be restricted to edited content
25709 "modes": ["selser"],
25710 "scrubWikitext": true,
25712 [ "h1", "before", "<i></i>"]
25726 1. Multiple normalizations (html2wt)
25729 "modes": ["html2wt"],
25730 "scrubWikitext": true
25734 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
25735 </a><b><i></i></b>x</p>
25744 2. Multiple normalizations (selser)
25747 "modes": ["selser"],
25748 "scrubWikitext": true,
25750 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
25754 <span id="x">foo</span>
25756 <span id="x">foo</span>
25762 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
25765 "modes": ["html2wt"],
25766 "scrubWikitext": true
25778 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
25785 <nowiki> </nowiki>hi
25787 <nowiki> </nowiki> hello
25791 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
25794 "modes": ["html2wt"],
25795 "scrubWikitext": true
25804 baz bang</td></tr></table>
25810 bar<span>boo</span></p>
25826 bar<span>boo</span>
25830 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
25833 "modes": ["selser"],
25834 "scrubWikitext": true,
25836 [ "p", "html", " a\n b" ]
25847 1. New links that end in spaces
25850 "modes": ["html2wt"],
25851 "scrubWikitext": false
25854 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25855 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25856 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
25858 [[Berlin ]]<nowiki/>is the capital of Germany.
25862 [[Boston ]] is a city.
25866 2. New links that end in spaces
25869 "modes": ["html2wt"],
25870 "scrubWikitext": true
25873 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25874 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25875 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
25877 [[Berlin]] is the capital of Germany.
25881 [[Boston]] is a city.
25885 1. Table cells with escapable prefixes
25888 "modes": ["html2wt"],
25889 "scrubWikitext": false
25893 <tr><td>a</td></tr>
25894 <tr><td>-</td></tr>
25895 <tr><td>+</td></tr>
25901 |<nowiki>-</nowiki>
25903 |<nowiki>+</nowiki>
25908 2. Table cells with escapable prefixes
25911 "modes": ["html2wt"],
25912 "scrubWikitext": true
25916 <tr><td>a</td></tr>
25917 <tr><td>-</td></tr>
25918 <tr><td>+</td></tr>
25931 3a. Table cells with escapable prefixes after edits
25934 "modes": ["selser"],
25935 "scrubWikitext": true,
25937 [ "table tbody tr:first-child td:first-child", "remove"]
25951 3b. Table cells with escapable prefixes after edits
25954 "modes": ["selser"],
25955 "scrubWikitext": true,
25957 [ "table tbody tr:first-child td:first-child", "html", "-" ],
25964 |<span id="x">foo</span>+
25973 # FIXME: This test will fail because
25974 # normalization doesn't realize that the id attribute
25975 # will eliminate the escapable scenario
25977 4a. Table cells without escapable prefixes after edits
25980 "modes": ["selser"],
25981 "scrubWikitext": true,
25983 [ "#x", "html", "-" ]
25996 ## This tests normalizer's ability to discriminate between
25997 ## cells having identical content.
25999 4b. Table cells without escapable prefixes after edits
26002 "modes": ["selser"],
26003 "scrubWikitext": true,
26005 [ "td", "html", "-" ]
26018 ## This tests normalizer's ability to not be tripped by
26019 ## comments (and whitespace)
26021 4c. Table cells without escapable prefixes after edits
26024 "modes": ["selser"],
26025 "scrubWikitext": true,
26027 [ "table tbody tr td:first-child", "remove" ]
26042 ## This tests normalizer's ability to handle HTML cells
26044 4d. Table cells without escapable prefixes after edits
26047 "modes": ["selser"],
26048 "scrubWikitext": true,
26050 [ "td", "html", "-" ]
26055 <tr><td>a</td></tr>
26059 <tr><td>-</td></tr>
26064 Escape nowiki DOM elements
26068 <nowiki><i>foo</i></nowiki>
26070 <nowiki>''foo''</nowiki>
26073 # ---------------------------------------------------
26074 # End of tests spec'ing wikitext serialization norms |
26075 # ---------------------------------------------------
26077 # -----------------------------------------------------------------
26078 # End of section for Parsoid-only html2wt tests for serialization
26080 # -----------------------------------------------------------------
26082 # -----------------------------------------------------------------
26083 # The following section of tests are primarily to spec behavior of
26084 # the selective serializer. All these tests have manual selser
26085 # changes. The automated selser changes for all tests handle the
26086 # wide variation of changes, but these tests here capture specs
26087 # deterministically.
26088 # ----------------------------------------------------------------
26092 Selser: New comments should not be lost
26095 "modes": ["selser"],
26097 [ "#a", "after", "<!--c1-->" ],
26098 [ "#b", "before", "<!--c2-->" ]
26102 <span id="a">a</span>
26104 <span id="b">b</span>
26106 <span id="a">a</span><!--c1-->
26108 <!--c2--><span id="b">b</span>
26113 Selser: Check for validity of DSR before using it
26116 "modes": ["selser"],
26118 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26122 <span id="a">a</span>
26124 {{DISPLAYTITLE:foo}}
26125 <span id="a">a</span>
26129 1. DOMDiff: Changes to <ref> content should be looked up using id
26132 "modes": ["selser"],
26134 ["#X", "after", "bar"],
26135 ["#Y", "after", "baz"]
26139 X <ref><span id="X">foo</span></ref>
26142 <ref name="a"><span id="Y">foo</span></ref>
26145 X <ref><span id="X">foo</span>bar</ref>
26148 <ref name="a"><span id="Y">foo</span>baz</ref>
26153 2. DOMDiff: Changes to <ref> content should be looked up using id
26156 "modes": ["selser"],
26158 ["#Z", "after", "bar"]
26162 A <ref>foo bar for a</ref>
26163 B <ref group="X" name="b" />
26167 <references group="X">
26168 <ref name="b"><span id="Z">foo</span></ref>
26171 A <ref>foo bar for a</ref>
26172 B <ref group="X" name="b" />
26176 <references group="X">
26177 <ref name="b"><span id="Z">foo</span>bar</ref>