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: No preceding word characters allowed (bug 65278)
4562 NOPEhttp://example.com
4563 N0http://example.com
4564 ok:http://example.com
4565 ok-http://example.com
4567 <p>NOPEhttp://example.com
4568 N0http://example.com
4569 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4570 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4577 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4579 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4584 External image from https
4586 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4588 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4593 External image (when not allowed)
4595 wgAllowExternalImages=0
4597 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4599 <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>
4604 Link to non-http image, no img tag
4606 Link to non-http image, no img tag: ftp://example.com/test.jpg
4608 <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>
4613 External links: terminating separator
4615 Terminating separator: http://example.com/thing,
4617 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4622 External links: intervening separator
4624 Intervening separator: http://example.com/1,2,3
4626 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4631 External links: old bug with URL in query
4633 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4635 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4640 External links: old URL-in-URL bug, mixed protocols
4642 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4644 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4649 External links: URL in text
4651 URL in text: [http://example.com http://example.com]
4653 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4658 External links: Clickable images
4660 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4662 <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>
4665 <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>
4669 External links: raw ampersand
4671 Old & use: http://x&y
4673 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4678 External links: encoded ampersand
4680 Old & use: http://x&y
4682 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4685 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4689 External links: encoded equals (bug 6102)
4691 http://example.com/?foo=bar
4693 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4696 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4700 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4701 ## does it number them. As discussed in bug 53505, we can identify
4702 ## autonumbered links via CSS.
4706 External links: [raw ampersand]
4708 Old & use: [http://x&y]
4710 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4713 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4716 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4717 # mode will return the [raw ampersand] wikitext
4719 External links: [encoded ampersand]
4721 parsoid=wt2html,wt2wt,html2html
4723 Old & use: [http://x&y]
4725 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4728 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4732 External links: [raw equals]
4734 [http://example.com/?foo=bar]
4736 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4739 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4742 # note that parsoid html is identical to [raw equals] case; so html2wt
4743 # mode will return the [raw equals] wikitext
4745 External links: [encoded equals] (bug 6102)
4747 parsoid=wt2html,wt2wt,html2html
4749 [http://example.com/?foo=bar]
4751 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4754 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4757 # xxx parsoid strips the IDN character, so the round-trip tests will
4758 # obviously fail and are disabled. --cscott
4760 External links: [IDN ignored character reference in hostname; strip it right off]
4762 parsoid=wt2html,wt2wt,html2html
4764 [http://e‌xample.com/]
4766 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4769 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4772 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4773 # Where an external link could easily circumvent the sanitization of the text of
4774 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4775 # test demands a higher standard. That's a bit strange.
4779 # http://example.com -> [http://example.com|http://example.com]
4780 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4782 # The first example is sanitized, but the second is not. Any security benefits
4783 # from this production are trivial to circumvent. Either remove this test and
4784 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4785 # the test accordingly.
4789 # xxx parsoid strips the IDN character, so the round-trip tests will
4790 # obviously fail and are disabled. --cscott
4792 External links: IDN ignored character reference in hostname; strip it right off
4794 parsoid=wt2html,html2html
4796 http://e‌xample.com/
4798 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4801 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4805 External links: www.jpeg.org (bug 554)
4809 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4813 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4815 External links: URL within URL (original bug 2)
4817 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4819 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4822 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4826 BUG 361: URL inside bracketed URL
4828 [http://www.example.com/foo http://www.example.com/bar]
4830 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4835 BUG 361: URL within URL, not bracketed
4837 http://www.example.com/foo?=http://www.example.com/bar
4839 <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>
4844 BUG 289: ">"-token in URL-tail
4846 http://www.example.com/<hello>
4848 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4853 BUG 289: literal ">"-token in URL-tail
4855 http://www.example.com/<b>html</b>
4857 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4860 <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>
4864 BUG 289: ">"-token in bracketed URL
4866 [http://www.example.com/<hello> stuff]
4868 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4873 BUG 289: literal ">"-token in bracketed URL
4875 [http://www.example.com/<b>html</b> stuff]
4877 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4882 BUG 289: literal double quote at end of URL
4884 http://www.example.com/"hello"
4886 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4891 BUG 289: literal double quote in bracketed URL
4893 [http://www.example.com/"hello" stuff]
4895 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4900 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4902 [http://www.example.com test]
4904 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4909 External links: link text with spaces
4911 [http://www.example.com a b c]
4912 [http://www.example.com ''a'' ''b'']
4914 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4915 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4920 External links: wiki links within external link (Bug 3695)
4922 [http://example.com [[wikilink]] embedded in ext link]
4924 <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>
4927 <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>
4931 BUG 787: Links with one slash after the url protocol are invalid
4935 [http:/example.com title]
4937 <p>http:/example.com
4938 </p><p>[http:/example.com title]
4943 Bracketed external links with template-generated invalid target
4945 [{{echo|http:/example.com}} title]
4947 <p>[http:/example.com title]
4952 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4954 ''[http://example.com text'']
4955 [http://example.com '''text]'''
4956 ''Something [http://example.com in italic'']
4957 ''Something [http://example.com mixed''''', even bold]'''
4958 '''''Now [http://example.com both''''']
4960 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4961 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4962 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4963 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4964 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4970 Bug 4781: %26 in URL
4972 http://www.example.com/?title=AT%26T
4974 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4977 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4980 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
4981 # % is actually legal in HTML5. Any change in output would need testing though.
4983 Bug 4781, 5267: %25 in URL
4985 http://www.example.com/?title=100%25_Bran
4987 <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>
4990 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4994 Bug 4781, 5267: %28, %29 in URL
4996 http://www.example.com/?title=Ben-Hur_%281959_film%29
4998 <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>
5001 <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>
5006 Bug 4781: %26 in autonumber URL
5008 [http://www.example.com/?title=AT%26T]
5010 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5013 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5017 Bug 4781, 5267: %26 in autonumber URL
5019 [http://www.example.com/?title=100%25_Bran]
5021 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5024 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5028 Bug 4781, 5267: %28, %29 in autonumber URL
5030 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5032 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5035 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5040 Bug 4781: %26 in bracketed URL
5042 [http://www.example.com/?title=AT%26T link]
5044 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5047 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5051 Bug 4781, 5267: %25 in bracketed URL
5053 [http://www.example.com/?title=100%25_Bran link]
5055 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5060 Bug 4781, 5267: %28, %29 in bracketed URL
5062 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5064 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5067 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5071 External link containing a period in the anchor. (bug 63947)
5073 [//foo.org/bar#baz. bang]
5075 [//foo.org/bar. bang]
5077 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5078 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5081 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5082 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5086 External link containing a single quote. (bug 63947)
5090 [//foo.org/bar'baz bang]
5092 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5093 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5096 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5097 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5102 External link containing a period in the anchor. (bug 63947)
5104 [//foo.org/bar#baz. bang]
5106 [//foo.org/bar. bang]
5108 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5109 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5112 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5113 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5117 External link containing a single quote. (bug 63947)
5121 [//foo.org/bar'baz bang]
5123 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5124 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5127 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5128 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5133 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5135 Some [http://example.com/ pretty ''italics'' and stuff]!
5137 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5142 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5144 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5146 <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>
5151 External link containing double-single-quotes with no space separating the url from text in italics
5153 [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]].]
5155 <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>
5158 <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>
5160 <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>
5164 External link with comments in link text
5166 [http://www.google.com Google <!-- comment -->]
5168 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5173 URL-encoding in URL functions (single parameter)
5175 {{localurl:Some page|amp=&}}
5177 <p>/index.php?title=Some_page&amp=&
5182 URL-encoding in URL functions (multiple parameters)
5184 {{localurl:Some page|q=?&=&}}
5186 <p>/index.php?title=Some_page&q=?&amp=&
5193 http://example.com/index.php?foozoid%5B%5D=bar
5195 http://example.com/index.php?foozoid[]=bar
5197 <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>
5198 </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>
5201 <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>
5203 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5207 IPv6 urls (bug 21261)
5211 http://[2404:130:0:1000::187:2]/index.php
5213 <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>
5218 Non-extlinks in brackets
5227 [{{echo|foo}} ''bar'']
5228 [{{echo|foo}}l's] errand
5229 [{{echo|foo}}l's errand]
5231 [url=http://example.com]
5244 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5249 Percent encoding in external links
5251 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5253 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5256 <p><a rel="mw:ExtLink"
5257 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5261 Use url link syntax for links where the content is equal the link target
5265 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5268 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5272 Parenthesis in external links, especially URL links
5276 http://example.com/test)
5278 http://example.com/(test)
5280 http://example.com/((test)
5282 (http://example.com/(test))
5284 (http://example.com/(test)))))
5286 http://example.com/a)b
5288 [http://example.com) foo]
5290 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5291 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5292 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5293 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5294 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5295 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5296 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5297 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5300 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5301 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5302 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5303 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5304 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5305 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5306 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5307 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5311 Parenthesis in external links, w/ transclusion or comment
5313 (http://example.com/{{echo|hi}})
5315 (http://example.com<!-- hi -->)
5317 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5318 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5321 <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>
5323 <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>
5327 Serialize <a> tags with invalid link targets as plain text
5331 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5332 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5333 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5334 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5337 <nowiki>*</nowiki>text
5338 <nowiki>[[foo]]</nowiki>
5339 <nowiki>*a [[foo]]</nowiki>
5343 mw:ExtLink -vs- mw:WikiLink (T94723)
5347 <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>
5348 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5349 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5350 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5352 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5353 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5358 [[wikipedia:Foo|Bar]]
5359 [[wikipedia:Foo|Bar]]
5361 [[wikipedia:European_Robin|European Robin]]
5362 [[wikipedia:European_Robin|European Robin]]
5366 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5370 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5372 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5383 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5385 Normal text. '''''Bold italic text.''''' Normal text.
5387 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5388 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5393 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5394 # parser strips. The wikitext contains just the first half of the bold
5397 Unclosed and unmatched quotes
5399 '''''Bold italic text '''with bold deactivated''' in between.'''''
5401 '''''Bold italic text ''with italic deactivated'' in between.'''''
5405 ..spanning two paragraphs (should not work).'''
5407 '''Bold tag left open
5409 ''Italic tag left open
5413 <!-- Unmatching number of opening, closing tags: -->
5414 '''This year''''s election ''should'' beat '''last year''''s.
5416 ''Tom'''s car is bigger than ''Susan'''s.
5418 Plain ''italic'''s plain
5420 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5421 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5422 </p><p><b>Bold text..</b>
5423 </p><p>..spanning two paragraphs (should not work).
5424 </p><p><b>Bold tag left open</b>
5425 </p><p><i>Italic tag left open</i>
5427 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5428 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5429 </p><p>Plain <i>italic'</i>s plain
5432 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5433 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5434 </p><p><b>Bold text..</b>
5435 </p><p>..spanning two paragraphs (should not work).<b></b>
5436 </p><p><b>Bold tag left open</b>
5437 </p><p><i>Italic tag left open</i>
5440 <!-- Unmatching number of opening, closing tags: -->
5441 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5442 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5443 </p><p>Plain <i>italic'</i>s plain
5450 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5453 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5454 # is the bare minimum required by the spec, see:
5455 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5456 # Parsoid team replies: empty table tags are legal in HTML5
5458 A table with no data.
5471 A table with stray table end tags on start tag line (wt2html)
5475 {|style="color: red;"|}
5477 {|style="color: red;" |}
5481 {|style="color: red;"|} id="foo"
5485 {|style="color: red;" |} id="foo"
5489 <table style="color: red;"></table>
5491 <table style="color: red;">
5497 <table style="color: red;" id="foo">
5503 <table style="color: red;" id="foo">
5512 A table with no data (take 2)
5520 # A table with nothing but a caption is invalid XHTML, we might want to render
5521 # this as <p>caption</p>
5522 # Parsoid team replies: table with only a caption is legal in HTML5
5524 A table with nothing but a caption
5532 </caption><tr><td></td></tr></table>
5535 <table><caption> caption</caption></table>
5539 A table with caption with default-spaced attributes and a table row
5542 |+ style="color: red;" | caption1
5548 <caption style="color: red;"> caption1
5557 A table with captions with non-default spaced attributes and a table row
5560 |+style="color: red;"|caption2
5561 |+ style="color: red;"| caption3
5567 <caption style="color: red;">caption2
5569 <caption style="color: red;"> caption3
5578 Table td-cell syntax variations
5582 | foo bar foo || baz
5583 | style='color:red;' | baz
5584 | style='color:red;' || baz
5591 <td> foo bar foo </td>
5594 <td style="color:red;"> baz
5596 <td> style='color:red;' </td>
5624 Simple table but with multiple dashes for row wikitext
5643 Multiplication table
5645 {| border="1" cellpadding="2"
5646 |+Multiplication table
5648 ! × !! 1 !! 2 !! 3
5666 <table border="1" cellpadding="2">
5667 <caption>Multiplication table
5714 Accept "||" in table headings
5729 Accept "!!" in table data
5743 <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>
5748 Accept "||" in indented table headings
5758 </th></tr></table></dd></dl>
5763 Accept "!!" in templates
5777 <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>
5781 Accept "!!" in table headings after newline
5798 <p>b!!c</p></th></tr>
5803 Accept "!!" in table data of mixed wikitext / html syntax
5807 <tr><td>b!!c</td></tr>
5820 <tbody><tr><th>a</th></tr>
5821 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
5826 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5843 Accept "| !" at start of line in tables (ignore !-attribute)
5847 | !style="color:red" | bar
5859 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 +/-
5863 |style='color:red;'|+1
5864 |style='color:blue;'|-1
5876 <td style="color:red;">+1
5878 <td style="color:blue;">-1
5902 |rowspan=2| Cell 2, row 1 (and 2)
5913 <td rowspan="2"> Cell 2, row 1 (and 2)
5931 {| bgcolor=#ABCDEF border=2
5936 |the original table again
5944 <table bgcolor="#ABCDEF" border="2">
5952 <td>the original table again
5958 Invalid attributes in table cell (bug 1830)
5972 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
5976 | title="foo<nowiki>|</nowiki>" |bar
5977 | title="foo<nowiki>|</nowiki>" bar
5984 <td title="foo|">bar
5986 <td> title="foo|" bar
5991 # The "|}" to close the table is missing from the input, so parsoid's
5992 # *2wt modes will fail.
5994 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5996 parsoid=wt2html,html2html
5999 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6003 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6004 <td>]" onmouseover="alert(document.cookie)">test
6012 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6015 # FIXME: The php output is broken.
6017 ! and || in td attributes should not be parsed as <th>/<td>
6020 | style="color: red !important;" data-contrived="put this here ||" | foo
6025 <td> style="color: red !important;" data-contrived="put this here </td>
6031 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
6036 Indented table markup mixed with indented pre content (proposed in bug 6200)
6041 Text that should be rendered preformatted
6049 <pre>Text that should be rendered preformatted
6058 1. Template-generated table cell attributes and cell content
6063 || {{table_attribs_5}}
6064 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6065 |align=center {{table_attribs}}
6066 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6071 <td style="color:red;">Foo
6073 <td style="color:red;">Foo
6075 <td> style="color:red;"</td>
6078 <td style="color:red;">Foo
6080 <td align="center" style="color:red;">Foo
6082 <td align="center" style="color:red;">Foo
6088 2. Template-generated table cell attributes and cell content
6091 |{{table_attribs_2}}
6096 <td style="color:red;">Foo
6104 <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>
6105 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6110 3. Template-generated table cell attributes and cell content
6113 !align=center {{table_header_cells}}
6115 |align=center {{table_cells}}
6120 <th align="center" style="color:red;">Foo</th>
6121 <th style="color:red;"><i>Bar</i></th>
6122 <th style="color:brown;"><i>Foo</i> and Baz
6125 <td align="center" style="color:red;">Foo</td>
6126 <td style="color:red;"><i>Bar</i></td>
6127 <td style="color:brown;"><i>Foo</i> and Baz
6132 <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>
6133 <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>
6138 4. Template-generated table cell attributes and cell content inside a templated table
6141 !align=center {{table_header_cells}}
6143 |align=center {{table_cells}}
6148 <th align="center" style="color:red;">Foo</th>
6149 <th style="color:red;"><i>Bar</i></th>
6150 <th style="color:brown;"><i>Foo</i> and Baz
6153 <td align="center" style="color:red;">Foo</td>
6154 <td style="color:red;"><i>Bar</i></td>
6155 <td style="color:brown;"><i>Foo</i> and Baz
6159 <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}}]}'>
6160 <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>
6162 <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>
6167 Table with row followed by newlines and table heading
6185 Table with empty line following the start tag
6202 # FIXME: Preserve the attribute properly (with an empty string as value) in
6203 # the PHP parser. Parsoid implements the behavior below.
6205 Table attributes with empty value
6215 </td></tr></tbody></table>
6220 Wikitext table with a lot of comments
6243 Wikitext table comments represented in parsoid dom
6245 {|<!--c1--><!--c2-->
6256 <table><!--c1--><!--c2-->
6257 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6258 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6263 Wikitext table with double-line table cell
6280 Table cell with a single comment
6297 Table-cell after a comment-only-empty-line
6314 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6316 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6322 Build table with {{!}}
6324 {{{!}} class="wikitable"
6327 {{!}}- style="color:red;"
6328 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6331 <table class="wikitable">
6337 <tr style="color:red;">
6339 <td style="color:red;"> second data
6345 Build table with pipe as data
6347 {| class="wikitable"
6350 |- style="color:red;"
6351 | data || style="color:red;" | second data
6353 | style="color:red;" | data with | || style="color:red;" | second data with |
6355 || data with | ||| second data with |
6358 <table class="wikitable">
6364 <tr style="color:red;">
6366 <td style="color:red;"> second data
6369 <td style="color:red;"> data with | </td>
6370 <td style="color:red;"> second data with |
6373 <td> data with | </td>
6374 <td> second data with |
6380 Build table with wikilink
6382 {| class="wikitable"
6383 ! header || second header
6384 |- style="color:red;"
6385 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6387 | data || second data [[Main Page|link|text with pipe]]
6390 <table class="wikitable">
6395 <tr style="color:red;">
6396 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6397 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6401 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6406 # The expected HTML structure in this test is debatable. The PHP parser does
6407 # not parse this kind of table at all. The main focus for Parsoid is on
6408 # round-tripping, so this output is ok for now. TODO: revisit!
6410 Wikitext table with html-syntax row
6420 <td>foo</td></tr></tbody></table>
6423 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6424 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6425 ## PHP parser, which tidy then compounds by fostering the content
6426 ## entirely out of the table. Parsoid recognizes the table context
6427 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6428 ## depends on PHP's treatment of broken table markup!
6430 Implicit <td> after a |-
6432 parsoid=wt2html,html2html
6452 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6454 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6456 parsoid=wt2html,html2html
6489 <tr><td><pre>a</pre></td></tr>
6490 <tr><td> b</td></tr>
6495 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6496 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6498 Lists should be recognized in an implicit <td> context
6500 parsoid=wt2html,html2html
6527 Table cells not properly parsed in an implicit-td context
6531 {{table_attribs_4}} || a || b
6536 <td style="background-color:#DC241f;" width="10px"></td>
6543 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6544 <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>
6549 Parsoid: Round-trip tables directly followed by content (bug 51219)
6551 parsoid=wt2html,wt2wt
6576 Parsoid: Default to a newline after tables in new content (bug 51219)
6581 <tr><td>foo</td></tr></tbody></table> bar
6583 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6588 <nowiki> </nowiki>bar
6596 Parsoid: newline inducing block nodes don't suppress <nowiki>
6608 Parsoid: Row-syntax table headings followed by comment & table cells
6610 parsoid=wt2html,wt2wt
6614 <!-- foo --> || baz || quux
6628 <tbody><tr><th> foo </th><th> bar
6629 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6634 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6637 Parsoid: Recover better from broken table attributes
6657 <p>foo</p></td></tr>
6662 Strip unsupported table tags
6710 Testing serialization after deletion of table cells
6713 "modes": ["wt2wt", "selser"],
6721 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6734 Plain link, capitalized
6738 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6743 Plain link, uncapitalized
6747 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6754 [[Main Page|The Main Page]]
6756 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6761 Piped link with comment in link text
6763 [[Main Page|The Main<!--front--> Page]]
6765 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6770 Piped link with multiple pipe characters in link text
6772 [[Main Page||The|Main|Page|]]
6774 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6777 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6785 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6790 Broken link with fragment
6792 [[Zigzagzogzagzig#zug]]
6794 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6799 Special page link with fragment
6801 [[Special:Version#anchor]]
6803 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6808 Nonexistent special page link with fragment
6810 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6812 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6819 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6821 <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>
6828 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6830 <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>!!!
6841 Bug 43661: Piped links with identical prefixes
6843 [[prefixed article|prefixed articles with spaces]]
6845 [[prefixed article|prefixed articlesaoeu]]
6847 [[Main Page|Main Page test]]
6849 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6850 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6851 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6857 Link with HTML entity in suffix / tail
6859 [[Main Page]]", [[Main Page]]a
6861 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6864 <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>
6868 Link with 3 brackets
6877 Link with 4 brackets
6881 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6886 Piped link with 3 brackets
6888 [[[main page|the main page]]]
6890 <p>[[[main page|the main page]]]
6895 Piped link with extlink-like text
6898 [[Main Page|This is a [bar]]]
6900 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6901 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6904 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6905 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6909 Link with multiple pipes
6911 [[Main Page|The|Main|Page]]
6913 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6917 # Note that parsoid does not munge anchor text; all non-space
6918 # characters are valid in HTML5 ids.
6920 Anchor containing a #. (bug 63430)
6922 [[Main Page#And#Link]]
6924 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6927 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6933 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6935 <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>
6940 Link with space in namespace
6942 [[User talk:Foo bar]]
6944 <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>
6949 MemoryAlpha:AlphaTest
6951 This is an article in the MemoryAlpha namespace
6952 (which shadows the memoryalpha interwiki link).
6956 Namespace takes precedence over interwiki link (bug 51680)
6958 [[MemoryAlpha:AlphaTest]]
6960 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6964 # The previous test doesn't work correctly in html2*, due to not recognizing the
6965 # link as an internal one. This one checks for the correct behavior.
6967 Link to namespace preferred over interwiki with correct rel attribute
6969 parsoid=html2wt,html2html
6971 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6973 [[MemoryAlpha:AlphaTest]]
6977 Piped link to namespace
6979 [[Meta:Disclaimers|The disclaimers]]
6981 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6988 [[Usually caused by a typo (oops}]]
6990 <p>[[Usually caused by a typo (oops}]]
6997 Just a test of an article title containing a percent.
7001 Link containing % (not as a hex sequence)
7005 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7008 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7011 # note that the parsoid HTML is identical to the previous test output,
7012 # so the previous test ensures that the html2wt mode will generate the
7013 # "not as a hex sequence" wikitext.
7015 Link containing % as a single hex sequence interpreted to char
7017 parsoid=wt2wt,wt2html,html2html
7021 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7024 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7028 Link containing % as a double hex sequence interpreted to hex sequence
7032 <p>[[7%2525 Solution]]
7036 # note that parsoid does not munge anchor text; all non-space
7037 # characters are valid in HTML5 anchors.
7039 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7040 Example for such a section: == < ==
7042 [[%23%3c]][[%23%3e]]
7044 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7047 <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>
7051 Link containing "<#" and ">#" as a hex sequences
7053 [[%3c%23]][[%3e%23]]
7055 <p>[[%3c%23]][[%3e%23]]
7060 Link containing an equals sign
7062 [[Special:BookSources/isbn=4-00-026157-6]]
7064 <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>
7067 <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>
7073 Just a test of an article title containing a tilde.
7076 # note that links containing signatures, like [[Foo~~~~]], are
7077 # massaged by the pre-save transform (PST) and so the tildes are never
7078 # seen by the parser.
7080 Link containing a tilde
7084 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7087 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7091 Link containing double-single-quotes '' (bug 4598)
7093 [[Lista d''e paise d''o munno]]
7095 <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>
7098 <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>
7102 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7104 Some [[Link|pretty ''italics'' and stuff]]!
7106 <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>!
7109 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7113 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7115 ''Some [[Link|pretty ''italics'' and stuff]]!''
7117 <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>
7122 Link with double quotes in title part (literal) and alternate part (interpreted)
7124 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7128 [[''Pentecoste''|Pentecoste]]
7130 [[''Pentecoste''|''Pentecoste'']]
7132 <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>
7133 </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>
7134 </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>
7135 </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>
7138 <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>
7139 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7140 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7141 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7145 Broken image links with HTML captions (bug 39700)
7147 [[File:Nonexistent|<script></script>]]
7148 [[File:Nonexistent|100x100px|<script></script>]]
7149 [[File:Nonexistent|<]]
7150 [[File:Nonexistent|a<i>b</i>c]]
7152 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7153 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7154 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7155 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7158 <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>
7159 <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>
7160 <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>
7161 <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>
7167 [[http://www.example.com]]
7169 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7172 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7176 Plain link to URL with link text
7178 [[http://www.example.com Link text]]
7180 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7185 Plain link to protocol-relative URL
7187 [[//www.example.com]]
7189 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7192 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7196 Plain link to protocol-relative URL with link text
7198 [[//www.example.com Link text]]
7200 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7205 Plain link to page with question mark in title
7211 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7212 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7217 # I'm fairly sure the expected result here is wrong.
7218 # We want these to be URL links, not pseudo-pages with URLs for titles....
7219 # However the current output is also pretty screwy.
7222 # I'm changing it to match the current output--it arguably makes more
7223 # sense in the light of the test above. Old expected result was:
7224 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7226 # But I think this test is bordering on "garbage in, garbage out" anyway.
7231 Piped link to URL: [[http://www.example.com|an example URL]]
7233 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7236 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7240 BUG 2: [[page|http://url/]] should link to page, not http://url/
7242 [[Main Page|http://url/]]
7244 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7247 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7250 # Parsoid does not mark self-links, by design.
7252 BUG 337: Escaped self-links should be bold
7256 [[Bug462]] [[Bug462]]
7258 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7261 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7263 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7267 Self-link to section should not be bold
7271 [[Main Page#section]]
7273 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7284 Self-link to numeric title
7290 <p><strong class="selflink">0</strong>
7295 Link to numeric-equivalent title
7301 <p><a href="/wiki/00" title="00">00</a>
7306 <nowiki> inside a link
7308 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7310 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7315 Non-breaking spaces in title
7317 [[ Main Page ]]
7319 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7324 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7330 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7335 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7341 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7346 Internal link with en linktrail: no apostrophes (bug 27473)
7352 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7357 Internal link with ca linktrail with apostrophes (bug 27473)
7363 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7368 Internal link with kaa linktrail with apostrophes (bug 27473)
7374 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7379 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7381 [[User:Foo/Test/63636:Bar|Test]]
7383 <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>
7386 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7390 Purely hash wikilink
7392 title=[[User:test/123]]
7396 <p><a href="#a">b</a>
7399 <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>
7403 1. Interaction of linktrail and template encapsulation
7409 <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>
7413 2. Interaction of linktrail and template encapsulation
7417 {{echo|Some [[Fool]]}}s
7419 <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>
7423 3. Interaction of linktrail and template encapsulation
7427 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7429 <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>
7439 Internal link with is link prefix
7443 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7445 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7456 Internal link with is link trail and link prefix
7460 [[mótmælendatrú|xxx]]ar
7462 mótmælenda[[söfnuður]]
7463 mótmælenda[[söfnuður|söfnuðir]]
7464 mótmælenda[[söfnuður|söfnuðir]]xxx
7466 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7467 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7468 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7469 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7470 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7475 Parsoid link trail escaping
7477 parsoid=html2wt,html2html
7479 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7485 Parsoid link prefix escaping
7488 parsoid=html2wt,html2html
7490 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7492 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7496 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7504 [http://wp.org ''foo'']
7506 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7507 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7508 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7509 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7514 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7518 [[Foo|{{echo|a}} b {{echo|c}}]]
7520 <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>
7524 Link with angle bracket after anchor
7528 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7531 <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>
7535 ### Interwiki links (see maintenance/interwiki.sql)
7539 Inline interwiki link
7541 parsoid=wt2html,wt2wt,html2html
7543 [[MeatBall:SoftSecurity]]
7545 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7548 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7552 Inline interwiki link with empty title (bug 2372)
7554 parsoid=wt2html,wt2wt,html2html
7558 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7561 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7565 Interwiki link encoding conversion (bug 1636)
7567 *[[Wikipedia:ro:Olteniţa]]
7568 *[[Wikipedia:ro:Olteniţa]]
7570 <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>
7571 <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>
7575 <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>
7576 <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>
7581 Interwiki link with fragment (bug 2130)
7583 [[MeatBall:SoftSecurity#foo]]
7585 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7589 # Ideally the wikipedia: prefix here should be proto-relative too
7590 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7591 # define the 'en' prefix, and originally the test used 'wikipedia',
7592 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7595 Different interwiki prefixes mapping to the same URL
7603 [[:wikipedia:Foo|Foo]]
7605 [[wikipedia:en:Foo]]
7607 [[:wikipedia:en:Foo]]
7611 <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>
7613 <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>
7615 <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>
7617 <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>
7619 <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>
7621 <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>
7623 <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>
7627 Interwiki links that cannot be represented in wiki syntax
7630 [[meatball:ok#foo|ok with fragment]]
7631 [[meatball:ok_as_well?|ok ending with ? mark]]
7632 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7633 [http://de.wikipedia.org/wiki/#foo is just fragment]
7636 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7637 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7638 <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>
7639 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7640 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7643 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7644 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7645 <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>
7646 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7647 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7651 Interwiki links: trail
7653 [[wikipedia:Foo|Ba]]r
7655 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7658 <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>
7662 Local interwiki link
7664 parsoid=wt2html,wt2wt,html2html
7666 [[local:Template:Foo]]
7668 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7671 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7674 # Parsoid does not mark self-links, by design.
7676 Local interwiki link: self-link to current page
7679 parsoid=wt2html,wt2wt,html2html
7683 <p><strong class="selflink">local:Main Page</strong>
7686 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7690 Local interwiki link: prefix only (bug 64167)
7692 parsoid=wt2html,wt2wt,html2html
7696 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7699 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7703 Local interwiki link: with additional interwiki prefix (bug 61357)
7705 parsoid=wt2html,wt2wt,html2html
7707 [[local:meatball:Hello]]
7709 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7712 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7716 Multiple local interwiki link prefixes
7718 [[local:local:local:local:mi:local:Foo]]
7720 parsoid=wt2html,wt2wt,html2html
7722 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7725 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7729 ### Interlanguage links
7730 ### Language links (so that searching for '### language' matches..)
7736 parsoid=wt2html,wt2wt,html2html
7744 <p>Blah blah blah</p>
7745 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7749 Interlanguage link with spacing
7751 parsoid=wt2html,wt2wt,html2html
7759 <p>Blah blah blah</p>
7760 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7764 Double interlanguage link
7766 parsoid=wt2html,wt2wt,html2html
7775 <p>Blah blah blah</p>
7776 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7777 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7781 Interlanguage link variations
7783 parsoid=wt2html,wt2wt,html2html
7793 <p>Blah blah blah</p>
7794 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7795 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7796 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7800 Space and question mark encoding in interlanguage links (T95473)
7802 parsoid=wt2html,wt2wt,html2html
7810 <p>Blah blah blah</p>
7811 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
7815 Interlanguage link, with prefix links
7825 <p>Blah blah blah</p>
7826 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7830 Double interlanguage link, with prefix links (bug 8897)
7841 <p>Blah blah blah</p>
7842 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7843 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7847 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7855 <p>Blah blah blah</p>
7856 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7860 Parsoid-specific test: Wikilinks with should RT properly
7866 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7871 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7875 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7876 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7878 He&nbsp;llo [[Foo|He&nbsp;llo]]
7880 He&nbsp;llo [[He&nbsp;llo]]
7884 Parsoid: handle constructor well
7890 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7891 </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>
7894 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7896 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7905 # Note that `ko` isn't a known interlanguage prefix
7907 Parsoid: recognize interlanguage links without a target page
7917 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7919 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7922 # Note that `ko` isn't a known interwiki prefix
7924 Parsoid: recognize interwiki links without a target page
7926 parsoid=wt2html,wt2wt,html2html
7932 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7933 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7936 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7937 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7941 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7945 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7948 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7952 Interlanguage link with preceding local interwiki link (bug 68085)
7954 parsoid=wt2html,wt2wt,html2html
7957 [[local:es:Spanish]]
7960 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7964 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7968 Looks like an interlanguage link, but is actually a local interwiki
7970 parsoid=wt2html,wt2wt,html2html
7976 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7980 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7984 ### Redirects, Parsoid-only
7988 1. Simple redirect to page
7990 #REDIRECT [[Main Page]]
7992 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
7996 2. Other redirect variants
7998 #REDIRECT [[Main_Page]]
8000 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8003 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8004 # This tests the Parsoid bail-out code.
8006 3. Other redirect variants
8008 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8010 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8014 4. Redirect to a templated destination
8016 #REDIRECT [[{{echo|Foo}}bar]]
8018 <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"}]]}'/>
8024 parsoid=wt2html,wt2wt
8029 <li>REDIRECT [[]]</li></ol>
8033 Optional colon in #REDIRECT
8035 # the colon is archaic syntax. we support it for wt2html, but we
8036 # don't care that it roundtrips back to the modern syntax.
8037 parsoid=wt2html,html2html
8039 #REDIRECT:[[Main Page]]
8041 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8045 Whitespace in #REDIRECT with optional colon
8047 # the colon and gratuitous whitespace is archaic syntax. we support
8048 # it for wt2html, but we don't care that it roundtrips back to the
8049 # modern syntax (without extra whitespace)
8050 parsoid=wt2html,html2html
8057 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8061 Piped link in #REDIRECT
8063 # content after piped link is ignored. we support this syntax,
8064 # but don't care that the piped link is lost when we roundtrip this.
8067 #REDIRECT [[Main Page|bar]]
8069 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8073 Redirect to category (T104502)
8075 parsoid=wt2html,wt2wt
8077 #REDIRECT [[Category:Foo]]
8079 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8083 Redirect to category with URL encoding (T104502)
8087 #REDIRECT [[Category%3AFoo]]
8089 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8093 Redirect to category page
8095 #REDIRECT [[:Category:Foo]]
8097 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8101 Redirect to image page (1)
8103 #REDIRECT [[File:Wiki.png]]
8105 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8109 Redirect to image page (2)
8111 #REDIRECT [[Image:Wiki.png]]
8113 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8116 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8117 # Next test confirms this.
8119 Redirect to language (1) (T104918)
8121 parsoid=wt2html,wt2wt,html2html
8123 #REDIRECT [[en:File:Wiki.png]]
8125 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8129 Redirect to language (2) (T104918)
8131 #REDIRECT [[:en:File:Wiki.png]]
8133 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8137 Redirect to interwiki (T104918)
8139 #REDIRECT [[meatball:File:Wiki.png]]
8141 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8145 Non-English #REDIRECT
8149 #TILVÍSUN [[Main Page]]
8151 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8155 Redirect syntax under text isn't considered a redirect
8158 #redirect [[Main Page]]
8161 <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>
8164 # FIXME: Should hoist the redirect to the top of the page and ensure there
8171 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8191 Broken br tag sanitization
8199 # TODO: Fix html2html mode (bug 51055)!
8201 Parsoid: Broken br tag recognition
8214 Incorrecly removing closing slashes from correctly formed XHTML
8216 <br style="clear:both;" />
8218 <p><br style="clear:both;" />
8223 Failing to transform badly formed HTML into correct XHTML
8225 <br style="clear: left;">
8226 <br style="clear: right;">
8227 <br style="clear: both;">
8229 <p><br style="clear: left;" />
8230 <br style="clear: right;" />
8231 <br style="clear: both;" />
8235 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8236 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8238 Handling html with a div self-closing tag
8247 <p><div title />
8251 <p><div title=bar />
8252 <div title=bar/>
8254 <div title="bar/"></div>
8258 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8259 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8260 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8261 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8262 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8263 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8267 Handling html with a br self-closing tag
8276 <p><br title="title" />
8277 <br title="title" />
8294 Horizontal ruler (should it add that extra space?)
8309 Horizontal ruler -- 4+ dashes render hr
8318 Horizontal ruler -- eats additional dashes on the same line
8327 Horizontal ruler -- does not collapse dashes on consecutive lines
8338 Horizontal ruler -- <4 dashes render as plain text
8347 Horizontal ruler -- Supports content following dashes on same line
8359 ### Block-level elements
8368 <ul><li>Common list</li>
8370 <li>item 3</li></ul>
8381 <ol><li>Numbered list</li>
8383 <li> item 3</li></ol>
8397 ***#Number on level 4
8399 **#Number on level 3
8400 **#Number on level 3
8404 #** Level 3, but ordered
8407 <ol><li> with numbers</li></ol>
8408 <ul><li> and bullets</li></ul>
8409 <ol><li> and numbers</li></ol></li>
8411 <ul><li>bullet level 2
8412 <ul><li>bullet level 3
8413 <ol><li>Number on level 4</li></ol></li></ul></li>
8415 <ol><li>Number on level 3</li>
8416 <li>Number on level 3</li></ol></li></ul>
8417 <ol><li>number level 2</li></ol></li>
8419 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8420 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8431 <ul><li>bar</li></ul></li></ul>
8441 <ul><li><ul><li>foo</li></ul></li>
8447 Nested lists 3 (first element empty)
8453 <ul><li>bar</li></ul></li></ul>
8458 Nested lists 4 (first element empty)
8463 <ul><li><ul><li></li></ul></li>
8469 Nested lists 5 (both elements empty)
8474 <ul><li><ul><li></li></ul></li>
8480 Nested lists 6 (both elements empty)
8486 <ul><li></li></ul></li></ul>
8491 Nested lists 7 (skip initial nesting levels)
8495 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8500 Nested lists 8 (multiple nesting transitions)
8508 <ul><li><ul><li> bar</li></ul></li>
8509 <li> baz</li></ul></li>
8515 Nested lists 9 (extension interaction)
8521 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8525 1. Lists with start-of-line-transparent tokens before bullets: Comments
8538 2. Lists with start-of-line-transparent tokens before bullets: Template close
8543 <ul><li>foo bar</li>
8549 List items are not parsed correctly following a <pre> block (bug 785)
8555 <ul><li> <pre>foo</pre></li>
8556 <li> <pre>bar</pre></li>
8560 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8561 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8566 List items from template
8577 * notSOL{{inner list}}
8580 <ul><li> item 1</li>
8581 <li> item 2</li></ul>
8582 <ul><li> item 0</li>
8584 <li> item 2</li></ul>
8585 <ul><li> item 0</li>
8588 <li> item 2</li></ul>
8593 List interrupted by empty line or heading
8601 <ul><li> foo</li></ul>
8602 <ul><li><ul><li> bar</li></ul></li></ul>
8603 <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>
8604 <ul><li> Another list item</li></ul>
8609 Multiple list tags generated by templates
8630 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8633 <!--This line will NOT split the list-->
8635 <!--This line will NOT split the list either-->
8637 <!--foo--> <!----> <!--This line NOT split the list either-->
8648 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8651 <!--This line will NOT split the list-->
8653 <!--This line will NOT split the list either-->
8655 <!--foo--> <!----> <!--This line NOT split the list
8668 (The PHP parser relies on Tidy for the hack)
8670 parsoid=wt2html,wt2wt
8674 * {{echo|<li>templated li-hack}}
8675 * <!--foo--> <li> unsupported li-hack with preceding comments
8678 <li><li>not a li-hack
8685 <li>templated li-hack</li>
8686 <li>unsupported li-hack with preceding comments</li>
8689 <li>not a li-hack</li>
8694 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8721 Parsoid: Test of whitespace serialization with Templated bullets
8728 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8732 # ------------------------------------------------------------------------
8733 # The next set of tests are about Parsoid's ability to handle badly nested
8734 # tags (parse, minimize scope of fixup, and roundtrip back)
8735 # ------------------------------------------------------------------------
8738 Unbalanced closing block tags break a list
8739 (php parser relies on Tidy to fix up)
8757 # Parsoid fails this test, but it might be tricky to support properly.
8760 Unbalanced closing non-block tags don't break a list
8761 (php parser relies on Tidy to fix up)
8768 <li><span>a</span></li>
8769 <li><span>b</span></li>
8783 Unclosed formatting tags that straddle lists are closed and reopened
8784 (php parser relies on Tidy to fix up)
8786 parsoid=wt2html,wt2wt,html2html
8796 <ol><li> <s> a</s></li>
8797 <li><s> b </s></li></ol>
8802 1. List embedded in a formatting tag
8809 <li><small>foo</small></li>
8819 ## Ugly Parsoid output here
8820 ## Not sure what the right output is.
8822 2. List embedded in a formatting tag
8829 <li><small>a</small></li>
8830 <li><small>b</small></li>
8837 <li><small>b</small></li>
8841 # Ugly Parsoid and PHP parser output here
8842 # Not sure if we want to make this a test!
8845 ## 3. Unclosed formatting tags in list elements
8851 ## <li><small>a</small></li>
8852 ## <li><small><small>b</small></small></li>
8856 ## <li><small>a</small></li>
8858 ## <li><small>b</small></li>
8862 # This is a bug in the PHP parser + tidy combination.
8863 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8864 # and then fostered out of the table by tidy.)
8865 # We believe the Parsoid output to be correct.
8867 Table with missing opening <tr> tag
8869 parsoid=wt2html,wt2wt
8887 # Note that the current date is hard-coded as
8888 # 1970-01-01T00:02:03Z (a Thursday)
8889 # when running parser tests. The timezone is also fixed to GMT, so
8890 # local date will be identical to current date.
8893 Magic Word: {{CURRENTDAY}}
8902 Magic Word: {{CURRENTDAY2}}
8911 Magic Word: {{CURRENTDAYNAME}}
8920 Magic Word: {{CURRENTDOW}}
8929 Magic Word: {{CURRENTMONTH}}
8938 Magic Word: {{CURRENTMONTH1}}
8947 Magic Word: {{CURRENTMONTHABBREV}}
8949 {{CURRENTMONTHABBREV}}
8956 Magic Word: {{CURRENTMONTHNAME}}
8958 {{CURRENTMONTHNAME}}
8965 Magic Word: {{CURRENTMONTHNAMEGEN}}
8967 {{CURRENTMONTHNAMEGEN}}
8974 Magic Word: {{CURRENTTIME}}
8983 Magic Word: {{CURRENTHOUR}}
8992 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9001 Magic Word: {{CURRENTYEAR}}
9010 Magic Word: {{CURRENTTIMESTAMP}}
9012 {{CURRENTTIMESTAMP}}
9019 Magic Words LOCAL (UTC)
9023 * {{LOCALMONTHNAME}}
9024 * {{LOCALMONTHNAMEGEN}}
9025 * {{LOCALMONTHABBREV}}
9034 * {{LOCALTIMESTAMP}}
9049 <li> 19700101000203</li></ul>
9054 Magic Word: {{FULLPAGENAME}}
9056 title=[[User:Ævar Arnfjörð Bjarmason]]
9060 <p>User:Ævar Arnfjörð Bjarmason
9065 Magic Word: {{FULLPAGENAMEE}}
9067 title=[[User:Ævar Arnfjörð Bjarmason]]
9071 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9076 Magic Word: {{TALKSPACE}}
9078 title=[[User:Ævar Arnfjörð Bjarmason]]
9087 Magic Word: {{TALKSPACE}}, same namespace
9089 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9098 Magic Word: {{TALKSPACE}}, main namespace
9100 title=[[Parser Test]]
9109 Magic Word: {{TALKSPACEE}}
9111 title=[[User:Ævar Arnfjörð Bjarmason]]
9120 Magic Word: {{SUBJECTSPACE}}
9122 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9131 Magic Word: {{SUBJECTSPACE}}, same namespace
9133 title=[[User:Ævar Arnfjörð Bjarmason]]
9142 Magic Word: {{SUBJECTSPACE}}, main namespace
9144 title=[[Parser Test]]
9152 Magic Word: {{SUBJECTSPACEE}}
9154 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9163 Magic Word: {{NAMESPACE}}
9165 title=[[User:Ævar Arnfjörð Bjarmason]]
9174 Magic Word: {{NAMESPACEE}}
9176 title=[[User:Ævar Arnfjörð Bjarmason]]
9185 Magic Word: {{NAMESPACENUMBER}}
9187 title=[[User:Ævar Arnfjörð Bjarmason]]
9196 Magic Word: {{SUBPAGENAME}}
9198 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9207 Magic Word: {{SUBPAGENAMEE}}
9209 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9218 Magic Word: {{ROOTPAGENAME}}
9220 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9224 <p>Ævar Arnfjörð Bjarmason
9229 Magic Word: {{ROOTPAGENAMEE}}
9231 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9235 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9240 Magic Word: {{BASEPAGENAME}}
9242 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9246 <p>Ævar Arnfjörð Bjarmason
9251 Magic Word: {{BASEPAGENAMEE}}
9253 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9257 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9262 Magic Word: {{TALKPAGENAME}}
9264 title=[[User:Ævar Arnfjörð Bjarmason]]
9268 <p>User talk:Ævar Arnfjörð Bjarmason
9273 Magic Word: {{TALKPAGENAMEE}}
9275 title=[[User:Ævar Arnfjörð Bjarmason]]
9279 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9284 Magic Word: {{SUBJECTPAGENAME}}
9286 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9290 <p>User:Ævar Arnfjörð Bjarmason
9295 Magic Word: {{SUBJECTPAGENAMEE}}
9297 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9299 {{SUBJECTPAGENAMEE}}
9301 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9306 Magic Word: {{NUMBEROFFILES}}
9315 Magic Word: {{PAGENAME}}
9317 title=[[User:Ævar Arnfjörð Bjarmason]]
9321 <p>Ævar Arnfjörð Bjarmason
9326 Magic Word: {{PAGENAME}} with metacharacters
9328 title=[['foo & bar = baz']]
9332 <p><i>'foo & bar = baz'</i>
9335 <p><i>'foo & bar = baz'</i></p>
9339 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9341 title=[[*RFC 1234 http://example.com/]]
9345 <p>*RFC 1234 http://example.com/
9348 <p>*RFC 1234 http://example.com/</p>
9352 Magic Word: {{PAGENAMEE}}
9354 title=[[User:Ævar Arnfjörð Bjarmason]]
9358 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9363 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9365 title=[[*RFC 1234 http://example.com/]]
9369 <p>*RFC_1234_http://example.com/
9372 <p>*RFC_1234_http://example.com/</p>
9376 Magic Word: {{REVISIONID}}
9385 Magic Word: {{SCRIPTPATH}}
9394 Magic Word: {{STYLEPATH}}
9403 Magic Word: {{SERVER}}
9407 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9412 Magic Word: {{SERVERNAME}}
9421 Magic Word: {{SITENAME}}
9430 Case-sensitive magic words, when cased differently, should just be template transclusions
9437 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9438 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9439 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9440 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9445 Case-insensitive magic words should still work with weird casing.
9455 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9459 # From plwiki:PLOS_ONE
9461 Parsoid: Page property magic word with magic word contents
9463 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9465 <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>"}]]}'/>
9469 Parsoid: Template-generated DISPLAYTITLE
9471 {{{{echo|DISPLAYTITLE}}:Foo}}
9473 <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}}]}'/>
9477 Namespace 1 {{ns:1}}
9486 Namespace 1 {{ns:01}}
9495 Namespace 0 {{ns:0}} (bug 4783)
9503 Namespace 0 {{ns:00}} (bug 4783)
9511 Namespace -1 {{ns:-1}}
9520 Namespace User {{ns:User}}
9529 Namespace User talk {{ns:User_talk}}
9538 Namespace User talk {{ns:uSeR tAlK}}
9547 Namespace File {{ns:File}}
9556 Namespace File {{ns:Image}}
9565 Namespace (lang=de) Benutzer {{ns:User}}
9576 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9582 <p>Benutzer Diskussion
9590 {{urlencode:hi world?!}}
9591 {{urlencode:hi world?!|WIKI}}
9592 {{urlencode:hi world?!|PATH}}
9593 {{urlencode:hi world?!|QUERY}}
9603 Magic Word: prioritize type info over data-parsoid
9607 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9613 Magic Word: serialize on separate line (parsoid)
9615 parsoid=wt2wt,html2wt
9621 foo<meta property="mw:PageProp/notoc"/>bar
9625 Magic Word: rt non-english wikis
9632 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9639 Magic links: internal link to RFC (bug 479)
9643 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9648 Magic links: RFC (bug 479)
9652 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9657 Magic links: RFC (bug 65278)
9659 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9661 <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.
9666 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9668 RFC      822
9672 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9679 Magic links: ISBN (bug 1937)
9683 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9688 Magic links: ISBN (bug 65278)
9690 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9692 <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.
9695 <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>
9699 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9701 ISBN      978 0 316 09811 3
9707 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9716 Magic links: PMID incorrectly converts space to underscore
9720 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9725 Magic links: PMID (bug 65278)
9727 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9729 <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.
9734 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9736 PMID      1234
9740 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9751 Nonexistent template
9753 {{thistemplatedoesnotexist}}
9755 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9760 Template with invalid target containing tags
9762 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9764 <p>{{a<b>b</b>|foo|a=b|a = b}}
9769 Template with invalid target containing unclosed tag
9771 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9773 <p>{{a<b>|foo|a=b|a = b}}</b>
9778 Template with invalid target containing wikilink
9782 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9785 <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>
9789 Template with just whitespace in it, bug #68421
9793 <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>
9799 This is a test template
9807 <p>This is a test template
9812 Template with explicit namespace
9816 <p>This is a test template
9824 This is a test template with parameter {{{param}}}
9830 {{paramtest|param=foo}}
9832 <p>This is a test template with parameter foo
9837 Template:paramtestnum
9843 Template unnamed parameter
9845 {{paramtestnum|Main Page|the main page}}
9847 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9852 Template:templatesimple
9858 Template:templateredirect
9860 #redirect [[Template:templatesimple]]
9864 Template:templateasargtestnum
9870 Template:templateasargtest
9872 {{template{{{templ}}}}}
9876 Template:templateasargtest2
9882 Template with template name as unnamed argument
9884 {{templateasargtestnum|templatesimple}}
9891 Template with template name as argument
9893 {{templateasargtest|templ=simple}}
9900 Template with template name as argument (2)
9902 {{templateasargtest2|templ=templatesimple}}
9909 Template:templateasargtestdefault
9911 {{{{{templ|templatesimple}}}}}
9921 Template with default value
9923 {{templateasargtestdefault}}
9930 Template with default value (value set)
9932 {{templateasargtestdefault|templ=templa}}
9941 {{templateredirect}}
9946 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
9950 Template with argument in separate line
9952 {{ templateasargtest |
9960 Template with complex template as argument
9963 param ={{ templateasargtest |
9966 <p>This is a test template with parameter (test)
9971 Template with thumb image (with link in description)
9973 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9975 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>
9978 <p>This is a test template with parameter</p>
9979 <div class="thumb tright">
9980 <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>
9981 <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>
9985 <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>
9989 Template:complextemplate
9991 {{{1}}} {{paramtest|
9992 param ={{{param}}}}}
9996 Template with complex arguments
9999 param ={{ templateasargtest |
10000 templ = simple }}|[[Template:complextemplate|link]]}}
10002 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10007 BUG 553: link with two variables in a piped link
10010 |[[{{{1}}}|{{{2}}}]]
10015 <td>[[{{{1}}}|{{{2}}}]]
10021 Magic variable as template parameter
10023 {{paramtest|param={{SITENAME}}}}
10025 <p>This is a test template with parameter MediaWiki
10032 [[{{{param}}}|link]]
10036 Template parameter as link source
10038 {{linktest|param=Main Page}}
10040 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10045 Template:paramtest2
10047 including another template, {{paramtest|param={{{arg}}}}}
10051 Template passing argument to another template
10053 {{paramtest2|arg='hmm'}}
10055 <p>including another template, This is a test template with parameter 'hmm'
10066 Template as link source
10070 [[{{linktest2}}|Main Page]]
10072 [[{{linktest2}}]]Page
10074 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10075 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10076 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10094 Template infinite loop
10098 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10103 Template from main namespace
10122 BUG 529: Template with table, not included at beginning of line
10141 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10161 BUG 41: Template parameters shown as broken links
10170 Template with targets containing wikilinks
10174 {{[[{{echo|foo}}]]}}
10176 {{{{echo|[[foo}}]]}}
10178 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10179 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10191 Templates: Double quotes as template target
10198 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10203 Template:MSGNW test
10205 ''None'' of '''this''' should be
10207 but rather passed unmodified
10214 # hmm, fix this or just deprecate msgnw and document its behavior?
10218 {{msgnw:MSGNW test}}
10220 <p>''None'' of '''this''' should be
10222  but rather passed unmodified
10223 {{test}}
10233 {{int:youhavenewmessages|lots of money|not!}}
10235 <p>You have lots of money (not!).
10240 int keyword - non-existing message
10251 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10255 <includeonly> and <noinclude> being included
10266 <onlyinclude>Foo</onlyinclude>bar
10270 <onlyinclude> being included
10282 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10286 <onlyinclude> and <includeonly> being included
10295 <includeonly> and <noinclude> on a page
10297 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10304 Un-closed <noinclude>
10311 <onlyinclude> on a page
10313 <onlyinclude>Foo</onlyinclude>bar
10320 Un-closed <onlyinclude>
10327 Self-closed noinclude, includeonly, onlyinclude tags
10338 Unbalanced includeonly and noinclude tags
10342 |b</noinclude></noinclude>
10343 |c</noinclude></includeonly>
10344 |d</includeonly></includeonly>
10353 <td>c</includeonly>
10355 <td>d</includeonly></includeonly>
10361 Template:Includeonly section
10364 ==Includeonly section==
10370 Bug 6563: Edit link generation for section shown by <includeonly>
10372 {{includeonly section}}
10374 <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>
10375 <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>
10379 # Uses same input as the contents of [[Template:Includeonly section]]
10381 Bug 6563: Section extraction for section shown by <includeonly>
10386 ==Includeonly section==
10394 Bug 6563: Edit link generation for section suppressed by <includeonly>
10397 ==Includeonly section==
10401 <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>
10406 Bug 6563: Section extraction for section suppressed by <includeonly>
10411 ==Includeonly section==
10419 Un-closed <includeonly>
10426 Includes and comments at SOL
10428 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10432 </noinclude>* stuff
10435 <includeonly>can have stuff</includeonly>=== here ===
10438 <h2><span class="mw-headline" id="hu">hu</span></h2>
10441 <ul><li> stuff</li>
10442 <li> here</li></ul>
10443 <h3><span class="mw-headline" id="here">here</span></h3>
10446 <!-- 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>
10448 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10450 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10451 <li> here</li></ul>
10453 <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>
10457 # TODO: test with DOM fragment reuse!
10459 Parsoid: DOM fragment reuse
10461 parsoid=wt2wt,wt2html
10463 a{{echo|b<table></table>c}}d
10475 <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>
10477 <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">
10478 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10479 </span><p about="#mwt2">cd</p>
10481 <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">
10483 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10485 </span><p about="#mwt3">b</p>
10489 Parsoid: Merge double tds (bug 50603)
10494 |{{echo|{{!}} foo}}
10498 <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>
10503 Parsoid: Merge double tds in nested transclusion content (bug 50603)
10509 |{{echo|{{!}} foo}}
10513 <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}}]}'>
10515 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10521 ### <includeonly> and <noinclude> in attributes
10524 0. includeonly around the entire attribute
10526 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10528 <p><span id="v2">bar</span>
10533 1. includeonly in html attr key
10535 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10537 <p><span id="foo">bar</span>
10542 2. includeonly in html attr value
10544 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10545 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10547 <p><span id="v1">bar</span>
10548 <span id="v1">bar</span>
10553 3. includeonly in part of an attr value
10555 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10557 <p><span style="color:red;">bar</span>
10562 4. includeonly in table attributes
10586 ### Token Stream Patcher tests
10588 ### These tests won't always pass wt2wt and other modes because
10589 ### on serialization, the table will be output on a new line.
10590 ### For now, we are blacklisting them, and using this to test selser.
10594 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10596 parsoid=wt2html,wt2wt
10598 {{echo|}}{| width = '100%'
10602 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10603 <tbody><tr><td>foo</td></tr>
10608 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10610 parsoid=wt2html,wt2wt
10612 <includeonly>a</includeonly>{| {{{b}}}
10616 <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}}}":""}}'>
10617 <tbody><tr><td>c</td></tr>
10623 ### Testing parsing of templates where a template arg
10624 ### has the same name as the template itself.
10630 {{{quote|{{{1}}}}}}
10634 Templates: Template Name/Arg clash: 1. Use of positional param
10643 Templates: Template Name/Arg clash: 2. Use of named param
10645 {{quote|quote=foo}}
10652 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10661 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10665 Templates: 1. Simple use
10674 Templates: 2. Inside a block tag
10676 <div>{{echo|Foo}}</div>
10677 <blockquote>{{echo|Foo}}</blockquote>
10680 <blockquote>Foo</blockquote>
10690 Templates: P-wrapping: 1a. Templates on consecutive lines
10701 Templates: P-wrapping: 1b. Templates on consecutive lines
10715 Templates: P-wrapping: 1c. Templates on consecutive lines
10718 {{echo|bar}} <div>baz</div>
10731 Templates: P-wrapping: 1d. Template preceded by comment-only line
10740 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10744 Templates: Inline Text: 1. Multiple template uses
10746 {{echo|Foo}}bar{{echo|baz}}
10753 Templates: Inline Text: 2. Back-to-back template uses
10755 {{echo|Foo}}{{echo|bar}}
10762 Templates: Block Tags: 1. Multiple template uses
10764 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10766 <div>Foo</div><div>bar</div><div>baz</div>
10771 Templates: Block Tags: 2. Back-to-back template uses
10773 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10775 <div>Foo</div><div>bar</div>
10779 # This is an edge case relating to paragraph wrapping.
10781 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10786 <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
10791 Templates: Links: 1. Simple example
10793 {{echo|[[Foo|bar]]}}
10795 <p><a href="/wiki/Foo" title="Foo">bar</a>
10800 Templates: Links: 2. Generation of link href
10802 [[{{echo|Foo}}|bar]]
10804 <p><a href="/wiki/Foo" title="Foo">bar</a>
10809 Templates: Links: 3. Generation of part of a link href
10811 [[Fo{{echo|o}}|bar]]
10813 [[Foo{{echo|bar}}]]
10815 [[Foo{{echo|bar}}baz]]
10817 [[Foo{{echo|bar}}|bar]]
10819 [[:Foo{{echo|bar}}]]
10821 [[:Foo{{echo|bar}}|bar]]
10823 <p><a href="/wiki/Foo" title="Foo">bar</a>
10824 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10825 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10826 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10827 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10828 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10833 Templates: Links: 4. Multiple templates generating link href
10835 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10837 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10842 Templates: Links: 5. Generation of link text
10844 [[Foo|{{echo|bar}}]]
10846 <p><a href="/wiki/Foo" title="Foo">bar</a>
10851 Templates: Links: 5. Nested templates (only outermost template should be marked)
10853 {{echo|[[{{echo|Foo}}|bar]]}}
10855 <p><a href="/wiki/Foo" title="Foo">bar</a>
10860 Templates: HTML Tag: 1. Generation of HTML attr. key
10862 <div {{echo|style}}="color:red;">foo</div>
10864 <div style="color:red;">foo</div>
10869 Templates: HTML Tag: 2. Generation of HTML attr. value
10871 <div style={{echo|'color:red;'}}>foo</div>
10873 <div style="color:red;">foo</div>
10878 Templates: HTML Tag: 3. Generation of HTML attr key and value
10880 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10882 <div style="color:red;">foo</div>
10887 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10889 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10891 <div title="This is a long title with just one piece templated">foo</div>
10896 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10898 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10900 <div title="This is a long title with just one piece templated">foo</div>
10905 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10907 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10909 <div title="This is a long title with just one piece templated">foo</div>
10913 # SSS FIXME: While it is great we added support for all this,
10914 # do we want to make this part of the spec? Maybe we want to
10915 # deprecate this kind of usage in the future?
10917 Templates: HTML Tag: 7. Generation of partial attribute key string
10919 <div st{{echo|yle}}="color:red;">foo</div>
10921 <div style="color:red;">foo</div>
10926 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10928 <div {{echo|1=id="v1"}}>bar</div>
10930 <div id="v1">bar</div>
10935 Templates: HTML Tag: 9. Multiple template-generated attributes
10937 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10939 <div id="v1" title="foo">bar</div>
10944 Templates: Support for templates generating attributes and content
10946 {| {{mixed_attr_content_template}}
10951 <table style="color:red;" title="T48811">
10961 <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|}"]}'>
10970 1. Entities and nowikis inside templated attributes should be handled correctly
10972 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
10974 <div style="background:#f9f9f9;">foo</div>
10977 <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>
10981 2. Entities and nowikis inside templated attributes should be handled correctly
10984 |{{table_attribs_3}}
10989 <td style="background:#f9f9f9;">Foo
10994 <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>
10999 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11002 |{{table_attribs_3}}
11007 <td style="background:#f9f9f9;">Foo
11011 <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}}]}'>
11012 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11017 Templates: HTML Tables: 1. Generating start of a HTML table
11019 {{echo|<table><tr><td>foo</td>}}</tr></table>
11021 <table><tr><td>foo</td></tr></table>
11026 Templates: HTML Tables: 2a. Generating middle of a HTML table
11028 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11030 <table><tr><td>foo</td></tr></table>
11035 Templates: HTML Tables: 2b. Generating middle of a HTML table
11037 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11039 <table><tr><td>foo</td></tr></table>
11044 Templates: HTML Tables: 3. Generating end of a HTML table
11046 <table><tr>{{echo|<td>foo</td></tr></table>}}
11048 <table><tr><td>foo</td></tr></table>
11053 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11055 {{echo|<table>}}<tr><td>foo</td></tr></table>
11057 <table><tr><td>foo</td></tr></table>
11062 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11064 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11066 <table><tr><td>foo</td></tr></table>
11071 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11073 <table><tr>{{echo|<td>}}foo</td></tr></table>
11075 <table><tr><td>foo</td></tr></table>
11080 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11082 <table><tr><td>foo{{echo|</td>}}</tr></table>
11084 <table><tr><td>foo</td></tr></table>
11089 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11091 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11093 <table><tr><td>foo</td></tr></table>
11098 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11100 <table><tr><td>foo</td></tr>{{echo|</table>}}
11102 <table><tr><td>foo</td></tr></table>
11107 Templates: HTML Tables: 5. Proper fostering of categories from inside
11109 parsoid=wt2html,wt2wt
11111 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11112 <!--Two categories (Bug 50330)-->
11113 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11115 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11116 <!--Two categories (Bug 50330)-->
11117 <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>
11121 Templates: Wiki Tables: 1a. Fostering of entire template content
11129 <tr><td></td></tr></table>
11141 Templates: Wiki Tables: 1b. Fostering of entire template content
11154 <tr><td></td></tr></table>
11168 Templates: Wiki Tables: 2. Fostering of partial template content
11178 <tr><td></td></tr></table>
11191 Templates: Wiki Tables: 3. td-content via multiple templates
11194 {{echo|{{pipe}}a}}{{echo|b}}
11205 Templates: Wiki Tables: 4. Templated tags, no content
11211 <tr><td></td></tr></table>
11216 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11230 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11243 ## This test case is very specific to Parsoid's internals
11244 ## and is hence only tested for Parsoid's code. Parsoid uses
11245 ## a <meta> marker tag for <ref> tags and they are expanded
11246 ## much later. We are verifying that this <meta> tag usage
11247 ## doesn't prevent foster parenting.
11249 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11251 {{PartialTable}}<ref>foo</ref>
11256 <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">
11260 <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>
11264 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11274 <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{{!}}}"]}'>
11275 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11279 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11284 Templates: Lists: Multi-line list-items via templates
11286 *{{echo|a {{nonexistent|
11288 *{{echo|b {{nonexistent|
11291 <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>
11292 <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>
11297 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11299 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11301 <p><i>ab</i>c<i>d</i>e
11306 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11307 (PHP parser generates misnested html)
11309 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11311 <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>
11315 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11316 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11318 parsoid=wt2html,wt2wt
11320 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11322 <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>
11323 <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>
11324 <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>
11328 Templates: Ugly nesting: 4. Divs opened/closed across templates
11330 a<div>b{{echo|c</div>d}}e
11341 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11347 |{{echo|foo</table>}}
11351 <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|}"]}'>
11355 <td>foo</td></tr></tbody></table><span about="#mwt1">
11356 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11361 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11371 <td>1. {{echo|foo </table>}}</td>
11373 <td>2. {{echo|baz </table>}}</td>
11386 <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>"]}'>
11391 <td>1. foo </td></tr></tbody></table></td>
11393 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11394 </span><span about="#mwt2">
11395 </span><span about="#mwt2">
11396 </span><span about="#mwt2">abc</span><span about="#mwt2">
11397 </span><span about="#mwt2">
11398 </span><span about="#mwt2">
11399 </span><span about="#mwt2">
11400 </span><span about="#mwt2">
11401 </span><span about="#mwt2">
11402 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11403 </span><span about="#mwt2">
11408 Templates: Ugly templates: 3. newline-only template parameter
11417 # This looks like a bug: a single newline triggers p/br for some reason.
11419 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11428 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11429 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11431 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11437 <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
11438 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11442 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11443 # that are "identical" and generate nesting cycles in the algorithm
11445 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11447 {{echo|<table><tr><td><table>}}
11451 <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"}'>
11452 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11453 </table></td></tr></tbody></table>
11457 Parser Functions: 1. Simple example
11466 Parser Functions: 2. Nested use (only outermost should be marked up)
11475 ### Pre-save transform tests
11478 pre-save transform: subst:
11484 This is a test template
11488 pre-save transform: normal template
11498 pre-save transform: nonexistent template
11502 {{thistemplatedoesnotexist}}
11504 {{thistemplatedoesnotexist}}
11509 pre-save transform: subst magic variables
11518 # This is bug 89, which I fixed. -- wtm
11520 pre-save transform: subst: templates with parameters
11524 {{subst:paramtest|param="something else"}}
11526 This is a test template with parameter "something else"
11530 Template:nowikitest
11532 <nowiki>'''not wiki'''</nowiki>
11536 pre-save transform: nowiki in subst (bug 1188)
11540 {{subst:nowikitest}}
11542 <nowiki>'''not wiki'''</nowiki>
11547 Template:commenttest
11549 This template has <!-- a comment --> in it.
11553 pre-save transform: comment in subst (bug 1936)
11557 {{subst:commenttest}}
11559 This template has <!-- a comment --> in it.
11563 pre-save transform: unclosed tag
11567 <nowiki>'''not wiki'''
11569 <nowiki>'''not wiki'''
11573 pre-save transform: mixed tag case
11577 <NOwiki>'''not wiki'''</noWIKI>
11579 <NOwiki>'''not wiki'''</noWIKI>
11583 pre-save transform: unclosed comment in <nowiki>
11587 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11589 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11592 # Leading @ in this template definition works around a limitation
11593 # in parsoid's parserTests which otherwise strips the <span> from the
11594 # result (confusing it for a template wrapper)
11598 @<span onmouseover="alert('crap')">Oh no</span>
11602 (confirming safety of fix for subst bug 1936)
11604 {{Template:dangerous}}
11606 <p>@<span>Oh no</span>
11611 pre-save transform: comment containing gallery (bug 5024)
11615 <!-- <gallery>data</gallery> -->
11617 <!-- <gallery>data</gallery> -->
11621 pre-save transform: comment containing extension
11625 <!-- <tag>data</tag> -->
11627 <!-- <tag>data</tag> -->
11631 pre-save transform: comment containing nowiki
11635 <!-- <nowiki>data</nowiki> -->
11637 <!-- <nowiki>data</nowiki> -->
11641 pre-save transform: <noinclude> in subst (bug 3298)
11651 pre-save transform: <onlyinclude> in subst (bug 3298)
11655 {{subst:Includes2}}
11663 {{<includeonly>subst:</includeonly>Includes}}
11667 Template:SafeSubstTest
11669 {{<includeonly>safesubst:</includeonly>Includes}}
11673 bug 22297: safesubst: works during PST
11677 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11683 bug 22297: safesubst: works during normal parse
11692 subst: does not work during normal parse
11696 <p>{{subst:Includes}}
11701 pre-save transform: context links ("pipe trick")
11705 [[Article (context)|]]
11708 [[Bar:Article (context)|]]
11709 [[:Bar:Article (context)|]]
11711 [[|Article (context)]]
11715 [[Article (context)|Article]]
11716 [[Bar:Article|Article]]
11717 [[:Bar:Article|Article]]
11718 [[Bar:Article (context)|Article]]
11719 [[:Bar:Article (context)|Article]]
11721 [[Article (context)]]
11722 [[Bar:X (Y) Z|X (Y) Z]]
11723 [[:Bar:X (Y) Z|X (Y) Z]]
11727 pre-save transform: context links ("pipe trick") with interwiki prefix
11731 [[interwiki:Article|]]
11732 [[:interwiki:Article|]]
11733 [[interwiki:Bar:Article|]]
11734 [[:interwiki:Bar:Article|]]
11736 [[interwiki:Article|Article]]
11737 [[:interwiki:Article|Article]]
11738 [[interwiki:Bar:Article|Bar:Article]]
11739 [[:interwiki:Bar:Article|Bar:Article]]
11743 pre-save transform: context links ("pipe trick") with parens in title
11745 pst title=[[Somearticle (context)]]
11749 [[Article (context)|Article]]
11753 pre-save transform: context links ("pipe trick") with comma in title
11755 pst title=[[Someplace, Somewhere]]
11758 [[Otherplace, Elsewhere|]]
11759 [[Otherplace, Elsewhere, Anywhere|]]
11761 [[Otherplace, Somewhere|Otherplace]]
11762 [[Otherplace, Elsewhere|Otherplace]]
11763 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11767 pre-save transform: context links ("pipe trick") with parens and comma
11769 pst title=[[Someplace (IGNORED), Somewhere]]
11772 [[Otherplace (place), Elsewhere|]]
11774 [[Otherplace, Somewhere|Otherplace]]
11775 [[Otherplace (place), Elsewhere|Otherplace]]
11779 pre-save transform: context links ("pipe trick") with comma and parens
11781 pst title=[[Who, me? (context)]]
11784 [[Me, Myself, and I (1937 song)|]]
11786 [[Yes, you. (context)|Yes, you.]]
11787 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11791 pre-save transform: context links ("pipe trick") with namespace
11793 pst title=[[Ns:Somearticle]]
11797 [[Ns:Article|Article]]
11801 pre-save transform: context links ("pipe trick") with namespace and parens
11803 pst title=[[Ns:Somearticle (context)]]
11807 [[Ns:Article (context)|Article]]
11811 pre-save transform: context links ("pipe trick") with namespace and comma
11813 pst title=[[Ns:Somearticle, Context, Whatever]]
11817 [[Ns:Article, Context, Whatever|Article]]
11821 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11823 pst title=[[Ns:Somearticle, Context (context)]]
11827 [[Ns:Article (context)|Article]]
11831 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11833 pst title=[[Ns:Somearticle (IGNORED), Context]]
11837 [[Ns:Article, Context|Article]]
11841 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11845 [[Article(context)|]]
11846 [[Bar:Article(context)|]]
11847 [[:Bar:Article(context)|]]
11848 [[|Article(context)]]
11852 [[Article(context)|Article]]
11853 [[Bar:Article(context)|Article]]
11854 [[:Bar:Article(context)|Article]]
11855 [[Article(context)]]
11856 [[Bar:X(Y)Z|X(Y)Z]]
11857 [[:Bar:X(Y)Z|X(Y)Z]]
11861 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11865 [[Article (context)|]]
11866 [[Bar:Article (context)|]]
11867 [[:Bar:Article (context)|]]
11868 [[|Article (context)]]
11872 [[Article (context)|Article]]
11873 [[Bar:Article (context)|Article]]
11874 [[:Bar:Article (context)|Article]]
11875 [[Article (context)]]
11876 [[Bar:X (Y) Z|X (Y) Z]]
11877 [[:Bar:X (Y) Z|X (Y) Z]]
11881 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11885 [[Article(context)|]]
11886 [[Bar:Article(context)|]]
11887 [[:Bar:Article(context)|]]
11888 [[|Article(context)]]
11892 [[Article(context)|Article]]
11893 [[Bar:Article(context)|Article]]
11894 [[:Bar:Article(context)|Article]]
11895 [[Article(context)]]
11896 [[Bar:X(Y)Z|X(Y)Z]]
11897 [[:Bar:X(Y)Z|X(Y)Z]]
11901 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11905 [[Article (context), context|]]
11906 [[Article (context),context|]]
11907 [[Bar:Article (context), context|]]
11908 [[Bar:Article (context),context|]]
11909 [[:Bar:Article (context), context|]]
11910 [[:Bar:Article (context),context|]]
11912 [[Article (context), context|Article]]
11913 [[Article (context),context|Article]]
11914 [[Bar:Article (context), context|Article]]
11915 [[Bar:Article (context),context|Article]]
11916 [[:Bar:Article (context), context|Article]]
11917 [[:Bar:Article (context),context|Article]]
11921 pre-save transform: trim trailing empty lines
11925 Empty lines are trimmed
11931 Empty lines are trimmed
11935 pre-save transform: Signature expansion
11940 * <noinclude>~~~</noinclude>
11941 * <includeonly>~~~</includeonly>
11942 * <onlyinclude>~~~</onlyinclude>
11944 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11945 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11946 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11947 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11952 pre-save transform: Signature expansion in nowiki tags (bug 93)
11958 <nowiki>~~~~</nowiki>
11960 <includeonly><nowiki>~~~~</nowiki></includeonly>
11962 <noinclude><nowiki>~~~~</nowiki></noinclude>
11964 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11966 {{subst:Foo}} shall be converted to FOO
11968 As well as inside noinclude/onlyinclude
11969 <noinclude>{{subst:Foo}}</noinclude>
11970 <onlyinclude>{{subst:Foo}}</onlyinclude>
11972 But not inside includeonly
11973 <includeonly>{{subst:Foo}}</includeonly>
11977 <nowiki>~~~~</nowiki>
11979 <includeonly><nowiki>~~~~</nowiki></includeonly>
11981 <noinclude><nowiki>~~~~</nowiki></noinclude>
11983 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11985 FOO shall be converted to FOO
11987 As well as inside noinclude/onlyinclude
11988 <noinclude>FOO</noinclude>
11989 <onlyinclude>FOO</onlyinclude>
11991 But not inside includeonly
11992 <includeonly>{{subst:Foo}}</includeonly>
11996 Parsoid: Recognize nowiki with trailing space in tags
12000 <nowiki ><div>[[foo]]</nowiki >
12008 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12015 Parsoid: Recognize nowiki with odd capitalization
12019 <noWikI ><div>[[foo]]</Nowiki >
12021 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12026 Parsoid: Escape nowiki with trailing space in tags
12030 <p><nowiki > foo </nowiki ></p>
12031 <p>a<nowiki />b</p>
12032 <p>c<nowiki/ >d</p>
12034 <nowiki > foo </nowiki >
12042 Parsoid: Escape weird noWikI capitalizations
12046 <p><noWikI > foo </NoWikI ></p>
12048 <noWikI > foo </NoWikI >
12052 ### Message transform tests
12055 message transform: magic variables
12065 message transform: should not transform wiki markup
12075 message transform: <noinclude> in transcluded template (bug 4926)
12085 message transform: <onlyinclude> in transcluded template (bug 4926)
12095 {{#special:}} page name, known
12099 {{#special:Recentchanges}}
12101 Special:RecentChanges
12105 {{#special:}} page name with subpage, known
12109 {{#special:Recentchanges/param}}
12111 Special:RecentChanges/param
12115 {{#special:}} page name, unknown
12119 {{#special:foobar nonexistent}}
12121 Special:Foobar nonexistent
12125 {{#speciale:}} page name, known
12129 {{#speciale:Recentchanges}}
12131 Special:RecentChanges
12135 {{#speciale:}} page name with subpage, known
12139 {{#speciale:Recentchanges/param}}
12141 Special:RecentChanges/param
12145 {{#speciale:}} page name, unknown
12149 {{#speciale:foobar nonexistent}}
12151 Special:Foobar_nonexistent
12157 ### For Parsoid-specific tests, see
12158 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12163 parsoid=wt2html,wt2wt,html2html
12165 [[Image:foobar.jpg]]
12167 <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>
12170 <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>
12174 Simple image (using File: namespace, now canonical)
12176 [[File:Foobar.jpg]]
12178 <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>
12181 <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>
12185 Right-aligned image
12187 [[File:Foobar.jpg|right]]
12189 <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>
12192 <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>
12198 [[File:Foobar.jpg|right|Caption text]]
12200 <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>
12203 <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>
12207 Image with caption, bug 53312 #1
12209 [[File:Foobar.jpg|right|Caption page stuff]]
12211 <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>
12214 <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>
12218 Image with caption, bug 53312 #2
12220 [[File:Foobar.jpg|right|Caption page=]]
12222 <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>
12225 <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>
12229 Image with caption, bug 53312 #3
12231 [[File:Foobar.jpg|right|Caption page=stuff]]
12233 <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>
12236 <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>
12240 Allow empty links in image captions (Bug 60753)
12244 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12249 <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>
12252 <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>
12254 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12255 </figcaption></figure>
12259 Titles in unlinked images (T23454)
12261 [[File:Foobar.jpg|link=|stuff]]
12263 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12268 Link with empty target
12277 Image with link trail
12279 Linktrails should not work for images: [[File:Foobar.jpg]]s
12281 <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
12284 <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>
12288 Image with empty attribute
12290 parsoid=wt2html,wt2wt,html2html
12292 [[File:Foobar.jpg|right||Caption text]]
12294 <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>
12297 <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>
12301 1. Block image with individual attributes from templates
12303 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12305 <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>
12308 <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>
12312 2. Block Image with individual attributes from templates
12314 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12316 <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>
12319 <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>
12323 3. Inline image with individual attributes from templates
12325 [[File:Foobar.jpg|{{echo|50px}}]]
12327 <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>
12330 <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>
12333 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12334 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12336 Image with multiple attributes from the same template
12338 [[File:Foobar.jpg|{{image_attribs}}]]
12340 <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>
12343 <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>
12347 Image with link tails
12351 123[[File:Foobar.jpg]]456
12352 123[[File:Foobar.jpg|right]]456
12353 123[[File:Foobar.jpg|thumb]]456
12355 <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
12357 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
12358 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
12361 <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>
12363 <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>
12365 <div class="thumb tright">
12366 <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>
12367 <div class="thumbcaption">
12368 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12374 <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>
12375 <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>
12376 <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>
12380 Image with multiple captions -- only last one is accepted
12382 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12384 <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>
12387 <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>
12391 Image with multiple widths -- use last
12393 [[File:Foobar.jpg|200px|300px|caption]]
12395 <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>
12398 <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>
12402 Image with multiple alignments -- use first (bug 48664)
12406 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12408 [[File:Foobar.jpg|middle|text-top|caption]]
12410 <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>
12411 <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>
12414 <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>
12415 <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>
12419 Image with width attribute at different positions
12421 [[File:Foobar.jpg|200px|right|Caption]]
12422 [[File:Foobar.jpg|right|200px|Caption]]
12423 [[File:Foobar.jpg|right|Caption|200px]]
12425 <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>
12426 <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>
12427 <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>
12430 <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>
12431 <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>
12432 <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>
12435 # a sad bit of backward-compatibility
12437 Image with size specified with pxpx (bug 13500, 51628)
12439 parsoid=wt2html,wt2wt,html2html
12441 [[File:Foobar.jpg|20pxpx]]
12442 [[File:Foobar.jpg|200x20pxpx]]
12444 <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>
12445 <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>
12448 <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>
12452 Image with link parameter, wiki target
12454 [[File:Foobar.jpg|link=Main Page]]
12456 <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>
12459 <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>
12462 # parsoid bug 49293 (part 1)
12464 Image with link parameter, URL target
12466 [[File:Foobar.jpg|link=http://example.com/]]
12468 <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>
12471 <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>
12474 # parsoid bug 49293 (part 2)
12476 Image with link parameter, protocol-less URL target
12478 [[File:Foobar.jpg|link=//example.com/]]
12480 <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>
12483 <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>
12487 Image with link parameter, wgExternalLinkTarget
12489 [[Image:foobar.jpg|link=http://example.com/]]
12491 wgExternalLinkTarget='foobar'
12493 <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>
12498 Image with link parameter, wgNoFollowLinks set to false
12500 [[Image:foobar.jpg|link=http://example.com/]]
12502 wgNoFollowLinks=false
12504 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12509 Image with link parameter, wgNoFollowDomainExceptions
12511 [[Image:foobar.jpg|link=http://example.com/]]
12513 wgNoFollowDomainExceptions='example.com'
12515 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12520 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12522 [[Image:foobar.jpg|link=http://example.com/|Title]]
12524 wgExternalLinkTarget='foobar'
12526 <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>
12531 Image with empty link parameter
12533 [[File:Foobar.jpg|link=]]
12535 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12538 <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>
12542 Image with link parameter (wiki target) and unnamed parameter
12544 [[File:Foobar.jpg|link=Main_Page|Title]]
12546 <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>
12549 <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>
12553 Image with link parameter (URL target) and unnamed parameter
12555 [[File:Foobar.jpg|link=http://example.com/|Title]]
12557 <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>
12560 <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>
12564 Thumbnail image with link parameter
12567 parsoid=wt2html,wt2wt,html2html
12569 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12571 <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>
12574 <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>
12578 Manually-specified thumbnail image
12582 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12584 <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>
12587 <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>
12591 Manually-specified thumbnail image with explicit link to wiki page
12594 parsoid=wt2html,wt2wt,html2html
12596 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12598 <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>
12601 <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>
12605 Manually-specified thumbnail image with explicit link to url
12608 parsoid=wt2html,wt2wt,html2html
12610 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12612 <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>
12615 <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>
12619 Manually-specified thumbnail image with explicit no link
12622 parsoid=wt2html,wt2wt,html2html
12624 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12626 <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>
12629 <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>
12633 Manually-specified thumbnail image with explicit link and alt text
12636 parsoid=wt2html,wt2wt,html2html
12638 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12640 <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>
12643 <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>
12647 Image with frame and link
12649 parsoid=wt2html,wt2wt,html2html
12651 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12653 <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>
12656 <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>
12660 Image with frame and link and explicit alt
12662 parsoid=wt2html,wt2wt,html2html
12664 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12666 <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>
12669 <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>
12673 Image with wiki markup in implicit alt
12675 parsoid=wt2html,wt2wt,html2html
12677 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12679 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12681 <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>
12682 </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>
12685 <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>
12686 <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>
12690 Alt image option should handle most kinds of wikitext without barfing
12692 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12694 <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>
12697 <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>
12700 ###################
12701 # Conflicting image format options.
12702 # First option specified should 'win'.
12703 # All three cases in each test should be identical.
12706 Image with 'frameless' first.
12708 parsoid=wt2html,wt2wt,html2html
12710 [[File:Foobar.jpg|frameless|caption]]
12712 [[File:Foobar.jpg|frameless|frame|caption]]
12714 [[File:Foobar.jpg|frameless|thumb|caption]]
12716 <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>
12717 </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>
12718 </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>
12721 <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>
12722 <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>
12723 <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>
12727 Image with 'frame' first.
12729 parsoid=wt2html,wt2wt,html2html
12731 [[File:Foobar.jpg|frame|caption]]
12732 [[File:Foobar.jpg|frame|frameless|caption]]
12733 [[File:Foobar.jpg|frame|thumb|caption]]
12735 <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>
12736 <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>
12737 <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>
12740 <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>
12741 <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>
12742 <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>
12746 Image with 'thumb' first.
12748 parsoid=wt2html,wt2wt,html2html
12750 [[File:Foobar.jpg|thumb|caption]]
12751 [[File:Foobar.jpg|thumb|frameless|caption]]
12752 [[File:Foobar.jpg|thumb|frame|caption]]
12754 <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>
12755 <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>
12756 <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>
12759 <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>
12760 <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>
12761 <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>
12764 ###################
12766 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12767 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12768 # Foobar has actual size of 1941x220
12769 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12770 # a scalable format.
12771 # 2. Framed images always ignore size options; always render at default size.
12772 # 3. "Unspecified format" and border are the only types which can be
12776 Image: "unspecified format" and border enlarge
12778 parsoid=wt2html,wt2wt,html2html
12780 [[File:Foobar.jpg|2000px]]
12782 [[File:Foobar.jpg|border|2000px]]
12784 <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>
12785 </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>
12788 <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>
12789 <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>
12793 Image: "unspecified format" and border reduce
12795 parsoid=wt2html,wt2wt,html2html
12797 [[File:Foobar.jpg|1000px]]
12799 [[File:Foobar.jpg|border|1000px]]
12801 <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>
12802 </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>
12805 <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>
12806 <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>
12810 Image: thumbs reduce
12812 parsoid=wt2html,wt2wt,html2html
12814 [[File:Foobar.jpg|thumb|50px]]
12816 <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>
12819 <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>
12823 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12825 parsoid=wt2html,wt2wt,html2html
12827 [[File:Foobar.jpg|thumb|2000px]]
12829 [[File:Foobar.svg|thumb|2000px]]
12831 <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>
12832 <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>
12835 <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>
12836 <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>
12840 Image: frameless can reduce in size
12842 parsoid=wt2html,wt2wt,html2html
12844 [[File:Foobar.jpg|frameless|50px]]
12846 <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>
12849 <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>
12853 Image: bitmap frameless can't be enlarged past original size, but vector can
12855 parsoid=wt2html,wt2wt,html2html
12857 [[File:Foobar.jpg|frameless|2000px]]
12859 [[File:Foobar.svg|frameless|2000px]]
12861 <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>
12862 </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>
12865 <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>
12866 <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>
12870 Image: framed images are always unscaled.
12872 parsoid=wt2html,wt2wt,html2html
12874 [[File:Foobar.jpg|frame]]
12876 [[File:Foobar.jpg|frame|50px]]
12878 [[File:Foobar.jpg|frame|50x50px]]
12880 [[File:Foobar.jpg|frame|2000px]]
12882 <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>
12883 <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>
12884 <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>
12885 <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>
12888 <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>
12889 <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>
12890 <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>
12891 <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>
12894 ###################
12897 Link to image page- image page normally doesn't exists, hence edit link
12898 Add test with existing image page
12899 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12903 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12908 bug 18784 Link to non-existent image page with caption should use caption as link text
12910 [[:Image:test|caption]]
12912 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12917 Frameless image caption with a free URL
12919 [[File:Foobar.jpg|http://example.com]]
12921 <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>
12924 <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>
12928 Thumbnail image caption with a free URL
12932 [[File:Foobar.jpg|thumb|http://example.com]]
12934 <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>
12937 <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>
12941 Thumbnail image caption with a free URL and explicit alt
12944 parsoid=wt2html,wt2wt,html2html
12946 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12948 <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>
12951 <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>
12955 SVG thumbnails with no language set
12958 [[File:Foobar.svg|thumb|caption]]
12960 <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>
12963 <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>
12967 SVG thumbnails with language de
12969 parsoid=wt2html,wt2wt,html2html
12971 [[File:Foobar.svg|thumb|caption|lang=de]]
12973 <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>
12976 <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>
12980 SVG thumbnails with invalid language code
12982 parsoid=wt2html,wt2wt,html2html
12984 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12986 <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>
12989 <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>
12993 BUG 1887: A ISBN with a thumbnail
12995 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12997 <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>
13000 <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>
13004 BUG 1887: A RFC with a thumbnail
13006 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13008 <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>
13011 <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>
13015 BUG 1887: A mailto link with a thumbnail
13017 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13019 <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>
13022 <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>
13025 # Pending resolution to bug 368
13027 BUG 648: Frameless image caption with a link
13029 [[File:Foobar.jpg|text with a [[link]] in it]]
13031 <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>
13034 <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>
13038 BUG 648: Frameless image caption with a link (suffix)
13040 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13042 <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>
13045 <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>
13049 BUG 648: Frameless image caption with an interwiki link
13051 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13053 <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>
13056 <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>
13060 BUG 648: Frameless image caption with a piped interwiki link
13062 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13064 <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>
13067 <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>
13071 Escape HTML special chars in image alt text
13073 [[File:Foobar.jpg|& < > "]]
13075 <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>
13078 <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>
13082 BUG 499: Alt text should have Ӓ, not &1234;
13084 [[File:Foobar.jpg|♀]]
13086 <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>
13089 <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>
13093 Broken image caption with link
13095 parsoid=wt2html,wt2wt,html2html
13097 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13099 <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.
13102 <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>
13106 Image caption containing another image
13108 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13110 <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>
13113 <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>
13117 Image: caption containing a newline
13119 [[File:Foobar.jpg|This
13122 <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>
13125 <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>
13129 Image: caption containing leading space
13130 (The leading space should not trigger nowiki escaping in wt2wt mode)
13132 [[File:Foobar.jpg|thumb| bar]]
13134 <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>
13137 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
13141 Image: caption containing a table
13143 parsoid=wt2html,wt2wt,html2html
13145 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13151 and some more text.]]
13153 <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>
13156 <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
13159 <tr><th>Foo </th><th>Bar</th></tr>
13162 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13166 Bug 3090: External links other than http: in image captions
13168 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13170 <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>
13173 <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>
13179 parsoid=wt2html,wt2wt,html2html
13181 [[Image:foobar.jpg|a|class=b]]
13183 <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>
13186 <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>
13190 Localized image handling (1).
13192 parsoid=wt2html,wt2wt,html2html
13195 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13197 <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>
13200 <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>
13204 Localized image handling (2).
13207 parsoid=wt2html,wt2wt,html2html
13210 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13212 <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>
13215 <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>
13219 "border", "frameless" and "class" attributes on an image.
13222 parsoid=wt2html,wt2wt,html2html
13224 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13226 <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>
13229 <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>
13232 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13234 Invalid image attributes (bug 62500)
13237 parsoid=wt2html,wt2wt,html2html
13239 [[File:Foobar.jpg|thumb|float|left|caption]]
13241 [[File:Foobar.jpg|thumb|righ|caption]]
13243 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13245 <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>
13246 <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>
13247 <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>
13250 <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>
13251 <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>
13252 <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>
13258 #REDIRECT [[File:Barfoo.jpg]]
13261 # FIXME: Parsoid should run this test -- but we'd need to teach the
13262 # mockAPI about the redirected Barfoo.jpg image.
13266 [[Image:Barfoo.jpg]]
13268 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13273 Missing image with uploads disabled
13277 [[File:Foobaz.jpg]]
13279 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13282 <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>
13285 # Parsoid-specific testing for images
13286 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13287 # Currently imperfect due to a flaw in the Parsoid testrunner
13289 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13293 Parsoid-specific image handling - simple image with size and middle alignment
13295 [[File:Foobar.jpg|middle|50px]]
13297 <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>
13301 Parsoid-specific image handling - simple image with size, middle alignment,
13302 non-standard namespace alias
13304 parsoid=wt2wt,wt2html,html2html
13306 [[Image:Foobar.jpg|middle|50px]]
13308 <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>
13312 Parsoid-specific image handling - simple image with size and middle alignment
13315 [[File:Foobar.jpg|50px|middle]]
13317 <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>
13321 Parsoid-specific image handling - simple image with size and middle alignment
13322 and non-standard namespace name
13324 parsoid=wt2html,wt2wt,html2html
13326 [[Image:Foobar.jpg|50px|middle]]
13328 <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>
13332 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13334 [[File:Foobar.jpg|500x10px|baseline|caption]]
13336 <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>
13340 Parsoid-specific image handling - simple image with border and size spec
13342 [[File:Foobar.jpg|50px|border|caption]]
13344 <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>
13348 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13350 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13352 <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>
13356 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13359 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13361 <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>
13365 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13367 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13369 <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>
13373 Parsoid-specific image handling - thumbnail with specific size, halign,
13374 valign, and caption (existing content)
13376 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13378 <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>
13382 Parsoid-specific image handling - framed image with specific size and caption
13385 parsoid=wt2html,wt2wt,html2html
13387 [[File:Foobar.jpg|frame|500x50px|caption]]
13389 <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>
13393 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13396 parsoid=wt2html,wt2wt,html2html
13398 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13400 <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>
13404 Parsoid-specific image handling - frameless image with specific size, border, and caption
13406 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13408 <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>
13412 Parsoid-specific image handling - simple image with a formatted caption
13414 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13416 <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>
13420 Parsoid-specific image handling - caption with a template in it
13422 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13424 <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>
13428 Parsoid-specific image handling - caption with unbalanced tags in it
13430 parsoid=wt2html,wt2wt,html2html
13433 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13437 <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>
13442 Parsoid-specific image handling - empty caption (1)
13444 parsoid=wt2html,wt2wt
13446 [[File:Foobar.jpg|thumb|]]
13448 <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>
13451 # empty captions don't get serialized unless we're in the "round trip" case
13453 Parsoid-specific image handling - empty caption (2)
13457 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13458 <a href="./File:Foobar.jpg">
13459 <img resource="./File:Foobar.jpg"
13460 src="//example.com/images/3/3a/Foobar.jpg"
13461 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13462 height="25" width="220"/>
13464 <figcaption></figcaption>
13467 [[File:Foobar.jpg|thumb]]
13471 Parsoid-specific image handling - whitespace caption
13473 [[File:Foobar.jpg|thumb| ]]
13475 <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>
13479 Parsoid-specific image handling - lang option
13482 [[File:Foobar.svg|lang=de|caption]]
13486 <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>
13495 Subpage test/subpage
13503 subpage title=[[Subpage test]]
13507 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13512 Subpage noslash link
13514 subpage title=[[Subpage test]]
13518 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13523 Subpage test/1/2/subpage
13529 Relative subpage noslash link
13531 parsoid=wt2wt,wt2html,html2html
13532 subpage title=[[Subpage test/1/2/3/4]]
13538 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13539 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13542 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13543 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13547 Parsoid: dot-slash prefixed wikilinks
13557 </p><p>[[././baz/]]
13562 </p><p>[[././baz/]]
13567 Render invalid page names as plain text (bug 51090)
13580 [[{{echo|./../foo}}|bar]]
13581 [[{{echo|foo/.}}|bar]]
13582 [[{{echo|foo/..}}|bar]]
13583 [[{{echo|foo~~~~bar}}]]
13584 [[{{echo|foo>bar}}]]
13585 [[{{echo|foo././bar}}]]
13586 [[{{echo|foo{bar}}]]
13587 [[{{echo|foo}bar}}]]
13588 [[{{echo|foo[bar}}]]
13589 [[{{echo|foo]bar}}]]
13590 [[{{echo|foo<bar}}]]
13592 <p>[[./../foo|bar]]
13602 </p><p>[[./../foo|bar]]
13615 <p>[[./../foo|bar]]
13626 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13627 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13628 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13629 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13630 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13631 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13632 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13633 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13634 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
13635 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
13636 [[<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>
13644 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13649 BUG 561: {{/Subpage}}
13651 subpage title=[[Page]]
13655 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13663 Category:MediaWiki User's Guide
13671 [[:Category:MediaWiki User's Guide]]
13673 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13682 [[Category:MediaWiki User's Guide]]
13684 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13688 PAGESINCATEGORY invalid title fatal (r33546 fix)
13690 {{PAGESINCATEGORY:<bogus>}}
13697 Category with different sort key
13701 [[Category:MediaWiki User's Guide|Foo]]
13703 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13707 Category with identical sort key
13711 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13713 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13717 Category with empty sort key
13722 [[Category:MediaWiki User's Guide|]]
13724 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13728 Category with empty sort key and parentheses
13733 [[Category:Foo (bar)|]]
13735 [[Category:Foo (bar)|Foo]]
13739 Category with link tail
13744 123[[Category:Foo]]456
13746 123[[Category:Foo]]456
13750 Category with template
13755 [[Category:{{echo|Foo}}]]
13757 [[Category:{{echo|Foo}}]]
13761 Category with template in sort key
13766 [[Category:Foo|{{echo|Bar}}]]
13768 [[Category:Foo|{{echo|Bar}}]]
13772 Category with template in sort key and title
13777 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13779 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13783 Category / paragraph interactions
13785 Foo [[Category:Baz]] Bar
13787 Foo [[Category:Baz]]
13795 [[Category:Baz]] Bar
13808 {{echo|[[Category:Baz]]}}
13822 ## The whitespace on the empty line is part of the test. Please do not delete
13824 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13826 parsoid=wt2html,wt2wt
13830 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
13832 {{echo|[[Category:Foo]] and so should this!}}
13834 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
13839 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
13841 <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>
13844 ## Parsoid will not try to wt2wt this while preserving newlines because
13845 ## it suppresses excess newlines within list items -- and we don't want to
13846 ## introduce a special case just for categories, which is, in reality somewhat
13847 ## odd behavior -- categories are unlikely to be used in list items like this
13848 ## in top-level pages and are only likely to show up in template-generated
13849 ## list items where this RT-ing is a non-issue.
13851 ## The whitespace on the empty line is part of the test. Please do not delete
13853 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13859 [[Category:Foo]] and this should be part of the same list item
13862 {{echo|[[Category:Foo]] and this should be part of the same list item}}
13864 <ul><li>This and this should be part of the same list item</li>
13865 <li>So should this and this should be part of the same list item</li></ul>
13868 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
13869 <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>
13873 ## Newlines and categories that follow the last item of a list
13874 ## are treated differently because this (list followed by categories)
13875 ## is an extremely common pattern on wikis.
13877 3. Categories and newlines: newline suppression for last list item should RT properly
13890 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13892 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13893 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13897 4. Categories and newlines: newline suppression for last list item should RT properly
13905 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
13907 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13910 ## only wt2html for this to make sure the algo only applies to the rightmost path
13912 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
13925 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
13927 <ul><li> d</li></ul></li></ul>
13928 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13932 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
13934 * a [[Category:Foo]]
13936 <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>
13939 # This test also demonstrates because of newline+category tunneling
13940 # through the list hander, template wrapping doesn't expand to the
13941 # containing list when the list item swallows the category.
13943 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
13948 <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">
13949 </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>
13953 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
13957 {{echo|[[Category:Foo]]
13961 <ul><li> a</li></ul>
13963 <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">
13964 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13965 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13969 Parsoid: Serialize link to category page with colon escape
13975 [[:Category:Foo|Bar]]
13978 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13979 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13983 # html2wt localizes the "Category" namespace.
13984 # XXX the <link> element needs an empty data-parsoid attribute, or
13985 # else the html2html test fails because spaces are inserted.
13987 Link prefix/suffixes aren't applied to category links
13989 parsoid=wt2html,wt2wt,html2html
13997 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14001 Parsoid: Serialize link to file page with colon escape
14007 [[:File:Foo.png|Bar]]
14010 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14011 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14016 Parsoid: Serialize a genuine category link without colon escape
14021 [[Category:Foo|Bar]]
14023 <link rel="mw:PageProp/Category" href="Category:Foo">
14024 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
14028 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14032 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14034 [[Category:Toxine bactérienne]]
14038 Parsoid: Defaultsort
14040 {{DEFAULTSORT:Foo}}
14042 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14046 Parsoid: Defaultsort (template-generated)
14048 {{{{echo|DEFAULTSORT}}:Foo}}
14050 <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}}]}'/>
14054 ### Inter-language links
14057 Interlanguage links
14065 es:Alimento fr:Nourriture zh:食品
14067 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14068 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14069 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14073 Duplicate interlanguage links (bug 24502)
14084 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14085 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14086 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14087 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14094 Basic section headings
14101 ===Smaller headline===
14104 <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>
14107 <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>
14110 <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>
14116 Section headings with TOC
14119 === Subheadline 1 ===
14120 ===== Skipping a level =====
14121 ====== Skipping a level ======
14125 ===Another headline===
14127 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14129 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14131 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14133 <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>
14135 <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>
14142 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14144 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14150 <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>
14151 <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>
14152 <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>
14153 <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>
14154 <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>
14157 <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>
14162 TOC anchors don't collide
14170 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14172 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14173 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14174 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14175 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14179 <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>
14180 <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>
14181 <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>
14182 <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>
14186 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14188 Handling of sections up to level 6 and beyond
14191 == Level 2 Heading==
14192 === Level 3 Heading===
14193 ==== Level 4 Heading====
14194 ===== Level 5 Heading=====
14195 ====== Level 6 Heading======
14196 ======= Level 7 Heading=======
14197 ======== Level 8 Heading========
14198 ========= Level 9 Heading=========
14199 ========== Level 10 Heading==========
14201 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14203 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14205 <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>
14207 <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>
14209 <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>
14211 <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>
14213 <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>
14214 <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>
14215 <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>
14216 <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>
14217 <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>
14231 <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>
14232 <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>
14233 <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>
14234 <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>
14235 <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>
14236 <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>
14237 <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>
14238 <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>
14239 <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>
14240 <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>
14245 TOC regression (T11764)
14249 ==== title 1.1.1 ====
14254 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14256 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14258 <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>
14260 <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>
14263 <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>
14266 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14268 <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>
14274 <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>
14275 <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>
14276 <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>
14277 <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>
14278 <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>
14279 <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>
14284 TOC for heading containing <span id="..."></span> (T96153)
14287 ==<span id="old-anchor"></span>New title==
14289 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14291 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14295 <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>
14300 TOC with wgMaxTocLevel=3 (bug 6204)
14306 ==== title 1.1.1 ====
14311 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14313 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14315 <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>
14316 <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>
14319 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14321 <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>
14327 <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>
14328 <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>
14329 <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>
14330 <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>
14331 <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>
14332 <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>
14337 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14343 ====Section 1.1.1====
14344 ====Section 1.1.1.1====
14347 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14349 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14351 <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>
14354 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14358 <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>
14359 <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>
14360 <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>
14361 <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>
14362 <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>
14368 Resolving duplicate section names
14373 <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>
14374 <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>
14379 Resolving duplicate section names with differing case (bug 10721)
14384 <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>
14385 <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>
14397 Template with sections, __NOTOC__
14404 <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>
14405 <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>
14406 <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>
14407 <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>
14412 __NOEDITSECTION__ keyword
14418 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14419 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14424 Link inside a section heading
14426 ==Section with a [[Main Page|link]] in it==
14428 <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>
14433 TOC regression (T14077)
14440 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14442 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14444 <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>
14447 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14451 <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>
14452 <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>
14453 <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>
14458 BUG 1219 URL next to image (good)
14460 http://example.com [[File:Foobar.jpg]]
14462 <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>
14465 <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>
14469 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14472 The line above must have a trailing space!
14475 But just in case it doesn't...
14477 <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>
14478 <p>The line above must have a trailing space!
14480 <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>
14481 <p>But just in case it doesn't...
14486 Header with special characters (bug 25462)
14488 The tooltips shall not show entities to the user (ie. be double escaped)
14505 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14507 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14509 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14510 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14511 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14512 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14513 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14517 <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>
14520 <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>
14523 <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>
14526 <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>
14529 <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>
14535 Header with space, plus and underscore as entity
14537 Id should not contain + for spaces
14539 == Space between Text ==
14542 == Space-Entity between Text ==
14545 == Plus+between+Text ==
14548 == Plus-Entity+between+Text ==
14551 == Underscore_between_Text ==
14554 == Underscore-Entity_between_Text ==
14557 [[#Space between Text]]
14558 [[#Space-Entity between Text]]
14559 [[#Plus+between+Text]]
14560 [[#Plus-Entity+between+Text]]
14561 [[#Underscore_between_Text]]
14562 [[#Underscore-Entity_between_Text]]
14564 <p>Id should not contain + for spaces
14566 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14568 <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>
14569 <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>
14570 <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>
14571 <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>
14572 <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>
14573 <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>
14577 <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>
14580 <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>
14583 <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>
14586 <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>
14589 <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>
14592 <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>
14594 </p><p><a href="#Space_between_Text">#Space between Text</a>
14595 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14596 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14597 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14598 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14599 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14604 Headers with excess '=' characters
14605 (Are similar tests necessary beyond the 1st level?)
14609 =''italic'' heading==
14610 ==''italic'' heading=
14612 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14614 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14615 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14616 <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>
14617 <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>
14621 <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>
14622 <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>
14623 <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>
14624 <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>
14629 HTML headers vs TOC (bug 23393)
14630 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14642 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14644 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14646 <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>
14647 <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>
14650 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14652 <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>
14653 <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>
14659 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14660 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14661 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14662 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14663 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14664 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14669 Single-line or multiline-comments can follow headings
14671 parsoid=wt2html,wt2wt
14679 <h2><span class="mw-headline" id="foo">foo</span></h2>
14680 <h2><span class="mw-headline" id="bar">bar</span></h2>
14681 <h2><span class="mw-headline" id="baz">baz</span></h2>
14686 BUG 1219 URL next to image (broken)
14688 http://example.com[[File:Foobar.jpg]]
14690 <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>
14693 <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>
14697 Bug 1186 news: in the middle of text
14699 http://en.wikinews.org/wiki/Wikinews:Workplace
14701 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14707 Namespaced link must have a title
14716 Namespaced link must have a title (bad fragment version)
14718 [[Project:#fragment]]
14720 <p>[[Project:#fragment]]
14726 ### HTML tags and HTML attributes
14730 div with no attributes
14732 <div>HTML rocks</div>
14734 <div>HTML rocks</div>
14739 div with double-quoted attribute
14741 <div id="rock">HTML rocks</div>
14743 <div id="rock">HTML rocks</div>
14748 div with single-quoted attribute
14750 <div id='rock'>HTML rocks</div>
14752 <div id="rock">HTML rocks</div>
14757 div with unquoted attribute
14759 <div id=rock>HTML rocks</div>
14761 <div id="rock">HTML rocks</div>
14766 div with illegal double attributes
14768 <div id="a" id="b">HTML rocks</div>
14770 <div id="b">HTML rocks</div>
14774 # FIXME: produce empty string instead of "class" in the PHP parser, following
14777 div with empty attribute value, space before equals
14781 <div class =>HTML rocks</div>
14783 <div class="">HTML rocks</div>
14788 div with multiple empty attribute values
14792 <div id= title=>HTML rocks</div>
14794 <div id="" title="">HTML rocks</div>
14799 table with multiple empty attribute values
14807 <table title="" id="">
14808 <tbody><tr><td> hi</td></tr>
14813 div with braces in attribute value
14815 <div title="{}">Foo</div>
14817 <div title="{}">Foo</div>
14820 <div title="{}">Foo</div>
14823 # This it very inconsistent in the PHP parser: it returns
14824 # class="class" if there is a space between the name and the equal sign (see
14825 # 'div with empty attribute value, space before equals'), but strips the
14826 # attribute completely if the space is missing. We hope that not much content
14827 # depends on this, so are implementing the behavior below in Parsoid for
14828 # consistencies' sake.
14829 # FIXME: fix this behavior in the PHP parser?
14831 div with empty attribute value, no space before equals
14833 parsoid=wt2html,html2html
14835 <div class=>HTML rocks</div>
14837 <div>HTML rocks</div>
14840 <div class="">HTML rocks</div>
14844 HTML multiple attributes correction
14846 <p class="error" class="awesome">Awesome!</p>
14848 <p class="awesome">Awesome!</p>
14853 Table multiple attributes correction
14856 !+ class="error" class="awesome"| status
14861 <th class="awesome"> status
14869 <DIV ID="x">HTML ROCKS</DIV>
14871 <div id="x">HTML ROCKS</div>
14876 Non-ASCII pseudo-tags are rendered as text
14885 Pseudo-tag with URL 'name' renders as url link
14887 <http://example.com/>
14889 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14894 text with amp in the middle of nowhere
14898 <p>Remember AT&T?
14903 text with character entity: eacute
14905 I always thought é was a cute letter.
14907 <p>I always thought é was a cute letter.
14910 <p>I always thought é was a cute letter.</p>
14914 text with entity-escaped character entity-like string: eacute
14916 I always thought &eacute; was a cute letter.
14918 <p>I always thought &eacute; was a cute letter.
14923 text with undefined character entity: xacute
14925 I always thought &xacute; was a cute letter.
14927 <p>I always thought &xacute; was a cute letter.
14931 # TODO: generalize to PHP parser?
14937 <data value="5">five</data>
14938 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14939 <mark>This highlighted text</mark>
14941 <p><data value="5">five</data>
14942 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14943 <mark>This highlighted text</mark></p>
14947 HTML tag with leading space is parsed as text
14951 <p>< div>foo< /div>
14956 ### Nesting tests (see bug 41545, 50604, 51081)
14959 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14960 # Note that html2wt is considerably more difficult if we use <b> in
14961 # the test case, instead of <big>
14963 Ensure that HTML adoption agency algorithm is properly implemented.
14965 <big>X<big>Y</big>Z</big>
14967 <p><big>X<big>Y</big>Z</big>
14971 # This was bug 41545 in the PHP parser.
14972 # Note that tidy doesn't handle this correctly.
14976 <kbd>X<kbd>Y</kbd>Z</kbd>
14978 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14982 # The following cases were bug 51081 in the PHP parser.
14983 # Note that there are some other nestable tags (b, i, etc) which are
14984 # not covered; see bug 51081 for discussion.
14986 # Note that tidy doesn't handle this correctly.
14990 <em>X<em>Y</em>Z</em>
14992 <p><em>X<em>Y</em>Z</em>
14996 # Note that tidy doesn't handle this correctly.
14998 Nesting of <strong>
15000 <strong>X<strong>Y</strong>Z</strong>
15002 <p><strong>X<strong>Y</strong>Z</strong>
15011 <p><q>X<q>Y</q>Z</q></p>
15014 # Note that tidy doesn't handle this correctly.
15018 <ruby>X<ruby>Y</ruby>Z</ruby>
15020 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15024 # Note that tidy doesn't handle this correctly.
15028 <bdo>X<bdo>Y</bdo>Z</bdo>
15030 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15042 [[Media:Foobar.jpg]]
15044 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15049 Media link with text
15051 [[Media:Foobar.jpg|A neat file to look at]]
15053 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15057 # FIXME: this is still bad HTML tag nesting
15058 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15060 Media link with nasty text
15062 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15064 <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>
15067 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15068 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15072 Media link to nonexistent file (bug 1702)
15074 [[Media:No such.jpg]]
15076 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15081 Image link to nonexistent file (bug 1850 - good)
15083 [[File:No_such.jpg]]
15085 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15088 <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>
15092 :Image link to nonexistent file (bug 1850 - bad)
15094 [[:Image:No such.jpg]]
15096 <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>
15099 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15105 Character reference normalization in link text (bug 1938)
15107 [[Main Page|this&that]]
15109 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15116 Test for unicode normalization
15118 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15122 (bug 19451) Links should refer to the normalized form.
15130 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15131 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15132 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15133 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15134 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15139 Empty attribute crash test (bug 2067)
15141 <font color="">foo</font>
15143 <p><font color="">foo</font>
15148 Empty attribute crash test single-quotes (bug 2067)
15150 <font color=''>foo</font>
15152 <p><font color="">foo</font>
15157 Attribute test: equals, then nothing
15159 <font color=>foo</font>
15161 <p><font>foo</font>
15166 Attribute test: unquoted value
15168 <font color=x>foo</font>
15170 <p><font color="x">foo</font>
15175 Attribute test: unquoted but illegal value (hash)
15177 <font color=#x>foo</font>
15179 <p><font color="#x">foo</font>
15184 Attribute test: no value
15186 <font color>foo</font>
15188 <p><font color="color">foo</font>
15193 Bug 2095: link with three closing brackets
15197 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15200 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15204 Bug 2095: link with pipe and three closing brackets
15206 [[Main Page|link]]]
15208 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15211 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15215 Bug 2095: link with pipe and three closing brackets, version 2
15217 [[Main Page|[http://example.com/]]]
15219 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15222 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15231 Template:Dangerous attribute
15233 " onmouseover="alert(document.cookie)
15237 Template:Dangerous style attribute
15239 border-size: expression(alert(document.cookie))
15245 <div style="float: right; {{{1}}}">Magic div</div>
15249 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15251 <div title="{{test}}"></div>
15253 <div title="This is a test template"></div>
15257 # Parsoid has enough context to handle this case
15259 Bug 2304: HTML attribute safety (dangerous template; 2309)
15261 <div title="{{dangerous attribute}}"></div>
15263 <div title=""></div>
15266 <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>
15270 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15272 <div style="{{dangerous style attribute}}"></div>
15274 <div style="/* insecure input */"></div>
15279 Bug 2304: HTML attribute safety (safe parameter; 2309)
15281 {{div style|width: 200px}}
15283 <div style="float: right; width: 200px">Magic div</div>
15288 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15290 {{div style|width: expression(alert(document.cookie))}}
15292 <div style="/* insecure input */">Magic div</div>
15297 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15299 {{div style|"><script>alert(document.cookie)</script>}}
15301 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15306 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15308 {{div style|" ><script>alert(document.cookie)</script>}}
15310 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15315 Bug 2304: HTML attribute safety (link)
15317 <div title="[[Main Page]]"></div>
15319 <div title="[[Main Page]]"></div>
15324 Bug 2304: HTML attribute safety (italics)
15326 <div title="''foobar''"></div>
15328 <div title="''foobar''"></div>
15333 Bug 2304: HTML attribute safety (bold)
15335 <div title="'''foobar'''"></div>
15337 <div title="'''foobar'''"></div>
15343 Bug 2304: HTML attribute safety (ISBN)
15345 <div title="ISBN 1234567890"></div>
15347 <div title="ISBN 1234567890"></div>
15352 Bug 2304: HTML attribute safety (RFC)
15354 <div title="RFC 1234"></div>
15356 <div title="RFC 1234"></div>
15361 Bug 2304: HTML attribute safety (PMID)
15363 <div title="PMID 1234567890"></div>
15365 <div title="PMID 1234567890"></div>
15370 Bug 2304: HTML attribute safety (web link)
15372 <div title="http://example.com/"></div>
15374 <div title="http://example.com/"></div>
15379 Bug 2304: HTML attribute safety (named web link)
15381 <div title="[http://example.com/ link]"></div>
15383 <div title="[http://example.com/ link]"></div>
15388 Bug 3244: HTML attribute safety (extension; safe)
15390 <div style="<nowiki>background:blue</nowiki>"></div>
15392 <div style="background:blue"></div>
15397 Bug 3244: HTML attribute safety (extension; unsafe)
15399 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15401 <div style="/* insecure input */"></div>
15405 # More MSIE fun discovered by Tom Gilder
15408 MSIE CSS safety test: spurious slash
15410 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15412 <div style="/* insecure input */">evil</div>
15417 MSIE CSS safety test: hex code
15419 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15421 <div style="/* insecure input */">evil</div>
15426 MSIE CSS safety test: comment in url
15428 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15430 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15435 MSIE CSS safety test: comment in expression
15437 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15439 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15444 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15446 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15448 <p style="/* invalid control char */">A</p>
15453 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15455 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15456 <div style="top:EXPRESSION(alert())">B</div>
15458 <p style="/* insecure input */">A</p>
15459 <div style="/* insecure input */">B</div>
15464 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15466 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15467 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15469 <div style="/* insecure input */">A</div>
15470 <p style="/* insecure input */">B</p>
15475 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15477 <div style="background-image:url⁽javascript:alert())">A</div>
15478 <div style="background-image:url₍javascript:alert())">B</div>
15479 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15481 <div style="/* insecure input */">A</div>
15482 <div style="/* insecure input */">B</div>
15483 <p style="/* insecure input */">C</p>
15491 title="data:text/html,<img src=1 onerror=alert(1)>"
15492 style="-o-link:attr(title);-o-link-source:current">X</div>
15494 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15499 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15501 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15502 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15503 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15504 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15505 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15506 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15507 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15509 <p style="/* insecure input */">A</p>
15510 <p style="/* insecure input */">B</p>
15511 <p style="/* insecure input */">C</p>
15512 <p style="/* insecure input */">D</p>
15513 <p style="/* insecure input */">E</p>
15514 <p style="/* insecure input */">F</p>
15515 <p style="/* insecure input */">G</p>
15520 Table attribute legitimate extension
15523 !+ style="<nowiki>color:blue</nowiki>"| status
15528 <th style="color:blue"> status
15534 Table attribute safety
15537 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15542 <th style="/* insecure input */"> status
15548 CSS line continuation 1
15550 <div style="background-image: u\ rl(test.jpg);"></div>
15552 <div style="/* insecure input */"></div>
15557 CSS line continuation 2
15559 <div style="background-image: u\ rl(test.jpg); "></div>
15561 <div style="/* insecure input */"></div>
15572 Expansion of multi-line templates in attribute values (bug 6255)
15574 <div style="background: {{identity|#00FF00}}">-</div>
15576 <div style="background: #00FF00">-</div>
15582 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15584 <div style="background:
15587 <div style="background: #00FF00">-</div>
15590 <div style="background:
15595 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15597 <div style="background: #00FF00">-</div>
15599 <div style="background: #00FF00">-</div>
15604 evil <math>-wiki-tags without Extension:Math enabled
15606 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15608 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15612 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15615 Parser hook: empty input
15628 Parser hook: empty input using terminated empty elements
15641 Parser hook: empty input using terminated empty elements (space before)
15654 Parser hook: basic input
15668 Parser hook: case insensitive
15682 Parser hook: case insensitive, redux
15695 Parser hook: nested tags
15699 <tag><tag></tag></tag>
15710 Parser hook: basic arguments
15712 <tag width=200 height = "100" depth = '50' square></tag>
15720 'square' => 'square',
15727 Parser hook: argument containing a forward slash (bug 5344)
15729 <tag filename='/tmp/bla'></tag>
15734 'filename' => '/tmp/bla',
15741 Parser hook: empty input using terminated empty elements (bug 2374)
15754 # </tag> should be output literally since there is no matching tag that begins it
15756 Parser hook: basic arguments using terminated empty elements (bug 2374)
15758 <tag width=200 height = "100" depth = '50' square/>
15768 'square' => 'square',
15777 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
15781 Parser hook: static parser hook not inside a comment
15783 <statictag>hello, world</statictag>
15784 <statictag action=flush/>
15792 Parser hook: static parser hook inside a comment
15794 <!-- <statictag>hello, world</statictag> -->
15795 <statictag action=flush/>
15801 # Nested template calls; this case was broken by Parser.php rev 1.506,
15805 Template:One-parameter
15807 (My parameter is: {{{1}}})
15811 Template:Map-one-parameter
15813 {{{{{1}}}|{{{2}}}}}
15817 Nested template calls
15819 {{Map-one-parameter|One-parameter|param}}
15821 <p>(My parameter is: param)
15830 # HTML+Tidy effectively strips out the empty tags completely
15831 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
15832 # which Tidy would have done for the PHP parser had there been content inside it.
15834 Sanitizer: Closing of open tags
15836 <s></s><table></table>
15838 <s></s><table></table>
15841 <p><s></s></p><table></table>
15845 Sanitizer: Closing of open but not closed tags
15854 Sanitizer: Closing of closed but not open tags
15863 Sanitizer: Closing of closed but not open table tags
15865 Table not started</td></tr></table>
15867 <p>Table not started</td></tr></table>
15872 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
15874 <span id="æ: v">byte</span>[[#æ: v|backlink]]
15876 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15880 # In HTML5, the restrictions are that id must contain at least one character,
15881 # and must not contain any space characters.
15883 Sanitizer: Validating the contents of the id attribute (bug 4515)
15887 <br id="" /><br id="a space" />
15892 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
15894 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
15898 <br id="foo" /><br id="foo" />
15900 Something need to be done. foo-2 ?
15904 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
15907 <meta itemprop="hello" content="world">
15908 <meta http-equiv="refresh" content="5">
15909 <meta itemprop="hello" http-equiv="refresh" content="5">
15910 <link itemprop="hello" href="{{SERVER}}">
15911 <link rel="stylesheet" href="{{SERVER}}">
15912 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
15915 <div itemscope="itemscope">
15916 <p> <meta itemprop="hello" content="world" />
15917 <meta http-equiv="refresh" content="5">
15918 <meta itemprop="hello" content="5" />
15920 <link itemprop="hello" href="http://example.org" />
15921 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
15922 <link itemprop="hello" href="http://example.org" />
15928 Language converter: output gets cut off unexpectedly (bug 5757)
15932 this bit is safe: }-
15934 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
15936 then we get cut off here: }-
15938 all additional text is vanished
15940 <p>this bit is safe: }-
15941 </p><p>but if we add a conversion instance: xxx
15942 </p><p>then we get cut off here: }-
15943 </p><p>all additional text is vanished
15948 Self closed html pairs (bug 5487)
15951 <center><font id="bug" />Centered text</center>
15952 <div><font id="bug2" />In div text</div>
15954 <center><font id="bug" />Centered text</center>
15955 <div><font id="bug2" />In div text</div>
15964 Punctuation: nbsp before exclamation
15968 <p>C'est grave !
15973 Punctuation: CSS !important (bug 11874)
15975 <div style="width:50% !important">important</div>
15977 <div style="width:50% !important">important</div>
15982 Punctuation: CSS ! important (bug 11874; with space after)
15984 <div style="width:50% ! important">important</div>
15986 <div style="width:50% ! important">important</div>
15991 HTML bullet list, closed tags (bug 5497)
16004 <ul data-parsoid='{"stx":"html"}'>
16005 <li data-parsoid='{"stx":"html"}'>One</li>
16006 <li data-parsoid='{"stx":"html"}'>Two</li>
16012 HTML bullet list, unclosed tags (bug 5497)
16024 <ul data-parsoid='{"stx":"html"}'>
16025 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16026 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16032 HTML ordered list, closed tags (bug 5497)
16045 <ol data-parsoid='{"stx":"html"}'>
16046 <li data-parsoid='{"stx":"html"}'>One</li>
16047 <li data-parsoid='{"stx":"html"}'>Two</li>
16053 HTML ordered list, unclosed tags (bug 5497)
16066 <ol data-parsoid='{"stx":"html"}'>
16067 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16068 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16074 HTML nested bullet list, closed tags (bug 5497)
16099 HTML nested bullet list, open tags (bug 5497)
16136 HTML nested ordered list, closed tags (bug 5497)
16161 HTML nested ordered list, open tags (bug 5497)
16198 HTML ordered list item with parameters oddity
16200 <ol><li id="fragment">One</li>
16203 <ol><li id="fragment">One</li>
16208 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16210 bug 5918: autonumbering
16212 [http://first/] [http://second] [ftp://ftp]
16216 [mailto:enclosed@mail.tld With target]
16218 [mailto:enclosed@mail.tld]
16220 mailto:inline@mail.tld
16222 <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>
16223 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16224 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16225 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16226 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16229 <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>
16230 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16231 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16232 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16233 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16238 # Security and HTML correctness
16239 # From Nick Jenkins' fuzz testing
16243 Fuzz testing: Parser13
16258 Fuzz testing: Parser14
16263 <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>
16264 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16266 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16272 <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>
16274 <div id="toc" class="toc">
16275 <div id="toctitle">
16279 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16286 Fuzz testing: Parser14-table
16291 <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>
16292 <table style="__TOC__">
16297 <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>
16298 <table style="__TOC__">
16305 # Known to produce bogus xml (extra </td>)
16307 Fuzz testing: Parser16
16336 Fuzz testing: Parser21
16339 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16344 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16354 Fuzz testing: Parser22
16356 http://===r:::https://b
16360 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16368 # Known to produce bad XML for now
16370 Fuzz testing: Parser24
16377 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16378 <br style="onmouseover='alert(document.cookie);' " />
16380 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16385 <u class="|">}}}} >
16386 <br style="onmouseover='alert(document.cookie);'" />
16388 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16397 # Note: the current result listed for this is not what the original one was,
16398 # but the original bug was JavaScript injection, which is fixed in any case.
16399 # It's not clear that the original result listed was any more correct than the
16400 # current one. Original result:
16403 # <li class="||">
16404 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16406 Fuzz testing: Parser25 (bug 6055)
16412 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16414 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16419 Fuzz testing: URL adjacent extension (with space, clean)
16421 http://example.com <nowiki>junk</nowiki>
16423 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16426 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16430 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16432 http://example.com<nowiki>junk</nowiki>
16434 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16437 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16441 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16443 http://example.com<pre>junk</pre>
16445 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16448 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16453 <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>
16457 Fuzz testing: image with bogus manual thumbnail
16459 [[Image:foobar.jpg|thumbnail= ]]
16461 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16464 <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>
16468 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16470 <pre dir=" "></pre>
16472 <pre dir=" "></pre>
16477 Parsing optional HTML elements (Bug 6171)
16482 <td> Some tabular data</td>
16483 <td> More tabular data ...
16484 <td> And yet som tabular data</td>
16490 <td> Some tabular data</td>
16491 <td> More tabular data ...
16492 </td><td> And yet som tabular data</td>
16499 Correct handling of <td>, <tr> (Bug 6171)
16504 <td> Some tabular data</td>
16505 <td> More tabular data ...</td>
16506 <td> And yet som tabular data</td>
16512 <td> Some tabular data</td>
16513 <td> More tabular data ...</td>
16514 <td> And yet som tabular data</td>
16522 Parsing crashing regression (fr:JavaScript)
16526 <p></body></x>
16531 Inline wiki vs wiki block nesting
16537 <p><b>Bold paragraph</b>
16538 </p><p>New wiki paragraph
16542 # FIXME: The current php output is documented
16543 # and desired output is the parsoid target.
16545 Inline HTML vs wiki block nesting
16551 <p><b>Bold paragraph
16552 </p><p>New wiki paragraph</b>
16555 <p><b>Bold paragraph</b>
16556 </p><p>New wiki paragraph
16560 # Original result was this:
16561 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16563 # While that might be marginally more intuitive, maybe, the six-apostrophe
16564 # construct is clearly pathological and the result stated here (which is what
16565 # the parser actually does) is about as reasonable as anything.
16567 Mixing markup for italics and bold
16570 '''bold''''''bold''bolditalics'''''
16572 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16580 Article for special page transclusion test
16584 Special page transclusion
16587 {{Special:Prefixindex/Xyzzyx}}
16589 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16594 Special page transclusion twice (bug 5021)
16597 {{Special:Prefixindex/Xyzzyx}}
16598 {{Special:Prefixindex/Xyzzyx}}
16600 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16601 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16606 Transclusion of default MediaWiki message
16608 {{MediaWiki:Mainpage}}
16615 Transclusion of nonexistent MediaWiki message
16617 {{MediaWiki:Mainpagexxx}}
16619 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16624 Transclusion of MediaWiki message with underscore
16626 {{MediaWiki:history_short}}
16633 Transclusion of MediaWiki message with space
16635 {{MediaWiki:history short}}
16642 Invalid header with following text
16652 Section extraction test (section 0)
16672 Section extraction test (section 1)
16694 Section extraction test (section 2)
16715 Section extraction test (section 3)
16735 Section extraction test (section 4)
16759 Section extraction test (section 5)
16779 Section extraction test (section 6)
16800 Section extraction test (section 7)
16820 Section extraction test (section 8)
16840 Section extraction test (section 9)
16861 Section extraction test (section 10)
16881 Section extraction test (nonexistent section 11)
16900 Section extraction test with bogus heading (section 1)
16905 ==bogus== not a legal section
16909 ==bogus== not a legal section
16913 Section extraction test with bogus heading (section 2)
16918 ==bogus== not a legal section
16925 Section extraction test with comment after heading (section 1)
16937 Section extraction test with comment after heading (section 2)
16949 Section extraction test with bogus <nowiki> heading (section 1)
16954 ==bogus== <nowiki>not a legal section</nowiki>
16958 ==bogus== <nowiki>not a legal section</nowiki>
16962 Section extraction test with bogus <nowiki> heading (section 2)
16967 ==bogus== <nowiki>not a legal section</nowiki>
16974 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16975 # instead of respecting commented sections
16977 Section extraction prefixed by comment (section 1)
16988 Section extraction prefixed by comment (section 2)
16999 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17000 # instead of respecting HTML-style headings
17002 Section extraction, mixed wiki and html (section 1)
17018 Section extraction, mixed wiki and html (section 2)
17034 # Formerly testing for bug 3342
17036 Section extraction, heading surrounded by <noinclude>
17040 <noinclude>==unmarked==</noinclude>
17046 # Test behavior of bug 19910
17048 Sectiion with all-equals
17053 The line above must have a trailing space
17056 But just in case it doesn't...
17060 But just in case it doesn't...
17064 Section replacement test (section 0)
17095 Section replacement test (section 1)
17124 Section replacement test (section 2)
17154 Section replacement test (section 3)
17185 Section replacement test (section 4)
17212 Section replacement test (section 5)
17243 Section replacement test (section 6)
17273 Section replacement test (section 7)
17304 Section replacement test (section 8)
17335 Section replacement test (section 9)
17364 Section replacement test (section 10)
17394 Section replacement test with initial whitespace (bug 13728)
17398 Preformatted initial line
17402 Preformatted initial line
17409 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17421 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17434 Section extraction, <pre> around bogus header (bug 10309)
17451 Section replacement, <pre> around bogus header (bug 10309)
17453 noxml replace=2,"xxx"
17474 Handling of 
 in URLs
17478 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17481 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17483 a</a></li></ul></li></ul>
17487 Handling of %0A in URLs
17491 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17494 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17498 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17500 5 quotes, code coverage +1 line
17507 <p><b><i></i></b></p>
17510 # same html as previous, but wikitext adjusted to match parsoid html2wt
17511 # note that wt2html and html2html will put the <i> before the <b>
17513 5 quotes, code coverage +1 line w/ nowiki (1)
17515 parsoid=wt2wt,html2wt
17517 '''''<nowiki/>'''''
17522 <p><b><i></i></b></p>
17525 # same as previous, just swapping the <i> and <b>
17527 5 quotes, code coverage +1 line w/ nowiki (2)
17529 '''''<nowiki/>'''''
17534 <p><i><b></b></i></p>
17538 Special:Search page linking.
17542 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17547 {{!}} is a magic word
17549 {{!}} is a magic word there and {{!}} is still a magic word here
17551 <p>| is a magic word there and | is still a magic word here
17554 <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>
17560 title=[[Parser test]]
17565 * {{FULLPAGENAMEE}}
17567 * {{BASEPAGENAMEE}}
17571 * {{ROOTPAGENAMEE}}
17573 * {{TALKPAGENAMEE}}
17574 * {{SUBJECTPAGENAME}}
17575 * {{SUBJECTPAGENAMEE}}
17578 * {{NAMESPACENUMBER}}
17582 * {{SUBJECTSPACEE}}
17583 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17585 <ul><li> Parser test</li>
17586 <li> Parser_test</li>
17587 <li> Parser test</li>
17588 <li> Parser_test</li>
17589 <li> Parser test</li>
17590 <li> Parser_test</li>
17591 <li> Parser test</li>
17592 <li> Parser_test</li>
17593 <li> Parser test</li>
17594 <li> Parser_test</li>
17595 <li> Talk:Parser test</li>
17596 <li> Talk:Parser_test</li>
17597 <li> Parser test</li>
17598 <li> Parser_test</li>
17606 <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>
17609 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17619 image4 |300px| centre
17620 image5.svg| http://///////
17625 <ul class="gallery mw-gallery-traditional">
17626 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17627 <div class="thumb" style="height: 150px;">Image1.png</div>
17628 <div class="gallerytext">
17631 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17632 <div class="thumb" style="height: 150px;">Image2.gif</div>
17633 <div class="gallerytext">
17638 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17639 <div class="thumb" style="height: 150px;">Image3</div>
17640 <div class="gallerytext">
17643 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17644 <div class="thumb" style="height: 150px;">Image4</div>
17645 <div class="gallerytext">
17650 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17651 <div class="thumb" style="height: 150px;">Image5.svg</div>
17652 <div class="gallerytext">
17653 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17657 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17658 <div class="thumb" style="height: 150px;">* image6</div>
17659 <div class="gallerytext">
17667 Gallery (with options)
17669 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17670 File:Nonexistent.jpg|caption
17671 File:Nonexistent.jpg
17672 image:foobar.jpg|some '''caption''' [[Main Page]]
17674 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17677 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17678 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17679 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17680 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17681 <div class="gallerytext">
17686 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17687 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17688 <div class="gallerytext">
17691 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17692 <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>
17693 <div class="gallerytext">
17694 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17698 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17699 <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>
17700 <div class="gallerytext">
17703 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17704 <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>
17705 <div class="gallerytext">
17715 Gallery with link that has fragment
17718 image:foobar.jpg|link=Main_Page
17719 image:foobar.jpg|link=Main_Page#section
17720 image:foobar.jpg|link=Main Page#section|caption
17723 <ul class="gallery mw-gallery-traditional">
17724 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17725 <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>
17726 <div class="gallerytext">
17729 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17730 <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>
17731 <div class="gallerytext">
17734 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17735 <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>
17736 <div class="gallerytext">
17746 Gallery with wikitext inside caption
17749 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
17750 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
17753 <ul class="gallery mw-gallery-traditional">
17754 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17755 <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>
17756 <div class="gallerytext">
17757 <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>
17761 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17762 <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>
17763 <div class="gallerytext">
17764 <p>This is a test template
17773 gallery (with showfilename option)
17775 <gallery showfilename>
17776 File:Nonexistent.jpg|caption
17777 File:Nonexistent.jpg
17778 image:foobar.jpg|some '''caption''' [[Main Page]]
17782 <ul class="gallery mw-gallery-traditional">
17783 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17784 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17785 <div class="gallerytext">
17786 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17791 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17792 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17793 <div class="gallerytext">
17794 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17798 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17799 <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>
17800 <div class="gallerytext">
17801 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17802 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17806 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17807 <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>
17808 <div class="gallerytext">
17809 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17818 Gallery (with namespace-less filenames)
17821 File:Nonexistent.jpg
17827 <ul class="gallery mw-gallery-traditional">
17828 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17829 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17830 <div class="gallerytext">
17833 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17834 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17835 <div class="gallerytext">
17838 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17839 <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>
17840 <div class="gallerytext">
17843 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17844 <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>
17845 <div class="gallerytext">
17853 HTML Hex character encoding (spells the word "JavaScript")
17855 parsoid=wt2html,wt2wt,html2html
17857 JavaScript
17859 <p>JavaScript
17864 <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>
17868 HTML Hex character encoding bogus encoding (bug 26437 regression check)
17872 <p>&#xsee;&#XSEE;
17875 <p>&#xsee;&#XSEE;</p>
17879 HTML Hex character encoding mixed case
17881 parsoid=wt2html,wt2wt,html2html
17890 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
17894 __FORCETOC__ override
17906 ISBN 978-0-1234-56 789
17908 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
17911 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
17913 <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>
17917 ISBN followed by 5 spaces
17928 ISBN ISBN 1234567890
17930 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17933 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17943 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17944 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17945 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17948 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17949 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17950 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17954 ISBN with empty prefix (parsoid test)
17958 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17961 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17965 Bug 22905: <abbr> followed by ISBN followed by </a>
17967 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17969 <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>
17972 <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>
17980 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17985 Double RFC with a wiki link
17989 <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>
17998 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18001 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18005 Centre-aligned image
18007 [[Image:foobar.jpg|centre]]
18009 <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>
18016 [[Image:foobar.jpg|none]]
18018 <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>
18023 Width + Height sized image (using px) (height is ignored)
18025 [[Image:foobar.jpg|640x480px]]
18027 <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>
18032 Width-sized image (using px, no following whitespace)
18034 [[Image:foobar.jpg|640px]]
18036 <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>
18041 Width-sized image (using px, with following whitespace - test regression from r39467)
18043 [[Image:foobar.jpg|640px ]]
18045 <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>
18050 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18052 [[Image:foobar.jpg| 640px]]
18054 <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>
18059 Image with page parameter
18063 [[File:LoremIpsum.djvu|page=2]]
18065 <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>
18068 <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>
18072 Another italics / bold test
18080 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18086 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18089 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18094 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18096 Images with the "|" character in the comment
18098 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18100 <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>
18103 <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>
18107 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18109 <html><script>alert(1);</script></html>
18111 <p><html><script>alert(1);</script></html>
18116 HTML with raw HTML ($wgRawHtml==true)
18120 <html><script>alert(1);</script></html>
18122 <p><script>alert(1);</script>
18127 Parents of subpages, one level up
18129 subpage title=[[Subpage test/L1/L2/L3]]
18133 <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>
18139 Parents of subpages, one level up, not named
18141 subpage title=[[Subpage test/L1/L2/L3]]
18145 <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>
18152 Parents of subpages, two levels up
18154 subpage title=[[Subpage test/L1/L2/L3]]
18160 <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
18161 </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>
18166 Parents of subpages, two levels up, without trailing slash or name.
18168 subpage title=[[Subpage test/L1/L2/L3]]
18177 Parents of subpages, two levels up, with lots of extra trailing slashes.
18179 subpage title=[[Subpage test/L1/L2/L3]]
18183 <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>
18188 Subpage test/L1/L2/L3Sibling
18194 Transclusion of a sibling page (one level up)
18196 subpage title=[[Subpage test/L1/L2/L3]]
18205 Transclusion of a child page
18207 subpage title=[[Subpage test/L1/L2]]
18216 Non-transclusion because of too many up levels
18218 subpage title=[[Subpage test/L1/L2/L3]]
18220 {{../../../../More than parent}}
18222 <p>{{../../../../More than parent}}
18227 Definition list code coverage
18233 <dl><dt> title  </dt>
18235 <dt> title </dt>
18241 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18242 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18243 <dt>title</dt><dd> def</dd></dl>
18247 Don't fall for the self-closing div
18249 <div>hello world</div/>
18251 <div>hello world</div>
18260 <p>[[:Template:Msg]]
18269 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18273 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18275 Always escape literal '>' in output, not just after '<'
18289 <p>This is a test template
18290 This is a test template
18302 Inclusion of !userCanEdit() content
18306 <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>
18312 Out-of-order TOC heading levels
18321 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18323 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18325 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18326 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18329 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18331 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18332 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18338 <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>
18339 <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>
18340 <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>
18341 <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>
18342 <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>
18343 <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>
18349 ISBN with a dummy number
18359 ISBN with space-delimited number
18363 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18369 ISBN with multiple spaces, no number
18388 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18389 </p><p>ISBN 12345678901
18395 ISBN with trailing year (bug 8110)
18397 ISBN 1-234-56789-0 - 2006
18399 ISBN 1 234 56789 0 - 2006
18401 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18402 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18410 {{anchorencode:foo bar©#%n}}
18412 <p>foo_bar.C2.A9.23.25n
18417 anchorencode trims spaces
18419 {{anchorencode: __pretty__please__}}
18426 anchorencode deals with links
18428 {{anchorencode: [[hello|world]] [[hi]]}}
18435 anchorencode deals with templates
18437 {{anchorencode: {{Foo}} }}
18444 anchorencode encodes like the TOC generator: (bug 18431)
18446 === _ +:.3A%3A&&]] ===
18447 {{anchorencode: _ +:.3A%3A&&]] }}
18450 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18451 <p>.2B:.3A.253A.26.26.5D.5D
18456 Bug 6200: blockquotes and paragraph formatting
18477 Bug 8293: Use of center tag ruins paragraph formatting
18498 Parsing of overlapping (improperly nested) inline html tags
18500 <span><s>x</span></s>
18502 <p><span><s>x</span></s></span>
18505 <p><span><s>x</s></span>
18510 ### Language variants related tests
18513 Self-link in language variants
18515 title=[[Dunav]] language=sr
18517 Both [[Dunav]] and [[Дунав]] are names for this river.
18519 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18530 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
18532 title=[[Duna]] language=sr
18534 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
18536 <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.
18541 Link to a section of a variant of this title shouldn't be parsed as self-link
18543 title=[[Duna]] language=sr
18545 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
18547 <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.
18552 Link to pages in language variants
18556 Main Page can be written as [[Маин Паге]]
18558 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18564 Multiple links to pages in language variants
18568 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18570 <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>.
18576 Simple template in language variants
18582 <p>This is a test template
18588 Template with explicit namespace in language variants
18594 <p>This is a test template
18600 Basic test for template parameter in language variants
18604 {{парамтест|param=foo}}
18606 <p>This is a test template with parameter foo
18612 Simple category in language variants
18616 [[Category:МедиаWики Усер'с Гуиде]]
18618 <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>
18635 Don't convert blue categorylinks to another variant (bug 33210)
18639 [[A]][[Category:分类]]
18641 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18646 Stripping -{}- tags (language variants)
18650 Latin proverb: -{Ne nuntium necare}-
18652 <p>Latin proverb: Ne nuntium necare
18658 Prevent conversion with -{}- tags (language variants)
18660 language=sr variant=sr-ec
18662 Latinski: -{Ne nuntium necare}-
18664 <p>Латински: Ne nuntium necare
18670 Prevent conversion of text with -{}- tags (language variants)
18672 language=sr variant=sr-ec
18674 Latinski: -{Ne nuntium necare}-
18676 <p>Латински: Ne nuntium necare
18682 Prevent conversion of links with -{}- tags (language variants)
18684 language=sr variant=sr-ec
18688 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18694 -{}- tags within headlines (within html for parserConvert())
18696 language=sr variant=sr-ec
18700 <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>
18706 Explicit definition of language variant alternatives
18708 language=zh variant=zh-tw
18710 -{zh:China;zh-tw:Taiwan}-, not China
18712 <p>Taiwan, not China
18718 Conversion around HTML tags
18720 language=sr variant=sr-ec
18722 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
18723 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
18726 <span title="ЛаCтин">ски</span>
18732 Explicit session-wise language variant mapping (A flag and - flag)
18734 language=zh variant=zh-tw
18736 Taiwan is not China.
18737 But -{A|zh:China;zh-tw:Taiwan}- is China,
18738 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
18739 and -{China}- is China.
18741 <p>Taiwan is not China.
18742 But Taiwan is Taiwan,
18743 (This should be stripped!)
18744 and China is China.
18749 Explicit session-wise language variant mapping (H flag for hide)
18751 language=zh variant=zh-tw
18753 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
18756 <p>(This should be stripped!)
18762 Adding explicit conversion rule for title (T flag)
18764 language=zh variant=zh-tw showtitle
18766 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18769 <p>Should be stripped!
18774 Testing that changing the language variant here in the tests actually works
18776 language=zh variant=zh showtitle
18778 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18781 <p>Should be stripped!
18786 Recursive conversion of alt and title attrs shouldn't clear converter state
18788 language=zh variant=zh-cn showtitle
18790 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
18791 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
18795 Should be stripped<span title="Exclamation">!</span>
18800 Bug 24072: more test on conversion rule for title
18802 language=zh variant=zh-tw showtitle
18804 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18805 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
18808 <p>This should be stripped!
18809 This won't take interferes with the title rule.
18814 Partly disable title conversion if variant == main language code
18816 language=zh variant=zh title=[[ZH]] showtitle
18818 -{T|zh-cn:CN;zh-tw:TW}-
18826 Partly disable title conversion if variant == main language code, more
18828 language=zh variant=zh title=[[ZH]] showtitle
18838 Raw output of variant escape tags (R flag)
18840 language=zh variant=zh-tw
18842 Raw: -{R|zh:China;zh-tw:Taiwan}-
18844 <p>Raw: zh:China;zh-tw:Taiwan
18849 Strings evaluating false shouldn't be ignored by Language converter (T51072)
18851 language=zh variant=zh-cn
18853 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
18860 Conversion rules from [numeric-only string] to [something else] (T48634)
18862 language=zh variant=zh-cn
18864 -{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
18871 Bidirectional converter rule entries with an empty value should be ignored (T53551)
18873 language=zh variant=zh-cn
18875 -{H|zh-cn:foo;zh-tw:;}-foobar
18882 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
18884 language=zh variant=zh-cn
18886 -{H|=>zh-cn:foo;}-foobar
18893 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
18895 language=zh variant=zh-cn
18904 Nested using of manual convert syntax
18906 language=zh variant=zh-hk
18908 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
18910 <p>Nested: Hello Hong Kong!
18915 Proper conversion of text in external links
18917 language=sr variant=sr-ec
18919 http://www.google.com
18920 gopher://www.google.com
18921 [http://www.google.com http://www.google.com]
18922 [gopher://www.google.com gopher://www.google.com]
18923 [https://www.google.com irc://www.google.com]
18924 [ftp://www.google.com www.google.com/ftp://dir]
18925 [//www.google.com www.google.com]
18927 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18928 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18929 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18930 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18931 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
18932 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
18933 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
18938 Do not convert roman numbers to language variants
18940 language=sr variant=sr-ec
18944 <p>Фридрих IV је цар.
18949 Unclosed language converter markup "-{"
18960 Don't convert raw rule "-{R|=>}-" to "=>"
18971 Don't break link parsing if language converter markup is in the caption.
18973 language=sr variant=sr-ec
18975 [[Main Page|-{R|main page}-]]
18977 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
18981 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18983 Don't break image parsing if language converter markup is in the caption.
18987 [[File:Foobar.jpg|-{R|caption}-]]
18989 <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>
18993 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18995 Don't break list handling if language converter markup is in the item.
18997 language=zh variant=zh-cn
18999 ;-{zh-cn:AAA;zh-tw:BBB}-
19001 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19008 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19010 Don't break table handling if language converter markup is in the cell.
19012 language=sr variant=sr-ec
19035 Bug 529: Uncovered bullet
19044 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19045 # Templates in Wikipedia rely on this behavior, as tidy has always been
19046 # enabled there. These tests are normally run *without* tidy, so specify the
19047 # full output here.
19048 # To test realistic parsing behavior, apply a tidy-like transformation to both
19049 # the expected output and your parser's output.
19051 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19053 ******* Foo {{bullet}}
19055 <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>
19061 Bug 529: Uncovered table already at line-start
19084 Bug 529: Uncovered bullet in parser function result
19086 * Foo {{lc:{{bullet}} }}
19094 Bug 5678: Double-parsed template argument
19096 {{lc:{{{1}}}|hello}}
19103 Bug 5678: Double-parsed template invocation
19105 {{lc:{{paramtest {{!}} param = hello }} }}
19107 <p>{{paramtest | param = hello }}
19112 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19115 title=[[Main Page]]
19117 {{PRVNÍVELKÉ:ěščř}}
19118 {{prvnívelké:ěščř}}
19138 Morwen/13: Unclosed link followed by heading
19145 <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>
19150 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19157 <h1><span class="mw-headline" id="heading">heading</span></h1>
19162 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19169 <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>
19184 Paragraphs inside divs (no extra line breaks)
19196 Paragraphs inside divs (extra line break on open)
19211 Paragraphs inside divs (extra line break on close)
19226 Paragraphs inside divs (extra line break on open and close)
19243 Nesting tags, paragraphs on lines which begin with <div>
19245 <div></div><strong>A
19248 <p><strong>A</strong></p>
19249 <p><strong>B</strong></p>
19257 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19259 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19261 <blockquote>Line one
19263 Line two</blockquote>
19265 <blockquote>Line one
19266 Line two</blockquote>
19270 <p>Line one Line two</p>
19275 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19280 Line two</blockquote>
19285 Line two</blockquote>
19290 Line two</blockquote>
19294 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19296 <blockquote>Line one
19301 <blockquote>Line one
19314 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19336 Paragraphs inside blockquotes/divs (no extra line breaks)
19338 <blockquote><div>Line one
19340 Line two</div></blockquote>
19342 <blockquote><div>Line one
19343 Line two</div></blockquote>
19348 Paragraphs inside blockquotes/divs (extra line break on open)
19353 Line two</div></blockquote>
19358 Line two</div></blockquote>
19363 Paragraphs inside blockquotes/divs (extra line break on close)
19365 <blockquote><div>Line one
19368 </div></blockquote>
19370 <blockquote><div>Line one
19373 </div></blockquote>
19378 Paragraphs inside blockquotes/divs (extra line break on open and close)
19384 </div></blockquote>
19390 </div></blockquote>
19395 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19397 wgLinkHolderBatchSize=0
19403 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19404 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19405 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19410 Free external link invading image caption
19412 [[Image:Foobar.jpg|thumb|http://x|hello]]
19414 <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>
19419 Bug 15196: localised external link numbers
19423 [http://en.wikipedia.org/]
19425 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19428 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19432 Multibyte character in padleft
19434 {{padleft:-Hello|7|Æ}}
19441 Multibyte character in padright
19443 {{padright:Hello-|7|Æ}}
19450 formatdate parser function
19452 {{#formatdate:2009-03-24}}
19454 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19459 formatdate parser function, with default format
19461 {{#formatdate:2009-03-24|mdy}}
19463 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19468 Spacing of numbers in formatted dates
19470 {{#formatdate:January 15}}
19472 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19477 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
19479 language=nl title=[[MediaWiki:Common.css]]
19481 {{#formatdate:2009-03-24|dmy}}
19483 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19496 Edit comment with link
19500 I like the [[Main Page]] a lot
19502 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19506 Edit comment with link and link text
19510 I like the [[Main Page|best pages]] a lot
19512 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19516 Edit comment with link and link text with suffix
19520 I like the [[Main Page|best page]]s a lot
19522 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19526 Edit comment with section link (non-local, eg in history list)
19528 comment title=[[Main Page]]
19530 /* External links */ removed bogus entries
19532 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19536 Edit comment with section link and text before it (non-local, eg in history list)
19538 comment title=[[Main Page]]
19540 pre-comment text /* External links */ removed bogus entries
19542 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>
19546 Edit comment with section link (local, eg in diff view)
19548 comment local title=[[Main Page]]
19550 /* External links */ removed bogus entries
19552 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19556 Edit comment with subpage link (bug 14080)
19560 title=[[Subpage test]]
19562 Poked at a [[/subpage]] here...
19564 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
19568 Edit comment with subpage link and link text (bug 14080)
19572 title=[[Subpage test]]
19574 Poked at a [[/subpage|neat little page]] here...
19576 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
19580 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
19583 title=[[Subpage test]]
19585 Poked at a [[/subpage]] here...
19587 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
19591 Edit comment with bare anchor link (local, as on diff)
19595 title=[[Main Page]]
19599 <a href="#section">#section</a>
19603 Edit comment with bare anchor link (non-local, as on history)
19606 title=[[Main Page]]
19610 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19614 Anchor starting with underscore
19618 <p><a href="#_ref">One</a>
19623 Id starting with underscore
19625 <div id="_ref"></div>
19627 <div id="_ref"></div>
19632 Space normalisation on autocomment (bug 22784)
19635 title=[[Main Page]]
19637 /* __hello__world__ */
19639 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19643 percent-encoding and + signs in comments (Bug 26410)
19647 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19649 <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>
19652 # Parsoid doesn't support this yet: see bug 73581
19653 # but it *should* omit the 'src' attribute if the image is bad.
19654 # PHP side of tests was disabled in
19655 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19656 # because of issues in the PHP parserTests infrastructure
19657 # (but the output below is indeed what the PHP side emits)
19659 Bad images - basic functionality
19662 !! DISABLED/html/php
19664 <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>
19668 Bad images - bug 16039: text after bad image disappears
19673 !! DISABLED/html/php
19679 <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>
19684 Verify that displaytitle works (bug #22501) no displaytitle
19688 wgAllowDisplayTitle=true
19689 wgRestrictDisplayTitle=false
19691 this is not the the title
19694 <p>this is not the the title
19699 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
19704 wgAllowDisplayTitle=true
19705 wgRestrictDisplayTitle=false
19707 this is not the the title
19708 {{DISPLAYTITLE:whatever}}
19711 <p>this is not the the title
19716 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
19721 wgAllowDisplayTitle=true
19722 wgRestrictDisplayTitle=true
19724 this is not the the title
19725 {{DISPLAYTITLE:whatever}}
19728 <p>this is not the the title
19733 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
19738 wgAllowDisplayTitle=true
19739 wgRestrictDisplayTitle=true
19741 this is not the the title
19742 {{DISPLAYTITLE:screen}}
19745 <p>this is not the the title
19750 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
19755 wgAllowDisplayTitle=false
19757 this is not the the title
19758 {{DISPLAYTITLE:screen}}
19761 <p>this is not the the title
19762 <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>
19767 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
19772 wgAllowDisplayTitle=false
19774 this is not the the title
19777 <p>this is not the the title
19782 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
19787 wgAllowDisplayTitle=true
19788 wgRestrictDisplayTitle=true
19790 this is not the the title
19791 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
19793 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
19794 <p>this is not the the title
19799 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
19804 wgAllowDisplayTitle=true
19805 wgRestrictDisplayTitle=true
19807 this is not the the title
19808 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
19810 <span style="color: red;">s</span>creen
19811 <p>this is not the the title
19816 Page status indicators: Empty name is invalid
19820 <indicator name=" "></indicator>
19821 <indicator></indicator>
19823 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19824 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19829 Page status indicators: Weird syntaxes that are okay
19833 <indicator name="empty" />
19834 <indicator name></indicator>
19843 Page status indicators: Torture test
19847 <indicator name="01">hello world</indicator>
19848 <indicator name="02">[[Main Page]]</indicator>
19849 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
19850 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
19851 <indicator name="05">* foo
19853 <indicator name="06"><nowiki>foo</nowiki></indicator>
19854 <indicator name="07"> Preformatted</indicator>
19855 <indicator name="08"><div>Broken tag</indicator>
19856 <indicator name="09">{| class=wikitable
19859 <indicator name="10">Two
19861 paragraphs</indicator>
19864 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19865 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" />
19866 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>
19867 05=<ul><li> foo</li>
19871 07=<pre>Preformatted
19873 08=<div>Broken tag</div>
19875 09=<table class="wikitable">
19892 preload: check <noinclude> and <includeonly>
19896 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
19902 preload: check <onlyinclude>
19906 Goodbye <onlyinclude>Hello world</onlyinclude>
19912 preload: can pass tags through if we want to
19916 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
19918 <includeonly>Hello world</includeonly>
19922 preload: check that it doesn't try to do tricks
19926 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19928 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19932 Play a bit with r67090 and bug 3158
19934 <div style="width:50% !important"> </div>
19935 <div style="width:50% !important"> </div>
19936 <div style="width:50% !important"> </div>
19937 <div style="border : solid;"> </div>
19939 <div style="width:50% !important"> </div>
19940 <div style="width:50% !important"> </div>
19941 <div style="width:50% !important"> </div>
19942 <div style="border : solid;"> </div>
19945 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19946 <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>
19947 <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>
19948 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19953 HTML5 data attributes
19955 <span data-foo="bar">Baz</span>
19956 <p data-abc-def_hij="">Quuz</p>
19958 <p><span data-foo="bar">Baz</span>
19960 <p data-abc-def_hij="">Quuz</p>
19965 percent-encoding and + signs in internal links (Bug 26410)
19967 [[User:+%]] [[Page+title%]]
19968 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
19969 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
19970 [[%33%45]] [[%33%45+]]
19972 <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>
19973 <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>
19974 <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>
19975 <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>
19978 <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>
19979 <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>
19980 <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>
19981 <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>
19985 Special characters in embedded file links (bug 27679)
19987 [[File:Contains & ampersand.jpg]]
19988 [[File:Does not exist.jpg|Title with & ampersand]]
19990 <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>
19991 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
19994 <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>
19995 <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>
19999 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20001 Text's been normalized?
20003 <p>Text's been normalized?
20008 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20010 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20012 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20017 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20019 [http://www.example.org/ ideograms]
20021 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20026 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20028 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20030 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20054 Bug 31098 Template which includes system messages which includes the template
20058 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20059 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20064 Bug31490 Turkish: ucfirst 'blah'
20075 Bug31490 Turkish: ucfirst 'ix'
20086 Bug31490 Turkish: lcfirst 'BLAH'
20097 Bug31490 Turkish: ucfırst (with a dotless i)
20103 <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>
20108 Bug31490 ucfırst (with a dotless i) with English language
20114 <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>
20119 Bug 26375: TOC with italics
20121 title=[[Main Page]]
20124 == ''Lost'' episodes ==
20126 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20128 <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>
20132 <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>
20137 Bug 26375: TOC with bold
20139 title=[[Main Page]]
20142 == '''should be bold''' then normal text ==
20144 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20146 <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>
20150 <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>
20155 Bug 33845: Headings become cursive in TOC when they contain an image
20157 title=[[Main Page]]
20160 == Image [[Image:foobar.jpg]] ==
20162 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20164 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20168 <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>
20173 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20175 title=[[Main Page]]
20178 == <blockquote>Quote</blockquote> ==
20180 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20182 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20186 <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>
20190 <div id="toc" class="toc">
20191 <div id="toctitle">
20195 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20199 <h2><span class="mw-headline" id="Quote"></span></h2>
20201 <p><span class="mw-headline" id="Quote">Quote</span></p>
20203 <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>
20207 Unclosed tags in TOC
20209 title=[[Main Page]]
20213 <small>Hanc marginis exiguitas non caperet.</small>
20216 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20218 <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>
20222 <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>
20223 <p><small>Hanc marginis exiguitas non caperet.</small>
20229 Multiple tags in TOC
20232 == <i>Foo</i> <b>Bar</b> ==
20234 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20236 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20238 <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>
20239 <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>
20243 <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>
20244 <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>
20248 <div id="toc" class="toc">
20249 <div id="toctitle">
20253 <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>
20254 <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>
20258 <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>
20259 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20261 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20263 <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>
20267 Tags with parameters in TOC
20270 == <sup class="in-h2">Hello</sup> ==
20272 == <sup class="a > b">Evilbye</sup> ==
20274 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20276 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20277 <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>
20281 <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>
20282 <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>
20287 span tags with directionality in TOC
20290 == <span dir="ltr">C++</span> ==
20292 == <span dir="rtl">זבנג!</span> ==
20294 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20296 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20298 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20300 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20302 <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>
20303 <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>
20304 <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>
20305 <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>
20306 <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>
20310 <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>
20311 <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>
20312 <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>
20313 <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>
20314 <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>
20319 Bug 72884: bdi element in ToC
20322 == <bdi>test</bdi> ==
20324 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20326 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20330 <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>
20334 # Note that the html output does not have the <p></p>, but the
20335 # html+tidy output *does*. This is because the empty <p></p> is
20336 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20338 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20343 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20345 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20349 <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>
20353 <div id="toc" class="toc">
20354 <div id="toctitle">
20358 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20362 <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>
20368 == {{int:headline_sample}} ==
20372 Bug 32057: Title needed when expanding <h> nodes.
20374 title=[[Main Page]]
20378 <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>
20383 Strip marker in urlencode
20385 {{urlencode:x<nowiki/>y}}
20386 {{urlencode:x<nowiki/>y|wiki}}
20387 {{urlencode:x<nowiki/>y|path}}
20388 {{urlencode:x<pre id="one">two</pre>y}}
20416 Strip marker in formatNum
20418 {{formatnum:1<nowiki/>2}}
20419 {{formatnum:1<nowiki/>2|R}}
20427 Check noCommafy in formatNum
20431 {{formatnum:123456.78}}
20432 {{formatnum:123456.78|NOSEP}}
20440 Wrong option for formatNum (bug 56199)
20442 {{formatnum:1,234.56|Random}}
20443 {{formatnum:1,234.56|EVERYTHING}}
20444 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20453 Strip marker in grammar
20457 {{grammar:elative|foo<nowiki/>bar}}
20464 Strip marker in padleft
20466 {{padleft:|2|x<nowiki/>y}}
20473 Strip marker in padright
20475 {{padright:|2|x<nowiki/>y}}
20482 Strip marker in anchorencode
20484 {{anchorencode:x<nowiki/>y}}
20491 nowiki inside link inside heading (bug 18295)
20493 ==[[foo|x<nowiki>y</nowiki>z]]==
20495 <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>
20500 new support for bdi element (bug 31817)
20502 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20504 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20509 Ignore pipe between table row attributes
20513 |- id=foo | style='color: red'
20521 <tr id="foo" style="color: red">
20528 Gallery override link with WikiLink (bug 34852)
20531 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
20534 <ul class="gallery mw-gallery-traditional">
20535 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20536 <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>
20537 <div class="gallerytext">
20547 Gallery override link with absolute external link (bug 34852)
20550 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20553 <ul class="gallery mw-gallery-traditional">
20554 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20555 <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>
20556 <div class="gallerytext">
20566 Gallery override link with malicious javascript (bug 34852)
20569 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20572 <ul class="gallery mw-gallery-traditional">
20573 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20574 <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>
20575 <div class="gallerytext">
20585 Gallery with invalid title as link (bug 43964)
20588 File:foobar.jpg|link=<
20591 <ul class="gallery mw-gallery-traditional">
20592 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20593 <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>
20594 <div class="gallerytext">
20602 Language parser function
20611 Padleft and padright as substr
20613 {{padleft:|3|abcde}}
20614 {{padright:|3|abcde}}
20622 Special parser function
20624 {{#special:RandomPage}}
20625 {{#special:BaDtItLe}}
20626 {{#special:Foobar}}
20635 Bug 34939 - Case insensitive link parsing ([HttP://])
20637 [HttP://MediaWiki.Org/]
20639 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20642 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20646 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20648 [HttP://MediaWiki.Org/ MediaWiki]
20650 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20655 Bug 34939 - Case insensitive link parsing (HttP://)
20657 HttP://MediaWiki.Org/
20659 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20662 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
20680 <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>
20681 <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>
20682 <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>
20683 <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>
20684 <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>
20690 ### Parsoid-specific tests
20691 ### Parsoid-PHP parser incompatibilities
20694 1. SOL-sensitive wikitext tokens as template-args
20696 parsoid=wt2html,wt2wt
20702 <span about="#mwt1" typeof="mw:Transclusion">
20703 </span><ul about="#mwt1"><li>a</li>
20705 <span about="#mwt2" typeof="mw:Transclusion">
20706 </span><ol about="#mwt2"><li>a</li>
20708 <span about="#mwt3" typeof="mw:Transclusion">
20709 </span><dl about="#mwt3"><dd>a</dd>
20713 #### -----------------------------------------------------------------
20714 #### Parsoid-specific functionality tests
20715 #### -----------------------------------------------------------------
20717 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
20718 # We know wt2wt will fail, but we expect selser to pass.
20719 # Due to the nature of our testing, wt2wt and selser tests will enter the
20720 # blacklist and we'll catch selser regressions based on changes to the
20721 # blacklist entries for selser tests.
20723 1. Bad treebuilder fixup of formatting elt is cleaned up
20725 parsoid=wt2html,wt2wt
20730 [[Image:Foobar.jpg|right|Test]]
20737 <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>
20744 2. Bad treebuilder fixup of formatting elt is cleaned up
20746 parsoid=wt2html,wt2wt
20748 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
20750 <small>[[Image:Foobar.jpg|right|300px]]</small>
20754 <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>
20756 <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>
20759 #### ----------------------------------------------------------------
20760 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
20761 #### tags. Parsoid's output for these tags differs from that of the
20763 #### ----------------------------------------------------------------
20766 Ref: 1. ref-location should be replaced with an index span
20771 B <ref name="x">foo</ref>
20775 <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>
20776 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>
20777 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>
20778 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20779 <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>
20780 <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>
20781 <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>
20786 Ref: 2. ref-tags with identical names should all get the same index
20790 A <ref name="x">foo</ref>
20794 <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>
20795 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>
20796 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20797 <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>
20802 Ref: 3. spaces in ref-names should be ignored
20806 A <ref name="x">foo</ref>
20807 B <ref name=" x " />
20811 <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>
20812 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>
20813 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>
20814 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20815 <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>
20819 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
20821 Ref: 4. 'constructor' should be accepted as a valid ref-name
20825 A <ref name="constructor">foo</ref>
20828 <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>
20829 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20830 <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>
20835 Ref: 5. body should accept generic wikitext
20840 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
20845 <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>
20847 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20848 <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>
20854 Ref: 6. indent-pres should not be output in ref-body
20866 <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>
20868 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20869 <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
20877 Ref: 7. No p-wrapping in ref-body
20896 <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>
20898 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20899 <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
20914 Ref: 8. transclusion wikitext has lower precedence
20918 A <ref> foo {{echo|</ref> B C}}
20922 <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>
20923 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20924 <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>
20929 Ref: 9. unclosed comments should not leak out of ref-body
20933 A <ref> foo <!--</ref> B C
20936 <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>
20937 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20938 <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>
20943 Ref: 10. Unclosed HTML tags should not leak out of ref-body
20947 A <ref> <b> foo </ref> B C
20951 <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>
20954 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20955 <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>
20960 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
20968 <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
20969 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>
20970 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" 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">foo</span></li>
20972 <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>
20977 Ref: 12. ref-tags act as trailing newline migration barrier
20979 <!--the newline at the end of this line moves out of the p tag-->a
20981 b<!--the newline at the end of this line stays inside the p tag--> <ref />
20987 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
20990 <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>
20991 <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>
20994 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20995 <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>
20996 <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>
21000 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21009 <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
21010 <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>
21011 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21012 <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>
21013 <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
21019 Ref: 14. A nested ref-tag should be emitted as plain text
21023 <ref>foo <ref>bar</ref> baz</ref>
21027 <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>
21029 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21030 <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>
21035 Ref: 15. ref-tags with identical names should get identical indexes
21039 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21040 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21044 <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>
21045 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>
21047 <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>
21051 ## We don't bother wt2wt-ing non-standard whitespace
21053 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21061 <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>
21062 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21063 <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>
21067 Ref: 17. Generate valid HTML5 id/about attributes
21071 <ref name="a b">foo</ref>
21075 <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>
21078 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21079 <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>
21084 Ref: 18. T58916: Extension attributes should be parsed as plain text
21088 <ref name="{{echo|a}}">foo</ref>
21092 <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>
21095 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21096 <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>
21101 Ref: 19. ref-tags with identical name encodings should get identical indexes
21105 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21109 <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>
21111 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21112 <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>
21117 Ref: 20. ref-tags with identical names but different content should keep it
21121 A <ref name="foo">Foo one</ref>
21122 B <ref name="foo">Foo two</ref>
21123 C <ref name="foo" />
21127 <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>
21128 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>
21129 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>
21131 <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>
21136 References: 1. references tag without any refs should be handled properly
21140 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21144 References: 2. references tag with group only outputs references from that group
21146 A <ref group="a">foo</ref>
21147 B <ref group="b">bar</ref>
21150 <references group="a" />
21152 <references group="b" />
21154 <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>
21155 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>
21156 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>
21158 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21159 <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>
21161 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21162 <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>
21164 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21165 <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>
21170 References: 3. ref list should be cleared after processing references
21180 <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>
21182 <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>
21185 <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>
21187 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21188 <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>
21193 References: 4. only referenced group should be cleared after processing references
21195 A <ref group="a">afoo</ref>
21198 <references group="a" />
21204 <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>
21205 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>
21207 <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>
21210 <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>
21212 <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>
21217 References: 5. ref tags in references should be processed while ignoring all other content
21220 B <ref name="b">bar</ref>
21223 <ref name="a">foo</ref>
21224 This should just get lost.
21227 <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>
21228 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>
21231 <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>
21236 References: 6. <references /> from a transclusion
21238 <ref>Foo</ref> {{echo|<references />}}
21240 <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>
21245 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21247 A <ref>foo bar for a</ref>
21248 B <ref group="X" name="b" />
21252 <references group="X">
21253 <ref name="b">foo</ref>
21256 <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>
21257 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>
21260 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21261 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo bar for a</span></li>
21264 <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"}}'>
21265 <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>
21270 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21272 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21275 <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>
21276 <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>
21280 # This test only works in wt2html now as the <references /> are always generated
21281 # unless selser is active. Once T72722 is fixed, we should add a changes test
21282 # here to ensure that unrelated changes don't add the new <references /> in
21285 References: 9. Generate missing references list at the end
21288 B <ref group="inexistent">bar</ref>
21290 <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>
21291 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21292 <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>
21294 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21295 <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>
21300 References: 10. New <references/> shouldn't be added for unrelated edits.
21303 "modes": ["selser"],
21304 "changes": [["#x", "remove"]],
21308 Unrelated text<span id="x"> that's going to disappear</span>.
21316 Entities in ref name
21318 <ref name="test & me">hi</ref>
21321 <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>
21322 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21323 <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>
21327 # This test is wt2html only because we're permitting the serializer to produce
21328 # dirty diffs, normalizing the unclosed references to the self-closed version.
21330 Generate references for unclosed references tag
21338 <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>
21339 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21340 <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>
21344 New reference serializes on its own line
21346 parsoid=wt2wt,html2wt
21351 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21354 #### ----------------------------------------------------------------
21355 #### Parsoid-only testing of Parsoid's impl of LST
21356 #### Not implemented yet, see
21357 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21358 #### ----------------------------------------------------------------
21361 LST Sections: 1. Simple section start and end
21363 <section begin="2011-05-16" />
21364 <section end="2014-04-10 (MW 1.23wmf22)" />
21366 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21367 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21370 #--------- Test stripping of empty nodes in template content ----------
21372 Empty LI and TR nodes should be stripped from template content
21377 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21381 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21394 Empty LI and TR nodes should not be stripped from top-level content
21421 Empty TR nodes should not be stripped if they have any attributes set
21423 {{EmptyTRWithHTMLAttrTest}}
21425 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21426 <tr align="center"></tr>
21427 <tr><td>foo</td></tr>
21428 <tr align="center"></tr>
21429 <tr><td>bar</td></tr>
21433 #### ----------------------------------------------------------------
21434 #### The following section of tests are primarily to test
21435 #### wikitext escaping capabilities of Parsoid. Given that
21436 #### escaping can be done any number of ways, the wikitext (input)
21437 #### is always adjusted to reflect how Parsoid adds nowiki
21440 #### We are marking several tests as parsoid-only since the
21441 #### HTML in the result section is different from what the
21442 #### PHP parser generates for it.
21443 #### ----------------------------------------------------------------
21446 #### --------------- Headings ---------------
21448 #### 1. Nested inside html <h1>=foo=</h1>
21449 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21450 #### 3. Nested inside html with wikitext split by html tags
21451 #### 4. No escape needed
21452 #### 5. Empty headings <h1></h1>
21453 #### 6. Heading chars in SOL context
21454 #### ----------------------------------------
21456 Headings: 0. Unnested
21460 <nowiki>=foo=</nowiki>
21462 <nowiki> =foo= </nowiki>
21464 <nowiki>=foo=</nowiki>
21466 =foo''a''<nowiki>=</nowiki>
21468 <p><span typeof="mw:Nowiki">=foo=</span></p>
21470 <p><span typeof="mw:Nowiki"> =foo= </span>
21472 <span typeof="mw:Nowiki">=foo=</span></p>
21474 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
21477 # New headings and existing headings are handled differently
21479 Headings: 1. Nested inside html
21487 <h1 data-parsoid=''>=foo=</h1>
21488 <h2 data-parsoid=''>=foo=</h2>
21489 <h3 data-parsoid=''>=foo=</h3>
21490 <h4 data-parsoid=''>=foo=</h4>
21491 <h5 data-parsoid=''>=foo=</h5>
21492 <h6 data-parsoid=''>=foo=</h6>
21500 =<nowiki>=foo=</nowiki>=
21501 ==<nowiki>=foo=</nowiki>==
21502 ===<nowiki>=foo=</nowiki>===
21503 ====<nowiki>=foo=</nowiki>====
21504 =====<nowiki>=foo=</nowiki>=====
21505 ======<nowiki>=foo=</nowiki>======
21510 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
21519 <nowiki>*</nowiki>bar
21525 <nowiki>=bar=</nowiki>
21529 Headings: 3. Nested inside html with wikitext split by html tags
21531 parsoid=html2wt,wt2wt
21533 = ='''bold'''<nowiki>foo=</nowiki> =
21535 <h1>=<b>bold</b>foo=</h1>
21539 Headings: 4a. No escaping needed (testing just h1 and h2)
21564 <h1><i>=</i>foo=</h1>
21568 Headings: 4b. No escaping needed (inside p-tags)
21583 Headings: 5. Empty headings
21593 =====<nowiki/>=====
21595 ======<nowiki/>======
21597 <h1 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h1>
21599 <h2 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h2>
21601 <h3 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h3>
21603 <h4 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h4>
21605 <h5 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h5>
21607 <h6 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h6>
21611 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21615 <nowiki>=a=</nowiki>
21617 <nowiki>=a=</nowiki>
21619 <nowiki>=a=</nowiki>
21621 <nowiki>=a=</nowiki>
21630 Headings: 6b. Heading chars in SOL context (with trailing newlines)
21658 Headings: 6c. Heading chars in SOL context (leading newline break)
21663 <nowiki>=b=</nowiki>
21670 Headings: 6d. Heading chars in SOL context (with interspersed comments)
21674 <!--c0--><nowiki>=a=</nowiki>
21676 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
21678 <p><!--c0-->=a=</p>
21679 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
21683 Headings: 6d. Heading chars in SOL context (No escaping needed)
21693 Headings: 7. Insert a newline between new content and headings
21699 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
21700 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
21710 #### --------------- Lists ---------------
21711 #### 0. Outside nests (*foo, etc.)
21712 #### 1. Nested inside html <ul><li>*foo</li></ul>
21713 #### 2. Inside definition lists
21714 #### 3. Only bullets at start should be escaped
21715 #### 4. No escapes needed
21716 #### 5. No unnecessary escapes
21717 #### 6. Escape bullets in SOL position
21718 #### 7. Escape bullets in a multi-line context
21719 #### ----------------------------------------
21722 Lists: 0. Outside nests
21724 <nowiki>*</nowiki>foo
21726 <nowiki>#</nowiki>foo
21728 <nowiki>;Foo:</nowiki>bar
21737 Lists: 1. Nested inside html
21739 *<nowiki>*foo</nowiki>
21741 *<nowiki>#foo</nowiki>
21743 *<nowiki>:foo</nowiki>
21745 *<nowiki>;foo</nowiki>
21747 #<nowiki>*foo</nowiki>
21749 #<nowiki>#foo</nowiki>
21751 #<nowiki>:foo</nowiki>
21753 #<nowiki>;foo</nowiki>
21755 <ul><li>*foo</li></ul>
21756 <ul><li>#foo</li></ul>
21757 <ul><li>:foo</li></ul>
21758 <ul><li>;foo</li></ul>
21759 <ol><li>*foo</li></ol>
21760 <ol><li>#foo</li></ol>
21761 <ol><li>:foo</li></ol>
21762 <ol><li>;foo</li></ol>
21767 Lists: 2. Inside definition lists
21769 ;<nowiki>;foo</nowiki>
21771 ;<nowiki>:foo</nowiki>
21773 ;<nowiki>:foo</nowiki>
21776 :<nowiki>:foo</nowiki>
21778 <dl><dt>;foo</dt></dl>
21779 <dl><dt>:foo</dt></dl>
21782 <dl><dd>:foo</dd></dl>
21787 Lists: 3. Only bullets at start of text should be escaped
21789 *<nowiki>*foo*bar</nowiki>
21791 *<nowiki>*foo</nowiki>''it''*bar
21793 <ul><li>*foo*bar</li></ul>
21794 <ul><li>*foo<i>it</i>*bar</li></ul>
21799 Lists: 4. No escapes needed
21820 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
21824 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
21830 Lists: 5. No unnecessary escapes
21832 * bar <span><nowiki>[[foo]]</nowiki></span>
21834 * =bar <span><nowiki>[[foo]]</nowiki></span>
21836 * [[bar <span><nowiki>[[foo]]</nowiki></span>
21838 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
21840 * =bar <span>foo]]</span>=
21846 <ul><li> bar <span>[[foo]]</span></li></ul>
21847 <ul><li> =bar <span>[[foo]]</span></li></ul>
21848 <ul><li> [[bar <span>[[foo]]</span></li></ul>
21849 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
21850 <ul><li> =bar <span>foo]]</span>=</li></ul>
21851 <ul><li> <s></s>: a</li></ul>
21852 <ul><li> <i>* foo</i></li></ul>
21857 Lists: 6. Escape bullets in SOL position
21861 <p><!--cmt-->*foo</p>
21863 <!--cmt--><nowiki>*</nowiki>foo
21867 Lists: 7. Escape bullets in a multi-line context
21870 <nowiki>*</nowiki>b
21878 Lists: 8. Escape colons only if not present in tags
21882 <dl><dt>a:b<i>c:d</i></dt></dl>
21884 ; <nowiki>a:b</nowiki>''c:d''
21887 #### --------------- HRs ---------------
21888 #### 1. Single line
21889 #### -----------------------------------
21892 HRs: 1. Single line
21894 ----<nowiki>----</nowiki>
21906 #### --------------- Tables ---------------
21907 #### 1a. Simple example
21908 #### 1b. No escaping needed (!foo)
21909 #### 1c. No escaping needed (|foo)
21910 #### 1d. No escaping needed (|}foo)
21912 #### 2a. Nested in td (<td>foo|bar</td>)
21913 #### 2b. Nested in td (<td>foo||bar</td>)
21914 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
21916 #### 3a. Nested in th (<th>foo!bar</th>)
21917 #### 3b. Nested in th (<th>foo!!bar</th>)
21918 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
21922 #### 4c. No escaping needed
21923 #### --------------------------------------
21926 Tables: 1a. Simple example
21937 Tables: 1b. No escaping needed
21946 Tables: 1c. No escaping needed
21955 Tables: 1d. No escaping needed
21964 Tables: 2a. Nested in td
21969 <td>foo|bar</td></tr>
21970 <tr><td>x<div>a|b</div></td>
21974 |<nowiki>foo|bar</nowiki>
21976 |x<div><nowiki>a|b</nowiki></div>
21992 Tables: 2b. Nested in td
21998 <td>a<i>b||c</i></td>
21999 <td>a<i><div>b||c</div></i></td>
22000 </tr></tbody></table>
22003 |<nowiki>foo||bar</nowiki>
22004 |a''<nowiki>b||c</nowiki>''
22005 |a''<div><nowiki>b||c</nowiki></div>''
22014 <td>a<i><div>b||c</div></i>
22020 Tables: 2c. Nested in td -- no escaping needed
22036 Tables: 3a. Nested in th
22052 Tables: 3b. Nested in th
22057 <tr><th>foo!!bar</th>
22058 <th><i>foo|bar</i></th>
22059 <th><i>foo!!bar</i></th>
22060 <th><i><span>foo!!bar</span></i></th>
22061 </tr></tbody></table>
22064 !<nowiki>foo!!bar</nowiki>
22065 !''<nowiki>foo|bar</nowiki>''
22066 !''<nowiki>foo!!bar</nowiki>''
22067 !''<span><nowiki>foo!!bar</nowiki></span>''
22076 <th><i>foo!!bar</i>
22078 <th><i><span>foo!!bar</span></i>
22084 Tables: 3c. Nested in th
22089 <tr><th>foo||bar</th>
22090 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22091 </tr></tbody></table>
22094 !<nowiki>foo||bar</nowiki>
22095 !<nowiki>foo||bar</nowiki>
22108 Tables: 4a. Escape -
22127 |<nowiki>-bar</nowiki>
22132 Tables: 4b. Escape +
22151 |<nowiki>+bar</nowiki>
22156 Tables: 4c. No escaping needed
22199 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22200 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22206 <div>a|b</div></td>
22211 Tables: 4d. No escaping needed
22221 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22230 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22231 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22232 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22237 Tables: Digest broken attributes on table and tr tag
22254 T97430: Don't emit empty nowiki pairs around marker meta tags
22258 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22259 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22261 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22262 <nowiki>|</nowiki>** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22266 Unclosed xmlish element in table line shouldn't eat end delimiters
22282 <tbody><tr><td> <foo</td>
22283 <td> bar></td></tr>
22287 #### --------------- Links ----------------
22288 #### 1. Quote marks in link text
22289 #### 2. Wikilinks: Escapes needed
22290 #### 3. Wikilinks: No escapes needed
22291 #### 4. Extlinks: Escapes needed
22292 #### 5. Extlinks: No escapes needed
22293 #### --------------------------------------
22295 Links 1. WikiLinks: No escapes needed
22299 [[Foo|x [Foobar] x]]
22301 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22302 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22303 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22306 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22307 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22308 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22312 Links 2. WikiLinks: Escapes needed
22316 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22317 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22318 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22319 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22320 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22321 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22322 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22323 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22324 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22325 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22327 [[Foo|<nowiki>Foobar]</nowiki>]]
22328 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22329 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22330 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22331 [[Foo|<nowiki>|Bar</nowiki>]]
22332 [[Foo|<nowiki>]]bar</nowiki>]]
22333 [[Foo|<nowiki>[[bar</nowiki>]]
22334 [[Foo|<nowiki>x [[ y</nowiki>]]
22335 [[Foo|<nowiki>x ]] y</nowiki>]]
22336 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22338 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22339 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22340 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22341 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22342 <a href="/wiki/Foo" title="Foo">|Bar</a>
22343 <a href="/wiki/Foo" title="Foo">]]bar</a>
22344 <a href="/wiki/Foo" title="Foo">[[bar</a>
22345 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22346 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22347 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22352 Links 3. WikiLinks: No escapes needed
22357 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22358 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22361 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22362 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22366 Links 4. ExtLinks: Escapes needed
22370 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22371 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22372 <p>[http://google.com]</p>
22373 <p>[http://google.com google]</p>
22375 [http://google.com <nowiki>[google]</nowiki>]
22376 [http://google.com <nowiki>google]</nowiki>]
22378 <nowiki>[http://google.com]</nowiki>
22380 <nowiki>[http://google.com google]</nowiki>
22383 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22384 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22385 </p><p>[http://google.com]
22386 </p><p>[http://google.com google]
22391 Links 5. ExtLinks: No escapes needed
22393 [http://google.com [google]
22395 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22398 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22402 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22404 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22405 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22406 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22407 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22408 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22409 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22410 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22411 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
22412 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22413 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
22414 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
22415 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
22416 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22419 x<nowiki/>http://example.com<nowiki/>y
22420 http://example.com<nowiki/>?x
22421 http://example.com<nowiki/>&x
22422 http://example.com<nowiki/>'x
22423 http://example.com<nowiki/>,x
22424 http://example.com<nowiki/>.x
22425 http://example.com<nowiki/>;x
22426 http://example.com<nowiki/>:x
22427 http://example.com<nowiki/>;x
22428 http://example.com<nowiki/>!x
22429 http://example.com<nowiki/>=x
22430 http://example.com<nowiki/>(x)
22431 http://example.com(x<nowiki/>)
22435 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22438 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22440 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22441 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22442 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22443 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22444 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22450 "http://example.com"
22451 (http://example.com)
22452 (http://example.com) foo
22453 http://example.com,
22454 http://example.com, foo
22457 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22459 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22460 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22461 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22462 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22463 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22468 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22470 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22471 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
22473 http://example.com.,;:!?\
22474 -http://example.com:
22476 <p><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>:
22482 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
22484 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
22485 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
22486 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
22490 X<nowiki/>RFC 123<nowiki/>y
22494 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
22496 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
22497 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
22498 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
22505 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
22506 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
22507 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
22512 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
22514 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
22515 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22516 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22520 X<nowiki/>PMID 123<nowiki/>y
22524 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
22526 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
22527 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
22528 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
22535 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
22536 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
22537 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
22542 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
22544 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
22545 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
22546 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
22549 ISBN 1234567890<nowiki/>1
22550 ISBN 1234567890<nowiki/>x
22551 a<nowiki/>ISBN 1234567890<nowiki/>b
22555 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
22557 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
22561 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
22566 Links 14. Protect link-like plain text. (Parsoid bug T78425)
22570 <p>this is not a link: http://example.com
22573 this is not a link: <nowiki>http://example.com</nowiki>
22577 Links 15. Link trails can't become link prefixes.
22581 [[Söfnuður]]-[[00]]
22583 <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>
22586 <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>
22589 #### --------------- Quotes ---------------
22590 #### 1. Quotes inside <b> and <i>
22591 #### 2. Link fragments separated by <i> and <b> tags
22592 #### 3. Link fragments inside <i> and <b>
22593 #### 4. No escaping needed
22594 #### --------------------------------------
22596 1a. Quotes inside <b> and <i>
22598 parsoid=html2wt,wt2wt
22601 ''<nowiki>''foo''</nowiki>''
22602 ''<nowiki>'''foo'''</nowiki>''
22604 '''<nowiki/>'foo''''
22605 '''<nowiki>''foo''</nowiki>'''
22606 '''<nowiki>'''foo'''</nowiki>'''
22607 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
22608 '''foo'''<nowiki/>'s
22614 '''foo'''<nowiki/>'
22615 ''''foo'''<nowiki/>'
22616 ''fools'<span> errand</span>''
22617 ''<span>fool</span>'s errand''
22618 '<nowiki/>''foo'' bar '''baz''
22619 a|!*#-:;+-~[]{}b'''x''
22628 <b>foo'<i>bar'</i>baz</b>
22637 <i>fools'<span> errand</span></i>
22638 <i><span>fool</span>'s errand</i>
22639 '<i>foo</i> bar '<i>baz</i>
22640 a|!*#-:;+-~[]{}b'<i>x</i>
22645 1b. Quotes inside <b> and <i> with other tags on same line
22647 parsoid=html2wt,wt2wt
22649 '''a'' foo ''[[bar]]''
22650 ''a''' foo ''[[bar]]''
22651 ''a''' foo '''{{echo|[[bar]]}}'''
22652 [[foo]] x'''[[bar]]''
22653 '''foo'' <ref>test</ref>
22654 '''foo'' <div title="name">test</div>
22655 '''foo'' and <br> bar
22658 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22659 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22660 <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>
22661 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
22662 '<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>
22663 '<i>foo</i> <div title="name">test</div>
22664 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
22665 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22666 <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>
22671 2. Link fragments separated by <i> and <b> tags
22673 [[''foo''<nowiki>hello]]</nowiki>
22675 [['''foo'''<nowiki>hello]]</nowiki>
22677 <p>[[<i>foo</i>hello]]
22678 </p><p>[[<b>foo</b>hello]]
22682 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
22683 # this is one of the shortcomings of this format
22685 3. Link fragments inside <i> and <b>
22687 ''[[foo''<nowiki>]]</nowiki>
22689 '''[[foo'''<nowiki>]]</nowiki>
22692 </p><p><b>[[foo</b>]]
22697 4. No escaping needed
22699 '<span>''bar''</span>'
22700 '<span>'''bar'''</span>'
22703 <p>'<span><i>bar</i></span>'
22704 '<span><b>bar</b></span>'
22709 #### ----------- Paragraphs ---------------
22710 #### 1. No unnecessary escapes
22711 #### --------------------------------------
22714 1. No unnecessary escapes
22716 bar <span><nowiki>[[foo]]</nowiki></span>
22718 =bar <span><nowiki>[[foo]]</nowiki></span>
22720 [[bar <span><nowiki>[[foo]]</nowiki></span>
22722 ]]bar <span><nowiki>[[foo]]</nowiki></span>
22724 =bar <span>foo]]</span><nowiki>=</nowiki>
22726 <p>bar <span>[[foo]]</span>
22727 </p><p>=bar <span>[[foo]]</span>
22728 </p><p>[[bar <span>[[foo]]</span>
22729 </p><p>]]bar <span>[[foo]]</span>
22730 </p><p>=bar <span>foo]]</span>=
22734 #### ----------------------- PRE --------------------------
22735 #### 1. Leading whitespace in SOL context should be escaped
22736 #### ------------------------------------------------------
22738 1. Leading whitespace in SOL context should be escaped
22742 <nowiki> </nowiki>a
22744 <nowiki> </nowiki> a
22746 <nowiki> </nowiki>a(tab)
22748 <nowiki> </nowiki> a
22750 <nowiki> </nowiki> a
22753 <nowiki> </nowiki>b
22756 <nowiki> </nowiki>b
22759 <nowiki> </nowiki> b
22765 <p><!--cmt--> a</p>
22775 2. Leading whitespace in non-indent-pre contexts should not be escaped
22783 <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>
22784 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22785 <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>
22791 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
22810 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
22814 [[File:Foobar.jpg|thumb|caption]]
22816 <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>
22820 5. Nowiki escaping should account for indent-pres
22830 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
22843 #### --------------- Behavior Switches --------------------
22846 1. Valid behavior switches should be escaped
22853 <nowiki>__TOC__</nowiki>
22854 ''<nowiki>__TOC__</nowiki>''
22858 2. Invalid behavior switches should not be escaped
22869 # We use indent-pre as an indirect way to test for sol-transparent behavior.
22871 Behavior switches should be SOL-transparent
22875 <!-- this one's bogus -->
22882 <meta property="mw:PageProp/toc" />
22884 <!-- this one's bogus -->
22887 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
22889 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
22892 #### --------------- HTML tags ---------------
22895 #### 3. multi-line html tag
22896 #### 4. extension tags
22897 #### -----------------------------------------
22903 <a href="http://google.com">google</a>
22905 <a href="http://google.com">google</a>
22911 * <nowiki><div>foo</div></nowiki>
22912 * <nowiki><div style="color:red">foo</div></nowiki>
22913 * <nowiki><td></nowiki>
22915 <ul><li> <div>foo</div></li>
22916 <li> <div style="color:red">foo</div></li>
22917 <li> <td></li></ul>
22922 3. multi-line html tag
22937 <nowiki><ref>foo</ref></nowiki>
22939 <nowiki><ref>bar</nowiki>
22941 baz<nowiki></ref></nowiki>
22943 <p><ref>foo</ref>
22944 </p><p><ref>bar
22945 </p><p>baz</ref>
22949 #### --------------- Others ---------------
22953 <nowiki>foo</nowiki>
22955 <p><nowiki>foo</nowiki>
22959 ## The quote-char in the input is necessary for triggering the bug
22961 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
22963 parsoid=wt2wt,html2wt
22972 Tag-like HTML structures are passed through as text
22994 </p><p>1<d e>f
22999 HTML tag with necessary entities in attributes
23001 <span title="&amp;">foo</span>
23003 <p><span title="&amp;">foo</span>
23008 HTML tag with 'unnecessary' entity encoding in attributes
23010 <span title="&">foo</span>
23012 <p><span title="&">foo</span>
23017 HTML tag with broken attribute value quoting
23019 <span title="Hello world>Foo</span>
23021 <p><span>Foo</span>
23024 <p><span title="Hello world">Foo</span>
23029 Parsoid-only: HTML tag with broken attribute value quoting
23033 <span title="Hello world>Foo</span>
23035 <p><span title="Hello world">Foo</span>
23040 Table with broken attribute value quoting
23043 | title="Hello world|Foo
23054 <td title="Hello world">Foo
23060 Table with broken attribute value quoting on consecutive lines
23063 | title="Hello world|Foo
23064 | style="color:red|Bar
23077 <td title="Hello world">Foo
23078 </td><td style="color: red">Bar
23079 </td></tr></tbody></table>
23084 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23094 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23104 Accept empty td cell attribute
23107 | align="center" | foo || |
23112 <td align="center"> foo </td>
23119 Non-empty attributes in th-cells
23122 ! Foo !! style="color: red" | Bar
23128 <th style="color: red"> Bar
23134 Accept empty attributes in th-cells
23149 Empty table rows go away
23170 ### Parsoid-centric tests for testing RTing of inter-element separators
23171 ### Edge cases not tested by existing parser tests and specific to
23172 ### Parsoid-specific serialization strategies.
23176 RT-ed inter-element separators should be valid separators
23188 # Parsoid-only since PHP parser relies on Tidy for correct output
23190 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23204 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23205 <p>bar</p></small></td></tr>
23209 <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>
23213 # Note that the "style" attribute is really a template parameter here.
23214 # The = would have to be {{=}} if you wanted the literal.
23216 Empty TD followed by TD with tpl-generated attribute
23221 |{{echo|style='color:red'}}|foo
23235 Indented table with an empty td
23253 ## We have some newline diffs RT-ing this edge case
23254 ## and it is not important enough -- we seem to be emitting
23255 ## at most 2 newlines after a </tr> and this is unrelated to
23256 ## the issue from T85627 that this is testing.
23258 Indented table with blank lines in between (T85627)
23277 Indented block & table
23291 <div data-parsoid='{"stx":"html"}'>foo</div>
23293 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23298 Indent and comment before table row
23313 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23314 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23318 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23320 Empty TR followed by a template-generated TR
23326 {{echo|<tr><td>foo</td></tr>}}
23332 <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}}]}'>
23337 ## PHP and parsoid output differ for this, and since this is primarily
23338 ## for testing Parsoid's serializer, marking this Parsoid only
23340 Empty TR followed by mixed-ws-comment line should RT correctly
23356 <!--c--> </tr><!--d-->
23362 Multi-line image caption generated by templates with/without trailing newlines
23364 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23365 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23367 <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>
23368 <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>
23372 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23376 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23378 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23380 <includeonly>foo</includeonly>
23388 ## PHP emits broken html for this, and since this is primarily
23389 ## a Parsoid serializer test, marking this Parsoid only
23391 Improperly nested inline or quotes tags with whitespace in between
23393 <span> <s>x</span> </s>
23396 <p><span> <s>x</s></span><s> </s>
23397 <b> <i>x</i></b><i> </i>
23402 Encapsulate protected attributes from wt
23404 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23406 <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>
23410 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23411 ## Having nested or stray pre tags results in the attempt to add duplicates,
23412 ## causing an assertion fail. This test tries to prevent that situation.
23414 Ensure ParagraphWrapper can deal with stray closing pre tags
23424 1. Ensure fostered text content is wrapped in element nodes
23428 <table>hi</table><table>ho</table>
23437 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
23439 parsoid=wt2html,wt2wt
23448 <tbody><tr><td> a</td></tr>
23453 Encapsulation properly handles null DSR information from foster box
23455 parsoid=wt2html,wt2wt
23457 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
23459 <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>
23463 1. Encapsulate foster-parented transclusion content
23465 parsoid=wt2wt,wt2html
23467 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
23469 <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>
23479 2. Encapsulate foster-parented transclusion content
23481 parsoid=wt2wt,wt2html
23483 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
23485 <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>
23496 3. Encapsulate foster-parented transclusion content
23498 parsoid=wt2wt,wt2html
23500 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23502 <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>"]}">
23515 4. Encapsulate foster-parented transclusion content
23517 parsoid=wt2wt,wt2html
23519 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23521 <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>"]}">
23534 5. Encapsulate foster-parented transclusion content
23536 parsoid=wt2wt,wt2html
23538 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
23540 <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>
23555 6. Encapsulate foster-parented transclusion content
23557 parsoid=wt2wt,wt2html
23559 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
23561 <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>
23577 7. Encapsulate foster-parented transclusion content
23579 parsoid=wt2wt,wt2html
23581 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
23583 <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>
23593 # Note that the wt is broken on purpose: the = should be {{=}} if you
23594 # don't want it to be a template parameter key.
23596 8. Encapsulate foster-parented transclusion content
23598 parsoid=wt2wt,wt2html
23601 }}{|{{echo|style='color:red'}}
23606 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
23608 <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>
23619 9. Encapsulate foster-parented transclusion content
23621 parsoid=wt2wt,wt2html
23623 <table>{{echo|hi</table>hello}}
23625 <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>
23629 Table in fosterable position
23631 parsoid=wt2html,wt2wt
23640 <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">
23642 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
23648 # Parsoid only for bug 64747
23650 Properly encapsulate empty-content transclusions in fosterable positions
23658 <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":["","","",""]}]]}'>
23664 Support <object> element with .data attribute
23668 <object data="test.swf"></object>
23670 <object data="test.swf"></object>
23674 Don't block XML namespace declaration
23676 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
23678 <p><span>MediaWiki</span>
23681 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
23684 # -----------------------------------------------------------------
23685 # The following section of tests are primarily to spec requirements
23686 # around serialization of new/edited content.
23688 # All these tests are marked Parsoid html2wt and html2html only
23689 # ----------------------------------------------------------------
23691 # 'mi' is a localinterwiki prefix as well as a language
23693 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
23697 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
23704 New wikilinks should be serialized properly
23708 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
23709 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
23716 New wiki links (href variations)
23720 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23721 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
23722 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
23723 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
23728 [[Toxine bactérienne]]
23732 New wiki links (content string 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>
23742 [[Foo_bar|./Foo_bar]]
23746 New category links (href variations)
23750 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
23751 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
23752 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
23754 [[Category:Toxine bactérienne]]
23755 [[Category:Toxine bactérienne]]
23756 [[Category:Toxine bactérienne]]
23760 New sol transparent links don't need indent-pre nowiki protection
23765 <link rel="mw:PageProp/redirect" href="./Main_Page">
23766 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
23767 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
23769 #WEITERLEITUNG [[Main Page]]
23770 <!-- this is good --> [[Category:Good]]
23771 <!-- this is great --> [[Kategorie:Great]]
23775 New interlanguage links (href variations)
23779 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
23780 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
23781 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
23783 [[es:Toxine bactérienne]]
23784 [[es:Toxine_bactérienne]]
23785 [[es:Toxine_bactérienne]]
23789 Image: Modifying size of an image (1)
23792 "modes": ["wt2wt"],
23794 ["img[height]", "attr", "height", "22"],
23795 ["img[width]", "attr", "width", "200"]
23799 [[Image:Foobar.jpg|230x230px]]
23801 [[Image:Foobar.jpg|200x200px]]
23805 Image: Modifying size of an image (2)
23808 "modes": ["wt2wt"],
23810 ["img[height]", "attr", "height", "100"],
23811 ["img[width]", "attr", "width", "500"]
23815 [[Image:Foobar.jpg|230x230px]]
23817 [[Image:Foobar.jpg|500x500px]]
23820 # Change in size is ignored so long as class='mw-default-size'
23822 Image: Modifying size of an image (3)
23825 "modes": ["wt2wt"],
23827 ["figure[class]", "removeClass", "mw-default-size"],
23828 ["figure img", "attr", "height", "19"],
23829 ["figure img", "attr", "width", "170"]
23833 [[Image:Foobar.jpg|thumb]]
23835 [[Image:Foobar.jpg|thumb|170x170px]]
23839 Image: Modifying alignment of an image (bug 48665)
23842 "modes": ["wt2wt"],
23844 ["figure[class]", "removeClass", "mw-halign-right"],
23845 ["figure[class]", "addClass", "mw-halign-left"]
23849 [[Image:Foobar.jpg|thumb|caption|right]]
23851 [[Image:Foobar.jpg|thumb|caption|left]]
23855 Image: Modifying mw-default-size of an frameless image (bug 62805)
23858 "modes": ["wt2wt"],
23860 ["figure.mw-default-size", "removeClass", "mw-default-size"]
23864 [[Image:Foobar.jpg|frameless|right]]
23866 [[Image:Foobar.jpg|frameless|right|220x220px]]
23870 Image: Modifying valign of an image (bug 49221)
23873 "modes": ["wt2wt"],
23875 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
23876 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
23880 [[File:Foobar.jpg|20px|middle]]
23882 [[File:Foobar.jpg|20px|text-top]]
23886 Image: Modifying alt attribute of an image (bug 56400)
23889 "modes": ["wt2wt"],
23891 ["img[alt]", "attr", "alt", "some alternate edited text"]
23895 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
23897 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
23901 Image: Modifying caption of an image
23904 "modes": ["wt2wt"],
23906 ["figcaption", "text", "new caption"]
23910 [[Image:Foobar.jpg|thumb|original caption]]
23912 [[Image:Foobar.jpg|thumb|new caption]]
23916 Image: empty alt attribute (bug 48924)
23920 [[File:Foobar.jpg|thumb|alt=|bar]]
23922 <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>
23926 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
23931 #<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>
23933 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
23937 Image: Block level image should have \n before and after
23940 [[File:Foobar.jpg|right|thumb|150x150px]]
23944 <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>
23949 Image: New block level image should have \n before and after (existing content)
23952 [[File:Foobar.jpg|right|thumb|150x150px]]
23956 <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>
23961 Image: upright option (parsoid)
23963 [[File:Foobar.jpg|thumb|upright|caption]]
23964 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
23965 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
23967 <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>
23968 <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>
23969 <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>
23973 Image: upright option is ignored on inline and frame images (parsoid)
23975 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
23977 <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>
23981 Image: from basic HTML (1)
23985 <span typeof="mw:Image">
23986 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
23989 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
23993 Image: from basic HTML (2)
23997 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
23999 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24003 Image: from basic HTML (3)
24007 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24009 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24013 Image: from basic HTML (4)
24017 <img src="./File:Foobar.jpg">
24019 [[File:Foobar.jpg|link=]]
24023 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24028 <li><p>foo</p></li>
24035 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24039 <ul> <li>foo</li></ul>
24045 Don't strip leading whitespace when handling indent-pre suppressing tags
24050 <tr><td> indented row</td></tr>
24053 <b>This is very bold of you!</b>
24056 indented cell (no pre-wrapping!)
24066 '''This is very bold of you!'''
24070 indented cell (no pre-wrapping!)
24078 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24083 <nowiki> </nowiki><span>bar</span>
24086 <nowiki> </nowiki></span>bar2
24089 <nowiki> </nowiki><span>bar</span>
24092 <nowiki> </nowiki><span>foo</span>
24110 Lists: Dont insert newlines in a serialized list item.
24114 <ul><li>a<br>b</li><li>c</li></ul>
24121 Headings: Force sol-transparent links and behavior switches to serialize before/after
24125 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
24126 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24128 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24129 <h2>it goes well <link href="Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24131 <h2 data-parsoid='{}'>howdy<link href="Category:A5" rel="mw:PageProp/Category" /></h2>
24133 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24141 <!--foo--> [[Category:A3]]
24146 [[Category:A4]] <!--bar-->
24148 ==howdy [[Category:A5]] ==
24156 Headings: Don't hoist metas that come from templates
24160 <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>
24162 == {{echo|foo [[Category:Foo]]}} ==
24166 Headings: Category in ref isn't hoisted
24170 <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>
24172 <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>
24175 [[Category:Baz]] </ref> ==
24181 Parsoid: Serialize positional parameters with = in them as named parameter
24185 <p about="#mwt1" typeof="mw:Transclusion"
24186 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24188 <p about="#mwt1" typeof="mw:Transclusion"
24189 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24191 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24192 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24193 <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>
24197 {{echo|1 = f=oo|2 = bar}}
24199 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24200 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24201 {{echo|<nowiki>f=oo</nowiki>|bar}}
24205 Parsoid: Serialize positional parameters with = in extlink as named parameter
24209 <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>
24211 {{echo|1 = http://stuff?is=ok}}
24215 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24219 <div>a<p>b</p></div>
24240 Substrings resembling wikitext in hrefs should not get nowiki escapes
24244 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24250 Enforce single-line context in the serializer
24257 <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">
24258 </span><span about="#mwt1">you</span> </h2>
24260 <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>
24262 <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
24263 there</span></li></ol>
24276 == hi {{bogus|there
24287 * foo '''bar''' baz
24291 Serialize new placeholder space without spans
24295 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24297 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24299 <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>
24305 <ref>foo : bar</ref>ok
24309 #-----------------------
24310 # Tag minimization tests
24311 #-----------------------
24314 1. I/B quote minimization: wikitext-only tags should be combined
24318 <p><i>A</i><i>B</i></p>
24319 <p><b>A</b><b>B</b></p>
24320 <p><i>A</i><b><i>B</i></b></p>
24321 <p><b>A</b><i><b>B</b></i></p>
24322 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24323 <p><i><b>A</b></i><i><b>B</b></i></p>
24324 <p><i><b>A</b></i><b><i>B</i></b></p>
24325 <p><b><i>A</i></b><i><b>B</b></i></p>
24345 2. I/B quote minimization: wikitext and html tags should not be combined
24349 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24350 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24354 ''A''<nowiki/>'''<i>B</i>'''
24358 3. I/B quote minimization: templated content stops minimization
24362 <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>
24363 <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>
24365 ''A''{{echo|''B''}}
24367 ''A''{{echo|'''''B'''''}}
24371 4. I/B quote minimization: new content should be mimimized with adjacent old content
24375 <p><i>A</i><i>B</i></p>
24376 <p><b>A</b><b>B</b></p>
24377 <p><i>A</i><b><i>B</i></b></p>
24387 5a. Merge adjacent quote nodes if they've been edited
24390 "modes": ["wt2wt", "selser"],
24392 ["p", "contents", "remove", ":contains('b')"]
24402 5b. Merge adjacent quote nodes if they've been edited
24405 "modes": ["wt2wt", "selser"],
24411 ''a''<span id="x">b</span>''c''
24417 1. Merge adjacent link nodes as long as at least one element is new
24420 "modes": ["html2wt"],
24421 "scrubWikitext": true
24424 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24425 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24426 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
24430 [[Football|Foot]][[Football|ball]]
24434 2. Merge adjacent link nodes and enable additional normalizations
24437 "modes": ["html2wt"],
24438 "scrubWikitext": true
24441 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
24443 [[Football|''Football'']]
24447 3. Don't merge adjacent link nodes if scrubWikitext is false
24450 "modes": ["html2wt"],
24451 "scrubWikitext": false
24454 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24456 [[Football|Foot]][[Football|ball]]
24459 #------------------------------
24460 # End of tag minimization tests
24461 #------------------------------
24464 Bug 54262: New entities
24470 <span typeof="mw:Entity"> </span>
24473 ## Note that there is no wikitext output for 'unknownproperty' ##
24474 ## Unknown magic words are silently dropped ##
24481 <meta property='mw:PageProp/toc' />
24482 <meta property='mw:PageProp/notoc' />
24483 <meta property='mw:PageProp/forcetoc' />
24484 <meta property='mw:PageProp/index' />
24485 <meta property='mw:PageProp/noindex' />
24486 <meta property='mw:PageProp/nogallery' />
24487 <meta property='mw:PageProp/noeditsection' />
24488 <meta property='mw:PageProp/notitleconvert' />
24489 <meta property='mw:PageProp/nocontentconvert' />
24490 <meta property='mw:PageProp/unknownproperty' />
24500 __NOCONTENTCONVERT__
24504 Consecutive <pre>s should not get merged
24506 parsoid=html2wt,html2html
24508 <pre>a</pre><pre>b</pre>
24536 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
24540 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
24542 [[Special:BookSources/1234567890|ISBN 1234567895]]
24546 Edited RFC links not serializable as RFC links should serialize as extlinks
24550 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
24552 [//tools.ietf.org/html/rfc123 New RFC]
24556 Edited PMID links not serializable as PMID links should serialize as extlinks
24560 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
24562 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
24566 WTS of autolinks with trailing/surrounding context
24570 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
24571 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
24572 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
24573 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
24574 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
24575 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
24577 http://cscott.net<nowiki/>'''foo'''
24579 http://cscott.net<b>foo</b>
24581 '''http://cscott.net<nowiki/>'''
24583 '''http://cscott.net '''
24585 '''http://cscott.net<nowiki/>x'''
24587 http://cscott.net<nowiki/>x
24591 WTS of autolinks with nowikis (round-trip)
24593 x<nowiki/>http://cscott.net<nowiki/>x
24595 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
24598 # this is the "easy" test because it leaves in place all the
24599 # data-parsoid information indicating this is an autolink
24601 WTS of autolinks with escapes (editing)
24604 "modes": ["wt2wt"],
24606 [ "meta", "remove" ]
24610 x<nowiki/>http://cscott.net<nowiki/>x
24612 x<nowiki/>http://cscott.net<nowiki/>x
24616 Edited Redirect link should emit a non-piped wikitext link
24620 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
24626 T75121: Infer extension name from typeOf if data-mw is not present
24630 <div typeOf="mw:Extension/foo"></div>
24635 # Note that the <p> wrapping isn't present in PHP parser output
24636 # The important thing for this test is that P-wrapping doesn't
24637 # interfere with the <nowiki> protection for leading - in <td>
24638 # (which isn't necessary for <th>).
24640 T88318: p-wrapped dash in table.
24642 parsoid=html2wt,wt2wt
24645 <tr><th><p>-</p></th><th><p>- </p></th></tr>
24646 <tr><td><p>-</p></td><td><p>- </p></td></tr>
24647 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
24654 |<nowiki>-</nowiki>
24655 |<nowiki>- </nowiki>
24674 <td><small>-</small></td>
24686 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
24691 <td id='mwAc'>foo</td>
24692 <td id='serialize-this'>bar</td>
24697 | id="serialize-this" |bar
24702 Parsoid-like element ids should not be serialized to wikitext unless shadowed
24706 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
24708 <div id="hello">ok</div>
24715 "modes": ["wt2wt"],
24717 [ "#xyz", "before", "<b>before</b> stuff " ],
24718 [ "#xyz", "after", " stuff <i>after</i>" ],
24719 [ "#xyz", "html", "x <b>y</b> z" ]
24723 <span id="xyz">hello</span>
24725 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
24729 Never serialize a-tag as html, regardless of what data-parsoid has to say
24733 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
24738 ## SSS FIXME: This is broken output nevertheless.
24739 ## What might be a reasonable non-broken output for this?
24740 ## This is an edge case unlikely to be seen in production
24741 ## that I am not wasting more time on this right now.
24743 Never serialize a-tag as html, no matter what attributes it has
24747 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
24749 [http://boo.org http://boohoo.org]
24752 # --------------------------------------------
24753 # Tests spec'ing wikitext serialization norms |
24754 # --------------------------------------------
24757 Lists: Add space after bullets
24764 <li><span> baz</span></li>
24769 * <span> baz</span>
24773 Headings: Add space before/after == (T53744)
24780 <h2><span> baz</span></h2>
24782 <!-- Even after hoisted content -->
24783 <h2> <link href="Category:A2" rel="mw:PageProp/Category" />ok</h2>
24791 == <span> baz</span> ==
24793 <!-- Even after hoisted content -->
24800 1. Headings: suppress newly created empty headings
24803 "modes": ["html2wt"],
24804 "scrubWikitext": true
24812 2. Headings: don't suppress empty headings if scrubWikitext is false
24822 3. Headings: don't suppress empty headings for existing headings even if scrubWikitext is true
24825 "modes": ["html2wt"],
24826 "scrubWikitext": true
24829 <h2 data-parsoid='{}'></h2>
24835 1. WT Quote Tags: suppress newly created empty style tags
24838 "modes": ["html2wt"],
24839 "scrubWikitext": true
24847 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
24853 ''<nowiki/>'''''<nowiki/>'''
24857 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
24860 "modes": ["html2wt"],
24861 "scrubWikitext": true
24870 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
24876 <nowiki> </nowiki>hi
24879 # ---------------------------------------------------
24880 # End of tests spec'ing wikitext serialization norms |
24881 # ---------------------------------------------------
24883 # -----------------------------------------------------------------
24884 # End of section for Parsoid-only html2wt tests for serialization
24886 # -----------------------------------------------------------------
24888 # -----------------------------------------------------------------
24889 # The following section of tests are primarily to spec behavior of
24890 # the selective serializer. All these tests have manual selser
24891 # changes. The automated selser changes for all tests handle the
24892 # wide variation of changes, but these tests here capture specs
24893 # deterministically.
24894 # ----------------------------------------------------------------
24898 Selser: New comments should not be lost
24901 "modes": ["selser"],
24903 [ "#a", "after", "<!--c1-->" ],
24904 [ "#b", "before", "<!--c2-->" ]
24908 <span id="a">a</span>
24910 <span id="b">b</span>
24912 <span id="a">a</span><!--c1-->
24914 <!--c2--><span id="b">b</span>
24919 Selser: Check for validity of DSR before using it
24922 "modes": ["selser"],
24924 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
24928 <span id="a">a</span>
24930 {{DISPLAYTITLE:foo}}
24931 <span id="a">a</span>
24935 1. DOMDiff: Changes to <ref> content should be looked up using id
24938 "modes": ["selser"],
24940 ["#X", "after", "bar"],
24941 ["#Y", "after", "baz"]
24945 X <ref><span id="X">foo</span></ref>
24948 <ref name="a"><span id="Y">foo</span></ref>
24951 X <ref><span id="X">foo</span>bar</ref>
24954 <ref name="a"><span id="Y">foo</span>baz</ref>
24959 2. DOMDiff: Changes to <ref> content should be looked up using id
24962 "modes": ["selser"],
24964 ["#Z", "after", "bar"]
24968 A <ref>foo bar for a</ref>
24969 B <ref group="X" name="b" />
24973 <references group="X">
24974 <ref name="b"><span id="Z">foo</span></ref>
24977 A <ref>foo bar for a</ref>
24978 B <ref group="X" name="b" />
24982 <references group="X">
24983 <ref name="b"><span id="Z">foo</span>bar</ref>