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_header_cells
166 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
172 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
176 Template:PartialTable
183 Template:image_attribs
186 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
189 ## See T48811 for details
191 Template:mixed_attr_content_template
193 style="color:red;" title="T48811"
199 Template:definition_list
246 Template:EmptyTRWithHTMLAttrTest
249 <tr align="center"></tr>
250 <tr><td>foo</td></tr>
251 <tr align="center"></tr>
252 <tr><td>bar</td></tr>
269 This is a simple paragraph.
271 <p>This is a simple paragraph.
276 Paragraphs with extra newline spacing
299 Paragraphs with newline spacing with comment lines in between
307 <!--foo--><!--More than 1 comment, still stripped-->
311 <!--foo--> <!----> <!-- bar -->
372 Paragraphs with newline spacing with non-empty white-space lines in between
399 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
407 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
446 Extra newlines: More paragraphs with indented comment
461 Extra newlines followed by heading
476 <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>
477 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
480 <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>
485 Extra newlines between heading and content are swallowed
493 <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>
494 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
501 http://fr.wikipedia.org/wiki/🍺
502 <!-- EasterEgg we love beer, better be able be able to link to it -->
504 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
508 # Note that the html+tidy output removes the spaces after the <li>,
509 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
510 # This is an issue for all tests with lists. We intentionally do
511 # *not* add html+tidy clauses for these, as we don't want to
512 # document/test the broken behavior. (Parsoid matches the non-tidy
513 # output in these cases.)
522 <li> Item 2</li></ul>
530 * plain''italic''plain
531 * plain''italic''plain''italic''plain
532 * plain'''bold'''plain
533 * plain'''bold'''plain'''bold'''plain
534 * plain''italic''plain'''bold'''plain
535 * plain'''bold'''plain''italic''plain
536 * plain''italic'''bold-italic'''italic''plain
537 * plain'''bold''bold-italic''bold'''plain
538 * plain'''''bold-italic'''italic''plain
539 * plain'''''bold-italic''bold'''plain
540 * plain''italic'''bold-italic'''''plain
541 * plain'''bold''bold-italic'''''plain
542 * plain l'''italic''plain
543 * plain l''''bold''' plain
546 <li> plain<i>italic</i>plain</li>
547 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
548 <li> plain<b>bold</b>plain</li>
549 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
550 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
551 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
552 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
553 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
554 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
555 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
556 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
557 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
558 <li> plain l'<i>italic</i>plain</li>
559 <li> plain l'<b>bold</b> plain</li></ul>
563 # this example taken from the [[simple:Moon]] article (bug 47326)
565 Italics and possessives (1)
567 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
569 <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
573 # this example taken from [[en:Flaming Pie]] (bug 49926)
575 Italics and possessives (2)
577 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
579 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
583 # this example taken from [[en:Dictionary]] (bug 49926)
585 Italics and possessives (3)
587 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''.
589 <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>.
595 ### 2-quote opening sequence tests
598 Italics and bold: 2-quote opening sequence: (2,2)
607 Italics and bold: 2-quote opening sequence: (2,3)
616 Italics and bold: 2-quote opening sequence: (2,4)
626 # same html as previous, but wikitext adjusted to match parsoid html2wt
628 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
630 ''foo<nowiki>''</nowiki>''
636 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
638 Italics and bold: 2-quote opening sequence: (2,5)
651 # same html as previous, but wikitext adjusted to match parsoid html2wt
653 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
655 ''foo'''''<nowiki/>'''
666 ### 3-quote opening sequence tests
670 Italics and bold: 3-quote opening sequence: (3,2)
679 Italics and bold: 3-quote opening sequence: (3,3)
688 Italics and bold: 3-quote opening sequence: (3,4)
696 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
698 Italics and bold: 3-quote opening sequence: (3,5)
711 # same html as previous, but wikitext adjusted to match parsoid html2wt
713 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
715 '''foo'''''<nowiki/>''
726 ### 4-quote opening sequence tests
730 Italics and bold: 4-quote opening sequence: (4,2)
740 # same html as previous, but wikitext adjusted to match parsoid html2wt
742 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
744 <nowiki>''</nowiki>''foo''
751 Italics and bold: 4-quote opening sequence: (4,3)
760 Italics and bold: 4-quote opening sequence: (4,4)
770 # same html as previous, but wikitext adjusted to match parsoid html2wt
772 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
780 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
782 Italics and bold: 4-quote opening sequence: (4,5)
791 <p>'<b>foo</b><i></i>
795 # same html as previous, but wikitext adjusted to match parsoid html2wt
797 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
799 '<nowiki/>'''foo'''''<nowiki/>''
804 <p>'<b>foo</b><i></i>
810 ### 5-quote opening sequence tests
814 Italics and bold: 5-quote opening sequence: (5,2)
824 # same html as previous, but wikitext adjusted to match parsoid html2wt
825 # skipping wt2html and html2html because it wants to put <i> before <b>
827 Italics and bold: 5-quote opening sequence: (5,2+3)
829 parsoid=wt2wt,html2wt
838 Italics and bold: 5-quote opening sequence: (5,3)
848 # same html as previous, but wikitext adjusted to match parsoid html2wt
850 Italics and bold: 5-quote opening sequence: (5,3+2)
859 Italics and bold: 5-quote opening sequence: (5,4)
865 <p><i><b>foo'</b></i>
870 Italics and bold: 5-quote opening sequence: (5,5)
879 Italics and bold: 5-quote opening sequence: (5,6)
883 <p><i><b>foo'</b></i>
888 ### multiple quote sequences in a line
891 Italics and bold: multiple quote sequences: (2,4,2)
897 <p><i>foo'<b>bar</b></i>
902 # same html as previous, but wikitext adjusted to match parsoid html2wt
904 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
906 ''foo'<nowiki/>'''bar'''''
908 <p><i>foo'<b>bar</b></i>
914 Italics and bold: multiple quote sequences: (2,4,3)
920 <p><i>foo'<b>bar</b></i>
925 # same html as previous, but wikitext adjusted to match parsoid html2wt
927 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
929 ''foo'<nowiki/>'''bar'''''
931 <p><i>foo'<b>bar</b></i>
937 Italics and bold: multiple quote sequences: (2,4,4)
943 <p><i>foo'<b>bar'</b></i>
948 # same html as previous, but wikitext adjusted to match parsoid html2wt
950 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
952 ''foo'<nowiki/>'''bar'<nowiki/>'''''
954 <p><i>foo'<b>bar'</b></i>
959 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
961 Italics and bold: multiple quote sequences: (3,4,2)
970 <p><b>foo'</b>bar<i></i>
974 # same html as previous, but wikitext adjusted to match parsoid html2wt
976 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
980 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
985 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
990 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
992 Italics and bold: multiple quote sequences: (3,4,3)
1001 <p><b>foo'</b>bar<b></b>
1005 # same html as previous, but wikitext adjusted to match parsoid html2wt
1007 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1009 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1014 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1019 ### other quote tests
1022 Italics and bold: other quote tests: (2,3,5)
1024 ''this is about '''foo's family'''''
1026 <p><i>this is about <b>foo's family</b></i>
1032 Italics and bold: other quote tests: (2,(3,3),2)
1034 ''this is about '''foo's''' family''
1036 <p><i>this is about <b>foo's</b> family</i>
1042 Italics and bold: other quote tests: (3,2,3,2)
1046 '''this is about ''foo'''s family''
1048 <p><b>this is about <i>foo</i></b><i>s family</i>
1053 # same html as previous, but wikitext adjusted to match parsoid html2wt
1055 Italics and bold: other quote tests: (3,2,3+2+2,2)
1057 '''this is about ''foo'''''<nowiki/>''s family''
1059 <p><b>this is about <i>foo</i></b><i>s family</i>
1065 Italics and bold: other quote tests: (3,2,3,3)
1067 '''this is about ''foo'''s family'''
1069 <p>'<i>this is about </i>foo<b>s family</b>
1075 Italics and bold: other quote tests: (3,(2,2),3)
1077 '''this is about ''foo's'' family'''
1079 <p><b>this is about <i>foo's</i> family</b>
1085 Italicized possessive
1087 The ''[[Main Page]]'''s talk page.
1089 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1092 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1096 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1097 (Requires tidy for PHP parser output to be fixed up)
1099 parsoid=wt2html,wt2wt
1116 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1117 <td><i>a</i></td><td><i>b</i></td></tr>
1126 Non-html5 tags should be accepted
1128 <center>''foo''</center>
1130 <font>''foo''</font>
1131 <strike>''foo''</strike>
1134 <center><i>foo</i></center>
1135 <p><big><i>foo</i></big>
1136 <font><i>foo</i></font>
1137 <strike><i>foo</i></strike>
1143 <wbr> is valid wikitext (bug 52468)
1151 # <strike> is HTML4, <s> is HTML4/5.
1153 <s> or <strike> for strikethrough
1155 <strike>strike</strike>
1159 <p><strike>strike</strike>
1167 Text-level semantic html elements in wikitext
1170 <strong>text</strong>
1186 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1193 <strong>text</strong>
1209 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1217 # test cases taken from
1218 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1220 Ruby markup (W3C-style)
1222 ; Mono-ruby for individual base characters
1223 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1225 : <ruby>今日<rt>きょう</rt></ruby>
1227 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1229 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1231 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1233 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1234 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1235 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1238 <dl><dt> Mono-ruby for individual base characters</dt>
1239 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1240 <dt> Group ruby</dt>
1241 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1242 <dt> Jukugo ruby</dt>
1243 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1244 <dt> Inline ruby</dt>
1245 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1246 <dt> Double-sided ruby</dt>
1247 <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>
1249 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1250 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1251 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1256 # The next two test different paths in the sanitizer.
1258 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1260 <blockquote|>a</blockquote>
1262 <b→> doesn't terminate </b→>
1264 <bä> doesn't terminate </bä>
1266 <boo> doesn't terminate </boo>
1268 <s.foo> doesn't terminate </s.foo>
1272 <p><blockquote|>a</blockquote>
1273 </p><p><b→> doesn't terminate </b→>
1274 </p><p><bä> doesn't terminate </bä>
1275 </p><p><boo> doesn't terminate </boo>
1276 </p><p><s.foo> doesn't terminate </s.foo>
1277 </p><p><sub-ID#1>
1281 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1282 # If the non-word-character tag made it through the sanitizer, tidy
1283 # would munge it up.
1285 Non-word characters don't terminate tag names + tidy
1287 <blockquote|>a</blockquote>
1289 <b→> doesn't terminate </b→>
1291 <bä> doesn't terminate </bä>
1293 <boo> doesn't terminate </boo>
1295 <s.foo> doesn't terminate </s.foo>
1299 <p><blockquote|>a</p>
1300 <p><b→> doesn't terminate </b→></p>
1301 <p><bä> doesn't terminate </bä></p>
1302 <p><boo> doesn't terminate </boo></p>
1303 <p><s.foo> doesn't terminate </s.foo></p>
1304 <p><sub-ID#1></p>
1308 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1309 ### This checks that HTML5 tags (with non-word characters in the tag
1310 ### name) make it safely through the parser -- the Sanitizer will
1311 ### munge them later, as it should.
1314 Non-word characters are valid in extension tags (T19663)
1327 Isolated close tags should be treated as literal text (bug 52760)
1333 <p><s.foo>s</p>
1337 ### Special characters
1341 Bare pipe character (bug 52363)
1350 Bare pipe character from a template (bug 52363)
1359 ### <nowiki> test cases
1363 <nowiki> unordered list
1365 <nowiki>* This is not an unordered list item.</nowiki>
1367 <p>* This is not an unordered list item.
1374 <nowiki>Lorem ipsum dolor
1382 <p>Lorem ipsum dolor
1395 :There is not nowiki.
1396 :There is <nowiki>nowiki</nowiki>.
1398 #There is not nowiki.
1399 #There is <nowiki>nowiki</nowiki>.
1401 *There is not nowiki.
1402 *There is <nowiki>nowiki</nowiki>.
1404 <dl><dd>There is not nowiki.</dd>
1405 <dd>There is nowiki.</dd></dl>
1406 <ol><li>There is not nowiki.</li>
1407 <li>There is nowiki.</li></ol>
1408 <ul><li>There is not nowiki.</li>
1409 <li>There is nowiki.</li></ul>
1414 Entities inside <nowiki>
1416 <nowiki><</nowiki>
1423 Entities inside template parameters
1429 <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>
1433 Properly escape nowiki when combined with other wiki markup
1437 <p>* </nowiki> tag</p>
1439 <nowiki>* </nowiki></nowiki> tag
1443 T93824: Put escaped HTML tags inside nowiki
1447 <p><h2>foo</h2></p>
1449 <nowiki><h2>foo</h2></nowiki>
1453 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1457 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1458 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1459 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1461 This text: L'[[Foo]]
1462 This text: L<nowiki>''</nowiki>[[Foo]]
1463 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1466 # This test fails because wikitext whitespace is not normalized before comparing.
1468 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1472 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1475 This text : L<nowiki>''</nowiki>[[Foo]]
1478 # This test and the next one are html2wt only as they test that incorrect wikitext
1479 # passed in template arguments gets escaped or wrapped in nowikis where required.
1481 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1485 <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>
1486 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1488 {{echo|foo{{!}}bar}}
1489 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1493 T53961: Output correct nowikis in template arguments
1497 <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>
1498 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1499 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1500 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1501 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1504 {{echo|a <nowiki>}}</nowiki> b}}
1505 {{echo|<nowiki>a [[ b</nowiki>}}
1506 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1507 {{echo|a <nowiki>}</nowiki>}}
1511 Cases where "!!" needs nowiki protection
1516 <tr><th>this needs protection !! here</th></tr>
1520 <tr><th>this does not need
1521 protection !! here</th></tr>
1525 !<nowiki>this needs protection !! here</nowiki>
1538 Comments and Indent-Pre
1540 <!-- comment 1 --> asdf
1542 <!-- comment 1 --> asdf
1545 <!-- comment 1 --> asdf
1546 <!-- comment 2 -->xyz
1548 <!-- comment 1 --> asdf
1549 <!-- comment 2 --> xyz
1605 asdf<!-- comment 1 -->jkl
1615 <!-- foo --> b <!-- bar -->
1629 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1635 Comment semantics and delimiters
1637 <!-- --><!----><!-----><!------>
1641 <!-- --><!----><!-----><!------>
1645 Comment semantics and delimiters, redux
1647 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1648 -- foo -- funky huh? ... -->
1652 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1653 -- foo -- funky huh? ... -->
1657 Comment semantics and delimiters: directors cut
1659 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1660 everything starting with < followed by !-- until the first -- and > we see,
1661 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1667 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1668 everything starting with < followed by !-- until the first -- and > we see,
1669 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1674 Comment semantics: nesting
1676 <!--<!-- no, we're not going to do anything fancy here -->-->
1681 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1684 # Parsoid closes the unclosed comment, even if it means a slight
1687 Comment semantics: unclosed comment at end
1689 parsoid=wt2html,html2html
1691 <!--This comment will run out to the end of the document
1695 <!--This comment will run out to the end of the document-->
1699 Comment semantics: normalize comments to play nice with XML and browsers
1701 <!-- Browsers --!> think this is closed -->
1702 <!--> This would normally be text -->
1703 <!---> As would this -->
1704 <!-- XML doesn't like trailing dashes -------->
1705 <!-- Nor doubled hyphens -- anywhere in the data -->
1706 But this is not a comment.
1708 <p>But this is not a comment.
1711 <!-- Browsers --!> think this is closed -->
1712 <!--> This would normally be text -->
1713 <!---> As would this -->
1714 <!-- XML doesn't like trailing dashes -------->
1715 <!-- Nor doubled hyphens -- anywhere in the data -->
1716 <p>But this is not a comment.</p>
1720 Comment semantics: round-trip even text which contains encoded -->
1722 <!-- hello & goodbye - > --> --&gt; --&xx -->
1724 <!-- hello & goodbye - > --> --&gt; --&xx -->
1728 Comment in template title
1737 Comment on its own line post-expand
1749 Comment on its own line post-expand with non-significant whitespace
1761 Multiple comments should still parse as SOL-transparent
1763 parsoid=wt2html,wt2wt
1766 <!--c2--><!--c3--><!--c4-->*b
1771 <!--c2--><!--c3--><!--c4-->
1778 ### paragraph wrapping tests
1793 Block tag on one line (<div>)
1809 Block tag on one line (<blockquote>)
1811 a <blockquote>foo</blockquote>
1815 a <blockquote>foo</blockquote>
1827 Block tag on both lines (<div>)
1844 Block tag on both lines (<blockquote>)
1846 a <blockquote>foo</blockquote>
1848 b <blockquote>foo</blockquote>
1850 a <blockquote>foo</blockquote>
1851 b <blockquote>foo</blockquote>
1865 Multiple lines without block tags
1889 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1890 # So, we have a separate section for Parsoid. We don't want
1891 # to mimic this stripping behavior in Parsoid. It affects
1892 # editing experience and also requires us to maintain additional
1895 Empty lines between lines with block tags
1933 <div data-parsoid='{"stx":"html"}'></div>
1936 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1939 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1941 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1944 <div data-parsoid='{"stx":"html"}'>e</div>
1947 ## PHP parser emits output which is broken
1949 Unclosed HTML p-tags should be handled properly
1962 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1967 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1968 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1971 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1975 a [[Category:A1]] [[Category:A2]]
1980 <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"/>
1984 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1990 <link rel="mw:PageProp/Category" href="Category:A1"/><p>a</p>
1994 ### Preformatted text
2003 And a [[Main Page|link]]
2009 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2014 Tabs don't trigger preformatted text
2018 This is preformatted text.
2024 <pre>This is preformatted text.
2030 Ident preformatting with inline content
2041 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2058 Regression with preformatted in <center>
2072 Bug 52763: Preformatted in <blockquote>
2078 indented cell (no pre-wrapping!)
2088 <p> indented cell (no pre-wrapping!)
2096 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2113 Bug 15491: <ins>/<del> in blockquote
2116 Foo <del>bar</del> <ins>baz</ins> quux
2120 <p>Foo <del>bar</del> <ins>baz</ins> quux
2126 # Note that the p-wrapping is newline sensitive, which could be
2127 # considered a bug: tidy will wrap only the 'Foo' in the example
2128 # below in a <p> tag. (see comment 23-25 of bug #6200)
2130 Bug 15491: <ins>/<del> in blockquote (2)
2132 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2135 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2141 <del>bar</del> <ins>baz</ins> quux</blockquote>
2145 <pre> with attributes (bug 3202)
2147 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2149 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2154 <pre> with width attribute (bug 3202)
2156 <pre width="8">Narrow screen goodies</pre>
2158 <pre width="8">Narrow screen goodies</pre>
2163 <pre> with forbidden attribute (bug 3202)
2165 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2167 <pre width="8">Narrow screen goodies</pre>
2172 Entities inside <pre>
2181 <pre> with forbidden attribute values (bug 3202)
2183 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2185 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2190 <nowiki> inside <pre> (bug 13238)
2198 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2206 <pre><nowiki>Foo</nowiki></pre>
2211 <nowiki> and <pre> preference (first one wins)
2242 </pre> inside nowiki
2244 <nowiki></pre></nowiki>
2250 # Parsoid doesn't strip empty tags, like Tidy does.
2252 Empty pre; pre inside other HTML tags (bug 54946)
2254 parsoid=wt2html,wt2wt
2285 HTML pre followed by indent-pre
2300 <p><pre>foo</pre></p>
2302 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2306 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2314 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2324 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2336 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2357 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2361 {{echo| foo}}{{echo| bar}}
2366 {{echo|<!--cmt--> foo}}
2368 <!--cmt-->{{echo| foo}}
2370 {{echo|{{echo| }}bar}}
2388 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2425 Things that look like <pre> tags aren't treated as such
2427 Barack Obama <President> of the United States
2428 <President></President>
2430 <p>Barack Obama <President> of the United States
2431 <President></President>
2435 ## PHP parser discards the "<pre " string
2437 Handle broken pre-like tags (bug 64025)
2441 {{echo|<pre <pre>x</pre>}}
2443 <table><pre </table>
2446 <table><pre></pre></table>
2449 <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>
2458 Parsoid: handle pre with space after attribute
2462 <pre style="width:50%;" >{{echo|foo}}</pre>
2464 <pre style="width:50%;">{{echo|foo}}</pre>
2467 # TODO / maybe: fix wt2wt for this
2469 Parsoid: Don't paragraph-wrap fosterable content
2495 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2523 #--------------------------------------------------------------------
2524 # Transclusion parameter whitespace stripping tests
2525 # Behavior is different for positional and named parameters
2526 #--------------------------------------------------------------------
2528 Templates: Strip leading and trailing whitespace from named-param values
2532 {{echo|1= {{echo|b}} }}
2545 <ul><li> d</li></ul>
2550 Templates: Don't strip whitespace from positional-param values
2554 {{echo|{{echo|b}} }}
2586 <ul><li> f</li></ul>
2594 Templates: Handle empty comment-and-ws-only lines correctly
2597 <!--should be ignored-->
2598 <!--should be ignored as well-->
2607 Templates: Handle comments in the target
2610 <!-- should be ignored -->
2613 {{echo<!-- should be ignored -->
2616 {{echo<!-- should be ignored -->|foo}}
2618 {{<!-- should be ignored -->echo|foo}}
2620 <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>
2622 <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>
2624 <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>
2626 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2630 Templates: Handle comments in parameter names (bug 67657)
2633 <!-- should be ignored -->
2637 <!-- should be ignored -->
2640 {{echo|1<!-- should be ignored --> = foo}}
2642 {{echo|<!-- should be ignored -->1 = foo}}
2644 <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>
2646 <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>
2648 <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>
2650 <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>
2654 Templates: Other wikitext in parameter names (bug 67657)
2658 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2664 #--------------------------------------------------------------------
2665 # Transclusion parameter escaping tests
2666 #--------------------------------------------------------------------
2668 Templates: Parsoid parameter escaping test 1
2672 {{echo|[foo]|{{echo|[bar]}}}}
2674 <p about="#mwt1" typeof="mw:Transclusion"
2675 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2679 Parsoid: Pipes in external links in template parameter
2683 {{echo|[{{echo|http://example.com}} link]}}
2685 <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>
2689 Parsoid: pipe in transclusion parameter
2693 {{echo|http://foo.com/a|b}}
2695 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2696 typeof="mw:Transclusion"
2697 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>
2701 Parsoid: Pipe in external link target and content in template parameter
2703 parsoid=html2wt,wt2wt
2705 {{echo|[http://foo.com/a|b a|b]}}
2707 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2708 typeof="mw:Transclusion"
2709 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2710 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2714 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2718 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2720 <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>
2724 Templates: Don't escape already nowiki-escaped text in template parameters
2726 parsoid=html2wt,wt2wt
2728 {{echo|foo<nowiki>|</nowiki>bar}}
2729 {{echo|<nowiki><div></nowiki>}}
2730 {{echo|<nowiki></nowiki>}}
2732 <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>
2733 <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>
2734 <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>
2740 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2742 parsoid=html2wt,wt2wt
2744 {{echo|{{echo|1=bar}}}}
2746 <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>
2751 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2757 <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>
2762 Templates: Preserve blank parameter names
2769 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2773 Templates: Preserve blank parameter names in other positions
2775 {{blank_param|bar|=foo}}
2781 <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
2786 ### Parsoid-centric tests for testing RT edge cases for pre
2790 1a. Indent-Pre and Comments
2803 1b. Indent-Pre and Comments
2816 1c. Indent-Pre and Comments
2829 1d. Indent-Pre and Comments
2830 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2843 2a. Indent-Pre and tables
2864 2b. Indent-Pre and tables
2880 2c. Indent-Pre and tables (bug 42252)
2897 2d. Indent-Pre and tables
2914 <tbody><tr><td> b</td></tr>
2919 2e. Indent-Pre and table-line syntax
2932 2f. Indent-pre started by table-line syntax
2951 3a. Indent-Pre and block tags (single-line html)
2955 c <blockquote> foo </blockquote>
2960 c <blockquote> foo </blockquote>
2961 <pre><span> foo </span>
2964 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2965 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2966 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2967 <pre><span> foo </span>
2984 3b. Indent-Pre and block tags (multi-line html)
2989 <pre>a <span>foo</span>
2994 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2995 b <div data-parsoid='{"stx":"html"}'> foo </div>
3005 3c. Indent-Pre and block tags (pre-content on separate line)
3069 4. Indent-Pre and extension tags
3075 a <ul class="gallery mw-gallery-traditional">
3076 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3077 <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>
3078 <div class="gallerytext">
3085 <ul class="gallery mw-gallery-traditional">
3086 <li class="gallerybox" style="width: 155px">
3087 <div style="width: 155px">
3088 <div class="thumb" style="width: 150px;">
3089 <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>
3091 <div class="gallerytext"></div>
3098 Table wikitext syntax outside wiki-tables
3101 ! not a table heading
3104 | class="foo bar" | baz
3111 ! not a table heading
3114 | class="foo bar" | baz
3123 Render paragraphs when indent-pre is suppressed in blocklevels
3140 4. Multiple spaces at start-of-line
3158 ## NOTE: the leading white-space chars on empty line are significant
3160 5a. White-space in indent-pre
3172 ## NOTE: the leading white-space chars on empty line are significant
3174 5b. White-space in indent-pre
3193 5c. White-space in indent-pre
3206 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3229 7a. Indent-pre and category links
3231 parsoid=wt2html,wt2wt
3233 [[Category:foo]] <!-- No pre-wrapping -->
3234 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3236 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3237 <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 -->
3241 7b. Indent-pre and category links
3243 parsoid=wt2html,wt2wt
3246 [[Category:foo]] {{echo|b}}
3248 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3249 <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>
3253 Indent-Pre: Newlines in comments shouldn't affect sol state
3265 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3269 HTML-pre: 1. embedded newlines
3303 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3305 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3309 <pre data-parsoid='{"stx":"html"}'>
3314 <pre data-parsoid='{"stx":"html"}'>
3322 HTML-pre: big spaces
3359 <pre data-parsoid='{"stx":"html"}'>
3378 HTML-pre: 2: indented text
3391 HTML-pre: 3: other wikitext
3412 ### Definition lists
3419 <dl><dt> name </dt>
3420 <dd> Definition</dd></dl>
3425 Definition list for indentation only
3429 <dl><dd> Indented text</dd></dl>
3434 Definition list with no space
3439 <dd>Definition</dd></dl>
3444 Definition list with URL link
3446 ; http://example.com/ : definition
3448 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3449 <dd> definition</dd></dl>
3454 Definition list with bracketed URL link
3456 ;[http://www.example.com/ Example]:Something about it
3458 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3459 <dd>Something about it</dd></dl>
3464 Definition list with wikilink containing colon
3466 ; [[Help:FAQ]]: The least-read page on Wikipedia
3468 <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>
3469 <dd> The least-read page on Wikipedia</dd></dl>
3473 # At Brion's and JeLuF's insistence... :)
3475 Definition list with news link containing colon
3477 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3479 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3480 <dd> This isn't even a real newsgroup!</dd></dl>
3483 <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>
3487 Malformed definition list with colon
3489 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3491 <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>
3496 Definition lists: colon in external link text
3498 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3500 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3501 <dd> OK, I made that up</dd></dl>
3506 Definition lists: colon in HTML attribute
3508 ;<b style="display: inline">bold</b>
3510 <dl><dt><b style="display: inline">bold</b></dt></dl>
3515 Definition lists: self-closed tag
3517 ;one<br/>two : two-line fun
3519 <dl><dt>one<br />two </dt>
3520 <dd> two-line fun</dd></dl>
3525 Bug 11748: Literal closing tags
3529 <dd>test test test test test</dd>
3531 <dd>test test test test test</dd>
3536 <dd>test test test test test</dd>
3538 <dd>test test test test test</dd>
3544 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3547 ; term : description
3552 <dl><dt> term </dt>
3553 <dd> description</dd></dl>
3554 <ul><li> unordered</li></ul>
3561 Definition list with empty definition and following paragraph
3573 Nested definition lists using html syntax
3582 Definition Lists: No nesting: Multiple dd's
3595 Definition Lists: Indentation: Regular
3603 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3608 Definition Lists: Indentation: Missing 1st level
3614 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3619 Definition Lists: Indentation: Multi-level indent
3623 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3628 Definition Lists: Hacky use to indent tables
3635 should be left alone
3637 <dl><dd><dl><dd><table>
3642 </td></tr></table></dd></dl></dd></dl>
3644 should be left alone
3649 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3657 should be left alone
3660 <dl><dd><dl><dd><table><tr>
3663 </tr></table><!-- bar --></dd></dl></dd></dl>
3665 should be left alone</p>
3669 Definition Lists: Hacky use to indent tables, with comment before table
3675 <dl><dd><dl><dd><!-- foo --><table><tr>
3677 </tr></table></dd></dl></dd></dl>
3680 # The trailing whitespace in this test is to catch a regression in
3681 # Parsoid after T54473.
3683 Definition Lists: Hacky use to indent tables (WS-insensitive)
3692 </td></tr></table></dd></dl>
3696 <tbody><tr><td>a</td></tr>
3697 </tbody></table> </dd></dl>
3700 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3701 ## as an empty dt item. It also ignores all but the last ";" when followed
3702 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3703 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3706 ## Ex: ";;t2 ::d2" is transformed into:
3718 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3719 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3730 ## All Parsoid only definition list tests have this difference.
3732 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3733 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3736 Table / list interaction: indented table with lists in table contents
3751 <ul><li> b</li></ul>
3755 <ul><li> d</li></ul>
3756 </td></tr></table></dd></dl>
3761 Table / list interaction: lists nested in tables nested in indented lists
3784 </td></tr></table></dd></dl>
3791 Definition Lists: Nesting: Multi-level (Parsoid only)
3821 Definition Lists: Nesting: Test 2 (Parsoid only)
3841 Definition Lists: Nesting: Test 3 (Parsoid only)
3869 Definition Lists: Nesting: Test 4
3874 <dl><dd><dl><dd><dl><dt>t3</dt>
3875 <dd>d3</dd></dl></dd></dl></dd></dl>
3880 ## The Parsoid team believes the following three test exposes a
3881 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3882 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3883 ## It also exposes a "misfeature" in tidy, which doesn't like
3884 ## <dl> tags with a single <dt> child; it converts the <dt> into
3885 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3887 Definition Lists: Mixed Lists: Test 1
3893 <dl><dd><dl><dt><ul><li> foo</li>
3894 <li> bar</li></ul></dt></dl>
3895 <dl><dt> baz</dt></dl></dd></dl>
3930 Definition Lists: Mixed Lists: Test 2
3935 <ul><li><dl><dd> d1</dd>
3936 <dd> d2</dd></dl></li></ul>
3942 Definition Lists: Mixed Lists: Test 3
3947 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3948 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3954 Definition Lists: Mixed Lists: Test 4
3959 <ul><li><dl><dt>d1 </dt>
3962 <dd>d4</dd></dl></li></ul>
3968 Definition Lists: Mixed Lists: Test 5
3974 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3980 Definition Lists: Mixed Lists: Test 6
3985 <ol><li><ul><li><dl><dd>d1
3986 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3992 Definition Lists: Mixed Lists: Test 7
3997 <dl><dd><ul><li> d1</li>
3998 <li> d2</li></ul></dd></dl>
4004 Definition Lists: Mixed Lists: Test 8
4009 <dl><dd><ul><li> d1</li></ul>
4010 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4016 Definition Lists: Mixed Lists: Test 9
4020 <ul><li><dl><dt>foo </dt>
4021 <dd>bar</dd></dl></li></ul>
4027 Definition Lists: Mixed Lists: Test 10
4031 <ul><li><ol><li><dl><dt>foo </dt>
4032 <dd>bar</dd></dl></li></ol></li></ul>
4036 # The Parsoid team disagrees with the PHP parser's seemingly-random
4037 # rules regarding dd/dt on the next two tests. Parsoid is more
4038 # consistent, and recognizes the shared nesting and keeps the
4039 # still-open tags around until the nesting is complete.
4040 # (And tidy again converts <dt> to <dd> before 'bar'.)
4043 Definition Lists: Mixed Lists: Test 11
4048 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4049 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4050 <dl><dt>boo </dt>
4051 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4106 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4107 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4111 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4112 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4121 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4123 # * The test is wrong, there are two colons where there should be :;
4124 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4126 Definition Lists: Weird Ones: Test 1
4128 *#;*::;; foo : bar (who uses this?)
4130 <ul><li><ol><li><dl><dt> foo </dt>
4131 <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>
4150 <dt>bar (who uses this?)</dt>
4182 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4183 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4195 Definition Lists: colons occurring in tags
4213 <dt><span>a:b</span></dt>
4242 Definition Lists: colons and tables 1
4254 </td></tr></table></dd></dl>
4258 </td></tr></table></dd></dl>
4262 # Parsoid's output (as documented below) differs from php's in this case.
4263 # This is probably a bug. If we fixup parsoid to match php's output, the
4264 # above test should pass and the below test case can be removed. It is
4265 # unclear which output is more desirable.
4268 Definition Lists: colons and tables 2
4280 </td></tr></table></dd>
4284 </td></tr></table></dd></dl>
4288 Definition Lists: template interaction
4290 ::{{definition_list}}
4293 ::{{definition_list}}
4298 <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">
4299 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4301 <dl><dd data-parsoid='{}'>one
4302 <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">
4303 </span><dd about="#mwt2">two
4305 <dd>three</dd></dl></dd>
4306 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4314 External links: non-bracketed
4316 Non-bracketed: http://example.com
4318 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4322 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4324 External links: numbered
4326 Numbered: [http://example.com]
4327 Numbered: [http://example.net]
4328 Numbered: [http://example.com]
4330 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4331 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4332 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4335 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4336 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4337 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4341 External links: specified text
4343 Specified text: [http://example.com link]
4345 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4350 External links: trail
4352 Linktrails should not work for external links: [http://example.com link]s
4354 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4359 External links: dollar sign in URL
4361 http://example.com/1$2345
4363 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4367 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4369 External links: dollar sign in URL (autonumber)
4371 [http://example.com/1$2345]
4373 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4376 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4380 External links: open square bracket forbidden in URL (bug 4377)
4382 parsoid=wt2html,wt2wt,html2html
4384 http://example.com/1[2345
4386 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4389 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4393 External links: open square bracket forbidden in URL (named) (bug 4377)
4395 parsoid=wt2html,html2html
4397 [http://example.com/1[2345]
4399 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4402 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4405 # parsoid adds a space before the link name
4407 External links: open square bracket forbidden in URL (named) (bug 4377)
4410 [http://example.com/1 [2345]
4412 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4417 External links: nowiki in URL link text (bug 6230)
4419 [http://example.com/ <nowiki>''example site''</nowiki>]
4421 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4426 External links: newline forbidden in text (bug 6230 regression check)
4428 [http://example.com/ first
4431 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4437 External links: Pipe char between url and text
4439 [http://example.com | link]
4441 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4446 External links: protocol-relative URL in brackets
4448 [//example.com/ Test]
4450 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4454 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4456 External links: protocol-relative URL in brackets without text
4460 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4463 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4467 External links: protocol-relative URL in free text is left alone
4471 <p>//example.com/Foo
4476 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4478 foo//example.com/Foo
4480 <p>foo//example.com/Foo
4485 External links: with no contents
4487 [http://en.wikipedia.org/wiki/Foo]
4489 [[wikipedia:Foo|Bar]]
4491 [[wikipedia:Foo|<span>Bar</span>]]
4493 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4494 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4495 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4498 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4499 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4500 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4504 External links: Free with trailing punctuation
4514 http://example.com/url_with_(brackets)
4515 (http://example.com/url_without_brackets)
4516 http://example.com/url_with_entity
4517 http://example.com/url_with_entity 
4518 http://example.com/url_with_entity 
4519 http://example.com/url_with_entity<
4520 http://example.com/url_with_entity<
4521 http://example.com/url_with_entity<
4523 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4524 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4525 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4526 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4527 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4528 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4529 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4530 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4531 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4532 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4533 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4534 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4535 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4536 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4537 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4538 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4541 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4542 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4543 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4544 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4545 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4546 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4547 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4548 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4549 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4550 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4551 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4552 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4553 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4554 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4555 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4556 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4560 External links: Lone protocols are never linked (T105697)
4579 External links: No preceding word characters allowed (bug 65278)
4581 NOPEhttp://example.com
4582 N0http://example.com
4583 ok:http://example.com
4584 ok-http://example.com
4586 <p>NOPEhttp://example.com
4587 N0http://example.com
4588 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4589 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4596 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4598 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4603 External image from https
4605 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4607 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4612 External image (when not allowed)
4614 wgAllowExternalImages=0
4616 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4618 <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>
4623 Link to non-http image, no img tag
4625 Link to non-http image, no img tag: ftp://example.com/test.jpg
4627 <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>
4632 External links: terminating separator
4634 Terminating separator: http://example.com/thing,
4636 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4641 External links: intervening separator
4643 Intervening separator: http://example.com/1,2,3
4645 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4650 External links: old bug with URL in query
4652 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4654 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4659 External links: old URL-in-URL bug, mixed protocols
4661 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4663 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4668 External links: URL in text
4670 URL in text: [http://example.com http://example.com]
4672 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4677 External links: Clickable images
4679 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4681 <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>
4684 <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>
4688 External links: raw ampersand
4690 Old & use: http://x&y
4692 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4697 External links: encoded ampersand
4699 Old & use: http://x&y
4701 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4704 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4708 External links: encoded equals (bug 6102)
4710 http://example.com/?foo=bar
4712 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4715 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4719 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4720 ## does it number them. As discussed in bug 53505, we can identify
4721 ## autonumbered links via CSS.
4725 External links: [raw ampersand]
4727 Old & use: [http://x&y]
4729 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4732 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4735 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4736 # mode will return the [raw ampersand] wikitext
4738 External links: [encoded ampersand]
4740 parsoid=wt2html,wt2wt,html2html
4742 Old & use: [http://x&y]
4744 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4747 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4751 External links: [raw equals]
4753 [http://example.com/?foo=bar]
4755 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4758 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4761 # note that parsoid html is identical to [raw equals] case; so html2wt
4762 # mode will return the [raw equals] wikitext
4764 External links: [encoded equals] (bug 6102)
4766 parsoid=wt2html,wt2wt,html2html
4768 [http://example.com/?foo=bar]
4770 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4773 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4776 # xxx parsoid strips the IDN character, so the round-trip tests will
4777 # obviously fail and are disabled. --cscott
4779 External links: [IDN ignored character reference in hostname; strip it right off]
4781 parsoid=wt2html,wt2wt,html2html
4783 [http://e‌xample.com/]
4785 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4788 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4791 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4792 # Where an external link could easily circumvent the sanitization of the text of
4793 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4794 # test demands a higher standard. That's a bit strange.
4798 # http://example.com -> [http://example.com|http://example.com]
4799 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4801 # The first example is sanitized, but the second is not. Any security benefits
4802 # from this production are trivial to circumvent. Either remove this test and
4803 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4804 # the test accordingly.
4808 # xxx parsoid strips the IDN character, so the round-trip tests will
4809 # obviously fail and are disabled. --cscott
4811 External links: IDN ignored character reference in hostname; strip it right off
4813 parsoid=wt2html,html2html
4815 http://e‌xample.com/
4817 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4820 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4824 External links: www.jpeg.org (bug 554)
4828 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4832 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4834 External links: URL within URL (original bug 2)
4836 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4838 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4841 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4845 BUG 361: URL inside bracketed URL
4847 [http://www.example.com/foo http://www.example.com/bar]
4849 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4854 BUG 361: URL within URL, not bracketed
4856 http://www.example.com/foo?=http://www.example.com/bar
4858 <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>
4863 BUG 289: ">"-token in URL-tail
4865 http://www.example.com/<hello>
4867 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4872 BUG 289: literal ">"-token in URL-tail
4874 http://www.example.com/<b>html</b>
4876 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4879 <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>
4883 BUG 289: ">"-token in bracketed URL
4885 [http://www.example.com/<hello> stuff]
4887 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4892 BUG 289: literal ">"-token in bracketed URL
4894 [http://www.example.com/<b>html</b> stuff]
4896 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4901 BUG 289: literal double quote at end of URL
4903 http://www.example.com/"hello"
4905 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4910 BUG 289: literal double quote in bracketed URL
4912 [http://www.example.com/"hello" stuff]
4914 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4919 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4921 [http://www.example.com test]
4923 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4928 External links: link text with spaces
4930 [http://www.example.com a b c]
4931 [http://www.example.com ''a'' ''b'']
4933 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4934 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4939 External links: wiki links within external link (Bug 3695)
4941 [http://example.com [[wikilink]] embedded in ext link]
4943 <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>
4946 <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>
4950 BUG 787: Links with one slash after the url protocol are invalid
4954 [http:/example.com title]
4956 <p>http:/example.com
4957 </p><p>[http:/example.com title]
4962 Bracketed external links with template-generated invalid target
4964 [{{echo|http:/example.com}} title]
4966 <p>[http:/example.com title]
4971 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4973 ''[http://example.com text'']
4974 [http://example.com '''text]'''
4975 ''Something [http://example.com in italic'']
4976 ''Something [http://example.com mixed''''', even bold]'''
4977 '''''Now [http://example.com both''''']
4979 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4980 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4981 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4982 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4983 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4989 Bug 4781: %26 in URL
4991 http://www.example.com/?title=AT%26T
4993 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4996 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4999 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5000 # % is actually legal in HTML5. Any change in output would need testing though.
5002 Bug 4781, 5267: %25 in URL
5004 http://www.example.com/?title=100%25_Bran
5006 <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>
5009 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5013 Bug 4781, 5267: %28, %29 in URL
5015 http://www.example.com/?title=Ben-Hur_%281959_film%29
5017 <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>
5020 <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>
5025 Bug 4781: %26 in autonumber URL
5027 [http://www.example.com/?title=AT%26T]
5029 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5032 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5036 Bug 4781, 5267: %26 in autonumber URL
5038 [http://www.example.com/?title=100%25_Bran]
5040 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5043 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5047 Bug 4781, 5267: %28, %29 in autonumber URL
5049 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5051 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5054 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5059 Bug 4781: %26 in bracketed URL
5061 [http://www.example.com/?title=AT%26T link]
5063 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5066 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5070 Bug 4781, 5267: %25 in bracketed URL
5072 [http://www.example.com/?title=100%25_Bran link]
5074 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5079 Bug 4781, 5267: %28, %29 in bracketed URL
5081 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5083 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5086 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5090 External link containing a period in the anchor. (bug 63947)
5092 [//foo.org/bar#baz. bang]
5094 [//foo.org/bar. bang]
5096 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5097 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5100 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5101 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5105 External link containing a single quote. (bug 63947)
5109 [//foo.org/bar'baz bang]
5111 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5112 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5115 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5116 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5121 External link containing a period in the anchor. (bug 63947)
5123 [//foo.org/bar#baz. bang]
5125 [//foo.org/bar. bang]
5127 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5128 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5131 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5132 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5136 External link containing a single quote. (bug 63947)
5140 [//foo.org/bar'baz bang]
5142 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5143 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5146 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5147 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5152 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5154 Some [http://example.com/ pretty ''italics'' and stuff]!
5156 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5161 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5163 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5165 <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>
5170 External link containing double-single-quotes with no space separating the url from text in italics
5172 [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]].]
5174 <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>
5177 <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>
5179 <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>
5183 External link with comments in link text
5185 [http://www.google.com Google <!-- comment -->]
5187 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5192 URL-encoding in URL functions (single parameter)
5194 {{localurl:Some page|amp=&}}
5196 <p>/index.php?title=Some_page&amp=&
5201 URL-encoding in URL functions (multiple parameters)
5203 {{localurl:Some page|q=?&=&}}
5205 <p>/index.php?title=Some_page&q=?&amp=&
5212 http://example.com/index.php?foozoid%5B%5D=bar
5214 http://example.com/index.php?foozoid[]=bar
5216 <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>
5217 </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>
5220 <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>
5222 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5226 IPv6 urls (bug 21261)
5230 http://[2404:130:0:1000::187:2]/index.php
5232 <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>
5237 Non-extlinks in brackets
5246 [{{echo|foo}} ''bar'']
5247 [{{echo|foo}}l's] errand
5248 [{{echo|foo}}l's errand]
5250 [url=http://example.com]
5263 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5268 Percent encoding in external links
5270 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5272 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5275 <p><a rel="mw:ExtLink"
5276 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5280 Use url link syntax for links where the content is equal the link target
5284 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5287 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5291 Parenthesis in external links, especially URL links
5295 http://example.com/test)
5297 http://example.com/(test)
5299 http://example.com/((test)
5301 (http://example.com/(test))
5303 (http://example.com/(test)))))
5305 http://example.com/a)b
5307 [http://example.com) foo]
5309 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5310 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5311 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5312 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5313 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5314 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5315 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5316 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5319 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5320 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5321 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5322 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5323 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5324 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5325 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5326 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5330 Parenthesis in external links, w/ transclusion or comment
5332 (http://example.com/{{echo|hi}})
5334 (http://example.com<!-- hi -->)
5336 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5337 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5340 <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>
5342 <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>
5346 Serialize <a> tags with invalid link targets as plain text
5350 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5351 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5352 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5353 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5356 <nowiki>*</nowiki>text
5357 <nowiki>[[foo]]</nowiki>
5358 <nowiki>*a [[foo]]</nowiki>
5362 mw:ExtLink -vs- mw:WikiLink (T94723)
5366 <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>
5367 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5368 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5369 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5371 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5372 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5377 [[wikipedia:Foo|Bar]]
5378 [[wikipedia:Foo|Bar]]
5380 [[wikipedia:European_Robin|European Robin]]
5381 [[wikipedia:European_Robin|European Robin]]
5385 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5389 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5391 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5402 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5404 Normal text. '''''Bold italic text.''''' Normal text.
5406 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5407 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5412 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5413 # parser strips. The wikitext contains just the first half of the bold
5416 Unclosed and unmatched quotes
5418 '''''Bold italic text '''with bold deactivated''' in between.'''''
5420 '''''Bold italic text ''with italic deactivated'' in between.'''''
5424 ..spanning two paragraphs (should not work).'''
5426 '''Bold tag left open
5428 ''Italic tag left open
5432 <!-- Unmatching number of opening, closing tags: -->
5433 '''This year''''s election ''should'' beat '''last year''''s.
5435 ''Tom'''s car is bigger than ''Susan'''s.
5437 Plain ''italic'''s plain
5439 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5440 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5441 </p><p><b>Bold text..</b>
5442 </p><p>..spanning two paragraphs (should not work).
5443 </p><p><b>Bold tag left open</b>
5444 </p><p><i>Italic tag left open</i>
5446 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5447 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5448 </p><p>Plain <i>italic'</i>s plain
5451 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5452 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5453 </p><p><b>Bold text..</b>
5454 </p><p>..spanning two paragraphs (should not work).<b></b>
5455 </p><p><b>Bold tag left open</b>
5456 </p><p><i>Italic tag left open</i>
5459 <!-- Unmatching number of opening, closing tags: -->
5460 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5461 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5462 </p><p>Plain <i>italic'</i>s plain
5469 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5472 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5473 # is the bare minimum required by the spec, see:
5474 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5475 # Parsoid team replies: empty table tags are legal in HTML5
5477 A table with no data.
5490 A table with stray table end tags on start tag line (wt2html)
5494 {|style="color: red;"|}
5496 {|style="color: red;" |}
5500 {|style="color: red;"|} id="foo"
5504 {|style="color: red;" |} id="foo"
5508 <table style="color: red;"></table>
5510 <table style="color: red;">
5516 <table style="color: red;" id="foo">
5522 <table style="color: red;" id="foo">
5531 A table with no data (take 2)
5539 # A table with nothing but a caption is invalid XHTML, we might want to render
5540 # this as <p>caption</p>
5541 # Parsoid team replies: table with only a caption is legal in HTML5
5543 A table with nothing but a caption
5551 </caption><tr><td></td></tr></table>
5554 <table><caption> caption</caption></table>
5558 A table with caption with default-spaced attributes and a table row
5561 |+ style="color: red;" | caption1
5567 <caption style="color: red;"> caption1
5576 A table with captions with non-default spaced attributes and a table row
5579 |+style="color: red;"|caption2
5580 |+ style="color: red;"| caption3
5586 <caption style="color: red;">caption2
5588 <caption style="color: red;"> caption3
5597 Table td-cell syntax variations
5601 | foo bar foo || baz
5602 | style='color:red;' | baz
5603 | style='color:red;' || baz
5610 <td> foo bar foo </td>
5613 <td style="color:red;"> baz
5615 <td> style='color:red;' </td>
5643 Simple table but with multiple dashes for row wikitext
5662 Multiplication table
5664 {| border="1" cellpadding="2"
5665 |+Multiplication table
5667 ! × !! 1 !! 2 !! 3
5685 <table border="1" cellpadding="2">
5686 <caption>Multiplication table
5733 Accept "||" in table headings
5748 Accept "!!" in table data
5762 <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>
5767 Accept "||" in indented table headings
5777 </th></tr></table></dd></dl>
5782 Accept "!!" in templates
5796 <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>
5800 Accept "!!" in table headings after newline
5817 <p>b!!c</p></th></tr>
5822 Accept "!!" in table data of mixed wikitext / html syntax
5826 <tr><td>b!!c</td></tr>
5839 <tbody><tr><th>a</th></tr>
5840 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
5845 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5862 Accept "| !" at start of line in tables (ignore !-attribute)
5866 | !style="color:red" | bar
5878 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 +/-
5882 |style='color:red;'|+1
5883 |style='color:blue;'|-1
5895 <td style="color:red;">+1
5897 <td style="color:blue;">-1
5921 |rowspan=2| Cell 2, row 1 (and 2)
5932 <td rowspan="2"> Cell 2, row 1 (and 2)
5950 {| bgcolor=#ABCDEF border=2
5955 |the original table again
5963 <table bgcolor="#ABCDEF" border="2">
5971 <td>the original table again
5977 Invalid attributes in table cell (bug 1830)
5991 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
5995 | title="foo<nowiki>|</nowiki>" |bar
5996 | title="foo<nowiki>|</nowiki>" bar
6003 <td title="foo|">bar
6005 <td> title="foo|" bar
6010 # The "|}" to close the table is missing from the input, so parsoid's
6011 # *2wt modes will fail.
6013 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
6015 parsoid=wt2html,html2html
6018 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6022 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6023 <td>]" onmouseover="alert(document.cookie)">test
6031 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6034 # FIXME: The php output is broken.
6036 ! and || in td attributes should not be parsed as <th>/<td>
6039 | style="color: red !important;" data-contrived="put this here ||" | foo
6044 <td> style="color: red !important;" data-contrived="put this here </td>
6050 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
6055 Indented table markup mixed with indented pre content (proposed in bug 6200)
6060 Text that should be rendered preformatted
6068 <pre>Text that should be rendered preformatted
6077 1. Template-generated table cell attributes and cell content
6082 || {{table_attribs_5}}
6083 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6084 |align=center {{table_attribs}}
6085 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6090 <td style="color:red;">Foo
6092 <td style="color:red;">Foo
6094 <td> style="color:red;"</td>
6097 <td style="color:red;">Foo
6099 <td align="center" style="color:red;">Foo
6101 <td align="center" style="color:red;">Foo
6107 2. Template-generated table cell attributes and cell content
6110 |{{table_attribs_2}}
6115 <td style="color:red;">Foo
6123 <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>
6124 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6129 3. Template-generated table cell attributes and cell content
6132 !align=center {{table_header_cells}}
6134 |align=center {{table_cells}}
6139 <th align="center" style="color:red;">Foo</th>
6140 <th style="color:red;"><i>Bar</i></th>
6141 <th style="color:brown;"><i>Foo</i> and Baz
6144 <td align="center" style="color:red;">Foo</td>
6145 <td style="color:red;"><i>Bar</i></td>
6146 <td style="color:brown;"><i>Foo</i> and Baz
6151 <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>
6152 <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>
6157 4. Template-generated table cell attributes and cell content inside a templated table
6160 !align=center {{table_header_cells}}
6162 |align=center {{table_cells}}
6167 <th align="center" style="color:red;">Foo</th>
6168 <th style="color:red;"><i>Bar</i></th>
6169 <th style="color:brown;"><i>Foo</i> and Baz
6172 <td align="center" style="color:red;">Foo</td>
6173 <td style="color:red;"><i>Bar</i></td>
6174 <td style="color:brown;"><i>Foo</i> and Baz
6178 <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}}]}'>
6179 <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>
6181 <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>
6186 Table with row followed by newlines and table heading
6204 Table with empty line following the start tag
6221 # FIXME: Preserve the attribute properly (with an empty string as value) in
6222 # the PHP parser. Parsoid implements the behavior below.
6224 Table attributes with empty value
6234 </td></tr></tbody></table>
6239 Wikitext table with a lot of comments
6262 Wikitext table comments represented in parsoid dom
6264 {|<!--c1--><!--c2-->
6275 <table><!--c1--><!--c2-->
6276 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6277 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6282 Wikitext table with double-line table cell
6299 Table cell with a single comment
6316 Table-cell after a comment-only-empty-line
6333 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6335 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6341 Build table with {{!}}
6343 {{{!}} class="wikitable"
6346 {{!}}- style="color:red;"
6347 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6350 <table class="wikitable">
6356 <tr style="color:red;">
6358 <td style="color:red;"> second data
6364 Build table with pipe as data
6366 {| class="wikitable"
6369 |- style="color:red;"
6370 | data || style="color:red;" | second data
6372 | style="color:red;" | data with | || style="color:red;" | second data with |
6374 || data with | ||| second data with |
6377 <table class="wikitable">
6383 <tr style="color:red;">
6385 <td style="color:red;"> second data
6388 <td style="color:red;"> data with | </td>
6389 <td style="color:red;"> second data with |
6392 <td> data with | </td>
6393 <td> second data with |
6399 Build table with wikilink
6401 {| class="wikitable"
6402 ! header || second header
6403 |- style="color:red;"
6404 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6406 | data || second data [[Main Page|link|text with pipe]]
6409 <table class="wikitable">
6414 <tr style="color:red;">
6415 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6416 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6420 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6425 # The expected HTML structure in this test is debatable. The PHP parser does
6426 # not parse this kind of table at all. The main focus for Parsoid is on
6427 # round-tripping, so this output is ok for now. TODO: revisit!
6429 Wikitext table with html-syntax row
6439 <td>foo</td></tr></tbody></table>
6442 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6443 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6444 ## PHP parser, which tidy then compounds by fostering the content
6445 ## entirely out of the table. Parsoid recognizes the table context
6446 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6447 ## depends on PHP's treatment of broken table markup!
6449 Implicit <td> after a |-
6451 parsoid=wt2html,html2html
6471 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6473 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6475 parsoid=wt2html,html2html
6508 <tr><td><pre>a</pre></td></tr>
6509 <tr><td> b</td></tr>
6514 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6515 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6517 Lists should be recognized in an implicit <td> context
6519 parsoid=wt2html,html2html
6546 Table cells not properly parsed in an implicit-td context
6550 {{table_attribs_4}} || a || b
6555 <td style="background-color:#DC241f;" width="10px"></td>
6562 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6563 <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>
6568 Parsoid: Round-trip tables directly followed by content (bug 51219)
6570 parsoid=wt2html,wt2wt
6595 Parsoid: Default to a newline after tables in new content (bug 51219)
6600 <tr><td>foo</td></tr></tbody></table> bar
6602 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6607 <nowiki> </nowiki>bar
6615 Parsoid: newline inducing block nodes don't suppress <nowiki>
6627 Parsoid: Row-syntax table headings followed by comment & table cells
6629 parsoid=wt2html,wt2wt
6633 <!-- foo --> || baz || quux
6647 <tbody><tr><th> foo </th><th> bar
6648 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6653 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6656 Parsoid: Recover better from broken table attributes
6676 <p>foo</p></td></tr>
6681 Strip unsupported table tags
6729 Testing serialization after deletion of table cells
6732 "modes": ["wt2wt", "selser"],
6740 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6753 Plain link, capitalized
6757 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6762 Plain link, uncapitalized
6766 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6773 [[Main Page|The Main Page]]
6775 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6780 Piped link with comment in link text
6782 [[Main Page|The Main<!--front--> Page]]
6784 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6789 Piped link with multiple pipe characters in link text
6791 [[Main Page||The|Main|Page|]]
6793 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6796 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6804 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6809 Broken link with fragment
6811 [[Zigzagzogzagzig#zug]]
6813 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6818 Special page link with fragment
6820 [[Special:Version#anchor]]
6822 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6827 Nonexistent special page link with fragment
6829 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6831 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6838 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6840 <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>
6847 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6849 <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>!!!
6860 Bug 43661: Piped links with identical prefixes
6862 [[prefixed article|prefixed articles with spaces]]
6864 [[prefixed article|prefixed articlesaoeu]]
6866 [[Main Page|Main Page test]]
6868 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6869 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6870 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6876 Link with HTML entity in suffix / tail
6878 [[Main Page]]", [[Main Page]]a
6880 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6883 <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>
6887 Link with 3 brackets
6896 Link with 4 brackets
6900 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6905 Piped link with 3 brackets
6907 [[[main page|the main page]]]
6909 <p>[[[main page|the main page]]]
6914 Piped link with extlink-like text
6917 [[Main Page|This is a [bar]]]
6919 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6920 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6923 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6924 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6928 Link with multiple pipes
6930 [[Main Page|The|Main|Page]]
6932 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6936 # Note that parsoid does not munge anchor text; all non-space
6937 # characters are valid in HTML5 ids.
6939 Anchor containing a #. (bug 63430)
6941 [[Main Page#And#Link]]
6943 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6946 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6952 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6954 <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>
6959 Link with space in namespace
6961 [[User talk:Foo bar]]
6963 <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>
6968 MemoryAlpha:AlphaTest
6970 This is an article in the MemoryAlpha namespace
6971 (which shadows the memoryalpha interwiki link).
6975 Namespace takes precedence over interwiki link (bug 51680)
6977 [[MemoryAlpha:AlphaTest]]
6979 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6983 # The previous test doesn't work correctly in html2*, due to not recognizing the
6984 # link as an internal one. This one checks for the correct behavior.
6986 Link to namespace preferred over interwiki with correct rel attribute
6988 parsoid=html2wt,html2html
6990 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6992 [[MemoryAlpha:AlphaTest]]
6996 Piped link to namespace
6998 [[Meta:Disclaimers|The disclaimers]]
7000 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7007 [[Usually caused by a typo (oops}]]
7009 <p>[[Usually caused by a typo (oops}]]
7016 Just a test of an article title containing a percent.
7020 Link containing % (not as a hex sequence)
7024 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7027 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7030 # note that the parsoid HTML is identical to the previous test output,
7031 # so the previous test ensures that the html2wt mode will generate the
7032 # "not as a hex sequence" wikitext.
7034 Link containing % as a single hex sequence interpreted to char
7036 parsoid=wt2wt,wt2html,html2html
7040 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7043 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7047 Link containing % as a double hex sequence interpreted to hex sequence
7051 <p>[[7%2525 Solution]]
7055 # note that parsoid does not munge anchor text; all non-space
7056 # characters are valid in HTML5 anchors.
7058 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7059 Example for such a section: == < ==
7061 [[%23%3c]][[%23%3e]]
7063 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7066 <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>
7070 Link containing "<#" and ">#" as a hex sequences
7072 [[%3c%23]][[%3e%23]]
7074 <p>[[%3c%23]][[%3e%23]]
7079 Link containing an equals sign
7081 [[Special:BookSources/isbn=4-00-026157-6]]
7083 <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>
7086 <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>
7092 Just a test of an article title containing a tilde.
7095 # note that links containing signatures, like [[Foo~~~~]], are
7096 # massaged by the pre-save transform (PST) and so the tildes are never
7097 # seen by the parser.
7099 Link containing a tilde
7103 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7106 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7110 Link containing double-single-quotes '' (bug 4598)
7112 [[Lista d''e paise d''o munno]]
7114 <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>
7117 <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>
7121 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7123 Some [[Link|pretty ''italics'' and stuff]]!
7125 <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>!
7128 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7132 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7134 ''Some [[Link|pretty ''italics'' and stuff]]!''
7136 <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>
7141 Link with double quotes in title part (literal) and alternate part (interpreted)
7143 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7147 [[''Pentecoste''|Pentecoste]]
7149 [[''Pentecoste''|''Pentecoste'']]
7151 <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>
7152 </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>
7153 </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>
7154 </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>
7157 <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>
7158 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7159 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7160 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7164 Broken image links with HTML captions (bug 39700)
7166 [[File:Nonexistent|<script></script>]]
7167 [[File:Nonexistent|100x100px|<script></script>]]
7168 [[File:Nonexistent|<]]
7169 [[File:Nonexistent|a<i>b</i>c]]
7171 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7172 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7173 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7174 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7177 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7178 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
7179 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7180 <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>b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
7186 [[http://www.example.com]]
7188 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7191 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7195 Plain link to URL with link text
7197 [[http://www.example.com Link text]]
7199 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7204 Plain link to protocol-relative URL
7206 [[//www.example.com]]
7208 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7211 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7215 Plain link to protocol-relative URL with link text
7217 [[//www.example.com Link text]]
7219 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7224 Plain link to page with question mark in title
7230 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7231 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7236 # I'm fairly sure the expected result here is wrong.
7237 # We want these to be URL links, not pseudo-pages with URLs for titles....
7238 # However the current output is also pretty screwy.
7241 # I'm changing it to match the current output--it arguably makes more
7242 # sense in the light of the test above. Old expected result was:
7243 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7245 # But I think this test is bordering on "garbage in, garbage out" anyway.
7250 Piped link to URL: [[http://www.example.com|an example URL]]
7252 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7255 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7259 BUG 2: [[page|http://url/]] should link to page, not http://url/
7261 [[Main Page|http://url/]]
7263 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7266 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7269 # Parsoid does not mark self-links, by design.
7271 BUG 337: Escaped self-links should be bold
7275 [[Bug462]] [[Bug462]]
7277 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7280 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7282 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7286 Self-link to section should not be bold
7290 [[Main Page#section]]
7292 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7303 Self-link to numeric title
7309 <p><strong class="selflink">0</strong>
7314 Link to numeric-equivalent title
7320 <p><a href="/wiki/00" title="00">00</a>
7325 <nowiki> inside a link
7327 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7329 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7334 Non-breaking spaces in title
7336 [[ Main Page ]]
7338 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7343 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7349 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7354 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7360 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7365 Internal link with en linktrail: no apostrophes (bug 27473)
7371 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7376 Internal link with ca linktrail with apostrophes (bug 27473)
7382 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7387 Internal link with kaa linktrail with apostrophes (bug 27473)
7393 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7398 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7400 [[User:Foo/Test/63636:Bar|Test]]
7402 <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>
7405 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7409 Purely hash wikilink
7411 title=[[User:test/123]]
7415 <p><a href="#a">b</a>
7418 <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>
7422 1. Interaction of linktrail and template encapsulation
7428 <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>
7432 2. Interaction of linktrail and template encapsulation
7436 {{echo|Some [[Fool]]}}s
7438 <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>
7442 3. Interaction of linktrail and template encapsulation
7446 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7448 <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>
7458 Internal link with is link prefix
7462 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7464 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7475 Internal link with is link trail and link prefix
7479 [[mótmælendatrú|xxx]]ar
7481 mótmælenda[[söfnuður]]
7482 mótmælenda[[söfnuður|söfnuðir]]
7483 mótmælenda[[söfnuður|söfnuðir]]xxx
7485 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7486 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7487 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7488 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7489 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7494 Parsoid link trail escaping
7496 parsoid=html2wt,html2html
7498 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7504 Parsoid link prefix escaping
7507 parsoid=html2wt,html2html
7509 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7511 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7515 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7523 [http://wp.org ''foo'']
7525 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7526 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7527 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7528 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7533 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7537 [[Foo|{{echo|a}} b {{echo|c}}]]
7539 <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>
7543 Link with angle bracket after anchor
7547 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7550 <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>
7554 ### Interwiki links (see maintenance/interwiki.sql)
7558 Inline interwiki link
7560 parsoid=wt2html,wt2wt,html2html
7562 [[MeatBall:SoftSecurity]]
7564 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7567 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7571 Inline interwiki link with empty title (bug 2372)
7573 parsoid=wt2html,wt2wt,html2html
7577 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7580 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7584 Interwiki link encoding conversion (bug 1636)
7586 *[[Wikipedia:ro:Olteniţa]]
7587 *[[Wikipedia:ro:Olteniţa]]
7589 <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>
7590 <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>
7594 <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>
7595 <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>
7600 Interwiki link with fragment (bug 2130)
7602 [[MeatBall:SoftSecurity#foo]]
7604 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7608 # Ideally the wikipedia: prefix here should be proto-relative too
7609 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7610 # define the 'en' prefix, and originally the test used 'wikipedia',
7611 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7614 Different interwiki prefixes mapping to the same URL
7622 [[:wikipedia:Foo|Foo]]
7624 [[wikipedia:en:Foo]]
7626 [[:wikipedia:en:Foo]]
7630 <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>
7632 <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>
7634 <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>
7636 <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>
7638 <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>
7640 <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>
7642 <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>
7646 Interwiki links that cannot be represented in wiki syntax
7649 [[meatball:ok#foo|ok with fragment]]
7650 [[meatball:ok_as_well?|ok ending with ? mark]]
7651 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7652 [http://de.wikipedia.org/wiki/#foo is just fragment]
7655 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7656 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7657 <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>
7658 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7659 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7662 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7663 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7664 <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>
7665 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7666 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7670 Interwiki links: trail
7672 [[wikipedia:Foo|Ba]]r
7674 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7677 <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>
7681 Local interwiki link
7683 parsoid=wt2html,wt2wt,html2html
7685 [[local:Template:Foo]]
7687 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7690 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7693 # Parsoid does not mark self-links, by design.
7695 Local interwiki link: self-link to current page
7698 parsoid=wt2html,wt2wt,html2html
7702 <p><strong class="selflink">local:Main Page</strong>
7705 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7709 Local interwiki link: prefix only (bug 64167)
7711 parsoid=wt2html,wt2wt,html2html
7715 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7718 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7722 Local interwiki link: with additional interwiki prefix (bug 61357)
7724 parsoid=wt2html,wt2wt,html2html
7726 [[local:meatball:Hello]]
7728 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7731 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7735 Multiple local interwiki link prefixes
7737 [[local:local:local:local:mi:local:Foo]]
7739 parsoid=wt2html,wt2wt,html2html
7741 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7744 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7748 ### Interlanguage links
7749 ### Language links (so that searching for '### language' matches..)
7755 parsoid=wt2html,wt2wt,html2html
7763 <p>Blah blah blah</p>
7764 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7768 Interlanguage link with spacing
7770 parsoid=wt2html,wt2wt,html2html
7778 <p>Blah blah blah</p>
7779 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7783 Double interlanguage link
7785 parsoid=wt2html,wt2wt,html2html
7794 <p>Blah blah blah</p>
7795 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7796 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7800 Interlanguage link variations
7802 parsoid=wt2html,wt2wt,html2html
7812 <p>Blah blah blah</p>
7813 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7814 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7815 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7819 Space and question mark encoding in interlanguage links (T95473)
7821 parsoid=wt2html,wt2wt,html2html
7829 <p>Blah blah blah</p>
7830 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
7834 Interlanguage link, with prefix links
7844 <p>Blah blah blah</p>
7845 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7849 Double interlanguage link, with prefix links (bug 8897)
7860 <p>Blah blah blah</p>
7861 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7862 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7866 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7874 <p>Blah blah blah</p>
7875 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7879 Parsoid-specific test: Wikilinks with should RT properly
7885 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7890 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7894 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7895 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7897 He&nbsp;llo [[Foo|He&nbsp;llo]]
7899 He&nbsp;llo [[He&nbsp;llo]]
7903 Parsoid: handle constructor well
7909 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7910 </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>
7913 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7915 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7924 # Note that `ko` isn't a known interlanguage prefix
7926 Parsoid: recognize interlanguage links without a target page
7936 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7938 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7941 # Note that `ko` isn't a known interwiki prefix
7943 Parsoid: recognize interwiki links without a target page
7945 parsoid=wt2html,wt2wt,html2html
7951 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7952 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7955 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7956 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7960 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7964 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7967 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7971 Interlanguage link with preceding local interwiki link (bug 68085)
7973 parsoid=wt2html,wt2wt,html2html
7976 [[local:es:Spanish]]
7979 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7983 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7987 Looks like an interlanguage link, but is actually a local interwiki
7989 parsoid=wt2html,wt2wt,html2html
7995 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7999 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8003 ### Redirects, Parsoid-only
8007 1. Simple redirect to page
8009 #REDIRECT [[Main Page]]
8011 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8015 2. Other redirect variants
8017 #REDIRECT [[Main_Page]]
8019 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8022 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8023 # This tests the Parsoid bail-out code.
8025 3. Other redirect variants
8027 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8029 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8033 4. Redirect to a templated destination
8035 #REDIRECT [[{{echo|Foo}}bar]]
8037 <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"}]]}'/>
8043 parsoid=wt2html,wt2wt
8048 <li>REDIRECT [[]]</li></ol>
8052 Optional colon in #REDIRECT
8054 # the colon is archaic syntax. we support it for wt2html, but we
8055 # don't care that it roundtrips back to the modern syntax.
8056 parsoid=wt2html,html2html
8058 #REDIRECT:[[Main Page]]
8060 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8064 Whitespace in #REDIRECT with optional colon
8066 # the colon and gratuitous whitespace is archaic syntax. we support
8067 # it for wt2html, but we don't care that it roundtrips back to the
8068 # modern syntax (without extra whitespace)
8069 parsoid=wt2html,html2html
8076 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8080 Piped link in #REDIRECT
8082 # content after piped link is ignored. we support this syntax,
8083 # but don't care that the piped link is lost when we roundtrip this.
8086 #REDIRECT [[Main Page|bar]]
8088 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8092 Redirect to category (T104502)
8094 parsoid=wt2html,wt2wt
8096 #REDIRECT [[Category:Foo]]
8098 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8102 Redirect to category with URL encoding (T104502)
8106 #REDIRECT [[Category%3AFoo]]
8108 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8112 Redirect to category page
8114 #REDIRECT [[:Category:Foo]]
8116 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8120 Redirect to image page (1)
8122 #REDIRECT [[File:Wiki.png]]
8124 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8128 Redirect to image page (2)
8130 #REDIRECT [[Image:Wiki.png]]
8132 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8135 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8136 # Next test confirms this.
8138 Redirect to language (1) (T104918)
8140 parsoid=wt2html,wt2wt,html2html
8142 #REDIRECT [[en:File:Wiki.png]]
8144 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8148 Redirect to language (2) (T104918)
8150 #REDIRECT [[:en:File:Wiki.png]]
8152 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8156 Redirect to interwiki (T104918)
8158 #REDIRECT [[meatball:File:Wiki.png]]
8160 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8164 Non-English #REDIRECT
8168 #TILVÍSUN [[Main Page]]
8170 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8174 Redirect syntax under text isn't considered a redirect
8177 #redirect [[Main Page]]
8180 <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>
8183 # FIXME: Should hoist the redirect to the top of the page and ensure there
8190 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8210 Broken br tag sanitization
8218 # TODO: Fix html2html mode (bug 51055)!
8220 Parsoid: Broken br tag recognition
8233 Incorrecly removing closing slashes from correctly formed XHTML
8235 <br style="clear:both;" />
8237 <p><br style="clear:both;" />
8242 Failing to transform badly formed HTML into correct XHTML
8244 <br style="clear: left;">
8245 <br style="clear: right;">
8246 <br style="clear: both;">
8248 <p><br style="clear: left;" />
8249 <br style="clear: right;" />
8250 <br style="clear: both;" />
8254 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8255 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8257 Handling html with a div self-closing tag
8266 <p><div title />
8270 <p><div title=bar />
8271 <div title=bar/>
8273 <div title="bar/"></div>
8277 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8278 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8279 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8280 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8281 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8282 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8286 Handling html with a br self-closing tag
8313 Horizontal ruler (should it add that extra space?)
8328 Horizontal ruler -- 4+ dashes render hr
8337 Horizontal ruler -- eats additional dashes on the same line
8346 Horizontal ruler -- does not collapse dashes on consecutive lines
8357 Horizontal ruler -- <4 dashes render as plain text
8366 Horizontal ruler -- Supports content following dashes on same line
8378 ### Block-level elements
8387 <ul><li>Common list</li>
8389 <li>item 3</li></ul>
8400 <ol><li>Numbered list</li>
8402 <li> item 3</li></ol>
8416 ***#Number on level 4
8418 **#Number on level 3
8419 **#Number on level 3
8423 #** Level 3, but ordered
8426 <ol><li> with numbers</li></ol>
8427 <ul><li> and bullets</li></ul>
8428 <ol><li> and numbers</li></ol></li>
8430 <ul><li>bullet level 2
8431 <ul><li>bullet level 3
8432 <ol><li>Number on level 4</li></ol></li></ul></li>
8434 <ol><li>Number on level 3</li>
8435 <li>Number on level 3</li></ol></li></ul>
8436 <ol><li>number level 2</li></ol></li>
8438 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8439 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8450 <ul><li>bar</li></ul></li></ul>
8460 <ul><li><ul><li>foo</li></ul></li>
8466 Nested lists 3 (first element empty)
8472 <ul><li>bar</li></ul></li></ul>
8477 Nested lists 4 (first element empty)
8482 <ul><li><ul><li></li></ul></li>
8488 Nested lists 5 (both elements empty)
8493 <ul><li><ul><li></li></ul></li>
8499 Nested lists 6 (both elements empty)
8505 <ul><li></li></ul></li></ul>
8510 Nested lists 7 (skip initial nesting levels)
8514 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8519 Nested lists 8 (multiple nesting transitions)
8527 <ul><li><ul><li> bar</li></ul></li>
8528 <li> baz</li></ul></li>
8534 Nested lists 9 (extension interaction)
8540 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8544 1. Lists with start-of-line-transparent tokens before bullets: Comments
8557 2. Lists with start-of-line-transparent tokens before bullets: Template close
8562 <ul><li>foo bar</li>
8568 List items are not parsed correctly following a <pre> block (bug 785)
8574 <ul><li> <pre>foo</pre></li>
8575 <li> <pre>bar</pre></li>
8579 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8580 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8585 List items from template
8596 * notSOL{{inner list}}
8599 <ul><li> item 1</li>
8600 <li> item 2</li></ul>
8601 <ul><li> item 0</li>
8603 <li> item 2</li></ul>
8604 <ul><li> item 0</li>
8607 <li> item 2</li></ul>
8612 List interrupted by empty line or heading
8620 <ul><li> foo</li></ul>
8621 <ul><li><ul><li> bar</li></ul></li></ul>
8622 <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>
8623 <ul><li> Another list item</li></ul>
8628 Multiple list tags generated by templates
8649 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8652 <!--This line will NOT split the list-->
8654 <!--This line will NOT split the list either-->
8656 <!--foo--> <!----> <!--This line NOT split the list either-->
8667 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8670 <!--This line will NOT split the list-->
8672 <!--This line will NOT split the list either-->
8674 <!--foo--> <!----> <!--This line NOT split the list
8687 (The PHP parser relies on Tidy for the hack)
8689 parsoid=wt2html,wt2wt
8693 * {{echo|<li>templated li-hack}}
8694 * <!--foo--> <li> unsupported li-hack with preceding comments
8697 <li><li>not a li-hack
8704 <li>templated li-hack</li>
8705 <li>unsupported li-hack with preceding comments</li>
8708 <li>not a li-hack</li>
8713 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8740 Parsoid: Test of whitespace serialization with Templated bullets
8747 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8751 # ------------------------------------------------------------------------
8752 # The next set of tests are about Parsoid's ability to handle badly nested
8753 # tags (parse, minimize scope of fixup, and roundtrip back)
8754 # ------------------------------------------------------------------------
8757 Unbalanced closing block tags break a list
8758 (php parser relies on Tidy to fix up)
8776 # Parsoid fails this test, but it might be tricky to support properly.
8779 Unbalanced closing non-block tags don't break a list
8780 (php parser relies on Tidy to fix up)
8787 <li><span>a</span></li>
8788 <li><span>b</span></li>
8802 Unclosed formatting tags that straddle lists are closed and reopened
8803 (php parser relies on Tidy to fix up)
8805 parsoid=wt2html,wt2wt,html2html
8815 <ol><li> <s> a</s></li>
8816 <li><s> b </s></li></ol>
8821 1. List embedded in a formatting tag
8828 <li><small>foo</small></li>
8838 ## Ugly Parsoid output here
8839 ## Not sure what the right output is.
8841 2. List embedded in a formatting tag
8848 <li><small>a</small></li>
8849 <li><small>b</small></li>
8856 <li><small>b</small></li>
8860 # Ugly Parsoid and PHP parser output here
8861 # Not sure if we want to make this a test!
8864 ## 3. Unclosed formatting tags in list elements
8870 ## <li><small>a</small></li>
8871 ## <li><small><small>b</small></small></li>
8875 ## <li><small>a</small></li>
8877 ## <li><small>b</small></li>
8881 # This is a bug in the PHP parser + tidy combination.
8882 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8883 # and then fostered out of the table by tidy.)
8884 # We believe the Parsoid output to be correct.
8886 Table with missing opening <tr> tag
8888 parsoid=wt2html,wt2wt
8906 # Note that the current date is hard-coded as
8907 # 1970-01-01T00:02:03Z (a Thursday)
8908 # when running parser tests. The timezone is also fixed to GMT, so
8909 # local date will be identical to current date.
8912 Magic Word: {{CURRENTDAY}}
8921 Magic Word: {{CURRENTDAY2}}
8930 Magic Word: {{CURRENTDAYNAME}}
8939 Magic Word: {{CURRENTDOW}}
8948 Magic Word: {{CURRENTMONTH}}
8957 Magic Word: {{CURRENTMONTH1}}
8966 Magic Word: {{CURRENTMONTHABBREV}}
8968 {{CURRENTMONTHABBREV}}
8975 Magic Word: {{CURRENTMONTHNAME}}
8977 {{CURRENTMONTHNAME}}
8984 Magic Word: {{CURRENTMONTHNAMEGEN}}
8986 {{CURRENTMONTHNAMEGEN}}
8993 Magic Word: {{CURRENTTIME}}
9002 Magic Word: {{CURRENTHOUR}}
9011 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9020 Magic Word: {{CURRENTYEAR}}
9029 Magic Word: {{CURRENTTIMESTAMP}}
9031 {{CURRENTTIMESTAMP}}
9038 Magic Words LOCAL (UTC)
9042 * {{LOCALMONTHNAME}}
9043 * {{LOCALMONTHNAMEGEN}}
9044 * {{LOCALMONTHABBREV}}
9053 * {{LOCALTIMESTAMP}}
9068 <li> 19700101000203</li></ul>
9073 Magic Word: {{FULLPAGENAME}}
9075 title=[[User:Ævar Arnfjörð Bjarmason]]
9079 <p>User:Ævar Arnfjörð Bjarmason
9084 Magic Word: {{FULLPAGENAMEE}}
9086 title=[[User:Ævar Arnfjörð Bjarmason]]
9090 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9095 Magic Word: {{TALKSPACE}}
9097 title=[[User:Ævar Arnfjörð Bjarmason]]
9106 Magic Word: {{TALKSPACE}}, same namespace
9108 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9117 Magic Word: {{TALKSPACE}}, main namespace
9119 title=[[Parser Test]]
9128 Magic Word: {{TALKSPACEE}}
9130 title=[[User:Ævar Arnfjörð Bjarmason]]
9139 Magic Word: {{SUBJECTSPACE}}
9141 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9150 Magic Word: {{SUBJECTSPACE}}, same namespace
9152 title=[[User:Ævar Arnfjörð Bjarmason]]
9161 Magic Word: {{SUBJECTSPACE}}, main namespace
9163 title=[[Parser Test]]
9171 Magic Word: {{SUBJECTSPACEE}}
9173 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9182 Magic Word: {{NAMESPACE}}
9184 title=[[User:Ævar Arnfjörð Bjarmason]]
9193 Magic Word: {{NAMESPACEE}}
9195 title=[[User:Ævar Arnfjörð Bjarmason]]
9204 Magic Word: {{NAMESPACENUMBER}}
9206 title=[[User:Ævar Arnfjörð Bjarmason]]
9215 Magic Word: {{SUBPAGENAME}}
9217 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9226 Magic Word: {{SUBPAGENAMEE}}
9228 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9237 Magic Word: {{ROOTPAGENAME}}
9239 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9243 <p>Ævar Arnfjörð Bjarmason
9248 Magic Word: {{ROOTPAGENAMEE}}
9250 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9254 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9259 Magic Word: {{BASEPAGENAME}}
9261 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9265 <p>Ævar Arnfjörð Bjarmason
9270 Magic Word: {{BASEPAGENAMEE}}
9272 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9276 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9281 Magic Word: {{TALKPAGENAME}}
9283 title=[[User:Ævar Arnfjörð Bjarmason]]
9287 <p>User talk:Ævar Arnfjörð Bjarmason
9292 Magic Word: {{TALKPAGENAMEE}}
9294 title=[[User:Ævar Arnfjörð Bjarmason]]
9298 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9303 Magic Word: {{SUBJECTPAGENAME}}
9305 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9309 <p>User:Ævar Arnfjörð Bjarmason
9314 Magic Word: {{SUBJECTPAGENAMEE}}
9316 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9318 {{SUBJECTPAGENAMEE}}
9320 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9325 Magic Word: {{NUMBEROFFILES}}
9334 Magic Word: {{PAGENAME}}
9336 title=[[User:Ævar Arnfjörð Bjarmason]]
9340 <p>Ævar Arnfjörð Bjarmason
9345 Magic Word: {{PAGENAME}} with metacharacters
9347 title=[['foo & bar = baz']]
9351 <p><i>'foo & bar = baz'</i>
9354 <p><i>'foo & bar = baz'</i></p>
9358 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9360 title=[[*RFC 1234 http://example.com/]]
9364 <p>*RFC 1234 http://example.com/
9367 <p>*RFC 1234 http://example.com/</p>
9371 Magic Word: {{PAGENAMEE}}
9373 title=[[User:Ævar Arnfjörð Bjarmason]]
9377 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9382 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9384 title=[[*RFC 1234 http://example.com/]]
9388 <p>*RFC_1234_http://example.com/
9391 <p>*RFC_1234_http://example.com/</p>
9395 Magic Word: {{REVISIONID}}
9404 Magic Word: {{SCRIPTPATH}}
9413 Magic Word: {{STYLEPATH}}
9422 Magic Word: {{SERVER}}
9426 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9431 Magic Word: {{SERVERNAME}}
9440 Magic Word: {{SITENAME}}
9449 Case-sensitive magic words, when cased differently, should just be template transclusions
9456 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9457 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9458 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9459 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9464 Case-insensitive magic words should still work with weird casing.
9474 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9478 # From plwiki:PLOS_ONE
9480 Parsoid: Page property magic word with magic word contents
9482 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9484 <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>"}]]}'/>
9488 Parsoid: Template-generated DISPLAYTITLE
9490 {{{{echo|DISPLAYTITLE}}:Foo}}
9492 <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}}]}'/>
9496 Namespace 1 {{ns:1}}
9505 Namespace 1 {{ns:01}}
9514 Namespace 0 {{ns:0}} (bug 4783)
9522 Namespace 0 {{ns:00}} (bug 4783)
9530 Namespace -1 {{ns:-1}}
9539 Namespace User {{ns:User}}
9548 Namespace User talk {{ns:User_talk}}
9557 Namespace User talk {{ns:uSeR tAlK}}
9566 Namespace File {{ns:File}}
9575 Namespace File {{ns:Image}}
9584 Namespace (lang=de) Benutzer {{ns:User}}
9595 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9601 <p>Benutzer Diskussion
9609 {{urlencode:hi world?!}}
9610 {{urlencode:hi world?!|WIKI}}
9611 {{urlencode:hi world?!|PATH}}
9612 {{urlencode:hi world?!|QUERY}}
9622 Magic Word: prioritize type info over data-parsoid
9626 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9632 Magic Word: serialize on separate line (parsoid)
9634 parsoid=wt2wt,html2wt
9640 foo<meta property="mw:PageProp/notoc"/>bar
9644 Magic Word: rt non-english wikis
9651 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9658 Magic links: internal link to RFC (bug 479)
9662 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9667 Magic links: RFC (bug 479)
9671 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9676 Magic links: RFC (bug 65278)
9678 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9680 <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.
9685 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9687 RFC      822
9691 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9698 Magic links: ISBN (bug 1937)
9702 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9707 Magic links: ISBN (bug 65278)
9709 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9711 <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.
9714 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:ExtLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
9718 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9720 ISBN      978 0 316 09811 3
9726 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9735 Magic links: PMID incorrectly converts space to underscore
9739 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9744 Magic links: PMID (bug 65278)
9746 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9748 <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.
9753 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9755 PMID      1234
9759 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9770 Nonexistent template
9772 {{thistemplatedoesnotexist}}
9774 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9779 Template with invalid target containing tags
9781 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9783 <p>{{a<b>b</b>|foo|a=b|a = b}}
9788 Template with invalid target containing unclosed tag
9790 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9792 <p>{{a<b>|foo|a=b|a = b}}</b>
9797 Template with invalid target containing wikilink
9801 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9804 <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>
9808 Template with just whitespace in it, bug #68421
9812 <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>
9818 This is a test template
9826 <p>This is a test template
9831 Template with explicit namespace
9835 <p>This is a test template
9843 This is a test template with parameter {{{param}}}
9849 {{paramtest|param=foo}}
9851 <p>This is a test template with parameter foo
9856 Template:paramtestnum
9862 Template unnamed parameter
9864 {{paramtestnum|Main Page|the main page}}
9866 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9871 Template:templatesimple
9877 Template:templateredirect
9879 #redirect [[Template:templatesimple]]
9883 Template:templateasargtestnum
9889 Template:templateasargtest
9891 {{template{{{templ}}}}}
9895 Template:templateasargtest2
9901 Template with template name as unnamed argument
9903 {{templateasargtestnum|templatesimple}}
9910 Template with template name as argument
9912 {{templateasargtest|templ=simple}}
9919 Template with template name as argument (2)
9921 {{templateasargtest2|templ=templatesimple}}
9928 Template:templateasargtestdefault
9930 {{{{{templ|templatesimple}}}}}
9940 Template with default value
9942 {{templateasargtestdefault}}
9949 Template with default value (value set)
9951 {{templateasargtestdefault|templ=templa}}
9960 {{templateredirect}}
9965 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
9969 Template with argument in separate line
9971 {{ templateasargtest |
9979 Template with complex template as argument
9982 param ={{ templateasargtest |
9985 <p>This is a test template with parameter (test)
9990 Template with thumb image (with link in description)
9992 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9994 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>
9997 <p>This is a test template with parameter</p>
9998 <div class="thumb tright">
9999 <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>
10000 <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>
10004 <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>
10008 Template:complextemplate
10010 {{{1}}} {{paramtest|
10011 param ={{{param}}}}}
10015 Template with complex arguments
10018 param ={{ templateasargtest |
10019 templ = simple }}|[[Template:complextemplate|link]]}}
10021 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10026 BUG 553: link with two variables in a piped link
10029 |[[{{{1}}}|{{{2}}}]]
10034 <td>[[{{{1}}}|{{{2}}}]]
10040 Magic variable as template parameter
10042 {{paramtest|param={{SITENAME}}}}
10044 <p>This is a test template with parameter MediaWiki
10051 [[{{{param}}}|link]]
10055 Template parameter as link source
10057 {{linktest|param=Main Page}}
10059 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10064 Template:paramtest2
10066 including another template, {{paramtest|param={{{arg}}}}}
10070 Template passing argument to another template
10072 {{paramtest2|arg='hmm'}}
10074 <p>including another template, This is a test template with parameter 'hmm'
10085 Template as link source
10089 [[{{linktest2}}|Main Page]]
10091 [[{{linktest2}}]]Page
10093 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10094 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10095 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10113 Template infinite loop
10117 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10122 Template from main namespace
10141 BUG 529: Template with table, not included at beginning of line
10160 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10180 BUG 41: Template parameters shown as broken links
10189 Template with targets containing wikilinks
10193 {{[[{{echo|foo}}]]}}
10195 {{{{echo|[[foo}}]]}}
10197 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10198 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10210 Templates: Double quotes as template target
10217 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10222 Template:MSGNW test
10224 ''None'' of '''this''' should be
10226 but rather passed unmodified
10233 # hmm, fix this or just deprecate msgnw and document its behavior?
10237 {{msgnw:MSGNW test}}
10239 <p>''None'' of '''this''' should be
10241  but rather passed unmodified
10242 {{test}}
10252 {{int:youhavenewmessages|lots of money|not!}}
10254 <p>You have lots of money (not!).
10261 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10265 <includeonly> and <noinclude> being included
10276 <onlyinclude>Foo</onlyinclude>bar
10280 <onlyinclude> being included
10292 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10296 <onlyinclude> and <includeonly> being included
10305 <includeonly> and <noinclude> on a page
10307 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10314 Un-closed <noinclude>
10321 <onlyinclude> on a page
10323 <onlyinclude>Foo</onlyinclude>bar
10330 Un-closed <onlyinclude>
10337 Self-closed noinclude, includeonly, onlyinclude tags
10348 Unbalanced includeonly and noinclude tags
10352 |b</noinclude></noinclude>
10353 |c</noinclude></includeonly>
10354 |d</includeonly></includeonly>
10363 <td>c</includeonly>
10365 <td>d</includeonly></includeonly>
10371 Template:Includeonly section
10374 ==Includeonly section==
10380 Bug 6563: Edit link generation for section shown by <includeonly>
10382 {{includeonly section}}
10384 <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>
10385 <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>
10389 # Uses same input as the contents of [[Template:Includeonly section]]
10391 Bug 6563: Section extraction for section shown by <includeonly>
10396 ==Includeonly section==
10404 Bug 6563: Edit link generation for section suppressed by <includeonly>
10407 ==Includeonly section==
10411 <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>
10416 Bug 6563: Section extraction for section suppressed by <includeonly>
10421 ==Includeonly section==
10429 Un-closed <includeonly>
10436 Includes and comments at SOL
10438 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10442 </noinclude>* stuff
10445 <includeonly>can have stuff</includeonly>=== here ===
10448 <h2><span class="mw-headline" id="hu">hu</span></h2>
10451 <ul><li> stuff</li>
10452 <li> here</li></ul>
10453 <h3><span class="mw-headline" id="here">here</span></h3>
10456 <!-- 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>
10458 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10460 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10461 <li> here</li></ul>
10463 <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>
10467 # TODO: test with DOM fragment reuse!
10469 Parsoid: DOM fragment reuse
10471 parsoid=wt2wt,wt2html
10473 a{{echo|b<table></table>c}}d
10485 <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>
10487 <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">
10488 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10489 </span><p about="#mwt2">cd</p>
10491 <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">
10493 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10495 </span><p about="#mwt3">b</p>
10499 Parsoid: Merge double tds (bug 50603)
10504 |{{echo|{{!}} foo}}
10508 <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>
10513 Parsoid: Merge double tds in nested transclusion content (bug 50603)
10519 |{{echo|{{!}} foo}}
10523 <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}}]}'>
10525 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10531 ### <includeonly> and <noinclude> in attributes
10534 0. includeonly around the entire attribute
10536 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10538 <p><span id="v2">bar</span>
10543 1. includeonly in html attr key
10545 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10547 <p><span id="foo">bar</span>
10552 2. includeonly in html attr value
10554 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10555 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10557 <p><span id="v1">bar</span>
10558 <span id="v1">bar</span>
10563 3. includeonly in part of an attr value
10565 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10567 <p><span style="color:red;">bar</span>
10572 4. includeonly in table attributes
10596 ### Token Stream Patcher tests
10598 ### These tests won't always pass wt2wt and other modes because
10599 ### on serialization, the table will be output on a new line.
10600 ### For now, we are blacklisting them, and using this to test selser.
10604 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10606 parsoid=wt2html,wt2wt
10608 {{echo|}}{| width = '100%'
10612 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10613 <tbody><tr><td>foo</td></tr>
10618 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10620 parsoid=wt2html,wt2wt
10622 <includeonly>a</includeonly>{| {{{b}}}
10626 <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}}}":""}}'>
10627 <tbody><tr><td>c</td></tr>
10633 ### Testing parsing of templates where a template arg
10634 ### has the same name as the template itself.
10640 {{{quote|{{{1}}}}}}
10644 Templates: Template Name/Arg clash: 1. Use of positional param
10653 Templates: Template Name/Arg clash: 2. Use of named param
10655 {{quote|quote=foo}}
10662 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10671 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10675 Templates: 1. Simple use
10684 Templates: 2. Inside a block tag
10686 <div>{{echo|Foo}}</div>
10687 <blockquote>{{echo|Foo}}</blockquote>
10690 <blockquote>Foo</blockquote>
10700 Templates: P-wrapping: 1a. Templates on consecutive lines
10711 Templates: P-wrapping: 1b. Templates on consecutive lines
10725 Templates: P-wrapping: 1c. Templates on consecutive lines
10728 {{echo|bar}} <div>baz</div>
10741 Templates: P-wrapping: 1d. Template preceded by comment-only line
10750 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10754 Templates: Inline Text: 1. Multiple template uses
10756 {{echo|Foo}}bar{{echo|baz}}
10763 Templates: Inline Text: 2. Back-to-back template uses
10765 {{echo|Foo}}{{echo|bar}}
10772 Templates: Block Tags: 1. Multiple template uses
10774 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10776 <div>Foo</div><div>bar</div><div>baz</div>
10781 Templates: Block Tags: 2. Back-to-back template uses
10783 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10785 <div>Foo</div><div>bar</div>
10789 # This is an edge case relating to paragraph wrapping.
10791 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10796 <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
10801 Templates: Links: 1. Simple example
10803 {{echo|[[Foo|bar]]}}
10805 <p><a href="/wiki/Foo" title="Foo">bar</a>
10810 Templates: Links: 2. Generation of link href
10812 [[{{echo|Foo}}|bar]]
10814 <p><a href="/wiki/Foo" title="Foo">bar</a>
10819 Templates: Links: 3. Generation of part of a link href
10821 [[Fo{{echo|o}}|bar]]
10823 [[Foo{{echo|bar}}]]
10825 [[Foo{{echo|bar}}baz]]
10827 [[Foo{{echo|bar}}|bar]]
10829 [[:Foo{{echo|bar}}]]
10831 [[:Foo{{echo|bar}}|bar]]
10833 <p><a href="/wiki/Foo" title="Foo">bar</a>
10834 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10835 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10836 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10837 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10838 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10843 Templates: Links: 4. Multiple templates generating link href
10845 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10847 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10852 Templates: Links: 5. Generation of link text
10854 [[Foo|{{echo|bar}}]]
10856 <p><a href="/wiki/Foo" title="Foo">bar</a>
10861 Templates: Links: 5. Nested templates (only outermost template should be marked)
10863 {{echo|[[{{echo|Foo}}|bar]]}}
10865 <p><a href="/wiki/Foo" title="Foo">bar</a>
10870 Templates: HTML Tag: 1. Generation of HTML attr. key
10872 <div {{echo|style}}="color:red;">foo</div>
10874 <div style="color:red;">foo</div>
10879 Templates: HTML Tag: 2. Generation of HTML attr. value
10881 <div style={{echo|'color:red;'}}>foo</div>
10883 <div style="color:red;">foo</div>
10888 Templates: HTML Tag: 3. Generation of HTML attr key and value
10890 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10892 <div style="color:red;">foo</div>
10897 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10899 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10901 <div title="This is a long title with just one piece templated">foo</div>
10906 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10908 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10910 <div title="This is a long title with just one piece templated">foo</div>
10915 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10917 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10919 <div title="This is a long title with just one piece templated">foo</div>
10923 # SSS FIXME: While it is great we added support for all this,
10924 # do we want to make this part of the spec? Maybe we want to
10925 # deprecate this kind of usage in the future?
10927 Templates: HTML Tag: 7. Generation of partial attribute key string
10929 <div st{{echo|yle}}="color:red;">foo</div>
10931 <div style="color:red;">foo</div>
10936 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10938 <div {{echo|1=id="v1"}}>bar</div>
10940 <div id="v1">bar</div>
10945 Templates: HTML Tag: 9. Multiple template-generated attributes
10947 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10949 <div id="v1" title="foo">bar</div>
10954 Templates: Support for templates generating attributes and content
10956 {| {{mixed_attr_content_template}}
10961 <table style="color:red;" title="T48811">
10971 <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|}"]}'>
10980 1. Entities and nowikis inside templated attributes should be handled correctly
10982 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
10984 <div style="background:#f9f9f9;">foo</div>
10987 <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>
10991 2. Entities and nowikis inside templated attributes should be handled correctly
10994 |{{table_attribs_3}}
10999 <td style="background:#f9f9f9;">Foo
11004 <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>
11009 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11012 |{{table_attribs_3}}
11017 <td style="background:#f9f9f9;">Foo
11021 <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}}]}'>
11022 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11027 Templates: HTML Tables: 1. Generating start of a HTML table
11029 {{echo|<table><tr><td>foo</td>}}</tr></table>
11031 <table><tr><td>foo</td></tr></table>
11036 Templates: HTML Tables: 2a. Generating middle of a HTML table
11038 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11040 <table><tr><td>foo</td></tr></table>
11045 Templates: HTML Tables: 2b. Generating middle of a HTML table
11047 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11049 <table><tr><td>foo</td></tr></table>
11054 Templates: HTML Tables: 3. Generating end of a HTML table
11056 <table><tr>{{echo|<td>foo</td></tr></table>}}
11058 <table><tr><td>foo</td></tr></table>
11063 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11065 {{echo|<table>}}<tr><td>foo</td></tr></table>
11067 <table><tr><td>foo</td></tr></table>
11072 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11074 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11076 <table><tr><td>foo</td></tr></table>
11081 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11083 <table><tr>{{echo|<td>}}foo</td></tr></table>
11085 <table><tr><td>foo</td></tr></table>
11090 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11092 <table><tr><td>foo{{echo|</td>}}</tr></table>
11094 <table><tr><td>foo</td></tr></table>
11099 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11101 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11103 <table><tr><td>foo</td></tr></table>
11108 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11110 <table><tr><td>foo</td></tr>{{echo|</table>}}
11112 <table><tr><td>foo</td></tr></table>
11117 Templates: HTML Tables: 5. Proper fostering of categories from inside
11119 parsoid=wt2html,wt2wt
11121 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11122 <!--Two categories (Bug 50330)-->
11123 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11125 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11126 <!--Two categories (Bug 50330)-->
11127 <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>
11131 Templates: Wiki Tables: 1a. Fostering of entire template content
11139 <tr><td></td></tr></table>
11151 Templates: Wiki Tables: 1b. Fostering of entire template content
11164 <tr><td></td></tr></table>
11178 Templates: Wiki Tables: 2. Fostering of partial template content
11188 <tr><td></td></tr></table>
11201 Templates: Wiki Tables: 3. td-content via multiple templates
11204 {{echo|{{pipe}}a}}{{echo|b}}
11215 Templates: Wiki Tables: 4. Templated tags, no content
11221 <tr><td></td></tr></table>
11226 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11240 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11253 ## This test case is very specific to Parsoid's internals
11254 ## and is hence only tested for Parsoid's code. Parsoid uses
11255 ## a <meta> marker tag for <ref> tags and they are expanded
11256 ## much later. We are verifying that this <meta> tag usage
11257 ## doesn't prevent foster parenting.
11259 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11261 {{PartialTable}}<ref>foo</ref>
11266 <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">
11270 <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>
11274 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11284 <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{{!}}}"]}'>
11285 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11289 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11294 Templates: Lists: Multi-line list-items via templates
11296 *{{echo|a {{nonexistent|
11298 *{{echo|b {{nonexistent|
11301 <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>
11302 <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>
11307 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11309 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11311 <p><i>ab</i>c<i>d</i>e
11316 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11317 (PHP parser generates misnested html)
11319 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11321 <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>
11325 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11326 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11328 parsoid=wt2html,wt2wt
11330 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11332 <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>
11333 <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>
11334 <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>
11338 Templates: Ugly nesting: 4. Divs opened/closed across templates
11340 a<div>b{{echo|c</div>d}}e
11351 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11357 |{{echo|foo</table>}}
11361 <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|}"]}'>
11365 <td>foo</td></tr></tbody></table><span about="#mwt1">
11366 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11371 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11381 <td>1. {{echo|foo </table>}}</td>
11383 <td>2. {{echo|baz </table>}}</td>
11396 <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>"]}'>
11401 <td>1. foo </td></tr></tbody></table></td>
11403 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11404 </span><span about="#mwt2">
11405 </span><span about="#mwt2">
11406 </span><span about="#mwt2">abc</span><span about="#mwt2">
11407 </span><span about="#mwt2">
11408 </span><span about="#mwt2">
11409 </span><span about="#mwt2">
11410 </span><span about="#mwt2">
11411 </span><span about="#mwt2">
11412 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11413 </span><span about="#mwt2">
11418 Templates: Ugly templates: 3. newline-only template parameter
11427 # This looks like a bug: a single newline triggers p/br for some reason.
11429 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11438 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11439 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11441 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11447 <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
11448 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11452 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11453 # that are "identical" and generate nesting cycles in the algorithm
11455 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11457 {{echo|<table><tr><td><table>}}
11461 <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"}'>
11462 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11463 </table></td></tr></tbody></table>
11467 Parser Functions: 1. Simple example
11476 Parser Functions: 2. Nested use (only outermost should be marked up)
11485 ### Pre-save transform tests
11488 pre-save transform: subst:
11494 This is a test template
11498 pre-save transform: normal template
11508 pre-save transform: nonexistent template
11512 {{thistemplatedoesnotexist}}
11514 {{thistemplatedoesnotexist}}
11519 pre-save transform: subst magic variables
11528 # This is bug 89, which I fixed. -- wtm
11530 pre-save transform: subst: templates with parameters
11534 {{subst:paramtest|param="something else"}}
11536 This is a test template with parameter "something else"
11540 Template:nowikitest
11542 <nowiki>'''not wiki'''</nowiki>
11546 pre-save transform: nowiki in subst (bug 1188)
11550 {{subst:nowikitest}}
11552 <nowiki>'''not wiki'''</nowiki>
11557 Template:commenttest
11559 This template has <!-- a comment --> in it.
11563 pre-save transform: comment in subst (bug 1936)
11567 {{subst:commenttest}}
11569 This template has <!-- a comment --> in it.
11573 pre-save transform: unclosed tag
11577 <nowiki>'''not wiki'''
11579 <nowiki>'''not wiki'''
11583 pre-save transform: mixed tag case
11587 <NOwiki>'''not wiki'''</noWIKI>
11589 <NOwiki>'''not wiki'''</noWIKI>
11593 pre-save transform: unclosed comment in <nowiki>
11597 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11599 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11602 # Leading @ in this template definition works around a limitation
11603 # in parsoid's parserTests which otherwise strips the <span> from the
11604 # result (confusing it for a template wrapper)
11608 @<span onmouseover="alert('crap')">Oh no</span>
11612 (confirming safety of fix for subst bug 1936)
11614 {{Template:dangerous}}
11616 <p>@<span>Oh no</span>
11621 pre-save transform: comment containing gallery (bug 5024)
11625 <!-- <gallery>data</gallery> -->
11627 <!-- <gallery>data</gallery> -->
11631 pre-save transform: comment containing extension
11635 <!-- <tag>data</tag> -->
11637 <!-- <tag>data</tag> -->
11641 pre-save transform: comment containing nowiki
11645 <!-- <nowiki>data</nowiki> -->
11647 <!-- <nowiki>data</nowiki> -->
11651 pre-save transform: <noinclude> in subst (bug 3298)
11661 pre-save transform: <onlyinclude> in subst (bug 3298)
11665 {{subst:Includes2}}
11673 {{<includeonly>subst:</includeonly>Includes}}
11677 Template:SafeSubstTest
11679 {{<includeonly>safesubst:</includeonly>Includes}}
11683 bug 22297: safesubst: works during PST
11687 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11693 bug 22297: safesubst: works during normal parse
11702 subst: does not work during normal parse
11706 <p>{{subst:Includes}}
11711 pre-save transform: context links ("pipe trick")
11715 [[Article (context)|]]
11718 [[Bar:Article (context)|]]
11719 [[:Bar:Article (context)|]]
11721 [[|Article (context)]]
11725 [[Article (context)|Article]]
11726 [[Bar:Article|Article]]
11727 [[:Bar:Article|Article]]
11728 [[Bar:Article (context)|Article]]
11729 [[:Bar:Article (context)|Article]]
11731 [[Article (context)]]
11732 [[Bar:X (Y) Z|X (Y) Z]]
11733 [[:Bar:X (Y) Z|X (Y) Z]]
11737 pre-save transform: context links ("pipe trick") with interwiki prefix
11741 [[interwiki:Article|]]
11742 [[:interwiki:Article|]]
11743 [[interwiki:Bar:Article|]]
11744 [[:interwiki:Bar:Article|]]
11746 [[interwiki:Article|Article]]
11747 [[:interwiki:Article|Article]]
11748 [[interwiki:Bar:Article|Bar:Article]]
11749 [[:interwiki:Bar:Article|Bar:Article]]
11753 pre-save transform: context links ("pipe trick") with parens in title
11755 pst title=[[Somearticle (context)]]
11759 [[Article (context)|Article]]
11763 pre-save transform: context links ("pipe trick") with comma in title
11765 pst title=[[Someplace, Somewhere]]
11768 [[Otherplace, Elsewhere|]]
11769 [[Otherplace, Elsewhere, Anywhere|]]
11771 [[Otherplace, Somewhere|Otherplace]]
11772 [[Otherplace, Elsewhere|Otherplace]]
11773 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11777 pre-save transform: context links ("pipe trick") with parens and comma
11779 pst title=[[Someplace (IGNORED), Somewhere]]
11782 [[Otherplace (place), Elsewhere|]]
11784 [[Otherplace, Somewhere|Otherplace]]
11785 [[Otherplace (place), Elsewhere|Otherplace]]
11789 pre-save transform: context links ("pipe trick") with comma and parens
11791 pst title=[[Who, me? (context)]]
11794 [[Me, Myself, and I (1937 song)|]]
11796 [[Yes, you. (context)|Yes, you.]]
11797 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11801 pre-save transform: context links ("pipe trick") with namespace
11803 pst title=[[Ns:Somearticle]]
11807 [[Ns:Article|Article]]
11811 pre-save transform: context links ("pipe trick") with namespace and parens
11813 pst title=[[Ns:Somearticle (context)]]
11817 [[Ns:Article (context)|Article]]
11821 pre-save transform: context links ("pipe trick") with namespace and comma
11823 pst title=[[Ns:Somearticle, Context, Whatever]]
11827 [[Ns:Article, Context, Whatever|Article]]
11831 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11833 pst title=[[Ns:Somearticle, Context (context)]]
11837 [[Ns:Article (context)|Article]]
11841 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11843 pst title=[[Ns:Somearticle (IGNORED), Context]]
11847 [[Ns:Article, Context|Article]]
11851 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11855 [[Article(context)|]]
11856 [[Bar:Article(context)|]]
11857 [[:Bar:Article(context)|]]
11858 [[|Article(context)]]
11862 [[Article(context)|Article]]
11863 [[Bar:Article(context)|Article]]
11864 [[:Bar:Article(context)|Article]]
11865 [[Article(context)]]
11866 [[Bar:X(Y)Z|X(Y)Z]]
11867 [[:Bar:X(Y)Z|X(Y)Z]]
11871 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11875 [[Article (context)|]]
11876 [[Bar:Article (context)|]]
11877 [[:Bar:Article (context)|]]
11878 [[|Article (context)]]
11882 [[Article (context)|Article]]
11883 [[Bar:Article (context)|Article]]
11884 [[:Bar:Article (context)|Article]]
11885 [[Article (context)]]
11886 [[Bar:X (Y) Z|X (Y) Z]]
11887 [[:Bar:X (Y) Z|X (Y) Z]]
11891 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11895 [[Article(context)|]]
11896 [[Bar:Article(context)|]]
11897 [[:Bar:Article(context)|]]
11898 [[|Article(context)]]
11902 [[Article(context)|Article]]
11903 [[Bar:Article(context)|Article]]
11904 [[:Bar:Article(context)|Article]]
11905 [[Article(context)]]
11906 [[Bar:X(Y)Z|X(Y)Z]]
11907 [[:Bar:X(Y)Z|X(Y)Z]]
11911 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11915 [[Article (context), context|]]
11916 [[Article (context),context|]]
11917 [[Bar:Article (context), context|]]
11918 [[Bar:Article (context),context|]]
11919 [[:Bar:Article (context), context|]]
11920 [[:Bar:Article (context),context|]]
11922 [[Article (context), context|Article]]
11923 [[Article (context),context|Article]]
11924 [[Bar:Article (context), context|Article]]
11925 [[Bar:Article (context),context|Article]]
11926 [[:Bar:Article (context), context|Article]]
11927 [[:Bar:Article (context),context|Article]]
11931 pre-save transform: trim trailing empty lines
11935 Empty lines are trimmed
11941 Empty lines are trimmed
11945 pre-save transform: Signature expansion
11950 * <noinclude>~~~</noinclude>
11951 * <includeonly>~~~</includeonly>
11952 * <onlyinclude>~~~</onlyinclude>
11954 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11955 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11956 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11957 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11962 pre-save transform: Signature expansion in nowiki tags (bug 93)
11968 <nowiki>~~~~</nowiki>
11970 <includeonly><nowiki>~~~~</nowiki></includeonly>
11972 <noinclude><nowiki>~~~~</nowiki></noinclude>
11974 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11976 {{subst:Foo}} shall be converted to FOO
11978 As well as inside noinclude/onlyinclude
11979 <noinclude>{{subst:Foo}}</noinclude>
11980 <onlyinclude>{{subst:Foo}}</onlyinclude>
11982 But not inside includeonly
11983 <includeonly>{{subst:Foo}}</includeonly>
11987 <nowiki>~~~~</nowiki>
11989 <includeonly><nowiki>~~~~</nowiki></includeonly>
11991 <noinclude><nowiki>~~~~</nowiki></noinclude>
11993 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11995 FOO shall be converted to FOO
11997 As well as inside noinclude/onlyinclude
11998 <noinclude>FOO</noinclude>
11999 <onlyinclude>FOO</onlyinclude>
12001 But not inside includeonly
12002 <includeonly>{{subst:Foo}}</includeonly>
12006 Parsoid: Recognize nowiki with trailing space in tags
12010 <nowiki ><div>[[foo]]</nowiki >
12018 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12025 Parsoid: Recognize nowiki with odd capitalization
12029 <noWikI ><div>[[foo]]</Nowiki >
12031 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12036 Parsoid: Escape nowiki with trailing space in tags
12040 <p><nowiki > foo </nowiki ></p>
12041 <p>a<nowiki />b</p>
12042 <p>c<nowiki/ >d</p>
12044 <nowiki > foo </nowiki >
12052 Parsoid: Escape weird noWikI capitalizations
12056 <p><noWikI > foo </NoWikI ></p>
12058 <noWikI > foo </NoWikI >
12062 ### Message transform tests
12065 message transform: magic variables
12075 message transform: should not transform wiki markup
12085 message transform: <noinclude> in transcluded template (bug 4926)
12095 message transform: <onlyinclude> in transcluded template (bug 4926)
12105 {{#special:}} page name, known
12109 {{#special:Recentchanges}}
12111 Special:RecentChanges
12115 {{#special:}} page name with subpage, known
12119 {{#special:Recentchanges/param}}
12121 Special:RecentChanges/param
12125 {{#special:}} page name, unknown
12129 {{#special:foobar nonexistent}}
12131 Special:Foobar nonexistent
12135 {{#speciale:}} page name, known
12139 {{#speciale:Recentchanges}}
12141 Special:RecentChanges
12145 {{#speciale:}} page name with subpage, known
12149 {{#speciale:Recentchanges/param}}
12151 Special:RecentChanges/param
12155 {{#speciale:}} page name, unknown
12159 {{#speciale:foobar nonexistent}}
12161 Special:Foobar_nonexistent
12167 ### For Parsoid-specific tests, see
12168 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12173 parsoid=wt2html,wt2wt,html2html
12175 [[Image:foobar.jpg]]
12177 <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>
12180 <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>
12184 Simple image (using File: namespace, now canonical)
12186 [[File:Foobar.jpg]]
12188 <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>
12191 <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>
12195 Right-aligned image
12197 [[File:Foobar.jpg|right]]
12199 <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>
12202 <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>
12208 [[File:Foobar.jpg|right|Caption text]]
12210 <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>
12213 <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>
12217 Image with caption, bug 53312 #1
12219 [[File:Foobar.jpg|right|Caption page stuff]]
12221 <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>
12224 <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>
12228 Image with caption, bug 53312 #2
12230 [[File:Foobar.jpg|right|Caption page=]]
12232 <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>
12235 <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>
12239 Image with caption, bug 53312 #3
12241 [[File:Foobar.jpg|right|Caption page=stuff]]
12243 <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>
12246 <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>
12250 Allow empty links in image captions (Bug 60753)
12254 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12259 <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>
12262 <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>
12264 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12265 </figcaption></figure>
12269 Titles in unlinked images (T23454)
12271 [[File:Foobar.jpg|link=|stuff]]
12273 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12278 Link with empty target
12287 Image with link trail
12289 Linktrails should not work for images: [[File:Foobar.jpg]]s
12291 <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
12294 <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>
12298 Image with empty attribute
12300 parsoid=wt2html,wt2wt,html2html
12302 [[File:Foobar.jpg|right||Caption text]]
12304 <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>
12307 <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>
12311 1. Block image with individual attributes from templates
12313 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12315 <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>
12318 <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>
12322 2. Block Image with individual attributes from templates
12324 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12326 <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>
12329 <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>
12333 3. Inline image with individual attributes from templates
12335 [[File:Foobar.jpg|{{echo|50px}}]]
12337 <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>
12340 <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>
12343 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12344 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12346 Image with multiple attributes from the same template
12348 [[File:Foobar.jpg|{{image_attribs}}]]
12350 <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>
12353 <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>
12357 Image with link tails
12361 123[[File:Foobar.jpg]]456
12362 123[[File:Foobar.jpg|right]]456
12363 123[[File:Foobar.jpg|thumb]]456
12365 <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
12367 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
12368 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
12371 <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>
12373 <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>
12375 <div class="thumb tright">
12376 <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>
12377 <div class="thumbcaption">
12378 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12384 <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>
12385 <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>
12386 <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>
12390 Image with multiple captions -- only last one is accepted
12392 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12394 <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>
12397 <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>
12401 Image with multiple widths -- use last
12403 [[File:Foobar.jpg|200px|300px|caption]]
12405 <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>
12408 <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>
12412 Image with multiple alignments -- use first (bug 48664)
12416 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12418 [[File:Foobar.jpg|middle|text-top|caption]]
12420 <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>
12421 <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>
12424 <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>
12425 <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>
12429 Image with width attribute at different positions
12431 [[File:Foobar.jpg|200px|right|Caption]]
12432 [[File:Foobar.jpg|right|200px|Caption]]
12433 [[File:Foobar.jpg|right|Caption|200px]]
12435 <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>
12436 <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>
12437 <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>
12440 <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>
12441 <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>
12442 <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>
12445 # a sad bit of backward-compatibility
12447 Image with size specified with pxpx (bug 13500, 51628)
12449 parsoid=wt2html,wt2wt,html2html
12451 [[File:Foobar.jpg|20pxpx]]
12452 [[File:Foobar.jpg|200x20pxpx]]
12454 <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>
12455 <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>
12458 <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>
12462 Image with link parameter, wiki target
12464 [[File:Foobar.jpg|link=Main Page]]
12466 <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>
12469 <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>
12472 # parsoid bug 49293 (part 1)
12474 Image with link parameter, URL target
12476 [[File:Foobar.jpg|link=http://example.com/]]
12478 <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>
12481 <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>
12484 # parsoid bug 49293 (part 2)
12486 Image with link parameter, protocol-less URL target
12488 [[File:Foobar.jpg|link=//example.com/]]
12490 <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>
12493 <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>
12497 Image with link parameter, wgExternalLinkTarget
12499 [[Image:foobar.jpg|link=http://example.com/]]
12501 wgExternalLinkTarget='foobar'
12503 <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>
12508 Image with link parameter, wgNoFollowLinks set to false
12510 [[Image:foobar.jpg|link=http://example.com/]]
12512 wgNoFollowLinks=false
12514 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12519 Image with link parameter, wgNoFollowDomainExceptions
12521 [[Image:foobar.jpg|link=http://example.com/]]
12523 wgNoFollowDomainExceptions='example.com'
12525 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12530 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12532 [[Image:foobar.jpg|link=http://example.com/|Title]]
12534 wgExternalLinkTarget='foobar'
12536 <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>
12541 Image with empty link parameter
12543 [[File:Foobar.jpg|link=]]
12545 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12548 <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>
12552 Image with link parameter (wiki target) and unnamed parameter
12554 [[File:Foobar.jpg|link=Main_Page|Title]]
12556 <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>
12559 <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>
12563 Image with link parameter (URL target) and unnamed parameter
12565 [[File:Foobar.jpg|link=http://example.com/|Title]]
12567 <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>
12570 <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>
12574 Thumbnail image with link parameter
12577 parsoid=wt2html,wt2wt,html2html
12579 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12581 <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>
12584 <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>
12588 Manually-specified thumbnail image
12592 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12594 <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>
12597 <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>
12601 Manually-specified thumbnail image with explicit link to wiki page
12604 parsoid=wt2html,wt2wt,html2html
12606 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12608 <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>
12611 <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>
12615 Manually-specified thumbnail image with explicit link to url
12618 parsoid=wt2html,wt2wt,html2html
12620 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12622 <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>
12625 <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>
12629 Manually-specified thumbnail image with explicit no link
12632 parsoid=wt2html,wt2wt,html2html
12634 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12636 <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>
12639 <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>
12643 Manually-specified thumbnail image with explicit link and alt text
12646 parsoid=wt2html,wt2wt,html2html
12648 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12650 <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>
12653 <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>
12657 Image with frame and link
12659 parsoid=wt2html,wt2wt,html2html
12661 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12663 <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>
12666 <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>
12670 Image with frame and link and explicit alt
12672 parsoid=wt2html,wt2wt,html2html
12674 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12676 <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>
12679 <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>
12683 Image with wiki markup in implicit alt
12685 parsoid=wt2html,wt2wt,html2html
12687 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12689 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12691 <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>
12692 </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>
12695 <p><span class="mw-default-size" typeof="mw:Image" data-mw="{"caption":"testing '''bold''' 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"/></a></span></p>
12696 <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"/></a></span></p>
12700 Alt image option should handle most kinds of wikitext without barfing
12702 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12704 <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>
12707 <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>
12710 ###################
12711 # Conflicting image format options.
12712 # First option specified should 'win'.
12713 # All three cases in each test should be identical.
12716 Image with 'frameless' first.
12718 parsoid=wt2html,wt2wt,html2html
12720 [[File:Foobar.jpg|frameless|caption]]
12722 [[File:Foobar.jpg|frameless|frame|caption]]
12724 [[File:Foobar.jpg|frameless|thumb|caption]]
12726 <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>
12727 </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>
12728 </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>
12731 <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>
12732 <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>
12733 <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>
12737 Image with 'frame' first.
12739 parsoid=wt2html,wt2wt,html2html
12741 [[File:Foobar.jpg|frame|caption]]
12742 [[File:Foobar.jpg|frame|frameless|caption]]
12743 [[File:Foobar.jpg|frame|thumb|caption]]
12745 <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>
12746 <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>
12747 <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>
12750 <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>
12751 <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>
12752 <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>
12756 Image with 'thumb' first.
12758 parsoid=wt2html,wt2wt,html2html
12760 [[File:Foobar.jpg|thumb|caption]]
12761 [[File:Foobar.jpg|thumb|frameless|caption]]
12762 [[File:Foobar.jpg|thumb|frame|caption]]
12764 <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>
12765 <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>
12766 <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>
12769 <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>
12770 <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>
12771 <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>
12774 ###################
12776 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12777 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12778 # Foobar has actual size of 1941x220
12779 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12780 # a scalable format.
12781 # 2. Framed images always ignore size options; always render at default size.
12782 # 3. "Unspecified format" and border are the only types which can be
12786 Image: "unspecified format" and border enlarge
12788 parsoid=wt2html,wt2wt,html2html
12790 [[File:Foobar.jpg|2000px]]
12792 [[File:Foobar.jpg|border|2000px]]
12794 <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>
12795 </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>
12798 <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>
12799 <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>
12803 Image: "unspecified format" and border reduce
12805 parsoid=wt2html,wt2wt,html2html
12807 [[File:Foobar.jpg|1000px]]
12809 [[File:Foobar.jpg|border|1000px]]
12811 <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>
12812 </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>
12815 <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>
12816 <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>
12820 Image: thumbs reduce
12822 parsoid=wt2html,wt2wt,html2html
12824 [[File:Foobar.jpg|thumb|50px]]
12826 <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>
12829 <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>
12833 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12835 parsoid=wt2html,wt2wt,html2html
12837 [[File:Foobar.jpg|thumb|2000px]]
12839 [[File:Foobar.svg|thumb|2000px]]
12841 <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>
12842 <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>
12845 <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>
12846 <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>
12850 Image: frameless can reduce in size
12852 parsoid=wt2html,wt2wt,html2html
12854 [[File:Foobar.jpg|frameless|50px]]
12856 <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>
12859 <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>
12863 Image: bitmap frameless can't be enlarged past original size, but vector can
12865 parsoid=wt2html,wt2wt,html2html
12867 [[File:Foobar.jpg|frameless|2000px]]
12869 [[File:Foobar.svg|frameless|2000px]]
12871 <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>
12872 </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>
12875 <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>
12876 <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>
12880 Image: framed images are always unscaled.
12882 parsoid=wt2html,wt2wt,html2html
12884 [[File:Foobar.jpg|frame]]
12886 [[File:Foobar.jpg|frame|50px]]
12888 [[File:Foobar.jpg|frame|50x50px]]
12890 [[File:Foobar.jpg|frame|2000px]]
12892 <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>
12893 <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>
12894 <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>
12895 <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>
12898 <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>
12899 <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>
12900 <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>
12901 <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>
12904 ###################
12907 Link to image page- image page normally doesn't exists, hence edit link
12908 Add test with existing image page
12909 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12913 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12918 bug 18784 Link to non-existent image page with caption should use caption as link text
12920 [[:Image:test|caption]]
12922 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12927 Frameless image caption with a free URL
12929 [[File:Foobar.jpg|http://example.com]]
12931 <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>
12934 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"http://example.com"}'><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>
12938 Thumbnail image caption with a free URL
12942 [[File:Foobar.jpg|thumb|http://example.com]]
12944 <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>
12947 <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>
12951 Thumbnail image caption with a free URL and explicit alt
12954 parsoid=wt2html,wt2wt,html2html
12956 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12958 <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>
12961 <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>
12965 SVG thumbnails with no language set
12968 [[File:Foobar.svg|thumb|caption]]
12970 <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>
12973 <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>
12977 SVG thumbnails with language de
12979 parsoid=wt2html,wt2wt,html2html
12981 [[File:Foobar.svg|thumb|caption|lang=de]]
12983 <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>
12986 <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>
12990 SVG thumbnails with invalid language code
12992 parsoid=wt2html,wt2wt,html2html
12994 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12996 <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>
12999 <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>
13003 BUG 1887: A ISBN with a thumbnail
13005 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13007 <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>
13010 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="Special:BookSources/1235467890" rel="mw:ExtLink">ISBN 1235467890</a></figcaption></figure>
13014 BUG 1887: A RFC with a thumbnail
13016 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13018 <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>
13021 <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>
13025 BUG 1887: A mailto link with a thumbnail
13027 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13029 <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>
13032 <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>
13035 # Pending resolution to bug 368
13037 BUG 648: Frameless image caption with a link
13039 [[File:Foobar.jpg|text with a [[link]] in it]]
13041 <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>
13044 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]] 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>
13048 BUG 648: Frameless image caption with a link (suffix)
13050 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13052 <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>
13055 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]]foo 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>
13059 BUG 648: Frameless image caption with an interwiki link
13061 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13063 <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>
13066 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link]] 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>
13070 BUG 648: Frameless image caption with a piped interwiki link
13072 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13074 <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>
13077 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link|link]] 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>
13081 Escape HTML special chars in image alt text
13083 [[File:Foobar.jpg|& < > "]]
13085 <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>
13088 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"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>
13092 BUG 499: Alt text should have Ӓ, not &1234;
13094 [[File:Foobar.jpg|♀]]
13096 <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>
13099 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&#9792;"}'><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>
13103 Broken image caption with link
13105 parsoid=wt2html,wt2wt,html2html
13107 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13109 <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.
13112 <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>
13116 Image caption containing another image
13118 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13120 <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>
13123 <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>
13127 Image: caption containing a newline
13129 [[File:Foobar.jpg|This
13132 <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>
13135 <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>
13139 Image: caption containing leading space
13140 (The leading space should not trigger nowiki escaping in wt2wt mode)
13142 [[File:Foobar.jpg|thumb| bar]]
13144 <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>
13147 <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>
13151 Image: caption containing a table
13153 parsoid=wt2html,wt2wt,html2html
13155 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13161 and some more text.]]
13163 <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>
13166 <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
13169 <tr><th>Foo </th><th>Bar</th></tr>
13172 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13176 Bug 3090: External links other than http: in image captions
13178 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13180 <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>
13183 <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>
13189 parsoid=wt2html,wt2wt,html2html
13191 [[Image:foobar.jpg|a|class=b]]
13193 <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>
13196 <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>
13200 Localized image handling (1).
13202 parsoid=wt2html,wt2wt,html2html
13205 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13207 <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>
13210 <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>
13214 Localized image handling (2).
13217 parsoid=wt2html,wt2wt,html2html
13220 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13222 <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>
13225 <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>
13229 "border", "frameless" and "class" attributes on an image.
13232 parsoid=wt2html,wt2wt,html2html
13234 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13236 <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>
13239 <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>
13242 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13244 Invalid image attributes (bug 62500)
13247 parsoid=wt2html,wt2wt,html2html
13249 [[File:Foobar.jpg|thumb|float|left|caption]]
13251 [[File:Foobar.jpg|thumb|righ|caption]]
13253 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13255 <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>
13256 <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>
13257 <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>
13260 <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>
13261 <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>
13262 <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>
13268 #REDIRECT [[File:Barfoo.jpg]]
13271 # FIXME: Parsoid should run this test -- but we'd need to teach the
13272 # mockAPI about the redirected Barfoo.jpg image.
13276 [[Image:Barfoo.jpg]]
13278 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13283 Missing image with uploads disabled
13287 [[File:Foobaz.jpg]]
13289 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13292 <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>
13295 # Parsoid-specific testing for images
13296 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13297 # Currently imperfect due to a flaw in the Parsoid testrunner
13299 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13303 Parsoid-specific image handling - simple image with size and middle alignment
13305 [[File:Foobar.jpg|middle|50px]]
13307 <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>
13311 Parsoid-specific image handling - simple image with size, middle alignment,
13312 non-standard namespace alias
13314 parsoid=wt2wt,wt2html,html2html
13316 [[Image:Foobar.jpg|middle|50px]]
13318 <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>
13322 Parsoid-specific image handling - simple image with size and middle alignment
13325 [[File:Foobar.jpg|50px|middle]]
13327 <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>
13331 Parsoid-specific image handling - simple image with size and middle alignment
13332 and non-standard namespace name
13334 parsoid=wt2html,wt2wt,html2html
13336 [[Image:Foobar.jpg|50px|middle]]
13338 <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>
13342 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13344 [[File:Foobar.jpg|500x10px|baseline|caption]]
13346 <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>
13350 Parsoid-specific image handling - simple image with border and size spec
13352 [[File:Foobar.jpg|50px|border|caption]]
13354 <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>
13358 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13360 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13362 <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>
13366 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13369 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13371 <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>
13375 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13377 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13379 <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>
13383 Parsoid-specific image handling - thumbnail with specific size, halign,
13384 valign, and caption (existing content)
13386 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13388 <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>
13392 Parsoid-specific image handling - framed image with specific size and caption
13395 parsoid=wt2html,wt2wt,html2html
13397 [[File:Foobar.jpg|frame|500x50px|caption]]
13399 <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>
13403 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13406 parsoid=wt2html,wt2wt,html2html
13408 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13410 <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>
13414 Parsoid-specific image handling - frameless image with specific size, border, and caption
13416 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13418 <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>
13422 Parsoid-specific image handling - simple image with a formatted caption
13424 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13426 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></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>
13430 Parsoid-specific image handling - caption with a template in it
13432 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13434 <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>
13438 Parsoid-specific image handling - caption with unbalanced tags in it
13440 parsoid=wt2html,wt2wt,html2html
13443 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13447 <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>
13452 Parsoid-specific image handling - empty caption (1)
13454 parsoid=wt2html,wt2wt
13456 [[File:Foobar.jpg|thumb|]]
13458 <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>
13461 # empty captions don't get serialized unless we're in the "round trip" case
13463 Parsoid-specific image handling - empty caption (2)
13467 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13468 <a href="./File:Foobar.jpg">
13469 <img resource="./File:Foobar.jpg"
13470 src="//example.com/images/3/3a/Foobar.jpg"
13471 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13472 height="25" width="220"/>
13474 <figcaption></figcaption>
13477 [[File:Foobar.jpg|thumb]]
13481 Parsoid-specific image handling - whitespace caption
13483 [[File:Foobar.jpg|thumb| ]]
13485 <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>
13489 Parsoid-specific image handling - lang option
13492 [[File:Foobar.svg|lang=de|caption]]
13496 <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>
13505 Subpage test/subpage
13513 subpage title=[[Subpage test]]
13517 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13522 Subpage noslash link
13524 subpage title=[[Subpage test]]
13528 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13533 Subpage test/1/2/subpage
13539 Relative subpage noslash link
13541 parsoid=wt2wt,wt2html,html2html
13542 subpage title=[[Subpage test/1/2/3/4]]
13548 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13549 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13552 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13553 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13557 Parsoid: dot-slash prefixed wikilinks
13567 </p><p>[[././baz/]]
13572 </p><p>[[././baz/]]
13577 Render invalid page names as plain text (bug 51090)
13590 [[{{echo|./../foo}}|bar]]
13591 [[{{echo|foo/.}}|bar]]
13592 [[{{echo|foo/..}}|bar]]
13593 [[{{echo|foo~~~~bar}}]]
13594 [[{{echo|foo>bar}}]]
13595 [[{{echo|foo././bar}}]]
13596 [[{{echo|foo{bar}}]]
13597 [[{{echo|foo}bar}}]]
13598 [[{{echo|foo[bar}}]]
13599 [[{{echo|foo]bar}}]]
13600 [[{{echo|foo<bar}}]]
13602 <p>[[./../foo|bar]]
13612 </p><p>[[./../foo|bar]]
13625 <p>[[./../foo|bar]]
13636 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13637 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13638 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13639 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13640 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13641 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13642 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13643 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13644 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
13645 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
13646 [[<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>
13654 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13659 BUG 561: {{/Subpage}}
13661 subpage title=[[Page]]
13665 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13673 Category:MediaWiki User's Guide
13681 [[:Category:MediaWiki User's Guide]]
13683 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13692 [[Category:MediaWiki User's Guide]]
13694 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13698 PAGESINCATEGORY invalid title fatal (r33546 fix)
13700 {{PAGESINCATEGORY:<bogus>}}
13707 Category with different sort key
13711 [[Category:MediaWiki User's Guide|Foo]]
13713 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13717 Category with identical sort key
13721 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13723 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13727 Category with empty sort key
13732 [[Category:MediaWiki User's Guide|]]
13734 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13738 Category with empty sort key and parentheses
13743 [[Category:Foo (bar)|]]
13745 [[Category:Foo (bar)|Foo]]
13749 Category with link tail
13754 123[[Category:Foo]]456
13756 123[[Category:Foo]]456
13760 Category with template
13765 [[Category:{{echo|Foo}}]]
13767 [[Category:{{echo|Foo}}]]
13771 Category with template in sort key
13776 [[Category:Foo|{{echo|Bar}}]]
13778 [[Category:Foo|{{echo|Bar}}]]
13782 Category with template in sort key and title
13787 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13789 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13793 Category / paragraph interactions
13795 Foo [[Category:Baz]] Bar
13797 Foo [[Category:Baz]]
13805 [[Category:Baz]] Bar
13818 {{echo|[[Category:Baz]]}}
13832 ## The whitespace on the empty line is part of the test. Please do not delete
13834 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13836 parsoid=wt2html,wt2wt
13840 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
13842 {{echo|[[Category:Foo]] and so should this!}}
13844 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
13849 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
13851 <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>
13854 ## Parsoid will not try to wt2wt this while preserving newlines because
13855 ## it suppresses excess newlines within list items -- and we don't want to
13856 ## introduce a special case just for categories, which is, in reality somewhat
13857 ## odd behavior -- categories are unlikely to be used in list items like this
13858 ## in top-level pages and are only likely to show up in template-generated
13859 ## list items where this RT-ing is a non-issue.
13861 ## The whitespace on the empty line is part of the test. Please do not delete
13863 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13869 [[Category:Foo]] and this should be part of the same list item
13872 {{echo|[[Category:Foo]] and this should be part of the same list item}}
13874 <ul><li>This and this should be part of the same list item</li>
13875 <li>So should this and this should be part of the same list item</li></ul>
13878 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
13879 <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>
13883 ## Newlines and categories that follow the last item of a list
13884 ## are treated differently because this (list followed by categories)
13885 ## is an extremely common pattern on wikis.
13887 3. Categories and newlines: newline suppression for last list item should RT properly
13900 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13902 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13903 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13907 4. Categories and newlines: newline suppression for last list item should RT properly
13915 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
13917 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13920 ## only wt2html for this to make sure the algo only applies to the rightmost path
13922 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
13935 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
13937 <ul><li> d</li></ul></li></ul>
13938 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13942 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
13944 * a [[Category:Foo]]
13946 <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>
13949 # This test also demonstrates because of newline+category tunneling
13950 # through the list hander, template wrapping doesn't expand to the
13951 # containing list when the list item swallows the category.
13953 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
13958 <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">
13959 </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>
13963 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
13967 {{echo|[[Category:Foo]]
13971 <ul><li> a</li></ul>
13973 <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">
13974 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13975 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13979 Parsoid: Serialize link to category page with colon escape
13985 [[:Category:Foo|Bar]]
13988 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13989 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13993 # html2wt localizes the "Category" namespace.
13994 # XXX the <link> element needs an empty data-parsoid attribute, or
13995 # else the html2html test fails because spaces are inserted.
13997 Link prefix/suffixes aren't applied to category links
13999 parsoid=wt2html,wt2wt,html2html
14007 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14011 Parsoid: Serialize link to file page with colon escape
14017 [[:File:Foo.png|Bar]]
14020 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14021 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14026 Parsoid: Serialize a genuine category link without colon escape
14031 [[Category:Foo|Bar]]
14033 <link rel="mw:PageProp/Category" href="Category:Foo">
14034 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
14038 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14042 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14044 [[Category:Toxine bactérienne]]
14048 Parsoid: Defaultsort
14050 {{DEFAULTSORT:Foo}}
14052 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14056 Parsoid: Defaultsort (template-generated)
14058 {{{{echo|DEFAULTSORT}}:Foo}}
14060 <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}}]}'/>
14064 ### Inter-language links
14067 Interlanguage links
14075 es:Alimento fr:Nourriture zh:食品
14077 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14078 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14079 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14083 Duplicate interlanguage links (bug 24502)
14094 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14095 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14096 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14097 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14104 Basic section headings
14111 ===Smaller headline===
14114 <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>
14117 <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>
14120 <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>
14126 Section headings with TOC
14129 === Subheadline 1 ===
14130 ===== Skipping a level =====
14131 ====== Skipping a level ======
14135 ===Another headline===
14137 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14139 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14141 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14143 <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>
14145 <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>
14152 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14154 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14160 <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>
14161 <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>
14162 <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>
14163 <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>
14164 <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>
14167 <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>
14172 TOC anchors don't collide
14180 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14182 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14183 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14184 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14185 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14189 <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>
14190 <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>
14191 <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>
14192 <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>
14196 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14198 Handling of sections up to level 6 and beyond
14201 == Level 2 Heading==
14202 === Level 3 Heading===
14203 ==== Level 4 Heading====
14204 ===== Level 5 Heading=====
14205 ====== Level 6 Heading======
14206 ======= Level 7 Heading=======
14207 ======== Level 8 Heading========
14208 ========= Level 9 Heading=========
14209 ========== Level 10 Heading==========
14211 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14213 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14215 <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>
14217 <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>
14219 <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>
14221 <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>
14223 <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>
14224 <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>
14225 <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>
14226 <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>
14227 <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>
14241 <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>
14242 <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>
14243 <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>
14244 <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>
14245 <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>
14246 <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>
14247 <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>
14248 <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>
14249 <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>
14250 <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>
14255 TOC regression (T11764)
14259 ==== title 1.1.1 ====
14264 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14266 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14268 <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>
14270 <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>
14273 <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>
14276 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14278 <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>
14284 <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>
14285 <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>
14286 <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>
14287 <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>
14288 <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>
14289 <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>
14294 TOC for heading containing <span id="..."></span> (T96153)
14297 ==<span id="old-anchor"></span>New title==
14299 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14301 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14305 <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>
14310 TOC with wgMaxTocLevel=3 (bug 6204)
14316 ==== title 1.1.1 ====
14321 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14323 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14325 <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>
14326 <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>
14329 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14331 <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>
14337 <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>
14338 <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>
14339 <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>
14340 <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>
14341 <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>
14342 <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>
14347 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14353 ====Section 1.1.1====
14354 ====Section 1.1.1.1====
14357 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14359 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14361 <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>
14364 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14368 <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>
14369 <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>
14370 <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>
14371 <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>
14372 <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>
14378 Resolving duplicate section names
14383 <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>
14384 <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>
14389 Resolving duplicate section names with differing case (bug 10721)
14394 <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>
14395 <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>
14407 Template with sections, __NOTOC__
14414 <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>
14415 <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>
14416 <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>
14417 <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>
14422 __NOEDITSECTION__ keyword
14428 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14429 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14434 Link inside a section heading
14436 ==Section with a [[Main Page|link]] in it==
14438 <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>
14443 TOC regression (T14077)
14450 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14452 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14454 <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>
14457 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14461 <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>
14462 <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>
14463 <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>
14468 BUG 1219 URL next to image (good)
14470 http://example.com [[File:Foobar.jpg]]
14472 <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>
14475 <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>
14479 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14482 The line above must have a trailing space!
14485 But just in case it doesn't...
14487 <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>
14488 <p>The line above must have a trailing space!
14490 <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>
14491 <p>But just in case it doesn't...
14496 Header with special characters (bug 25462)
14498 The tooltips shall not show entities to the user (ie. be double escaped)
14515 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14517 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14519 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14520 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14521 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14522 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14523 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14527 <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>
14530 <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>
14533 <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>
14536 <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>
14539 <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>
14545 Header with space, plus and underscore as entity
14547 Id should not contain + for spaces
14549 == Space between Text ==
14552 == Space-Entity between Text ==
14555 == Plus+between+Text ==
14558 == Plus-Entity+between+Text ==
14561 == Underscore_between_Text ==
14564 == Underscore-Entity_between_Text ==
14567 [[#Space between Text]]
14568 [[#Space-Entity between Text]]
14569 [[#Plus+between+Text]]
14570 [[#Plus-Entity+between+Text]]
14571 [[#Underscore_between_Text]]
14572 [[#Underscore-Entity_between_Text]]
14574 <p>Id should not contain + for spaces
14576 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14578 <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>
14579 <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>
14580 <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>
14581 <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>
14582 <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>
14583 <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>
14587 <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>
14590 <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>
14593 <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>
14596 <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>
14599 <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>
14602 <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>
14604 </p><p><a href="#Space_between_Text">#Space between Text</a>
14605 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14606 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14607 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14608 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14609 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14614 Headers with excess '=' characters
14615 (Are similar tests necessary beyond the 1st level?)
14619 =''italic'' heading==
14620 ==''italic'' heading=
14622 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14624 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14625 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14626 <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>
14627 <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>
14631 <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>
14632 <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>
14633 <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>
14634 <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>
14639 HTML headers vs TOC (bug 23393)
14640 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14652 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14654 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14656 <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>
14657 <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>
14660 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14662 <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>
14663 <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>
14669 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14670 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14671 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14672 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14673 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14674 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14679 Single-line or multiline-comments can follow headings
14681 parsoid=wt2html,wt2wt
14689 <h2><span class="mw-headline" id="foo">foo</span></h2>
14690 <h2><span class="mw-headline" id="bar">bar</span></h2>
14691 <h2><span class="mw-headline" id="baz">baz</span></h2>
14696 BUG 1219 URL next to image (broken)
14698 http://example.com[[File:Foobar.jpg]]
14700 <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>
14703 <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>
14707 Bug 1186 news: in the middle of text
14709 http://en.wikinews.org/wiki/Wikinews:Workplace
14711 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14717 Namespaced link must have a title
14726 Namespaced link must have a title (bad fragment version)
14728 [[Project:#fragment]]
14730 <p>[[Project:#fragment]]
14736 ### HTML tags and HTML attributes
14740 div with no attributes
14742 <div>HTML rocks</div>
14744 <div>HTML rocks</div>
14749 div with double-quoted attribute
14751 <div id="rock">HTML rocks</div>
14753 <div id="rock">HTML rocks</div>
14758 div with single-quoted attribute
14760 <div id='rock'>HTML rocks</div>
14762 <div id="rock">HTML rocks</div>
14767 div with unquoted attribute
14769 <div id=rock>HTML rocks</div>
14771 <div id="rock">HTML rocks</div>
14776 div with illegal double attributes
14778 <div id="a" id="b">HTML rocks</div>
14780 <div id="b">HTML rocks</div>
14784 # FIXME: produce empty string instead of "class" in the PHP parser, following
14787 div with empty attribute value, space before equals
14791 <div class =>HTML rocks</div>
14793 <div class="">HTML rocks</div>
14798 div with multiple empty attribute values
14802 <div id= title=>HTML rocks</div>
14804 <div id="" title="">HTML rocks</div>
14809 table with multiple empty attribute values
14817 <table title="" id="">
14818 <tbody><tr><td> hi</td></tr>
14823 div with braces in attribute value
14825 <div title="{}">Foo</div>
14827 <div title="{}">Foo</div>
14830 <div title="{}">Foo</div>
14833 # This it very inconsistent in the PHP parser: it returns
14834 # class="class" if there is a space between the name and the equal sign (see
14835 # 'div with empty attribute value, space before equals'), but strips the
14836 # attribute completely if the space is missing. We hope that not much content
14837 # depends on this, so are implementing the behavior below in Parsoid for
14838 # consistencies' sake.
14839 # FIXME: fix this behavior in the PHP parser?
14841 div with empty attribute value, no space before equals
14843 parsoid=wt2html,html2html
14845 <div class=>HTML rocks</div>
14847 <div>HTML rocks</div>
14850 <div class="">HTML rocks</div>
14854 HTML multiple attributes correction
14856 <p class="error" class="awesome">Awesome!</p>
14858 <p class="awesome">Awesome!</p>
14863 Table multiple attributes correction
14866 !+ class="error" class="awesome"| status
14871 <th class="awesome"> status
14879 <DIV ID="x">HTML ROCKS</DIV>
14881 <div id="x">HTML ROCKS</div>
14886 Non-ASCII pseudo-tags are rendered as text
14895 Pseudo-tag with URL 'name' renders as url link
14897 <http://example.com/>
14899 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14904 text with amp in the middle of nowhere
14908 <p>Remember AT&T?
14913 text with character entity: eacute
14915 I always thought é was a cute letter.
14917 <p>I always thought é was a cute letter.
14920 <p>I always thought é was a cute letter.</p>
14924 text with entity-escaped character entity-like string: eacute
14926 I always thought &eacute; was a cute letter.
14928 <p>I always thought &eacute; was a cute letter.
14933 text with undefined character entity: xacute
14935 I always thought &xacute; was a cute letter.
14937 <p>I always thought &xacute; was a cute letter.
14941 # TODO: generalize to PHP parser?
14947 <data value="5">five</data>
14948 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14949 <mark>This highlighted text</mark>
14951 <p><data value="5">five</data>
14952 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14953 <mark>This highlighted text</mark></p>
14957 HTML tag with leading space is parsed as text
14961 <p>< div>foo< /div>
14966 ### Nesting tests (see bug 41545, 50604, 51081)
14969 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14970 # Note that html2wt is considerably more difficult if we use <b> in
14971 # the test case, instead of <big>
14973 Ensure that HTML adoption agency algorithm is properly implemented.
14975 <big>X<big>Y</big>Z</big>
14977 <p><big>X<big>Y</big>Z</big>
14981 # This was bug 41545 in the PHP parser.
14982 # Note that tidy doesn't handle this correctly.
14986 <kbd>X<kbd>Y</kbd>Z</kbd>
14988 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14992 # The following cases were bug 51081 in the PHP parser.
14993 # Note that there are some other nestable tags (b, i, etc) which are
14994 # not covered; see bug 51081 for discussion.
14996 # Note that tidy doesn't handle this correctly.
15000 <em>X<em>Y</em>Z</em>
15002 <p><em>X<em>Y</em>Z</em>
15006 # Note that tidy doesn't handle this correctly.
15008 Nesting of <strong>
15010 <strong>X<strong>Y</strong>Z</strong>
15012 <p><strong>X<strong>Y</strong>Z</strong>
15021 <p><q>X<q>Y</q>Z</q></p>
15024 # Note that tidy doesn't handle this correctly.
15028 <ruby>X<ruby>Y</ruby>Z</ruby>
15030 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15034 # Note that tidy doesn't handle this correctly.
15038 <bdo>X<bdo>Y</bdo>Z</bdo>
15040 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15052 [[Media:Foobar.jpg]]
15054 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15059 Media link with text
15061 [[Media:Foobar.jpg|A neat file to look at]]
15063 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15067 # FIXME: this is still bad HTML tag nesting
15068 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15070 Media link with nasty text
15072 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15074 <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>
15077 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15078 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15082 Media link to nonexistent file (bug 1702)
15084 [[Media:No such.jpg]]
15086 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15091 Image link to nonexistent file (bug 1850 - good)
15093 [[File:No_such.jpg]]
15095 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15098 <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>
15102 :Image link to nonexistent file (bug 1850 - bad)
15104 [[:Image:No such.jpg]]
15106 <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>
15109 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15115 Character reference normalization in link text (bug 1938)
15117 [[Main Page|this&that]]
15119 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15126 Test for unicode normalization
15128 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15132 (bug 19451) Links should refer to the normalized form.
15140 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15141 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15142 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15143 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15144 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15149 Empty attribute crash test (bug 2067)
15151 <font color="">foo</font>
15153 <p><font color="">foo</font>
15158 Empty attribute crash test single-quotes (bug 2067)
15160 <font color=''>foo</font>
15162 <p><font color="">foo</font>
15167 Attribute test: equals, then nothing
15169 <font color=>foo</font>
15171 <p><font>foo</font>
15176 Attribute test: unquoted value
15178 <font color=x>foo</font>
15180 <p><font color="x">foo</font>
15185 Attribute test: unquoted but illegal value (hash)
15187 <font color=#x>foo</font>
15189 <p><font color="#x">foo</font>
15193 # Parsoid does not serialize to empty attribute syntax,
15194 # so wt2wt and html2wt cases are skipped
15196 Attribute test: no value (T54330)
15198 parsoid=wt2html,html2html
15200 <font color>foo</font>
15202 <p><font color="">foo</font>
15205 <p><font color="">foo</font></p>
15209 Bug 2095: link with three closing brackets
15213 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15216 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15220 Bug 2095: link with pipe and three closing brackets
15222 [[Main Page|link]]]
15224 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15227 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15231 Bug 2095: link with pipe and three closing brackets, version 2
15233 [[Main Page|[http://example.com/]]]
15235 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15238 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15247 Template:Dangerous attribute
15249 " onmouseover="alert(document.cookie)
15253 Template:Dangerous style attribute
15255 border-size: expression(alert(document.cookie))
15261 <div style="float: right; {{{1}}}">Magic div</div>
15265 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15267 <div title="{{test}}"></div>
15269 <div title="This is a test template"></div>
15273 # Parsoid has enough context to handle this case
15275 Bug 2304: HTML attribute safety (dangerous template; 2309)
15277 <div title="{{dangerous attribute}}"></div>
15279 <div title=""></div>
15282 <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>
15286 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15288 <div style="{{dangerous style attribute}}"></div>
15290 <div style="/* insecure input */"></div>
15295 Bug 2304: HTML attribute safety (safe parameter; 2309)
15297 {{div style|width: 200px}}
15299 <div style="float: right; width: 200px">Magic div</div>
15304 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15306 {{div style|width: expression(alert(document.cookie))}}
15308 <div style="/* insecure input */">Magic div</div>
15313 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15315 {{div style|"><script>alert(document.cookie)</script>}}
15317 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15322 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15324 {{div style|" ><script>alert(document.cookie)</script>}}
15326 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15331 Bug 2304: HTML attribute safety (link)
15333 <div title="[[Main Page]]"></div>
15335 <div title="[[Main Page]]"></div>
15340 Bug 2304: HTML attribute safety (italics)
15342 <div title="''foobar''"></div>
15344 <div title="''foobar''"></div>
15349 Bug 2304: HTML attribute safety (bold)
15351 <div title="'''foobar'''"></div>
15353 <div title="'''foobar'''"></div>
15359 Bug 2304: HTML attribute safety (ISBN)
15361 <div title="ISBN 1234567890"></div>
15363 <div title="ISBN 1234567890"></div>
15368 Bug 2304: HTML attribute safety (RFC)
15370 <div title="RFC 1234"></div>
15372 <div title="RFC 1234"></div>
15377 Bug 2304: HTML attribute safety (PMID)
15379 <div title="PMID 1234567890"></div>
15381 <div title="PMID 1234567890"></div>
15386 Bug 2304: HTML attribute safety (web link)
15388 <div title="http://example.com/"></div>
15390 <div title="http://example.com/"></div>
15395 Bug 2304: HTML attribute safety (named web link)
15397 <div title="[http://example.com/ link]"></div>
15399 <div title="[http://example.com/ link]"></div>
15404 Bug 3244: HTML attribute safety (extension; safe)
15406 <div style="<nowiki>background:blue</nowiki>"></div>
15408 <div style="background:blue"></div>
15413 Bug 3244: HTML attribute safety (extension; unsafe)
15415 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15417 <div style="/* insecure input */"></div>
15421 # More MSIE fun discovered by Tom Gilder
15424 MSIE CSS safety test: spurious slash
15426 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15428 <div style="/* insecure input */">evil</div>
15433 MSIE CSS safety test: hex code
15435 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15437 <div style="/* insecure input */">evil</div>
15442 MSIE CSS safety test: comment in url
15444 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15446 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15451 MSIE CSS safety test: comment in expression
15453 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15455 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15460 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15462 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15464 <p style="/* invalid control char */">A</p>
15469 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15471 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15472 <div style="top:EXPRESSION(alert())">B</div>
15474 <p style="/* insecure input */">A</p>
15475 <div style="/* insecure input */">B</div>
15480 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15482 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15483 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15485 <div style="/* insecure input */">A</div>
15486 <p style="/* insecure input */">B</p>
15491 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15493 <div style="background-image:url⁽javascript:alert())">A</div>
15494 <div style="background-image:url₍javascript:alert())">B</div>
15495 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15497 <div style="/* insecure input */">A</div>
15498 <div style="/* insecure input */">B</div>
15499 <p style="/* insecure input */">C</p>
15507 title="data:text/html,<img src=1 onerror=alert(1)>"
15508 style="-o-link:attr(title);-o-link-source:current">X</div>
15510 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15515 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15517 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15518 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15519 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15520 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15521 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15522 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15523 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15525 <p style="/* insecure input */">A</p>
15526 <p style="/* insecure input */">B</p>
15527 <p style="/* insecure input */">C</p>
15528 <p style="/* insecure input */">D</p>
15529 <p style="/* insecure input */">E</p>
15530 <p style="/* insecure input */">F</p>
15531 <p style="/* insecure input */">G</p>
15536 Table attribute legitimate extension
15539 !+ style="<nowiki>color:blue</nowiki>"| status
15544 <th style="color:blue"> status
15550 Table attribute safety
15553 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15558 <th style="/* insecure input */"> status
15564 CSS line continuation 1
15566 <div style="background-image: u\ rl(test.jpg);"></div>
15568 <div style="/* insecure input */"></div>
15573 CSS line continuation 2
15575 <div style="background-image: u\ rl(test.jpg); "></div>
15577 <div style="/* insecure input */"></div>
15588 Expansion of multi-line templates in attribute values (bug 6255)
15590 <div style="background: {{identity|#00FF00}}">-</div>
15592 <div style="background: #00FF00">-</div>
15598 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15600 <div style="background:
15603 <div style="background: #00FF00">-</div>
15606 <div style="background:
15611 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15613 <div style="background: #00FF00">-</div>
15615 <div style="background: #00FF00">-</div>
15620 evil <math>-wiki-tags without Extension:Math enabled
15622 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15624 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15628 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15631 Parser hook: empty input
15644 Parser hook: empty input using terminated empty elements
15657 Parser hook: empty input using terminated empty elements (space before)
15670 Parser hook: basic input
15684 Parser hook: case insensitive
15698 Parser hook: case insensitive, redux
15711 Parser hook: nested tags
15715 <tag><tag></tag></tag>
15726 Parser hook: basic arguments
15728 <tag width=200 height = "100" depth = '50' square></tag>
15743 Parser hook: argument containing a forward slash (bug 5344)
15745 <tag filename='/tmp/bla'></tag>
15750 'filename' => '/tmp/bla',
15757 Parser hook: empty input using terminated empty elements (bug 2374)
15770 # </tag> should be output literally since there is no matching tag that begins it
15772 Parser hook: basic arguments using terminated empty elements (bug 2374)
15774 <tag width=200 height = "100" depth = '50' square/>
15793 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
15797 Parser hook: static parser hook not inside a comment
15799 <statictag>hello, world</statictag>
15800 <statictag action=flush/>
15808 Parser hook: static parser hook inside a comment
15810 <!-- <statictag>hello, world</statictag> -->
15811 <statictag action=flush/>
15817 # Nested template calls; this case was broken by Parser.php rev 1.506,
15821 Template:One-parameter
15823 (My parameter is: {{{1}}})
15827 Template:Map-one-parameter
15829 {{{{{1}}}|{{{2}}}}}
15833 Nested template calls
15835 {{Map-one-parameter|One-parameter|param}}
15837 <p>(My parameter is: param)
15846 # HTML+Tidy effectively strips out the empty tags completely
15847 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
15848 # which Tidy would have done for the PHP parser had there been content inside it.
15850 Sanitizer: Closing of open tags
15852 <s></s><table></table>
15854 <s></s><table></table>
15857 <p><s></s></p><table></table>
15861 Sanitizer: Closing of open but not closed tags
15870 Sanitizer: Closing of closed but not open tags
15879 Sanitizer: Closing of closed but not open table tags
15881 Table not started</td></tr></table>
15883 <p>Table not started</td></tr></table>
15888 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
15890 <span id="æ: v">byte</span>[[#æ: v|backlink]]
15892 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15896 # In HTML5, the restrictions are that id must contain at least one character,
15897 # and must not contain any space characters.
15899 Sanitizer: Validating the contents of the id attribute (bug 4515)
15903 <br id="" /><br id="a space" />
15908 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
15910 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
15914 <br id="foo" /><br id="foo" />
15916 Something need to be done. foo-2 ?
15920 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
15923 <meta itemprop="hello" content="world">
15924 <meta http-equiv="refresh" content="5">
15925 <meta itemprop="hello" http-equiv="refresh" content="5">
15926 <link itemprop="hello" href="{{SERVER}}">
15927 <link rel="stylesheet" href="{{SERVER}}">
15928 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
15932 <p> <meta itemprop="hello" content="world" />
15933 <meta http-equiv="refresh" content="5">
15934 <meta itemprop="hello" content="5" />
15936 <link itemprop="hello" href="http://example.org" />
15937 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
15938 <link itemprop="hello" href="http://example.org" />
15944 Language converter: output gets cut off unexpectedly (bug 5757)
15948 this bit is safe: }-
15950 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
15952 then we get cut off here: }-
15954 all additional text is vanished
15956 <p>this bit is safe: }-
15957 </p><p>but if we add a conversion instance: xxx
15958 </p><p>then we get cut off here: }-
15959 </p><p>all additional text is vanished
15964 Self closed html pairs (bug 5487)
15967 <center><font id="bug" />Centered text</center>
15968 <div><font id="bug2" />In div text</div>
15970 <center><font id="bug" />Centered text</center>
15971 <div><font id="bug2" />In div text</div>
15980 Punctuation: nbsp before exclamation
15984 <p>C'est grave !
15989 Punctuation: CSS !important (bug 11874)
15991 <div style="width:50% !important">important</div>
15993 <div style="width:50% !important">important</div>
15998 Punctuation: CSS ! important (bug 11874; with space after)
16000 <div style="width:50% ! important">important</div>
16002 <div style="width:50% ! important">important</div>
16007 HTML bullet list, closed tags (bug 5497)
16020 <ul data-parsoid='{"stx":"html"}'>
16021 <li data-parsoid='{"stx":"html"}'>One</li>
16022 <li data-parsoid='{"stx":"html"}'>Two</li>
16028 HTML bullet list, unclosed tags (bug 5497)
16040 <ul data-parsoid='{"stx":"html"}'>
16041 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16042 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16048 HTML ordered list, closed tags (bug 5497)
16061 <ol data-parsoid='{"stx":"html"}'>
16062 <li data-parsoid='{"stx":"html"}'>One</li>
16063 <li data-parsoid='{"stx":"html"}'>Two</li>
16069 HTML ordered list, unclosed tags (bug 5497)
16082 <ol data-parsoid='{"stx":"html"}'>
16083 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16084 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16090 HTML nested bullet list, closed tags (bug 5497)
16115 HTML nested bullet list, open tags (bug 5497)
16152 HTML nested ordered list, closed tags (bug 5497)
16177 HTML nested ordered list, open tags (bug 5497)
16214 HTML ordered list item with parameters oddity
16216 <ol><li id="fragment">One</li>
16219 <ol><li id="fragment">One</li>
16224 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16226 bug 5918: autonumbering
16228 [http://first/] [http://second] [ftp://ftp]
16232 [mailto:enclosed@mail.tld With target]
16234 [mailto:enclosed@mail.tld]
16236 mailto:inline@mail.tld
16238 <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>
16239 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16240 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16241 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16242 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16245 <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>
16246 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16247 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16248 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16249 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16254 # Security and HTML correctness
16255 # From Nick Jenkins' fuzz testing
16259 Fuzz testing: Parser13
16274 Fuzz testing: Parser14
16279 <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>
16280 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16282 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16288 <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>
16290 <div id="toc" class="toc">
16291 <div id="toctitle">
16295 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16302 Fuzz testing: Parser14-table
16307 <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>
16308 <table style="__TOC__">
16313 <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>
16314 <table style="__TOC__">
16321 # Known to produce bogus xml (extra </td>)
16323 Fuzz testing: Parser16
16352 Fuzz testing: Parser21
16355 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16360 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16370 Fuzz testing: Parser22
16372 http://===r:::https://b
16376 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16384 # Known to produce bad XML for now
16386 Fuzz testing: Parser24
16393 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16394 <br style="onmouseover='alert(document.cookie);' " />
16396 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16401 <u class="|">}}}} >
16402 <br style="onmouseover='alert(document.cookie);'" />
16404 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16413 # Note: the current result listed for this is not what the original one was,
16414 # but the original bug was JavaScript injection, which is fixed in any case.
16415 # It's not clear that the original result listed was any more correct than the
16416 # current one. Original result:
16419 # <li class="||">
16420 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16422 Fuzz testing: Parser25 (bug 6055)
16428 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16430 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16435 Fuzz testing: URL adjacent extension (with space, clean)
16437 http://example.com <nowiki>junk</nowiki>
16439 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16442 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16446 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16448 http://example.com<nowiki>junk</nowiki>
16450 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16453 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16457 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16459 http://example.com<pre>junk</pre>
16461 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16464 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16469 <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>
16473 Fuzz testing: image with bogus manual thumbnail
16475 [[Image:foobar.jpg|thumbnail= ]]
16477 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16480 <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>
16484 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16486 <pre dir=" "></pre>
16488 <pre dir=" "></pre>
16493 Parsing optional HTML elements (Bug 6171)
16498 <td> Some tabular data</td>
16499 <td> More tabular data ...
16500 <td> And yet som tabular data</td>
16506 <td> Some tabular data</td>
16507 <td> More tabular data ...
16508 </td><td> And yet som tabular data</td>
16515 Correct handling of <td>, <tr> (Bug 6171)
16520 <td> Some tabular data</td>
16521 <td> More tabular data ...</td>
16522 <td> And yet som tabular data</td>
16528 <td> Some tabular data</td>
16529 <td> More tabular data ...</td>
16530 <td> And yet som tabular data</td>
16538 Parsing crashing regression (fr:JavaScript)
16542 <p></body></x>
16547 Inline wiki vs wiki block nesting
16553 <p><b>Bold paragraph</b>
16554 </p><p>New wiki paragraph
16558 # FIXME: The current php output is documented
16559 # and desired output is the parsoid target.
16561 Inline HTML vs wiki block nesting
16567 <p><b>Bold paragraph
16568 </p><p>New wiki paragraph</b>
16571 <p><b>Bold paragraph</b>
16572 </p><p>New wiki paragraph
16576 # Original result was this:
16577 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16579 # While that might be marginally more intuitive, maybe, the six-apostrophe
16580 # construct is clearly pathological and the result stated here (which is what
16581 # the parser actually does) is about as reasonable as anything.
16583 Mixing markup for italics and bold
16586 '''bold''''''bold''bolditalics'''''
16588 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16596 Article for special page transclusion test
16600 Special page transclusion
16603 {{Special:Prefixindex/Xyzzyx}}
16605 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16610 Special page transclusion twice (bug 5021)
16613 {{Special:Prefixindex/Xyzzyx}}
16614 {{Special:Prefixindex/Xyzzyx}}
16616 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16617 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16622 Transclusion of default MediaWiki message
16624 {{MediaWiki:Mainpage}}
16631 Transclusion of nonexistent MediaWiki message
16633 {{MediaWiki:Mainpagexxx}}
16635 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16640 Transclusion of MediaWiki message with underscore
16642 {{MediaWiki:history_short}}
16649 Transclusion of MediaWiki message with space
16651 {{MediaWiki:history short}}
16658 Invalid header with following text
16668 Section extraction test (section 0)
16688 Section extraction test (section 1)
16710 Section extraction test (section 2)
16731 Section extraction test (section 3)
16751 Section extraction test (section 4)
16775 Section extraction test (section 5)
16795 Section extraction test (section 6)
16816 Section extraction test (section 7)
16836 Section extraction test (section 8)
16856 Section extraction test (section 9)
16877 Section extraction test (section 10)
16897 Section extraction test (nonexistent section 11)
16916 Section extraction test with bogus heading (section 1)
16921 ==bogus== not a legal section
16925 ==bogus== not a legal section
16929 Section extraction test with bogus heading (section 2)
16934 ==bogus== not a legal section
16941 Section extraction test with comment after heading (section 1)
16953 Section extraction test with comment after heading (section 2)
16965 Section extraction test with bogus <nowiki> heading (section 1)
16970 ==bogus== <nowiki>not a legal section</nowiki>
16974 ==bogus== <nowiki>not a legal section</nowiki>
16978 Section extraction test with bogus <nowiki> heading (section 2)
16983 ==bogus== <nowiki>not a legal section</nowiki>
16990 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16991 # instead of respecting commented sections
16993 Section extraction prefixed by comment (section 1)
17004 Section extraction prefixed by comment (section 2)
17015 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17016 # instead of respecting HTML-style headings
17018 Section extraction, mixed wiki and html (section 1)
17034 Section extraction, mixed wiki and html (section 2)
17050 # Formerly testing for bug 3342
17052 Section extraction, heading surrounded by <noinclude>
17056 <noinclude>==unmarked==</noinclude>
17062 # Test behavior of bug 19910
17064 Sectiion with all-equals
17069 The line above must have a trailing space
17072 But just in case it doesn't...
17076 But just in case it doesn't...
17080 Section replacement test (section 0)
17111 Section replacement test (section 1)
17140 Section replacement test (section 2)
17170 Section replacement test (section 3)
17201 Section replacement test (section 4)
17228 Section replacement test (section 5)
17259 Section replacement test (section 6)
17289 Section replacement test (section 7)
17320 Section replacement test (section 8)
17351 Section replacement test (section 9)
17380 Section replacement test (section 10)
17410 Section replacement test with initial whitespace (bug 13728)
17414 Preformatted initial line
17418 Preformatted initial line
17425 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17437 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17450 Section extraction, <pre> around bogus header (bug 10309)
17467 Section replacement, <pre> around bogus header (bug 10309)
17469 noxml replace=2,"xxx"
17490 Handling of 
 in URLs
17494 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17497 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17499 a</a></li></ul></li></ul>
17503 Handling of %0A in URLs
17507 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17510 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17514 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17516 5 quotes, code coverage +1 line
17523 <p><b><i></i></b></p>
17526 # same html as previous, but wikitext adjusted to match parsoid html2wt
17527 # note that wt2html and html2html will put the <i> before the <b>
17529 5 quotes, code coverage +1 line w/ nowiki (1)
17531 parsoid=wt2wt,html2wt
17533 '''''<nowiki/>'''''
17538 <p><b><i></i></b></p>
17541 # same as previous, just swapping the <i> and <b>
17543 5 quotes, code coverage +1 line w/ nowiki (2)
17545 '''''<nowiki/>'''''
17550 <p><i><b></b></i></p>
17554 Special:Search page linking.
17558 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17563 {{!}} is a magic word
17565 {{!}} is a magic word there and {{!}} is still a magic word here
17567 <p>| is a magic word there and | is still a magic word here
17570 <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>
17576 title=[[Parser test]]
17581 * {{FULLPAGENAMEE}}
17583 * {{BASEPAGENAMEE}}
17587 * {{ROOTPAGENAMEE}}
17589 * {{TALKPAGENAMEE}}
17590 * {{SUBJECTPAGENAME}}
17591 * {{SUBJECTPAGENAMEE}}
17594 * {{NAMESPACENUMBER}}
17598 * {{SUBJECTSPACEE}}
17599 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17601 <ul><li> Parser test</li>
17602 <li> Parser_test</li>
17603 <li> Parser test</li>
17604 <li> Parser_test</li>
17605 <li> Parser test</li>
17606 <li> Parser_test</li>
17607 <li> Parser test</li>
17608 <li> Parser_test</li>
17609 <li> Parser test</li>
17610 <li> Parser_test</li>
17611 <li> Talk:Parser test</li>
17612 <li> Talk:Parser_test</li>
17613 <li> Parser test</li>
17614 <li> Parser_test</li>
17622 <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>
17625 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17635 image4 |300px| centre
17636 image5.svg| http://///////
17641 <ul class="gallery mw-gallery-traditional">
17642 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17643 <div class="thumb" style="height: 150px;">Image1.png</div>
17644 <div class="gallerytext">
17647 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17648 <div class="thumb" style="height: 150px;">Image2.gif</div>
17649 <div class="gallerytext">
17654 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17655 <div class="thumb" style="height: 150px;">Image3</div>
17656 <div class="gallerytext">
17659 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17660 <div class="thumb" style="height: 150px;">Image4</div>
17661 <div class="gallerytext">
17666 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17667 <div class="thumb" style="height: 150px;">Image5.svg</div>
17668 <div class="gallerytext">
17669 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17673 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17674 <div class="thumb" style="height: 150px;">* image6</div>
17675 <div class="gallerytext">
17683 Gallery (with options)
17685 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17686 File:Nonexistent.jpg|caption
17687 File:Nonexistent.jpg
17688 image:foobar.jpg|some '''caption''' [[Main Page]]
17690 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17693 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17694 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17695 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17696 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17697 <div class="gallerytext">
17702 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17703 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17704 <div class="gallerytext">
17707 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17708 <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>
17709 <div class="gallerytext">
17710 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17714 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17715 <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>
17716 <div class="gallerytext">
17719 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17720 <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>
17721 <div class="gallerytext">
17731 Gallery with link that has fragment
17734 image:foobar.jpg|link=Main_Page
17735 image:foobar.jpg|link=Main_Page#section
17736 image:foobar.jpg|link=Main Page#section|caption
17739 <ul class="gallery mw-gallery-traditional">
17740 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17741 <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>
17742 <div class="gallerytext">
17745 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17746 <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>
17747 <div class="gallerytext">
17750 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17751 <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>
17752 <div class="gallerytext">
17762 Gallery with wikitext inside caption
17765 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
17766 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
17769 <ul class="gallery mw-gallery-traditional">
17770 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17771 <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>
17772 <div class="gallerytext">
17773 <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>
17777 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17778 <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>
17779 <div class="gallerytext">
17780 <p>This is a test template
17789 gallery (with showfilename option)
17791 <gallery showfilename>
17792 File:Nonexistent.jpg|caption
17793 File:Nonexistent.jpg
17794 image:foobar.jpg|some '''caption''' [[Main Page]]
17798 <ul class="gallery mw-gallery-traditional">
17799 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17800 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17801 <div class="gallerytext">
17802 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17807 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17808 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17809 <div class="gallerytext">
17810 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17814 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17815 <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>
17816 <div class="gallerytext">
17817 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17818 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17822 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17823 <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>
17824 <div class="gallerytext">
17825 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17834 Gallery (with namespace-less filenames)
17837 File:Nonexistent.jpg
17843 <ul class="gallery mw-gallery-traditional">
17844 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17845 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17846 <div class="gallerytext">
17849 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17850 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17851 <div class="gallerytext">
17854 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17855 <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>
17856 <div class="gallerytext">
17859 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17860 <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>
17861 <div class="gallerytext">
17869 HTML Hex character encoding (spells the word "JavaScript")
17871 parsoid=wt2html,wt2wt,html2html
17873 JavaScript
17875 <p>JavaScript
17880 <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>
17884 HTML Hex character encoding bogus encoding (bug 26437 regression check)
17888 <p>&#xsee;&#XSEE;
17891 <p>&#xsee;&#XSEE;</p>
17895 HTML Hex character encoding mixed case
17897 parsoid=wt2html,wt2wt,html2html
17906 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
17910 __FORCETOC__ override
17922 ISBN 978-0-1234-56 789
17924 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
17927 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
17929 <p><a href="./Special:BookSources/9780123456" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
17933 ISBN followed by 5 spaces
17944 ISBN ISBN 1234567890
17946 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17949 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17959 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17960 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17961 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17964 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17965 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17966 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17970 ISBN with empty prefix (parsoid test)
17974 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17977 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17981 Bug 22905: <abbr> followed by ISBN followed by </a>
17983 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17985 <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>
17988 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
17996 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18001 Double RFC with a wiki link
18005 <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>
18014 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18017 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18021 Centre-aligned image
18023 [[Image:foobar.jpg|centre]]
18025 <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>
18032 [[Image:foobar.jpg|none]]
18034 <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>
18039 Width + Height sized image (using px) (height is ignored)
18041 [[Image:foobar.jpg|640x480px]]
18043 <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>
18048 Width-sized image (using px, no following whitespace)
18050 [[Image:foobar.jpg|640px]]
18052 <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>
18057 Width-sized image (using px, with following whitespace - test regression from r39467)
18059 [[Image:foobar.jpg|640px ]]
18061 <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>
18066 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18068 [[Image:foobar.jpg| 640px]]
18070 <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>
18075 Image with page parameter
18079 [[File:LoremIpsum.djvu|page=2]]
18081 <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>
18084 <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>
18088 Another italics / bold test
18096 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18102 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18105 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18110 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18112 Images with the "|" character in the comment
18114 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18116 <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>
18119 <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>
18123 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18125 <html><script>alert(1);</script></html>
18127 <p><html><script>alert(1);</script></html>
18132 HTML with raw HTML ($wgRawHtml==true)
18136 <html><script>alert(1);</script></html>
18138 <p><script>alert(1);</script>
18143 Parents of subpages, one level up
18145 subpage title=[[Subpage test/L1/L2/L3]]
18149 <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>
18155 Parents of subpages, one level up, not named
18157 subpage title=[[Subpage test/L1/L2/L3]]
18161 <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>
18168 Parents of subpages, two levels up
18170 subpage title=[[Subpage test/L1/L2/L3]]
18176 <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
18177 </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>
18182 Parents of subpages, two levels up, without trailing slash or name.
18184 subpage title=[[Subpage test/L1/L2/L3]]
18193 Parents of subpages, two levels up, with lots of extra trailing slashes.
18195 subpage title=[[Subpage test/L1/L2/L3]]
18199 <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>
18204 Subpage test/L1/L2/L3Sibling
18210 Transclusion of a sibling page (one level up)
18212 subpage title=[[Subpage test/L1/L2/L3]]
18221 Transclusion of a child page
18223 subpage title=[[Subpage test/L1/L2]]
18232 Non-transclusion because of too many up levels
18234 subpage title=[[Subpage test/L1/L2/L3]]
18236 {{../../../../More than parent}}
18238 <p>{{../../../../More than parent}}
18243 Definition list code coverage
18249 <dl><dt> title  </dt>
18251 <dt> title </dt>
18257 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18258 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18259 <dt>title</dt><dd> def</dd></dl>
18263 Don't fall for the self-closing div
18265 <div>hello world</div/>
18267 <div>hello world</div>
18276 <p>[[:Template:Msg]]
18285 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18289 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18291 Always escape literal '>' in output, not just after '<'
18305 <p>This is a test template
18306 This is a test template
18318 Inclusion of !userCanEdit() content
18322 <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>
18328 Out-of-order TOC heading levels
18337 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18339 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18341 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18342 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18345 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18347 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18348 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18354 <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>
18355 <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>
18356 <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>
18357 <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>
18358 <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>
18359 <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>
18365 ISBN with a dummy number
18375 ISBN with space-delimited number
18379 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18385 ISBN with multiple spaces, no number
18404 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18405 </p><p>ISBN 12345678901
18411 ISBN with trailing year (bug 8110)
18413 ISBN 1-234-56789-0 - 2006
18415 ISBN 1 234 56789 0 - 2006
18417 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18418 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18426 {{anchorencode:foo bar©#%n}}
18428 <p>foo_bar.C2.A9.23.25n
18433 anchorencode trims spaces
18435 {{anchorencode: __pretty__please__}}
18442 anchorencode deals with links
18444 {{anchorencode: [[hello|world]] [[hi]]}}
18451 anchorencode deals with templates
18453 {{anchorencode: {{Foo}} }}
18460 anchorencode encodes like the TOC generator: (bug 18431)
18462 === _ +:.3A%3A&&]] ===
18463 {{anchorencode: _ +:.3A%3A&&]] }}
18466 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18467 <p>.2B:.3A.253A.26.26.5D.5D
18472 Bug 6200: blockquotes and paragraph formatting
18493 Bug 8293: Use of center tag ruins paragraph formatting
18514 Parsing of overlapping (improperly nested) inline html tags
18516 <span><s>x</span></s>
18518 <p><span><s>x</span></s></span>
18521 <p><span><s>x</s></span>
18526 ### Language variants related tests
18529 Self-link in language variants
18531 title=[[Dunav]] language=sr
18533 Both [[Dunav]] and [[Дунав]] are names for this river.
18535 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18546 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
18548 title=[[Duna]] language=sr
18550 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
18552 <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.
18557 Link to a section of a variant of this title shouldn't be parsed as self-link
18559 title=[[Duna]] language=sr
18561 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
18563 <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.
18568 Link to pages in language variants
18572 Main Page can be written as [[Маин Паге]]
18574 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18580 Multiple links to pages in language variants
18584 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18586 <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>.
18592 Simple template in language variants
18598 <p>This is a test template
18604 Template with explicit namespace in language variants
18610 <p>This is a test template
18616 Basic test for template parameter in language variants
18620 {{парамтест|param=foo}}
18622 <p>This is a test template with parameter foo
18628 Simple category in language variants
18632 [[Category:МедиаWики Усер'с Гуиде]]
18634 <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>
18651 Don't convert blue categorylinks to another variant (bug 33210)
18655 [[A]][[Category:分类]]
18657 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18662 Stripping -{}- tags (language variants)
18666 Latin proverb: -{Ne nuntium necare}-
18668 <p>Latin proverb: Ne nuntium necare
18674 Prevent conversion with -{}- tags (language variants)
18676 language=sr variant=sr-ec
18678 Latinski: -{Ne nuntium necare}-
18680 <p>Латински: Ne nuntium necare
18686 Prevent conversion of text with -{}- tags (language variants)
18688 language=sr variant=sr-ec
18690 Latinski: -{Ne nuntium necare}-
18692 <p>Латински: Ne nuntium necare
18698 Prevent conversion of links with -{}- tags (language variants)
18700 language=sr variant=sr-ec
18704 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18710 -{}- tags within headlines (within html for parserConvert())
18712 language=sr variant=sr-ec
18716 <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>
18722 Explicit definition of language variant alternatives
18724 language=zh variant=zh-tw
18726 -{zh:China;zh-tw:Taiwan}-, not China
18728 <p>Taiwan, not China
18734 Conversion around HTML tags
18736 language=sr variant=sr-ec
18738 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
18739 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
18742 <span title="ЛаCтин">ски</span>
18748 Explicit session-wise language variant mapping (A flag and - flag)
18750 language=zh variant=zh-tw
18752 Taiwan is not China.
18753 But -{A|zh:China;zh-tw:Taiwan}- is China,
18754 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
18755 and -{China}- is China.
18757 <p>Taiwan is not China.
18758 But Taiwan is Taiwan,
18759 (This should be stripped!)
18760 and China is China.
18765 Explicit session-wise language variant mapping (H flag for hide)
18767 language=zh variant=zh-tw
18769 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
18772 <p>(This should be stripped!)
18778 Adding explicit conversion rule for title (T flag)
18780 language=zh variant=zh-tw showtitle
18782 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18785 <p>Should be stripped!
18790 Testing that changing the language variant here in the tests actually works
18792 language=zh variant=zh showtitle
18794 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18797 <p>Should be stripped!
18802 Recursive conversion of alt and title attrs shouldn't clear converter state
18804 language=zh variant=zh-cn showtitle
18806 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
18807 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
18811 Should be stripped<span title="Exclamation">!</span>
18816 Bug 24072: more test on conversion rule for title
18818 language=zh variant=zh-tw showtitle
18820 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18821 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
18824 <p>This should be stripped!
18825 This won't take interferes with the title rule.
18830 Partly disable title conversion if variant == main language code
18832 language=zh variant=zh title=[[ZH]] showtitle
18834 -{T|zh-cn:CN;zh-tw:TW}-
18842 Partly disable title conversion if variant == main language code, more
18844 language=zh variant=zh title=[[ZH]] showtitle
18854 Raw output of variant escape tags (R flag)
18856 language=zh variant=zh-tw
18858 Raw: -{R|zh:China;zh-tw:Taiwan}-
18860 <p>Raw: zh:China;zh-tw:Taiwan
18865 Strings evaluating false shouldn't be ignored by Language converter (T51072)
18867 language=zh variant=zh-cn
18869 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
18876 Conversion rules from [numeric-only string] to [something else] (T48634)
18878 language=zh variant=zh-cn
18880 -{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
18887 Bidirectional converter rule entries with an empty value should be ignored (T53551)
18889 language=zh variant=zh-cn
18891 -{H|zh-cn:foo;zh-tw:;}-foobar
18898 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
18900 language=zh variant=zh-cn
18902 -{H|=>zh-cn:foo;}-foobar
18909 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
18911 language=zh variant=zh-cn
18920 Nested using of manual convert syntax
18922 language=zh variant=zh-hk
18924 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
18926 <p>Nested: Hello Hong Kong!
18931 Proper conversion of text in external links
18933 language=sr variant=sr-ec
18935 http://www.google.com
18936 gopher://www.google.com
18937 [http://www.google.com http://www.google.com]
18938 [gopher://www.google.com gopher://www.google.com]
18939 [https://www.google.com irc://www.google.com]
18940 [ftp://www.google.com www.google.com/ftp://dir]
18941 [//www.google.com www.google.com]
18943 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18944 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18945 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18946 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18947 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
18948 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
18949 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
18954 Do not convert roman numbers to language variants
18956 language=sr variant=sr-ec
18960 <p>Фридрих IV је цар.
18965 Unclosed language converter markup "-{"
18976 Don't convert raw rule "-{R|=>}-" to "=>"
18987 Don't break link parsing if language converter markup is in the caption.
18989 language=sr variant=sr-ec
18991 [[Main Page|-{R|main page}-]]
18993 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
18997 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18999 Don't break image parsing if language converter markup is in the caption.
19003 [[File:Foobar.jpg|-{R|caption}-]]
19005 <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>
19009 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19011 Don't break list handling if language converter markup is in the item.
19013 language=zh variant=zh-cn
19015 ;-{zh-cn:AAA;zh-tw:BBB}-
19017 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19024 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19026 Don't break table handling if language converter markup is in the cell.
19028 language=sr variant=sr-ec
19051 Bug 529: Uncovered bullet
19060 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19061 # Templates in Wikipedia rely on this behavior, as tidy has always been
19062 # enabled there. These tests are normally run *without* tidy, so specify the
19063 # full output here.
19064 # To test realistic parsing behavior, apply a tidy-like transformation to both
19065 # the expected output and your parser's output.
19067 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19069 ******* Foo {{bullet}}
19071 <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>
19077 Bug 529: Uncovered table already at line-start
19100 Bug 529: Uncovered bullet in parser function result
19102 * Foo {{lc:{{bullet}} }}
19110 Bug 5678: Double-parsed template argument
19112 {{lc:{{{1}}}|hello}}
19119 Bug 5678: Double-parsed template invocation
19121 {{lc:{{paramtest {{!}} param = hello }} }}
19123 <p>{{paramtest | param = hello }}
19128 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19131 title=[[Main Page]]
19133 {{PRVNÍVELKÉ:ěščř}}
19134 {{prvnívelké:ěščř}}
19154 Morwen/13: Unclosed link followed by heading
19161 <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>
19166 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19173 <h1><span class="mw-headline" id="heading">heading</span></h1>
19178 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19185 <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>
19200 Paragraphs inside divs (no extra line breaks)
19212 Paragraphs inside divs (extra line break on open)
19227 Paragraphs inside divs (extra line break on close)
19242 Paragraphs inside divs (extra line break on open and close)
19259 Nesting tags, paragraphs on lines which begin with <div>
19261 <div></div><strong>A
19264 <p><strong>A</strong></p>
19265 <p><strong>B</strong></p>
19273 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19275 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19277 <blockquote>Line one
19279 Line two</blockquote>
19281 <blockquote>Line one
19282 Line two</blockquote>
19286 <p>Line one Line two</p>
19291 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19296 Line two</blockquote>
19301 Line two</blockquote>
19306 Line two</blockquote>
19310 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19312 <blockquote>Line one
19317 <blockquote>Line one
19330 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19352 Paragraphs inside blockquotes/divs (no extra line breaks)
19354 <blockquote><div>Line one
19356 Line two</div></blockquote>
19358 <blockquote><div>Line one
19359 Line two</div></blockquote>
19364 Paragraphs inside blockquotes/divs (extra line break on open)
19369 Line two</div></blockquote>
19374 Line two</div></blockquote>
19379 Paragraphs inside blockquotes/divs (extra line break on close)
19381 <blockquote><div>Line one
19384 </div></blockquote>
19386 <blockquote><div>Line one
19389 </div></blockquote>
19394 Paragraphs inside blockquotes/divs (extra line break on open and close)
19400 </div></blockquote>
19406 </div></blockquote>
19411 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19413 wgLinkHolderBatchSize=0
19419 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19420 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19421 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19426 Free external link invading image caption
19428 [[Image:Foobar.jpg|thumb|http://x|hello]]
19430 <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>
19435 Bug 15196: localised external link numbers
19439 [http://en.wikipedia.org/]
19441 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19444 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19448 Multibyte character in padleft
19450 {{padleft:-Hello|7|Æ}}
19457 Multibyte character in padright
19459 {{padright:Hello-|7|Æ}}
19466 formatdate parser function
19468 {{#formatdate:2009-03-24}}
19470 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19475 formatdate parser function, with default format
19477 {{#formatdate:2009-03-24|mdy}}
19479 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19484 Spacing of numbers in formatted dates
19486 {{#formatdate:January 15}}
19488 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19493 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
19495 language=nl title=[[MediaWiki:Common.css]]
19497 {{#formatdate:2009-03-24|dmy}}
19499 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19512 Edit comment with link
19516 I like the [[Main Page]] a lot
19518 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19522 Edit comment with link and link text
19526 I like the [[Main Page|best pages]] a lot
19528 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19532 Edit comment with link and link text with suffix
19536 I like the [[Main Page|best page]]s a lot
19538 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19542 Edit comment with section link (non-local, eg in history list)
19544 comment title=[[Main Page]]
19546 /* External links */ removed bogus entries
19548 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19552 Edit comment with section link and text before it (non-local, eg in history list)
19554 comment title=[[Main Page]]
19556 pre-comment text /* External links */ removed bogus entries
19558 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>
19562 Edit comment with section link (local, eg in diff view)
19564 comment local title=[[Main Page]]
19566 /* External links */ removed bogus entries
19568 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19572 Edit comment with subpage link (bug 14080)
19576 title=[[Subpage test]]
19578 Poked at a [[/subpage]] here...
19580 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
19584 Edit comment with subpage link and link text (bug 14080)
19588 title=[[Subpage test]]
19590 Poked at a [[/subpage|neat little page]] here...
19592 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
19596 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
19599 title=[[Subpage test]]
19601 Poked at a [[/subpage]] here...
19603 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
19607 Edit comment with bare anchor link (local, as on diff)
19611 title=[[Main Page]]
19615 <a href="#section">#section</a>
19619 Edit comment with bare anchor link (non-local, as on history)
19622 title=[[Main Page]]
19626 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19630 Anchor starting with underscore
19634 <p><a href="#_ref">One</a>
19639 Id starting with underscore
19641 <div id="_ref"></div>
19643 <div id="_ref"></div>
19648 Space normalisation on autocomment (bug 22784)
19651 title=[[Main Page]]
19653 /* __hello__world__ */
19655 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19659 percent-encoding and + signs in comments (Bug 26410)
19663 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19665 <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>
19668 # Parsoid doesn't support this yet: see bug 73581
19669 # but it *should* omit the 'src' attribute if the image is bad.
19670 # PHP side of tests was disabled in
19671 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19672 # because of issues in the PHP parserTests infrastructure
19673 # (but the output below is indeed what the PHP side emits)
19675 Bad images - basic functionality
19678 !! DISABLED/html/php
19680 <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>
19684 Bad images - bug 16039: text after bad image disappears
19689 !! DISABLED/html/php
19695 <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>
19700 Verify that displaytitle works (bug #22501) no displaytitle
19704 wgAllowDisplayTitle=true
19705 wgRestrictDisplayTitle=false
19707 this is not the the title
19710 <p>this is not the the title
19715 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
19720 wgAllowDisplayTitle=true
19721 wgRestrictDisplayTitle=false
19723 this is not the the title
19724 {{DISPLAYTITLE:whatever}}
19727 <p>this is not the the title
19732 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
19737 wgAllowDisplayTitle=true
19738 wgRestrictDisplayTitle=true
19740 this is not the the title
19741 {{DISPLAYTITLE:whatever}}
19744 <p>this is not the the title
19749 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
19754 wgAllowDisplayTitle=true
19755 wgRestrictDisplayTitle=true
19757 this is not the the title
19758 {{DISPLAYTITLE:screen}}
19761 <p>this is not the the title
19766 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
19771 wgAllowDisplayTitle=false
19773 this is not the the title
19774 {{DISPLAYTITLE:screen}}
19777 <p>this is not the the title
19778 <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>
19783 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
19788 wgAllowDisplayTitle=false
19790 this is not the the title
19793 <p>this is not the the title
19798 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
19803 wgAllowDisplayTitle=true
19804 wgRestrictDisplayTitle=true
19806 this is not the the title
19807 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
19809 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
19810 <p>this is not the the title
19815 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
19820 wgAllowDisplayTitle=true
19821 wgRestrictDisplayTitle=true
19823 this is not the the title
19824 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
19826 <span style="color: red;">s</span>creen
19827 <p>this is not the the title
19832 Page status indicators: Empty name is invalid
19836 <indicator name=" "></indicator>
19837 <indicator></indicator>
19839 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19840 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19845 Page status indicators: Weird syntaxes that are okay
19849 <indicator name="empty" />
19850 <indicator name="name"></indicator>
19859 Page status indicators: Torture test
19863 <indicator name="01">hello world</indicator>
19864 <indicator name="02">[[Main Page]]</indicator>
19865 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
19866 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
19867 <indicator name="05">* foo
19869 <indicator name="06"><nowiki>foo</nowiki></indicator>
19870 <indicator name="07"> Preformatted</indicator>
19871 <indicator name="08"><div>Broken tag</indicator>
19872 <indicator name="09">{| class=wikitable
19875 <indicator name="10">Two
19877 paragraphs</indicator>
19880 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19881 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" />
19882 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>
19883 05=<ul><li> foo</li>
19887 07=<pre>Preformatted
19889 08=<div>Broken tag</div>
19891 09=<table class="wikitable">
19908 preload: check <noinclude> and <includeonly>
19912 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
19918 preload: check <onlyinclude>
19922 Goodbye <onlyinclude>Hello world</onlyinclude>
19928 preload: can pass tags through if we want to
19932 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
19934 <includeonly>Hello world</includeonly>
19938 preload: check that it doesn't try to do tricks
19942 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19944 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19948 Play a bit with r67090 and bug 3158
19950 <div style="width:50% !important"> </div>
19951 <div style="width:50% !important"> </div>
19952 <div style="width:50% !important"> </div>
19953 <div style="border : solid;"> </div>
19955 <div style="width:50% !important"> </div>
19956 <div style="width:50% !important"> </div>
19957 <div style="width:50% !important"> </div>
19958 <div style="border : solid;"> </div>
19961 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19962 <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>
19963 <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>
19964 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19969 HTML5 data attributes
19971 <span data-foo="bar">Baz</span>
19972 <p data-abc-def_hij="">Quuz</p>
19974 <p><span data-foo="bar">Baz</span>
19976 <p data-abc-def_hij="">Quuz</p>
19981 percent-encoding and + signs in internal links (Bug 26410)
19983 [[User:+%]] [[Page+title%]]
19984 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
19985 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
19986 [[%33%45]] [[%33%45+]]
19988 <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>
19989 <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>
19990 <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>
19991 <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>
19994 <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>
19995 <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>
19996 <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":"[[bar]]"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
19997 <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>
20001 Special characters in embedded file links (bug 27679)
20003 [[File:Contains & ampersand.jpg]]
20004 [[File:Does not exist.jpg|Title with & ampersand]]
20006 <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>
20007 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20010 <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>
20011 <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 & 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>
20015 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20017 Text's been normalized?
20019 <p>Text's been normalized?
20024 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20026 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20028 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20033 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20035 [http://www.example.org/ ideograms]
20037 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20042 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20044 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20046 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20070 Bug 31098 Template which includes system messages which includes the template
20074 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20075 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20080 Bug31490 Turkish: ucfirst 'blah'
20091 Bug31490 Turkish: ucfirst 'ix'
20102 Bug31490 Turkish: lcfirst 'BLAH'
20113 Bug31490 Turkish: ucfırst (with a dotless i)
20119 <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>
20124 Bug31490 ucfırst (with a dotless i) with English language
20130 <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>
20135 Bug 26375: TOC with italics
20137 title=[[Main Page]]
20140 == ''Lost'' episodes ==
20142 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20144 <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>
20148 <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>
20153 Bug 26375: TOC with bold
20155 title=[[Main Page]]
20158 == '''should be bold''' then normal text ==
20160 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20162 <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>
20166 <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>
20171 Bug 33845: Headings become cursive in TOC when they contain an image
20173 title=[[Main Page]]
20176 == Image [[Image:foobar.jpg]] ==
20178 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20180 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20184 <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>
20189 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20191 title=[[Main Page]]
20194 == <blockquote>Quote</blockquote> ==
20196 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20198 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20202 <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>
20206 <div id="toc" class="toc">
20207 <div id="toctitle">
20211 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20215 <h2><span class="mw-headline" id="Quote"></span></h2>
20217 <p><span class="mw-headline" id="Quote">Quote</span></p>
20219 <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>
20223 Unclosed tags in TOC
20225 title=[[Main Page]]
20229 <small>Hanc marginis exiguitas non caperet.</small>
20232 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20234 <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>
20238 <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>
20239 <p><small>Hanc marginis exiguitas non caperet.</small>
20245 Multiple tags in TOC
20248 == <i>Foo</i> <b>Bar</b> ==
20250 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20252 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20254 <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>
20255 <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>
20259 <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>
20260 <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>
20264 <div id="toc" class="toc">
20265 <div id="toctitle">
20269 <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>
20270 <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>
20274 <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>
20275 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20277 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20279 <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>
20283 Tags with parameters in TOC
20286 == <sup class="in-h2">Hello</sup> ==
20288 == <sup class="a > b">Evilbye</sup> ==
20290 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20292 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20293 <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>
20297 <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>
20298 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
20303 span tags with directionality in TOC
20306 == <span dir="ltr">C++</span> ==
20308 == <span dir="rtl">זבנג!</span> ==
20310 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20312 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20314 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20316 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20318 <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>
20319 <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>
20320 <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>
20321 <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>
20322 <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>
20326 <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>
20327 <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>
20328 <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>
20329 <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>
20330 <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>
20335 Bug 72884: bdi element in ToC
20338 == <bdi>test</bdi> ==
20340 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20342 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20346 <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>
20350 # Note that the html output does not have the <p></p>, but the
20351 # html+tidy output *does*. This is because the empty <p></p> is
20352 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20354 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20359 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20361 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20365 <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>
20369 <div id="toc" class="toc">
20370 <div id="toctitle">
20374 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20378 <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>
20384 == {{int:headline_sample}} ==
20388 Bug 32057: Title needed when expanding <h> nodes.
20390 title=[[Main Page]]
20394 <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>
20399 Strip marker in urlencode
20401 {{urlencode:x<nowiki/>y}}
20402 {{urlencode:x<nowiki/>y|wiki}}
20403 {{urlencode:x<nowiki/>y|path}}
20404 {{urlencode:x<pre id="one">two</pre>y}}
20432 Strip marker in formatNum
20434 {{formatnum:1<nowiki/>2}}
20435 {{formatnum:1<nowiki/>2|R}}
20443 Check noCommafy in formatNum
20447 {{formatnum:123456.78}}
20448 {{formatnum:123456.78|NOSEP}}
20456 Wrong option for formatNum (bug 56199)
20458 {{formatnum:1,234.56|Random}}
20459 {{formatnum:1,234.56|EVERYTHING}}
20460 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20469 Strip marker in grammar
20473 {{grammar:elative|foo<nowiki/>bar}}
20480 Strip marker in padleft
20482 {{padleft:|2|x<nowiki/>y}}
20489 Strip marker in padright
20491 {{padright:|2|x<nowiki/>y}}
20498 Strip marker in anchorencode
20500 {{anchorencode:x<nowiki/>y}}
20507 nowiki inside link inside heading (bug 18295)
20509 ==[[foo|x<nowiki>y</nowiki>z]]==
20511 <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>
20516 new support for bdi element (bug 31817)
20518 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20520 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20525 Ignore pipe between table row attributes
20529 |- id=foo | style='color: red'
20537 <tr id="foo" style="color: red">
20544 Gallery override link with WikiLink (bug 34852)
20547 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
20550 <ul class="gallery mw-gallery-traditional">
20551 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20552 <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>
20553 <div class="gallerytext">
20563 Gallery override link with absolute external link (bug 34852)
20566 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20569 <ul class="gallery mw-gallery-traditional">
20570 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20571 <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>
20572 <div class="gallerytext">
20582 Gallery override link with malicious javascript (bug 34852)
20585 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20588 <ul class="gallery mw-gallery-traditional">
20589 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20590 <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>
20591 <div class="gallerytext">
20601 Gallery with invalid title as link (bug 43964)
20604 File:foobar.jpg|link=<
20607 <ul class="gallery mw-gallery-traditional">
20608 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20609 <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>
20610 <div class="gallerytext">
20618 Language parser function
20627 Padleft and padright as substr
20629 {{padleft:|3|abcde}}
20630 {{padright:|3|abcde}}
20638 Special parser function
20640 {{#special:RandomPage}}
20641 {{#special:BaDtItLe}}
20642 {{#special:Foobar}}
20651 Bug 34939 - Case insensitive link parsing ([HttP://])
20653 [HttP://MediaWiki.Org/]
20655 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20658 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20662 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20664 [HttP://MediaWiki.Org/ MediaWiki]
20666 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20671 Bug 34939 - Case insensitive link parsing (HttP://)
20673 HttP://MediaWiki.Org/
20675 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20678 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
20696 <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>
20697 <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>
20698 <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>
20699 <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>
20700 <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>
20706 ### Parsoid-specific tests
20707 ### Parsoid-PHP parser incompatibilities
20710 1. SOL-sensitive wikitext tokens as template-args
20712 parsoid=wt2html,wt2wt
20718 <span about="#mwt1" typeof="mw:Transclusion">
20719 </span><ul about="#mwt1"><li>a</li>
20721 <span about="#mwt2" typeof="mw:Transclusion">
20722 </span><ol about="#mwt2"><li>a</li>
20724 <span about="#mwt3" typeof="mw:Transclusion">
20725 </span><dl about="#mwt3"><dd>a</dd>
20729 #### -----------------------------------------------------------------
20730 #### Parsoid-specific functionality tests
20731 #### -----------------------------------------------------------------
20733 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
20734 # We know wt2wt will fail, but we expect selser to pass.
20735 # Due to the nature of our testing, wt2wt and selser tests will enter the
20736 # blacklist and we'll catch selser regressions based on changes to the
20737 # blacklist entries for selser tests.
20739 1. Bad treebuilder fixup of formatting elt is cleaned up
20741 parsoid=wt2html,wt2wt
20746 [[Image:Foobar.jpg|right|Test]]
20753 <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>
20760 2. Bad treebuilder fixup of formatting elt is cleaned up
20762 parsoid=wt2html,wt2wt
20764 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
20766 <small>[[Image:Foobar.jpg|right|300px]]</small>
20770 <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>
20772 <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>
20775 #### ----------------------------------------------------------------
20776 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
20777 #### tags. Parsoid's output for these tags differs from that of the
20779 #### ----------------------------------------------------------------
20782 Ref: 1. ref-location should be replaced with an index span
20787 B <ref name="x">foo</ref>
20791 <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>
20792 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>
20793 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>
20794 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20795 <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>
20796 <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>
20797 <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>
20802 Ref: 2. ref-tags with identical names should all get the same index
20806 A <ref name="x">foo</ref>
20810 <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>
20811 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>
20812 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20813 <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>
20818 Ref: 3. spaces in ref-names should be ignored
20822 A <ref name="x">foo</ref>
20823 B <ref name=" x " />
20827 <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>
20828 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>
20829 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>
20830 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20831 <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>
20835 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
20837 Ref: 4. 'constructor' should be accepted as a valid ref-name
20841 A <ref name="constructor">foo</ref>
20844 <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>
20845 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20846 <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>
20851 Ref: 5. body should accept generic wikitext
20856 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
20861 <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>
20863 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20864 <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>
20870 Ref: 6. indent-pres should not be output in ref-body
20882 <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>
20884 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20885 <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
20893 Ref: 7. No p-wrapping in ref-body
20912 <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>
20914 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20915 <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
20930 Ref: 8. transclusion wikitext has lower precedence
20934 A <ref> foo {{echo|</ref> B C}}
20938 <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>
20939 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20940 <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>
20945 Ref: 9. unclosed comments should not leak out of ref-body
20949 A <ref> foo <!--</ref> B C
20952 <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>
20953 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20954 <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>
20959 Ref: 10. Unclosed HTML tags should not leak out of ref-body
20963 A <ref> <b> foo </ref> B C
20967 <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>
20970 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20971 <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>
20976 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
20984 <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
20985 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>
20986 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20987 <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>
20988 <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>
20993 Ref: 12. ref-tags act as trailing newline migration barrier
20995 <!--the newline at the end of this line moves out of the p tag-->a
20997 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21003 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21006 <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>
21007 <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>
21010 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21011 <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>
21012 <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>
21016 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21025 <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
21026 <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>
21027 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21028 <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>
21029 <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
21035 Ref: 14. A nested ref-tag should be emitted as plain text
21039 <ref>foo <ref>bar</ref> baz</ref>
21043 <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>
21045 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21046 <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>
21051 Ref: 15. ref-tags with identical names should get identical indexes
21055 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21056 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21060 <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>
21061 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>
21063 <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>
21067 ## We don't bother wt2wt-ing non-standard whitespace
21069 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21077 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
21078 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21079 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
21083 Ref: 17. Generate valid HTML5 id/about attributes
21087 <ref name="a b">foo</ref>
21091 <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>
21094 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21095 <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>
21100 Ref: 18. T58916: Extension attributes should be parsed as plain text
21104 <ref name="{{echo|a}}">foo</ref>
21108 <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>
21111 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21112 <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>
21117 Ref: 19. ref-tags with identical name encodings should get identical indexes
21121 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21125 <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>
21127 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21128 <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>
21133 Ref: 20. ref-tags with identical names but different content should keep it
21137 A <ref name="foo">Foo one</ref>
21138 B <ref name="foo">Foo two</ref>
21139 C <ref name="foo" />
21143 <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>
21144 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>
21145 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>
21147 <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>
21152 References: 1. references tag without any refs should be handled properly
21156 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21160 References: 2. references tag with group only outputs references from that group
21162 A <ref group="a">foo</ref>
21163 B <ref group="b">bar</ref>
21166 <references group="a" />
21168 <references group="b" />
21170 <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>
21171 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>
21172 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>
21174 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21175 <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>
21177 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21178 <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>
21180 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21181 <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>
21186 References: 3. ref list should be cleared after processing references
21196 <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>
21198 <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>
21201 <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>
21203 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21204 <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>
21209 References: 4. only referenced group should be cleared after processing references
21211 A <ref group="a">afoo</ref>
21214 <references group="a" />
21220 <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>
21221 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>
21223 <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>
21226 <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>
21228 <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>
21233 References: 5. ref tags in references should be processed while ignoring all other content
21236 B <ref name="b">bar</ref>
21239 <ref name="a">foo</ref>
21240 This should just get lost.
21243 <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>
21244 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>
21247 <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>
21252 References: 6. <references /> from a transclusion
21254 <ref>Foo</ref> {{echo|<references />}}
21256 <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>
21261 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21263 A <ref>foo bar for a</ref>
21264 B <ref group="X" name="b" />
21268 <references group="X">
21269 <ref name="b">foo</ref>
21272 <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>
21273 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>
21276 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21277 <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>
21280 <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"}}'>
21281 <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>
21286 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21288 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21291 <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>
21292 <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>
21296 # This test only works in wt2html now as the <references /> are always generated
21297 # unless selser is active. Once T72722 is fixed, we should add a changes test
21298 # here to ensure that unrelated changes don't add the new <references /> in
21301 References: 9. Generate missing references list at the end
21304 B <ref group="inexistent">bar</ref>
21306 <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>
21307 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21308 <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>
21310 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21311 <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>
21316 References: 10. New <references/> shouldn't be added for unrelated edits.
21319 "modes": ["selser"],
21320 "changes": [["#x", "remove"]],
21324 Unrelated text<span id="x"> that's going to disappear</span>.
21332 Entities in ref name
21334 <ref name="test & me">hi</ref>
21337 <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>
21338 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21339 <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>
21343 # This test is wt2html only because we're permitting the serializer to produce
21344 # dirty diffs, normalizing the unclosed references to the self-closed version.
21346 Generate references for unclosed references tag
21354 <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>
21355 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21356 <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>
21360 New reference serializes on its own line
21362 parsoid=wt2wt,html2wt
21367 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21370 #### ----------------------------------------------------------------
21371 #### Parsoid-only testing of Parsoid's impl of LST
21372 #### Not implemented yet, see
21373 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21374 #### ----------------------------------------------------------------
21377 LST Sections: 1. Simple section start and end
21379 <section begin="2011-05-16" />
21380 <section end="2014-04-10 (MW 1.23wmf22)" />
21382 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21383 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21386 #--------- Test stripping of empty nodes in template content ----------
21388 Empty LI and TR nodes should be stripped from template content
21393 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21397 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21410 Empty LI and TR nodes should not be stripped from top-level content
21437 Empty TR nodes should not be stripped if they have any attributes set
21439 {{EmptyTRWithHTMLAttrTest}}
21441 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21442 <tr align="center"></tr>
21443 <tr><td>foo</td></tr>
21444 <tr align="center"></tr>
21445 <tr><td>bar</td></tr>
21449 #### ----------------------------------------------------------------
21450 #### The following section of tests are primarily to test
21451 #### wikitext escaping capabilities of Parsoid. Given that
21452 #### escaping can be done any number of ways, the wikitext (input)
21453 #### is always adjusted to reflect how Parsoid adds nowiki
21456 #### We are marking several tests as parsoid-only since the
21457 #### HTML in the result section is different from what the
21458 #### PHP parser generates for it.
21459 #### ----------------------------------------------------------------
21462 #### --------------- Headings ---------------
21464 #### 1. Nested inside html <h1>=foo=</h1>
21465 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21466 #### 3. Nested inside html with wikitext split by html tags
21467 #### 4. No escape needed
21468 #### 5. Empty headings <h1></h1>
21469 #### 6. Heading chars in SOL context
21470 #### ----------------------------------------
21472 Headings: 0. Unnested
21476 <nowiki>=foo=</nowiki>
21478 <nowiki> =foo= </nowiki>
21480 <nowiki>=foo=</nowiki>
21482 =foo''a''<nowiki>=</nowiki>
21484 <p><span typeof="mw:Nowiki">=foo=</span></p>
21486 <p><span typeof="mw:Nowiki"> =foo= </span>
21488 <span typeof="mw:Nowiki">=foo=</span></p>
21490 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
21493 # New headings and existing headings are handled differently
21495 Headings: 1. Nested inside html
21503 <h1 data-parsoid=''>=foo=</h1>
21504 <h2 data-parsoid=''>=foo=</h2>
21505 <h3 data-parsoid=''>=foo=</h3>
21506 <h4 data-parsoid=''>=foo=</h4>
21507 <h5 data-parsoid=''>=foo=</h5>
21508 <h6 data-parsoid=''>=foo=</h6>
21516 =<nowiki>=foo=</nowiki>=
21517 ==<nowiki>=foo=</nowiki>==
21518 ===<nowiki>=foo=</nowiki>===
21519 ====<nowiki>=foo=</nowiki>====
21520 =====<nowiki>=foo=</nowiki>=====
21521 ======<nowiki>=foo=</nowiki>======
21526 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
21535 <nowiki>*</nowiki>bar
21541 <nowiki>=bar=</nowiki>
21545 Headings: 3. Nested inside html with wikitext split by html tags
21547 parsoid=html2wt,wt2wt
21549 = ='''bold'''<nowiki>foo=</nowiki> =
21551 <h1>=<b>bold</b>foo=</h1>
21555 Headings: 4a. No escaping needed (testing just h1 and h2)
21580 <h1><i>=</i>foo=</h1>
21584 Headings: 4b. No escaping needed (inside p-tags)
21599 Headings: 5. Empty headings
21609 =====<nowiki/>=====
21611 ======<nowiki/>======
21613 <h1 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h1>
21615 <h2 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h2>
21617 <h3 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h3>
21619 <h4 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h4>
21621 <h5 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h5>
21623 <h6 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h6>
21627 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21631 <nowiki>=a=</nowiki>
21633 <nowiki>=a=</nowiki>
21635 <nowiki>=a=</nowiki>
21637 <nowiki>=a=</nowiki>
21646 Headings: 6b. Heading chars in SOL context (with trailing newlines)
21674 Headings: 6c. Heading chars in SOL context (leading newline break)
21679 <nowiki>=b=</nowiki>
21686 Headings: 6d. Heading chars in SOL context (with interspersed comments)
21690 <!--c0--><nowiki>=a=</nowiki>
21692 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
21694 <p><!--c0-->=a=</p>
21695 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
21699 Headings: 6d. Heading chars in SOL context (No escaping needed)
21709 Headings: 7. Insert a newline between new content and headings
21715 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
21716 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
21726 #### --------------- Lists ---------------
21727 #### 0. Outside nests (*foo, etc.)
21728 #### 1. Nested inside html <ul><li>*foo</li></ul>
21729 #### 2. Inside definition lists
21730 #### 3. Only bullets at start should be escaped
21731 #### 4. No escapes needed
21732 #### 5. No unnecessary escapes
21733 #### 6. Escape bullets in SOL position
21734 #### 7. Escape bullets in a multi-line context
21735 #### ----------------------------------------
21738 Lists: 0. Outside nests
21740 <nowiki>*</nowiki>foo
21742 <nowiki>#</nowiki>foo
21744 <nowiki>;Foo:</nowiki>bar
21753 Lists: 1. Nested inside html
21755 *<nowiki>*foo</nowiki>
21757 *<nowiki>#foo</nowiki>
21759 *<nowiki>:foo</nowiki>
21761 *<nowiki>;foo</nowiki>
21763 #<nowiki>*foo</nowiki>
21765 #<nowiki>#foo</nowiki>
21767 #<nowiki>:foo</nowiki>
21769 #<nowiki>;foo</nowiki>
21771 <ul><li>*foo</li></ul>
21772 <ul><li>#foo</li></ul>
21773 <ul><li>:foo</li></ul>
21774 <ul><li>;foo</li></ul>
21775 <ol><li>*foo</li></ol>
21776 <ol><li>#foo</li></ol>
21777 <ol><li>:foo</li></ol>
21778 <ol><li>;foo</li></ol>
21783 Lists: 2. Inside definition lists
21785 ;<nowiki>;foo</nowiki>
21787 ;<nowiki>:foo</nowiki>
21789 ;<nowiki>:foo</nowiki>
21792 :<nowiki>:foo</nowiki>
21794 <dl><dt>;foo</dt></dl>
21795 <dl><dt>:foo</dt></dl>
21798 <dl><dd>:foo</dd></dl>
21803 Lists: 3. Only bullets at start of text should be escaped
21805 *<nowiki>*foo*bar</nowiki>
21807 *<nowiki>*foo</nowiki>''it''*bar
21809 <ul><li>*foo*bar</li></ul>
21810 <ul><li>*foo<i>it</i>*bar</li></ul>
21815 Lists: 4. No escapes needed
21836 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
21840 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
21846 Lists: 5. No unnecessary escapes
21848 * bar <span><nowiki>[[foo]]</nowiki></span>
21850 * =bar <span><nowiki>[[foo]]</nowiki></span>
21852 * [[bar <span><nowiki>[[foo]]</nowiki></span>
21854 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
21856 * =bar <span>foo]]</span>=
21862 <ul><li> bar <span>[[foo]]</span></li></ul>
21863 <ul><li> =bar <span>[[foo]]</span></li></ul>
21864 <ul><li> [[bar <span>[[foo]]</span></li></ul>
21865 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
21866 <ul><li> =bar <span>foo]]</span>=</li></ul>
21867 <ul><li> <s></s>: a</li></ul>
21868 <ul><li> <i>* foo</i></li></ul>
21873 Lists: 6. Escape bullets in SOL position
21877 <p><!--cmt-->*foo</p>
21879 <!--cmt--><nowiki>*</nowiki>foo
21883 Lists: 7. Escape bullets in a multi-line context
21886 <nowiki>*</nowiki>b
21894 Lists: 8. Escape colons only if not present in tags
21898 <dl><dt>a:b<i>c:d</i></dt></dl>
21900 ; <nowiki>a:b</nowiki>''c:d''
21903 #### --------------- HRs ---------------
21904 #### 1. Single line
21905 #### -----------------------------------
21908 HRs: 1. Single line
21910 ----<nowiki>----</nowiki>
21922 #### --------------- Tables ---------------
21923 #### 1a. Simple example
21924 #### 1b. No escaping needed (!foo)
21925 #### 1c. No escaping needed (|foo)
21926 #### 1d. No escaping needed (|}foo)
21928 #### 2a. Nested in td (<td>foo|bar</td>)
21929 #### 2b. Nested in td (<td>foo||bar</td>)
21930 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
21932 #### 3a. Nested in th (<th>foo!bar</th>)
21933 #### 3b. Nested in th (<th>foo!!bar</th>)
21934 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
21938 #### 4c. No escaping needed
21939 #### --------------------------------------
21942 Tables: 1a. Simple example
21953 Tables: 1b. No escaping needed
21962 Tables: 1c. No escaping needed
21971 Tables: 1d. No escaping needed
21980 Tables: 2a. Nested in td
21985 <td>foo|bar</td></tr>
21986 <tr><td>x<div>a|b</div></td>
21990 |<nowiki>foo|bar</nowiki>
21992 |x<div><nowiki>a|b</nowiki></div>
22008 Tables: 2b. Nested in td
22014 <td>a<i>b||c</i></td>
22015 <td>a<i><div>b||c</div></i></td>
22016 </tr></tbody></table>
22019 |<nowiki>foo||bar</nowiki>
22020 |a''<nowiki>b||c</nowiki>''
22021 |a''<div><nowiki>b||c</nowiki></div>''
22030 <td>a<i><div>b||c</div></i>
22036 Tables: 2c. Nested in td -- no escaping needed
22052 Tables: 3a. Nested in th
22068 Tables: 3b. Nested in th
22073 <tr><th>foo!!bar</th>
22074 <th><i>foo|bar</i></th>
22075 <th><i>foo!!bar</i></th>
22076 <th><i><span>foo!!bar</span></i></th>
22077 </tr></tbody></table>
22080 !<nowiki>foo!!bar</nowiki>
22081 !''<nowiki>foo|bar</nowiki>''
22082 !''<nowiki>foo!!bar</nowiki>''
22083 !''<span><nowiki>foo!!bar</nowiki></span>''
22092 <th><i>foo!!bar</i>
22094 <th><i><span>foo!!bar</span></i>
22100 Tables: 3c. Nested in th
22105 <tr><th>foo||bar</th>
22106 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22107 </tr></tbody></table>
22110 !<nowiki>foo||bar</nowiki>
22111 !<nowiki>foo||bar</nowiki>
22124 Tables: 4a. Escape -
22143 |<nowiki>-bar</nowiki>
22148 Tables: 4b. Escape +
22167 |<nowiki>+bar</nowiki>
22172 Tables: 4c. No escaping needed
22215 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22216 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22222 <div>a|b</div></td>
22227 Tables: 4d. No escaping needed
22237 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22246 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22247 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22248 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22253 Tables: Digest broken attributes on table and tr tag
22270 T97430: Don't emit empty nowiki pairs around marker meta tags
22274 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22275 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22277 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22278 <nowiki>|</nowiki>** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22282 Unclosed xmlish element in table line shouldn't eat end delimiters
22298 <tbody><tr><td> <foo</td>
22299 <td> bar></td></tr>
22303 #### --------------- Links ----------------
22304 #### 1. Quote marks in link text
22305 #### 2. Wikilinks: Escapes needed
22306 #### 3. Wikilinks: No escapes needed
22307 #### 4. Extlinks: Escapes needed
22308 #### 5. Extlinks: No escapes needed
22309 #### --------------------------------------
22311 Links 1. WikiLinks: No escapes needed
22315 [[Foo|x [Foobar] x]]
22317 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22318 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22319 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22322 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22323 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22324 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22328 Links 2. WikiLinks: Escapes needed
22332 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22333 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22334 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22335 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22336 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22337 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22338 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22339 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22340 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22341 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22343 [[Foo|<nowiki>Foobar]</nowiki>]]
22344 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22345 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22346 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22347 [[Foo|<nowiki>|Bar</nowiki>]]
22348 [[Foo|<nowiki>]]bar</nowiki>]]
22349 [[Foo|<nowiki>[[bar</nowiki>]]
22350 [[Foo|<nowiki>x [[ y</nowiki>]]
22351 [[Foo|<nowiki>x ]] y</nowiki>]]
22352 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22354 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22355 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22356 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22357 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22358 <a href="/wiki/Foo" title="Foo">|Bar</a>
22359 <a href="/wiki/Foo" title="Foo">]]bar</a>
22360 <a href="/wiki/Foo" title="Foo">[[bar</a>
22361 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22362 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22363 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22368 Links 3. WikiLinks: No escapes needed
22373 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22374 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22377 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22378 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22382 Links 4. ExtLinks: Escapes needed
22386 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22387 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22388 <p>[http://google.com]</p>
22389 <p>[http://google.com google]</p>
22391 [http://google.com <nowiki>[google]</nowiki>]
22392 [http://google.com <nowiki>google]</nowiki>]
22394 <nowiki>[http://google.com]</nowiki>
22396 <nowiki>[http://google.com google]</nowiki>
22399 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22400 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22401 </p><p>[http://google.com]
22402 </p><p>[http://google.com google]
22407 Links 5. ExtLinks: No escapes needed
22409 [http://google.com [google]
22411 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22414 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22418 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22420 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22421 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22422 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22423 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22424 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22425 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22426 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22427 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
22428 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22429 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
22430 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
22431 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
22432 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22435 x<nowiki/>http://example.com<nowiki/>y
22436 http://example.com<nowiki/>?x
22437 http://example.com<nowiki/>&x
22438 http://example.com<nowiki/>'x
22439 http://example.com<nowiki/>,x
22440 http://example.com<nowiki/>.x
22441 http://example.com<nowiki/>;x
22442 http://example.com<nowiki/>:x
22443 http://example.com<nowiki/>;x
22444 http://example.com<nowiki/>!x
22445 http://example.com<nowiki/>=x
22446 http://example.com<nowiki/>(x)
22447 http://example.com(x<nowiki/>)
22451 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22454 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22456 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22457 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22458 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22459 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22460 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22466 "http://example.com"
22467 (http://example.com)
22468 (http://example.com) foo
22469 http://example.com,
22470 http://example.com, foo
22473 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22475 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22476 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22477 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22478 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22479 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22484 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22486 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22487 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
22489 http://example.com.,;:!?\
22490 -http://example.com:
22492 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
22493 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
22498 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
22500 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
22501 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
22502 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
22506 X<nowiki/>RFC 123<nowiki/>y
22510 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
22512 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
22513 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
22514 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
22521 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
22522 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
22523 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
22528 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
22530 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
22531 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22532 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22536 X<nowiki/>PMID 123<nowiki/>y
22540 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
22542 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
22543 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
22544 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
22551 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
22552 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
22553 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
22558 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
22560 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
22561 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
22562 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
22565 ISBN 1234567890<nowiki/>1
22566 ISBN 1234567890<nowiki/>x
22567 a<nowiki/>ISBN 1234567890<nowiki/>b
22571 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
22573 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
22577 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
22582 Links 14. Protect link-like plain text. (Parsoid bug T78425)
22586 <p>this is not a link: http://example.com
22589 this is not a link: <nowiki>http://example.com</nowiki>
22593 Links 15. Link trails can't become link prefixes.
22597 [[Söfnuður]]-[[00]]
22599 <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>
22602 <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>
22605 #### --------------- Quotes ---------------
22606 #### 1. Quotes inside <b> and <i>
22607 #### 2. Link fragments separated by <i> and <b> tags
22608 #### 3. Link fragments inside <i> and <b>
22609 #### 4. No escaping needed
22610 #### --------------------------------------
22612 1a. Quotes inside <b> and <i>
22614 parsoid=html2wt,wt2wt
22617 ''<nowiki>''foo''</nowiki>''
22618 ''<nowiki>'''foo'''</nowiki>''
22620 '''<nowiki/>'foo''''
22621 '''<nowiki>''foo''</nowiki>'''
22622 '''<nowiki>'''foo'''</nowiki>'''
22623 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
22624 '''foo'''<nowiki/>'s
22630 '''foo'''<nowiki/>'
22631 ''''foo'''<nowiki/>'
22632 ''fools'<span> errand</span>''
22633 ''<span>fool</span>'s errand''
22634 '<nowiki/>''foo'' bar '''baz''
22635 a|!*#-:;+-~[]{}b'''x''
22644 <b>foo'<i>bar'</i>baz</b>
22653 <i>fools'<span> errand</span></i>
22654 <i><span>fool</span>'s errand</i>
22655 '<i>foo</i> bar '<i>baz</i>
22656 a|!*#-:;+-~[]{}b'<i>x</i>
22661 1b. Quotes inside <b> and <i> with other tags on same line
22663 parsoid=html2wt,wt2wt
22665 '''a'' foo ''[[bar]]''
22666 ''a''' foo ''[[bar]]''
22667 ''a''' foo '''{{echo|[[bar]]}}'''
22668 [[foo]] x'''[[bar]]''
22669 '''foo'' <ref>test</ref>
22670 '''foo'' <div title="name">test</div>
22671 '''foo'' and <br> bar
22674 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22675 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22676 <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>
22677 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
22678 '<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>
22679 '<i>foo</i> <div title="name">test</div>
22680 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
22681 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22682 <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>
22687 2. Link fragments separated by <i> and <b> tags
22689 [[''foo''<nowiki>hello]]</nowiki>
22691 [['''foo'''<nowiki>hello]]</nowiki>
22693 <p>[[<i>foo</i>hello]]
22694 </p><p>[[<b>foo</b>hello]]
22698 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
22699 # this is one of the shortcomings of this format
22701 3. Link fragments inside <i> and <b>
22703 ''[[foo''<nowiki>]]</nowiki>
22705 '''[[foo'''<nowiki>]]</nowiki>
22708 </p><p><b>[[foo</b>]]
22713 4. No escaping needed
22715 '<span>''bar''</span>'
22716 '<span>'''bar'''</span>'
22719 <p>'<span><i>bar</i></span>'
22720 '<span><b>bar</b></span>'
22725 #### ----------- Paragraphs ---------------
22726 #### 1. No unnecessary escapes
22727 #### --------------------------------------
22730 1. No unnecessary escapes
22732 bar <span><nowiki>[[foo]]</nowiki></span>
22734 =bar <span><nowiki>[[foo]]</nowiki></span>
22736 [[bar <span><nowiki>[[foo]]</nowiki></span>
22738 ]]bar <span><nowiki>[[foo]]</nowiki></span>
22740 =bar <span>foo]]</span><nowiki>=</nowiki>
22742 <p>bar <span>[[foo]]</span>
22743 </p><p>=bar <span>[[foo]]</span>
22744 </p><p>[[bar <span>[[foo]]</span>
22745 </p><p>]]bar <span>[[foo]]</span>
22746 </p><p>=bar <span>foo]]</span>=
22750 #### ----------------------- PRE --------------------------
22751 #### 1. Leading whitespace in SOL context should be escaped
22752 #### ------------------------------------------------------
22754 1. Leading whitespace in SOL context should be escaped
22758 <nowiki> </nowiki>a
22760 <nowiki> </nowiki> a
22762 <nowiki> </nowiki>a(tab)
22764 <nowiki> </nowiki> a
22766 <nowiki> </nowiki> a
22769 <nowiki> </nowiki>b
22772 <nowiki> </nowiki>b
22775 <nowiki> </nowiki> b
22781 <p><!--cmt--> a</p>
22791 2. Leading whitespace in non-indent-pre contexts should not be escaped
22799 <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>
22800 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22801 <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>
22807 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
22826 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
22830 [[File:Foobar.jpg|thumb|caption]]
22832 <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>
22836 5. Nowiki escaping should account for indent-pres
22846 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
22859 #### --------------- Behavior Switches --------------------
22862 1. Valid behavior switches should be escaped
22869 <nowiki>__TOC__</nowiki>
22870 ''<nowiki>__TOC__</nowiki>''
22874 2. Invalid behavior switches should not be escaped
22885 # We use indent-pre as an indirect way to test for sol-transparent behavior.
22887 Behavior switches should be SOL-transparent
22891 <!-- this one's bogus -->
22898 <meta property="mw:PageProp/toc" />
22900 <!-- this one's bogus -->
22903 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
22905 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
22908 #### --------------- HTML tags ---------------
22911 #### 3. multi-line html tag
22912 #### 4. extension tags
22913 #### -----------------------------------------
22919 <a href="http://google.com">google</a>
22921 <a href="http://google.com">google</a>
22927 * <nowiki><div>foo</div></nowiki>
22928 * <nowiki><div style="color:red">foo</div></nowiki>
22929 * <nowiki><td></nowiki>
22931 <ul><li> <div>foo</div></li>
22932 <li> <div style="color:red">foo</div></li>
22933 <li> <td></li></ul>
22938 3. multi-line html tag
22953 <nowiki><ref>foo</ref></nowiki>
22955 <nowiki><ref>bar</nowiki>
22957 baz<nowiki></ref></nowiki>
22959 <p><ref>foo</ref>
22960 </p><p><ref>bar
22961 </p><p>baz</ref>
22965 #### --------------- Others ---------------
22969 <nowiki>foo</nowiki>
22971 <p><nowiki>foo</nowiki>
22975 ## The quote-char in the input is necessary for triggering the bug
22977 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
22979 parsoid=wt2wt,html2wt
22988 Tag-like HTML structures are passed through as text
23010 </p><p>1<d e>f
23015 HTML tag with necessary entities in attributes
23017 <span title="&amp;">foo</span>
23019 <p><span title="&amp;">foo</span>
23024 HTML tag with 'unnecessary' entity encoding in attributes
23026 <span title="&">foo</span>
23028 <p><span title="&">foo</span>
23033 HTML tag with broken attribute value quoting
23035 <span title="Hello world>Foo</span>
23037 <p><span>Foo</span>
23040 <p><span title="Hello world">Foo</span>
23045 Parsoid-only: HTML tag with broken attribute value quoting
23049 <span title="Hello world>Foo</span>
23051 <p><span title="Hello world">Foo</span>
23056 Table with broken attribute value quoting
23059 | title="Hello world|Foo
23070 <td title="Hello world">Foo
23076 Table with broken attribute value quoting on consecutive lines
23079 | title="Hello world|Foo
23080 | style="color:red|Bar
23093 <td title="Hello world">Foo
23094 </td><td style="color: red">Bar
23095 </td></tr></tbody></table>
23100 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23110 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23120 Accept empty td cell attribute
23123 | align="center" | foo || |
23128 <td align="center"> foo </td>
23135 Non-empty attributes in th-cells
23138 ! Foo !! style="color: red" | Bar
23144 <th style="color: red"> Bar
23150 Accept empty attributes in th-cells
23165 Empty table rows go away
23186 ### Parsoid-centric tests for testing RTing of inter-element separators
23187 ### Edge cases not tested by existing parser tests and specific to
23188 ### Parsoid-specific serialization strategies.
23192 RT-ed inter-element separators should be valid separators
23204 # Parsoid-only since PHP parser relies on Tidy for correct output
23206 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23220 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23221 <p>bar</p></small></td></tr>
23225 <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>
23229 # Note that the "style" attribute is really a template parameter here.
23230 # The = would have to be {{=}} if you wanted the literal.
23232 Empty TD followed by TD with tpl-generated attribute
23237 |{{echo|style='color:red'}}|foo
23251 Indented table with an empty td
23269 ## We have some newline diffs RT-ing this edge case
23270 ## and it is not important enough -- we seem to be emitting
23271 ## at most 2 newlines after a </tr> and this is unrelated to
23272 ## the issue from T85627 that this is testing.
23274 Indented table with blank lines in between (T85627)
23293 Indented block & table
23307 <div data-parsoid='{"stx":"html"}'>foo</div>
23309 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23314 Indent and comment before table row
23329 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23330 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23334 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23336 Empty TR followed by a template-generated TR
23342 {{echo|<tr><td>foo</td></tr>}}
23348 <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}}]}'>
23353 ## PHP and parsoid output differ for this, and since this is primarily
23354 ## for testing Parsoid's serializer, marking this Parsoid only
23356 Empty TR followed by mixed-ws-comment line should RT correctly
23372 <!--c--> </tr><!--d-->
23378 Multi-line image caption generated by templates with/without trailing newlines
23380 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23381 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23383 <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>
23384 <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>
23388 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23392 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23394 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23396 <includeonly>foo</includeonly>
23404 ## PHP emits broken html for this, and since this is primarily
23405 ## a Parsoid serializer test, marking this Parsoid only
23407 Improperly nested inline or quotes tags with whitespace in between
23409 <span> <s>x</span> </s>
23412 <p><span> <s>x</s></span><s> </s>
23413 <b> <i>x</i></b><i> </i>
23418 Encapsulate protected attributes from wt
23420 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23422 <body><div data-x-typeof="mw:placeholder stuff" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
23426 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23427 ## Having nested or stray pre tags results in the attempt to add duplicates,
23428 ## causing an assertion fail. This test tries to prevent that situation.
23430 Ensure ParagraphWrapper can deal with stray closing pre tags
23440 1. Ensure fostered text content is wrapped in element nodes
23444 <table>hi</table><table>ho</table>
23453 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
23455 parsoid=wt2html,wt2wt
23464 <tbody><tr><td> a</td></tr>
23469 Encapsulation properly handles null DSR information from foster box
23471 parsoid=wt2html,wt2wt
23473 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
23475 <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>
23479 1. Encapsulate foster-parented transclusion content
23481 parsoid=wt2wt,wt2html
23483 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
23485 <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>
23495 2. Encapsulate foster-parented transclusion content
23497 parsoid=wt2wt,wt2html
23499 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
23501 <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>
23512 3. Encapsulate foster-parented transclusion content
23514 parsoid=wt2wt,wt2html
23516 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23518 <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>"]}">
23531 4. Encapsulate foster-parented transclusion content
23533 parsoid=wt2wt,wt2html
23535 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23537 <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>"]}">
23550 5. Encapsulate foster-parented transclusion content
23552 parsoid=wt2wt,wt2html
23554 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
23556 <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>
23571 6. Encapsulate foster-parented transclusion content
23573 parsoid=wt2wt,wt2html
23575 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
23577 <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>
23593 7. Encapsulate foster-parented transclusion content
23595 parsoid=wt2wt,wt2html
23597 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
23599 <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>
23609 # Note that the wt is broken on purpose: the = should be {{=}} if you
23610 # don't want it to be a template parameter key.
23612 8. Encapsulate foster-parented transclusion content
23614 parsoid=wt2wt,wt2html
23617 }}{|{{echo|style='color:red'}}
23622 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
23624 <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>
23635 9. Encapsulate foster-parented transclusion content
23637 parsoid=wt2wt,wt2html
23639 <table>{{echo|hi</table>hello}}
23641 <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>
23645 Table in fosterable position
23647 parsoid=wt2html,wt2wt
23656 <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">
23658 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
23664 # Parsoid only for bug 64747
23666 Properly encapsulate empty-content transclusions in fosterable positions
23674 <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":["","","",""]}]]}'>
23680 Support <object> element with .data attribute
23684 <object data="test.swf"></object>
23686 <object data="test.swf"></object>
23690 Don't block XML namespace declaration
23692 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
23694 <p><span>MediaWiki</span>
23697 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
23700 # -----------------------------------------------------------------
23701 # The following section of tests are primarily to spec requirements
23702 # around serialization of new/edited content.
23704 # All these tests are marked Parsoid html2wt and html2html only
23705 # ----------------------------------------------------------------
23707 # 'mi' is a localinterwiki prefix as well as a language
23709 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
23713 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
23720 New wikilinks should be serialized properly
23724 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
23725 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
23732 New wiki links (href variations)
23736 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23737 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
23738 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
23739 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
23744 [[Toxine bactérienne]]
23748 New wiki links (content string variations)
23752 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23753 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
23754 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
23758 [[Foo_bar|./Foo_bar]]
23762 New category links (href variations)
23766 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
23767 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
23768 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
23770 [[Category:Toxine bactérienne]]
23771 [[Category:Toxine bactérienne]]
23772 [[Category:Toxine bactérienne]]
23776 New sol transparent links don't need indent-pre nowiki protection
23781 <link rel="mw:PageProp/redirect" href="./Main_Page">
23782 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
23783 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
23785 #WEITERLEITUNG [[Main Page]]
23786 <!-- this is good --> [[Category:Good]]
23787 <!-- this is great --> [[Kategorie:Great]]
23791 New interlanguage links (href variations)
23795 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
23796 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
23797 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
23799 [[es:Toxine bactérienne]]
23800 [[es:Toxine_bactérienne]]
23801 [[es:Toxine_bactérienne]]
23805 Image: Modifying size of an image (1)
23808 "modes": ["wt2wt"],
23810 ["img[height]", "attr", "height", "22"],
23811 ["img[width]", "attr", "width", "200"]
23815 [[Image:Foobar.jpg|230x230px]]
23817 [[Image:Foobar.jpg|200x200px]]
23821 Image: Modifying size of an image (2)
23824 "modes": ["wt2wt"],
23826 ["img[height]", "attr", "height", "100"],
23827 ["img[width]", "attr", "width", "500"]
23831 [[Image:Foobar.jpg|230x230px]]
23833 [[Image:Foobar.jpg|500x500px]]
23836 # Change in size is ignored so long as class='mw-default-size'
23838 Image: Modifying size of an image (3)
23841 "modes": ["wt2wt"],
23843 ["figure[class]", "removeClass", "mw-default-size"],
23844 ["figure img", "attr", "height", "19"],
23845 ["figure img", "attr", "width", "170"]
23849 [[Image:Foobar.jpg|thumb]]
23851 [[Image:Foobar.jpg|thumb|170x170px]]
23855 Image: Modifying alignment of an image (bug 48665)
23858 "modes": ["wt2wt"],
23860 ["figure[class]", "removeClass", "mw-halign-right"],
23861 ["figure[class]", "addClass", "mw-halign-left"]
23865 [[Image:Foobar.jpg|thumb|caption|right]]
23867 [[Image:Foobar.jpg|thumb|caption|left]]
23871 Image: Modifying mw-default-size of an frameless image (bug 62805)
23874 "modes": ["wt2wt"],
23876 ["figure.mw-default-size", "removeClass", "mw-default-size"]
23880 [[Image:Foobar.jpg|frameless|right]]
23882 [[Image:Foobar.jpg|frameless|right|220x220px]]
23886 Image: Modifying valign of an image (bug 49221)
23889 "modes": ["wt2wt"],
23891 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
23892 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
23896 [[File:Foobar.jpg|20px|middle]]
23898 [[File:Foobar.jpg|20px|text-top]]
23902 Image: Modifying alt attribute of an image (bug 56400)
23905 "modes": ["wt2wt"],
23907 ["img[alt]", "attr", "alt", "some alternate edited text"]
23911 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
23913 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
23917 Image: Modifying caption of an image
23920 "modes": ["wt2wt"],
23922 ["figcaption", "text", "new caption"]
23926 [[Image:Foobar.jpg|thumb|original caption]]
23928 [[Image:Foobar.jpg|thumb|new caption]]
23932 Image: empty alt attribute (bug 48924)
23936 [[File:Foobar.jpg|thumb|alt=|bar]]
23938 <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>
23942 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
23947 #<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>
23949 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
23953 Image: Block level image should have \n before and after
23956 [[File:Foobar.jpg|right|thumb|150x150px]]
23960 <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>
23965 Image: New block level image should have \n before and after (existing content)
23968 [[File:Foobar.jpg|right|thumb|150x150px]]
23972 <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>
23977 Image: upright option (parsoid)
23979 [[File:Foobar.jpg|thumb|upright|caption]]
23980 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
23981 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
23983 <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>
23984 <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>
23985 <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>
23989 Image: upright option is ignored on inline and frame images (parsoid)
23991 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
23993 <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>
23997 Image: from basic HTML (1)
24001 <span typeof="mw:Image">
24002 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24005 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24009 Image: from basic HTML (2)
24013 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24015 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24019 Image: from basic HTML (3)
24023 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24025 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24029 Image: from basic HTML (4)
24033 <img src="./File:Foobar.jpg">
24035 [[File:Foobar.jpg|link=]]
24039 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24044 <li><p>foo</p></li>
24051 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24055 <ul> <li>foo</li></ul>
24061 Don't strip leading whitespace when handling indent-pre suppressing tags
24066 <tr><td> indented row</td></tr>
24069 <b>This is very bold of you!</b>
24072 indented cell (no pre-wrapping!)
24082 '''This is very bold of you!'''
24086 indented cell (no pre-wrapping!)
24094 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24099 <nowiki> </nowiki><span>bar</span>
24102 <nowiki> </nowiki></span>bar2
24105 <nowiki> </nowiki><span>bar</span>
24108 <nowiki> </nowiki><span>foo</span>
24126 Lists: Dont insert newlines in a serialized list item.
24130 <ul><li>a<br>b</li><li>c</li></ul>
24137 Headings: Force sol-transparent links and behavior switches to serialize before/after
24141 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
24142 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24144 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24145 <h2>it goes well <link href="Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24147 <h2 data-parsoid='{}'>howdy<link href="Category:A5" rel="mw:PageProp/Category" /></h2>
24149 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24157 <!--foo--> [[Category:A3]]
24162 [[Category:A4]] <!--bar-->
24164 ==howdy [[Category:A5]] ==
24172 Headings: Don't hoist metas that come from templates
24176 <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>
24178 == {{echo|foo [[Category:Foo]]}} ==
24182 Headings: Category in ref isn't hoisted
24186 <h2> foo <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> </h2>
24188 <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>
24191 [[Category:Baz]] </ref> ==
24197 Parsoid: Serialize positional parameters with = in them as named parameter
24201 <p about="#mwt1" typeof="mw:Transclusion"
24202 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24204 <p about="#mwt1" typeof="mw:Transclusion"
24205 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24207 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24208 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24209 <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>
24213 {{echo|1 = f=oo|2 = bar}}
24215 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24216 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24217 {{echo|<nowiki>f=oo</nowiki>|bar}}
24221 Parsoid: Serialize positional parameters with = in extlink as named parameter
24225 <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>
24227 {{echo|1 = http://stuff?is=ok}}
24231 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24235 <div>a<p>b</p></div>
24256 Substrings resembling wikitext in hrefs should not get nowiki escapes
24260 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24266 Enforce single-line context in the serializer
24273 <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">
24274 </span><span about="#mwt1">you</span> </h2>
24276 <h2> foo <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> </h2>
24278 <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
24279 there</span></li></ol>
24292 == hi {{bogus|there
24303 * foo '''bar''' baz
24307 Serialize new placeholder space without spans
24311 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24313 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24315 <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>
24321 <ref>foo : bar</ref>ok
24325 #-----------------------
24326 # Tag minimization tests
24327 #-----------------------
24330 1. I/B quote minimization: wikitext-only tags should be combined
24334 <p><i>A</i><i>B</i></p>
24335 <p><b>A</b><b>B</b></p>
24336 <p><i>A</i><b><i>B</i></b></p>
24337 <p><b>A</b><i><b>B</b></i></p>
24338 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24339 <p><i><b>A</b></i><i><b>B</b></i></p>
24340 <p><i><b>A</b></i><b><i>B</i></b></p>
24341 <p><b><i>A</i></b><i><b>B</b></i></p>
24361 2. I/B quote minimization: wikitext and html tags should not be combined
24365 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24366 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24370 ''A''<nowiki/>'''<i>B</i>'''
24374 3. I/B quote minimization: templated content stops minimization
24378 <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>
24379 <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>
24381 ''A''{{echo|''B''}}
24383 ''A''{{echo|'''''B'''''}}
24387 4. I/B quote minimization: new content should be mimimized with adjacent old content
24391 <p><i>A</i><i>B</i></p>
24392 <p><b>A</b><b>B</b></p>
24393 <p><i>A</i><b><i>B</i></b></p>
24403 5a. Merge adjacent quote nodes if they've been edited
24406 "modes": ["wt2wt", "selser"],
24408 ["p", "contents", "remove", ":contains('b')"]
24418 5b. Merge adjacent quote nodes if they've been edited
24421 "modes": ["wt2wt", "selser"],
24427 ''a''<span id="x">b</span>''c''
24433 1. Merge adjacent link nodes as long as at least one element is new
24436 "modes": ["html2wt"],
24437 "scrubWikitext": true
24440 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24441 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24442 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
24446 [[Football|Foot]][[Football|ball]]
24450 2. Merge adjacent link nodes and enable additional normalizations
24453 "modes": ["html2wt"],
24454 "scrubWikitext": true
24457 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
24459 [[Football|''Football'']]
24463 3. Don't merge adjacent link nodes if scrubWikitext is false
24466 "modes": ["html2wt"],
24467 "scrubWikitext": false
24470 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24472 [[Football|Foot]][[Football|ball]]
24475 #------------------------------
24476 # End of tag minimization tests
24477 #------------------------------
24480 Bug 54262: New entities
24486 <span typeof="mw:Entity"> </span>
24489 ## Note that there is no wikitext output for 'unknownproperty' ##
24490 ## Unknown magic words are silently dropped ##
24497 <meta property='mw:PageProp/toc' />
24498 <meta property='mw:PageProp/notoc' />
24499 <meta property='mw:PageProp/forcetoc' />
24500 <meta property='mw:PageProp/index' />
24501 <meta property='mw:PageProp/noindex' />
24502 <meta property='mw:PageProp/nogallery' />
24503 <meta property='mw:PageProp/noeditsection' />
24504 <meta property='mw:PageProp/notitleconvert' />
24505 <meta property='mw:PageProp/nocontentconvert' />
24506 <meta property='mw:PageProp/unknownproperty' />
24516 __NOCONTENTCONVERT__
24520 Consecutive <pre>s should not get merged
24522 parsoid=html2wt,html2html
24524 <pre>a</pre><pre>b</pre>
24552 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
24556 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
24558 [[Special:BookSources/1234567890|ISBN 1234567895]]
24562 Edited RFC links not serializable as RFC links should serialize as extlinks
24566 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
24568 [//tools.ietf.org/html/rfc123 New RFC]
24572 Edited PMID links not serializable as PMID links should serialize as extlinks
24576 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
24578 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
24582 WTS of autolinks with trailing/surrounding context
24586 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
24587 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
24588 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
24589 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
24590 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
24591 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
24593 http://cscott.net<nowiki/>'''foo'''
24595 http://cscott.net<b>foo</b>
24597 '''http://cscott.net<nowiki/>'''
24599 '''http://cscott.net '''
24601 '''http://cscott.net<nowiki/>x'''
24603 http://cscott.net<nowiki/>x
24607 WTS of autolinks with nowikis (round-trip)
24609 x<nowiki/>http://cscott.net<nowiki/>x
24611 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
24614 # this is the "easy" test because it leaves in place all the
24615 # data-parsoid information indicating this is an autolink
24617 WTS of autolinks with escapes (editing)
24620 "modes": ["wt2wt"],
24622 [ "meta", "remove" ]
24626 x<nowiki/>http://cscott.net<nowiki/>x
24628 x<nowiki/>http://cscott.net<nowiki/>x
24632 Edited Redirect link should emit a non-piped wikitext link
24636 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
24642 T75121: Infer extension name from typeOf if data-mw is not present
24646 <div typeOf="mw:Extension/foo"></div>
24651 # Note that the <p> wrapping isn't present in PHP parser output
24652 # The important thing for this test is that P-wrapping doesn't
24653 # interfere with the <nowiki> protection for leading - in <td>
24654 # (which isn't necessary for <th>).
24656 T88318: p-wrapped dash in table.
24658 parsoid=html2wt,wt2wt
24661 <tr><th><p>-</p></th><th><p>- </p></th></tr>
24662 <tr><td><p>-</p></td><td><p>- </p></td></tr>
24663 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
24670 |<nowiki>-</nowiki>
24671 |<nowiki>- </nowiki>
24690 <td><small>-</small></td>
24702 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
24707 <td id='mwAc'>foo</td>
24708 <td id='serialize-this'>bar</td>
24713 | id="serialize-this" |bar
24718 Parsoid-like element ids should not be serialized to wikitext unless shadowed
24722 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
24724 <div id="hello">ok</div>
24731 "modes": ["wt2wt"],
24733 [ "#xyz", "before", "<b>before</b> stuff " ],
24734 [ "#xyz", "after", " stuff <i>after</i>" ],
24735 [ "#xyz", "html", "x <b>y</b> z" ]
24739 <span id="xyz">hello</span>
24741 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
24745 Never serialize a-tag as html, regardless of what data-parsoid has to say
24749 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
24754 ## SSS FIXME: This is broken output nevertheless.
24755 ## What might be a reasonable non-broken output for this?
24756 ## This is an edge case unlikely to be seen in production
24757 ## that I am not wasting more time on this right now.
24759 Never serialize a-tag as html, no matter what attributes it has
24763 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
24765 [http://boo.org http://boohoo.org]
24768 # --------------------------------------------
24769 # Tests spec'ing wikitext serialization norms |
24770 # --------------------------------------------
24773 Lists: Add space after bullets
24780 <li><span> baz</span></li>
24785 * <span> baz</span>
24789 Headings: Add space before/after == (T53744)
24796 <h2><span> baz</span></h2>
24798 <!-- Even after hoisted content -->
24799 <h2> <link href="Category:A2" rel="mw:PageProp/Category" />ok</h2>
24807 == <span> baz</span> ==
24809 <!-- Even after hoisted content -->
24816 1. Headings: suppress newly created empty headings
24819 "modes": ["html2wt"],
24820 "scrubWikitext": true
24828 2. Headings: don't suppress empty headings if scrubWikitext is false
24838 3. Headings: don't suppress empty headings for existing headings even if scrubWikitext is true
24841 "modes": ["html2wt"],
24842 "scrubWikitext": true
24845 <h2 data-parsoid='{}'></h2>
24851 1. WT Quote Tags: suppress newly created empty style tags
24854 "modes": ["html2wt"],
24855 "scrubWikitext": true
24863 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
24869 ''<nowiki/>'''''<nowiki/>'''
24873 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
24876 "modes": ["html2wt"],
24877 "scrubWikitext": true
24886 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
24892 <nowiki> </nowiki>hi
24895 # ---------------------------------------------------
24896 # End of tests spec'ing wikitext serialization norms |
24897 # ---------------------------------------------------
24899 # -----------------------------------------------------------------
24900 # End of section for Parsoid-only html2wt tests for serialization
24902 # -----------------------------------------------------------------
24904 # -----------------------------------------------------------------
24905 # The following section of tests are primarily to spec behavior of
24906 # the selective serializer. All these tests have manual selser
24907 # changes. The automated selser changes for all tests handle the
24908 # wide variation of changes, but these tests here capture specs
24909 # deterministically.
24910 # ----------------------------------------------------------------
24914 Selser: New comments should not be lost
24917 "modes": ["selser"],
24919 [ "#a", "after", "<!--c1-->" ],
24920 [ "#b", "before", "<!--c2-->" ]
24924 <span id="a">a</span>
24926 <span id="b">b</span>
24928 <span id="a">a</span><!--c1-->
24930 <!--c2--><span id="b">b</span>
24935 Selser: Check for validity of DSR before using it
24938 "modes": ["selser"],
24940 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
24944 <span id="a">a</span>
24946 {{DISPLAYTITLE:foo}}
24947 <span id="a">a</span>
24951 1. DOMDiff: Changes to <ref> content should be looked up using id
24954 "modes": ["selser"],
24956 ["#X", "after", "bar"],
24957 ["#Y", "after", "baz"]
24961 X <ref><span id="X">foo</span></ref>
24964 <ref name="a"><span id="Y">foo</span></ref>
24967 X <ref><span id="X">foo</span>bar</ref>
24970 <ref name="a"><span id="Y">foo</span>baz</ref>
24975 2. DOMDiff: Changes to <ref> content should be looked up using id
24978 "modes": ["selser"],
24980 ["#Z", "after", "bar"]
24984 A <ref>foo bar for a</ref>
24985 B <ref group="X" name="b" />
24989 <references group="X">
24990 <ref name="b"><span id="Z">foo</span></ref>
24993 A <ref>foo bar for a</ref>
24994 B <ref group="X" name="b" />
24998 <references group="X">
24999 <ref name="b"><span id="Z">foo</span>bar</ref>