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!).
10242 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10246 <includeonly> and <noinclude> being included
10257 <onlyinclude>Foo</onlyinclude>bar
10261 <onlyinclude> being included
10273 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10277 <onlyinclude> and <includeonly> being included
10286 <includeonly> and <noinclude> on a page
10288 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10295 Un-closed <noinclude>
10302 <onlyinclude> on a page
10304 <onlyinclude>Foo</onlyinclude>bar
10311 Un-closed <onlyinclude>
10318 Self-closed noinclude, includeonly, onlyinclude tags
10329 Unbalanced includeonly and noinclude tags
10333 |b</noinclude></noinclude>
10334 |c</noinclude></includeonly>
10335 |d</includeonly></includeonly>
10344 <td>c</includeonly>
10346 <td>d</includeonly></includeonly>
10352 Template:Includeonly section
10355 ==Includeonly section==
10361 Bug 6563: Edit link generation for section shown by <includeonly>
10363 {{includeonly section}}
10365 <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>
10366 <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>
10370 # Uses same input as the contents of [[Template:Includeonly section]]
10372 Bug 6563: Section extraction for section shown by <includeonly>
10377 ==Includeonly section==
10385 Bug 6563: Edit link generation for section suppressed by <includeonly>
10388 ==Includeonly section==
10392 <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>
10397 Bug 6563: Section extraction for section suppressed by <includeonly>
10402 ==Includeonly section==
10410 Un-closed <includeonly>
10417 Includes and comments at SOL
10419 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10423 </noinclude>* stuff
10426 <includeonly>can have stuff</includeonly>=== here ===
10429 <h2><span class="mw-headline" id="hu">hu</span></h2>
10432 <ul><li> stuff</li>
10433 <li> here</li></ul>
10434 <h3><span class="mw-headline" id="here">here</span></h3>
10437 <!-- 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>
10439 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10441 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10442 <li> here</li></ul>
10444 <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>
10448 # TODO: test with DOM fragment reuse!
10450 Parsoid: DOM fragment reuse
10452 parsoid=wt2wt,wt2html
10454 a{{echo|b<table></table>c}}d
10466 <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>
10468 <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">
10469 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10470 </span><p about="#mwt2">cd</p>
10472 <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">
10474 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10476 </span><p about="#mwt3">b</p>
10480 Parsoid: Merge double tds (bug 50603)
10485 |{{echo|{{!}} foo}}
10489 <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>
10494 Parsoid: Merge double tds in nested transclusion content (bug 50603)
10500 |{{echo|{{!}} foo}}
10504 <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}}]}'>
10506 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10512 ### <includeonly> and <noinclude> in attributes
10515 0. includeonly around the entire attribute
10517 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10519 <p><span id="v2">bar</span>
10524 1. includeonly in html attr key
10526 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10528 <p><span id="foo">bar</span>
10533 2. includeonly in html attr value
10535 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10536 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10538 <p><span id="v1">bar</span>
10539 <span id="v1">bar</span>
10544 3. includeonly in part of an attr value
10546 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10548 <p><span style="color:red;">bar</span>
10553 4. includeonly in table attributes
10577 ### Token Stream Patcher tests
10579 ### These tests won't always pass wt2wt and other modes because
10580 ### on serialization, the table will be output on a new line.
10581 ### For now, we are blacklisting them, and using this to test selser.
10585 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10587 parsoid=wt2html,wt2wt
10589 {{echo|}}{| width = '100%'
10593 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10594 <tbody><tr><td>foo</td></tr>
10599 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10601 parsoid=wt2html,wt2wt
10603 <includeonly>a</includeonly>{| {{{b}}}
10607 <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}}}":""}}'>
10608 <tbody><tr><td>c</td></tr>
10614 ### Testing parsing of templates where a template arg
10615 ### has the same name as the template itself.
10621 {{{quote|{{{1}}}}}}
10625 Templates: Template Name/Arg clash: 1. Use of positional param
10634 Templates: Template Name/Arg clash: 2. Use of named param
10636 {{quote|quote=foo}}
10643 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10652 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10656 Templates: 1. Simple use
10665 Templates: 2. Inside a block tag
10667 <div>{{echo|Foo}}</div>
10668 <blockquote>{{echo|Foo}}</blockquote>
10671 <blockquote>Foo</blockquote>
10681 Templates: P-wrapping: 1a. Templates on consecutive lines
10692 Templates: P-wrapping: 1b. Templates on consecutive lines
10706 Templates: P-wrapping: 1c. Templates on consecutive lines
10709 {{echo|bar}} <div>baz</div>
10722 Templates: P-wrapping: 1d. Template preceded by comment-only line
10731 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10735 Templates: Inline Text: 1. Multiple template uses
10737 {{echo|Foo}}bar{{echo|baz}}
10744 Templates: Inline Text: 2. Back-to-back template uses
10746 {{echo|Foo}}{{echo|bar}}
10753 Templates: Block Tags: 1. Multiple template uses
10755 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10757 <div>Foo</div><div>bar</div><div>baz</div>
10762 Templates: Block Tags: 2. Back-to-back template uses
10764 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10766 <div>Foo</div><div>bar</div>
10770 # This is an edge case relating to paragraph wrapping.
10772 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10777 <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
10782 Templates: Links: 1. Simple example
10784 {{echo|[[Foo|bar]]}}
10786 <p><a href="/wiki/Foo" title="Foo">bar</a>
10791 Templates: Links: 2. Generation of link href
10793 [[{{echo|Foo}}|bar]]
10795 <p><a href="/wiki/Foo" title="Foo">bar</a>
10800 Templates: Links: 3. Generation of part of a link href
10802 [[Fo{{echo|o}}|bar]]
10804 [[Foo{{echo|bar}}]]
10806 [[Foo{{echo|bar}}baz]]
10808 [[Foo{{echo|bar}}|bar]]
10810 [[:Foo{{echo|bar}}]]
10812 [[:Foo{{echo|bar}}|bar]]
10814 <p><a href="/wiki/Foo" title="Foo">bar</a>
10815 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10816 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10817 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10818 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10819 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10824 Templates: Links: 4. Multiple templates generating link href
10826 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10828 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10833 Templates: Links: 5. Generation of link text
10835 [[Foo|{{echo|bar}}]]
10837 <p><a href="/wiki/Foo" title="Foo">bar</a>
10842 Templates: Links: 5. Nested templates (only outermost template should be marked)
10844 {{echo|[[{{echo|Foo}}|bar]]}}
10846 <p><a href="/wiki/Foo" title="Foo">bar</a>
10851 Templates: HTML Tag: 1. Generation of HTML attr. key
10853 <div {{echo|style}}="color:red;">foo</div>
10855 <div style="color:red;">foo</div>
10860 Templates: HTML Tag: 2. Generation of HTML attr. value
10862 <div style={{echo|'color:red;'}}>foo</div>
10864 <div style="color:red;">foo</div>
10869 Templates: HTML Tag: 3. Generation of HTML attr key and value
10871 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10873 <div style="color:red;">foo</div>
10878 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10880 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10882 <div title="This is a long title with just one piece templated">foo</div>
10887 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10889 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10891 <div title="This is a long title with just one piece templated">foo</div>
10896 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10898 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10900 <div title="This is a long title with just one piece templated">foo</div>
10904 # SSS FIXME: While it is great we added support for all this,
10905 # do we want to make this part of the spec? Maybe we want to
10906 # deprecate this kind of usage in the future?
10908 Templates: HTML Tag: 7. Generation of partial attribute key string
10910 <div st{{echo|yle}}="color:red;">foo</div>
10912 <div style="color:red;">foo</div>
10917 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10919 <div {{echo|1=id="v1"}}>bar</div>
10921 <div id="v1">bar</div>
10926 Templates: HTML Tag: 9. Multiple template-generated attributes
10928 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10930 <div id="v1" title="foo">bar</div>
10935 Templates: Support for templates generating attributes and content
10937 {| {{mixed_attr_content_template}}
10942 <table style="color:red;" title="T48811">
10952 <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|}"]}'>
10961 1. Entities and nowikis inside templated attributes should be handled correctly
10963 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
10965 <div style="background:#f9f9f9;">foo</div>
10968 <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>
10972 2. Entities and nowikis inside templated attributes should be handled correctly
10975 |{{table_attribs_3}}
10980 <td style="background:#f9f9f9;">Foo
10985 <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>
10990 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
10993 |{{table_attribs_3}}
10998 <td style="background:#f9f9f9;">Foo
11002 <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}}]}'>
11003 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11008 Templates: HTML Tables: 1. Generating start of a HTML table
11010 {{echo|<table><tr><td>foo</td>}}</tr></table>
11012 <table><tr><td>foo</td></tr></table>
11017 Templates: HTML Tables: 2a. Generating middle of a HTML table
11019 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11021 <table><tr><td>foo</td></tr></table>
11026 Templates: HTML Tables: 2b. Generating middle of a HTML table
11028 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11030 <table><tr><td>foo</td></tr></table>
11035 Templates: HTML Tables: 3. Generating end of a HTML table
11037 <table><tr>{{echo|<td>foo</td></tr></table>}}
11039 <table><tr><td>foo</td></tr></table>
11044 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11046 {{echo|<table>}}<tr><td>foo</td></tr></table>
11048 <table><tr><td>foo</td></tr></table>
11053 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11055 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11057 <table><tr><td>foo</td></tr></table>
11062 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11064 <table><tr>{{echo|<td>}}foo</td></tr></table>
11066 <table><tr><td>foo</td></tr></table>
11071 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11073 <table><tr><td>foo{{echo|</td>}}</tr></table>
11075 <table><tr><td>foo</td></tr></table>
11080 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11082 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11084 <table><tr><td>foo</td></tr></table>
11089 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11091 <table><tr><td>foo</td></tr>{{echo|</table>}}
11093 <table><tr><td>foo</td></tr></table>
11098 Templates: HTML Tables: 5. Proper fostering of categories from inside
11100 parsoid=wt2html,wt2wt
11102 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11103 <!--Two categories (Bug 50330)-->
11104 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11106 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11107 <!--Two categories (Bug 50330)-->
11108 <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>
11112 Templates: Wiki Tables: 1a. Fostering of entire template content
11120 <tr><td></td></tr></table>
11132 Templates: Wiki Tables: 1b. Fostering of entire template content
11145 <tr><td></td></tr></table>
11159 Templates: Wiki Tables: 2. Fostering of partial template content
11169 <tr><td></td></tr></table>
11182 Templates: Wiki Tables: 3. td-content via multiple templates
11185 {{echo|{{pipe}}a}}{{echo|b}}
11196 Templates: Wiki Tables: 4. Templated tags, no content
11202 <tr><td></td></tr></table>
11207 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11221 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11234 ## This test case is very specific to Parsoid's internals
11235 ## and is hence only tested for Parsoid's code. Parsoid uses
11236 ## a <meta> marker tag for <ref> tags and they are expanded
11237 ## much later. We are verifying that this <meta> tag usage
11238 ## doesn't prevent foster parenting.
11240 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11242 {{PartialTable}}<ref>foo</ref>
11247 <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">
11251 <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>
11255 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11265 <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{{!}}}"]}'>
11266 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11270 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11275 Templates: Lists: Multi-line list-items via templates
11277 *{{echo|a {{nonexistent|
11279 *{{echo|b {{nonexistent|
11282 <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>
11283 <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>
11288 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11290 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11292 <p><i>ab</i>c<i>d</i>e
11297 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11298 (PHP parser generates misnested html)
11300 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11302 <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>
11306 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11307 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11309 parsoid=wt2html,wt2wt
11311 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11313 <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>
11314 <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>
11315 <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>
11319 Templates: Ugly nesting: 4. Divs opened/closed across templates
11321 a<div>b{{echo|c</div>d}}e
11332 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11338 |{{echo|foo</table>}}
11342 <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|}"]}'>
11346 <td>foo</td></tr></tbody></table><span about="#mwt1">
11347 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11352 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11362 <td>1. {{echo|foo </table>}}</td>
11364 <td>2. {{echo|baz </table>}}</td>
11377 <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>"]}'>
11382 <td>1. foo </td></tr></tbody></table></td>
11384 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11385 </span><span about="#mwt2">
11386 </span><span about="#mwt2">
11387 </span><span about="#mwt2">abc</span><span about="#mwt2">
11388 </span><span about="#mwt2">
11389 </span><span about="#mwt2">
11390 </span><span about="#mwt2">
11391 </span><span about="#mwt2">
11392 </span><span about="#mwt2">
11393 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11394 </span><span about="#mwt2">
11399 Templates: Ugly templates: 3. newline-only template parameter
11408 # This looks like a bug: a single newline triggers p/br for some reason.
11410 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11419 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11420 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11422 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11428 <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
11429 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11433 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11434 # that are "identical" and generate nesting cycles in the algorithm
11436 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11438 {{echo|<table><tr><td><table>}}
11442 <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"}'>
11443 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11444 </table></td></tr></tbody></table>
11448 Parser Functions: 1. Simple example
11457 Parser Functions: 2. Nested use (only outermost should be marked up)
11466 ### Pre-save transform tests
11469 pre-save transform: subst:
11475 This is a test template
11479 pre-save transform: normal template
11489 pre-save transform: nonexistent template
11493 {{thistemplatedoesnotexist}}
11495 {{thistemplatedoesnotexist}}
11500 pre-save transform: subst magic variables
11509 # This is bug 89, which I fixed. -- wtm
11511 pre-save transform: subst: templates with parameters
11515 {{subst:paramtest|param="something else"}}
11517 This is a test template with parameter "something else"
11521 Template:nowikitest
11523 <nowiki>'''not wiki'''</nowiki>
11527 pre-save transform: nowiki in subst (bug 1188)
11531 {{subst:nowikitest}}
11533 <nowiki>'''not wiki'''</nowiki>
11538 Template:commenttest
11540 This template has <!-- a comment --> in it.
11544 pre-save transform: comment in subst (bug 1936)
11548 {{subst:commenttest}}
11550 This template has <!-- a comment --> in it.
11554 pre-save transform: unclosed tag
11558 <nowiki>'''not wiki'''
11560 <nowiki>'''not wiki'''
11564 pre-save transform: mixed tag case
11568 <NOwiki>'''not wiki'''</noWIKI>
11570 <NOwiki>'''not wiki'''</noWIKI>
11574 pre-save transform: unclosed comment in <nowiki>
11578 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11580 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11583 # Leading @ in this template definition works around a limitation
11584 # in parsoid's parserTests which otherwise strips the <span> from the
11585 # result (confusing it for a template wrapper)
11589 @<span onmouseover="alert('crap')">Oh no</span>
11593 (confirming safety of fix for subst bug 1936)
11595 {{Template:dangerous}}
11597 <p>@<span>Oh no</span>
11602 pre-save transform: comment containing gallery (bug 5024)
11606 <!-- <gallery>data</gallery> -->
11608 <!-- <gallery>data</gallery> -->
11612 pre-save transform: comment containing extension
11616 <!-- <tag>data</tag> -->
11618 <!-- <tag>data</tag> -->
11622 pre-save transform: comment containing nowiki
11626 <!-- <nowiki>data</nowiki> -->
11628 <!-- <nowiki>data</nowiki> -->
11632 pre-save transform: <noinclude> in subst (bug 3298)
11642 pre-save transform: <onlyinclude> in subst (bug 3298)
11646 {{subst:Includes2}}
11654 {{<includeonly>subst:</includeonly>Includes}}
11658 Template:SafeSubstTest
11660 {{<includeonly>safesubst:</includeonly>Includes}}
11664 bug 22297: safesubst: works during PST
11668 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11674 bug 22297: safesubst: works during normal parse
11683 subst: does not work during normal parse
11687 <p>{{subst:Includes}}
11692 pre-save transform: context links ("pipe trick")
11696 [[Article (context)|]]
11699 [[Bar:Article (context)|]]
11700 [[:Bar:Article (context)|]]
11702 [[|Article (context)]]
11706 [[Article (context)|Article]]
11707 [[Bar:Article|Article]]
11708 [[:Bar:Article|Article]]
11709 [[Bar:Article (context)|Article]]
11710 [[:Bar:Article (context)|Article]]
11712 [[Article (context)]]
11713 [[Bar:X (Y) Z|X (Y) Z]]
11714 [[:Bar:X (Y) Z|X (Y) Z]]
11718 pre-save transform: context links ("pipe trick") with interwiki prefix
11722 [[interwiki:Article|]]
11723 [[:interwiki:Article|]]
11724 [[interwiki:Bar:Article|]]
11725 [[:interwiki:Bar:Article|]]
11727 [[interwiki:Article|Article]]
11728 [[:interwiki:Article|Article]]
11729 [[interwiki:Bar:Article|Bar:Article]]
11730 [[:interwiki:Bar:Article|Bar:Article]]
11734 pre-save transform: context links ("pipe trick") with parens in title
11736 pst title=[[Somearticle (context)]]
11740 [[Article (context)|Article]]
11744 pre-save transform: context links ("pipe trick") with comma in title
11746 pst title=[[Someplace, Somewhere]]
11749 [[Otherplace, Elsewhere|]]
11750 [[Otherplace, Elsewhere, Anywhere|]]
11752 [[Otherplace, Somewhere|Otherplace]]
11753 [[Otherplace, Elsewhere|Otherplace]]
11754 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11758 pre-save transform: context links ("pipe trick") with parens and comma
11760 pst title=[[Someplace (IGNORED), Somewhere]]
11763 [[Otherplace (place), Elsewhere|]]
11765 [[Otherplace, Somewhere|Otherplace]]
11766 [[Otherplace (place), Elsewhere|Otherplace]]
11770 pre-save transform: context links ("pipe trick") with comma and parens
11772 pst title=[[Who, me? (context)]]
11775 [[Me, Myself, and I (1937 song)|]]
11777 [[Yes, you. (context)|Yes, you.]]
11778 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11782 pre-save transform: context links ("pipe trick") with namespace
11784 pst title=[[Ns:Somearticle]]
11788 [[Ns:Article|Article]]
11792 pre-save transform: context links ("pipe trick") with namespace and parens
11794 pst title=[[Ns:Somearticle (context)]]
11798 [[Ns:Article (context)|Article]]
11802 pre-save transform: context links ("pipe trick") with namespace and comma
11804 pst title=[[Ns:Somearticle, Context, Whatever]]
11808 [[Ns:Article, Context, Whatever|Article]]
11812 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11814 pst title=[[Ns:Somearticle, Context (context)]]
11818 [[Ns:Article (context)|Article]]
11822 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11824 pst title=[[Ns:Somearticle (IGNORED), Context]]
11828 [[Ns:Article, Context|Article]]
11832 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11836 [[Article(context)|]]
11837 [[Bar:Article(context)|]]
11838 [[:Bar:Article(context)|]]
11839 [[|Article(context)]]
11843 [[Article(context)|Article]]
11844 [[Bar:Article(context)|Article]]
11845 [[:Bar:Article(context)|Article]]
11846 [[Article(context)]]
11847 [[Bar:X(Y)Z|X(Y)Z]]
11848 [[:Bar:X(Y)Z|X(Y)Z]]
11852 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11856 [[Article (context)|]]
11857 [[Bar:Article (context)|]]
11858 [[:Bar:Article (context)|]]
11859 [[|Article (context)]]
11863 [[Article (context)|Article]]
11864 [[Bar:Article (context)|Article]]
11865 [[:Bar:Article (context)|Article]]
11866 [[Article (context)]]
11867 [[Bar:X (Y) Z|X (Y) Z]]
11868 [[:Bar:X (Y) Z|X (Y) Z]]
11872 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11876 [[Article(context)|]]
11877 [[Bar:Article(context)|]]
11878 [[:Bar:Article(context)|]]
11879 [[|Article(context)]]
11883 [[Article(context)|Article]]
11884 [[Bar:Article(context)|Article]]
11885 [[:Bar:Article(context)|Article]]
11886 [[Article(context)]]
11887 [[Bar:X(Y)Z|X(Y)Z]]
11888 [[:Bar:X(Y)Z|X(Y)Z]]
11892 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11896 [[Article (context), context|]]
11897 [[Article (context),context|]]
11898 [[Bar:Article (context), context|]]
11899 [[Bar:Article (context),context|]]
11900 [[:Bar:Article (context), context|]]
11901 [[:Bar:Article (context),context|]]
11903 [[Article (context), context|Article]]
11904 [[Article (context),context|Article]]
11905 [[Bar:Article (context), context|Article]]
11906 [[Bar:Article (context),context|Article]]
11907 [[:Bar:Article (context), context|Article]]
11908 [[:Bar:Article (context),context|Article]]
11912 pre-save transform: trim trailing empty lines
11916 Empty lines are trimmed
11922 Empty lines are trimmed
11926 pre-save transform: Signature expansion
11931 * <noinclude>~~~</noinclude>
11932 * <includeonly>~~~</includeonly>
11933 * <onlyinclude>~~~</onlyinclude>
11935 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11936 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11937 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11938 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11943 pre-save transform: Signature expansion in nowiki tags (bug 93)
11949 <nowiki>~~~~</nowiki>
11951 <includeonly><nowiki>~~~~</nowiki></includeonly>
11953 <noinclude><nowiki>~~~~</nowiki></noinclude>
11955 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11957 {{subst:Foo}} shall be converted to FOO
11959 As well as inside noinclude/onlyinclude
11960 <noinclude>{{subst:Foo}}</noinclude>
11961 <onlyinclude>{{subst:Foo}}</onlyinclude>
11963 But not inside includeonly
11964 <includeonly>{{subst:Foo}}</includeonly>
11968 <nowiki>~~~~</nowiki>
11970 <includeonly><nowiki>~~~~</nowiki></includeonly>
11972 <noinclude><nowiki>~~~~</nowiki></noinclude>
11974 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11976 FOO shall be converted to FOO
11978 As well as inside noinclude/onlyinclude
11979 <noinclude>FOO</noinclude>
11980 <onlyinclude>FOO</onlyinclude>
11982 But not inside includeonly
11983 <includeonly>{{subst:Foo}}</includeonly>
11987 Parsoid: Recognize nowiki with trailing space in tags
11991 <nowiki ><div>[[foo]]</nowiki >
11999 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12006 Parsoid: Recognize nowiki with odd capitalization
12010 <noWikI ><div>[[foo]]</Nowiki >
12012 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12017 Parsoid: Escape nowiki with trailing space in tags
12021 <p><nowiki > foo </nowiki ></p>
12022 <p>a<nowiki />b</p>
12023 <p>c<nowiki/ >d</p>
12025 <nowiki > foo </nowiki >
12033 Parsoid: Escape weird noWikI capitalizations
12037 <p><noWikI > foo </NoWikI ></p>
12039 <noWikI > foo </NoWikI >
12043 ### Message transform tests
12046 message transform: magic variables
12056 message transform: should not transform wiki markup
12066 message transform: <noinclude> in transcluded template (bug 4926)
12076 message transform: <onlyinclude> in transcluded template (bug 4926)
12086 {{#special:}} page name, known
12090 {{#special:Recentchanges}}
12092 Special:RecentChanges
12096 {{#special:}} page name with subpage, known
12100 {{#special:Recentchanges/param}}
12102 Special:RecentChanges/param
12106 {{#special:}} page name, unknown
12110 {{#special:foobar nonexistent}}
12112 Special:Foobar nonexistent
12116 {{#speciale:}} page name, known
12120 {{#speciale:Recentchanges}}
12122 Special:RecentChanges
12126 {{#speciale:}} page name with subpage, known
12130 {{#speciale:Recentchanges/param}}
12132 Special:RecentChanges/param
12136 {{#speciale:}} page name, unknown
12140 {{#speciale:foobar nonexistent}}
12142 Special:Foobar_nonexistent
12148 ### For Parsoid-specific tests, see
12149 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12154 parsoid=wt2html,wt2wt,html2html
12156 [[Image:foobar.jpg]]
12158 <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>
12161 <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>
12165 Simple image (using File: namespace, now canonical)
12167 [[File:Foobar.jpg]]
12169 <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>
12172 <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>
12176 Right-aligned image
12178 [[File:Foobar.jpg|right]]
12180 <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>
12183 <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>
12189 [[File:Foobar.jpg|right|Caption text]]
12191 <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>
12194 <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>
12198 Image with caption, bug 53312 #1
12200 [[File:Foobar.jpg|right|Caption page stuff]]
12202 <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>
12205 <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>
12209 Image with caption, bug 53312 #2
12211 [[File:Foobar.jpg|right|Caption page=]]
12213 <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>
12216 <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>
12220 Image with caption, bug 53312 #3
12222 [[File:Foobar.jpg|right|Caption page=stuff]]
12224 <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>
12227 <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>
12231 Allow empty links in image captions (Bug 60753)
12235 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12240 <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>
12243 <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>
12245 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12246 </figcaption></figure>
12250 Titles in unlinked images (T23454)
12252 [[File:Foobar.jpg|link=|stuff]]
12254 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12259 Link with empty target
12268 Image with link trail
12270 Linktrails should not work for images: [[File:Foobar.jpg]]s
12272 <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
12275 <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>
12279 Image with empty attribute
12281 parsoid=wt2html,wt2wt,html2html
12283 [[File:Foobar.jpg|right||Caption text]]
12285 <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>
12288 <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>
12292 1. Block image with individual attributes from templates
12294 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12296 <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>
12299 <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>
12303 2. Block Image with individual attributes from templates
12305 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12307 <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>
12310 <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>
12314 3. Inline image with individual attributes from templates
12316 [[File:Foobar.jpg|{{echo|50px}}]]
12318 <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>
12321 <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>
12324 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12325 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12327 Image with multiple attributes from the same template
12329 [[File:Foobar.jpg|{{image_attribs}}]]
12331 <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>
12334 <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>
12338 Image with link tails
12342 123[[File:Foobar.jpg]]456
12343 123[[File:Foobar.jpg|right]]456
12344 123[[File:Foobar.jpg|thumb]]456
12346 <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
12348 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
12349 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
12352 <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>
12354 <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>
12356 <div class="thumb tright">
12357 <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>
12358 <div class="thumbcaption">
12359 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12365 <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>
12366 <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>
12367 <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>
12371 Image with multiple captions -- only last one is accepted
12373 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12375 <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>
12378 <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>
12382 Image with multiple widths -- use last
12384 [[File:Foobar.jpg|200px|300px|caption]]
12386 <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>
12389 <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>
12393 Image with multiple alignments -- use first (bug 48664)
12397 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12399 [[File:Foobar.jpg|middle|text-top|caption]]
12401 <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>
12402 <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>
12405 <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>
12406 <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>
12410 Image with width attribute at different positions
12412 [[File:Foobar.jpg|200px|right|Caption]]
12413 [[File:Foobar.jpg|right|200px|Caption]]
12414 [[File:Foobar.jpg|right|Caption|200px]]
12416 <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>
12417 <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>
12418 <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>
12421 <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>
12422 <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>
12423 <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>
12426 # a sad bit of backward-compatibility
12428 Image with size specified with pxpx (bug 13500, 51628)
12430 parsoid=wt2html,wt2wt,html2html
12432 [[File:Foobar.jpg|20pxpx]]
12433 [[File:Foobar.jpg|200x20pxpx]]
12435 <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>
12436 <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>
12439 <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>
12443 Image with link parameter, wiki target
12445 [[File:Foobar.jpg|link=Main Page]]
12447 <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>
12450 <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>
12453 # parsoid bug 49293 (part 1)
12455 Image with link parameter, URL target
12457 [[File:Foobar.jpg|link=http://example.com/]]
12459 <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>
12462 <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>
12465 # parsoid bug 49293 (part 2)
12467 Image with link parameter, protocol-less URL target
12469 [[File:Foobar.jpg|link=//example.com/]]
12471 <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>
12474 <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>
12478 Image with link parameter, wgExternalLinkTarget
12480 [[Image:foobar.jpg|link=http://example.com/]]
12482 wgExternalLinkTarget='foobar'
12484 <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>
12489 Image with link parameter, wgNoFollowLinks set to false
12491 [[Image:foobar.jpg|link=http://example.com/]]
12493 wgNoFollowLinks=false
12495 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12500 Image with link parameter, wgNoFollowDomainExceptions
12502 [[Image:foobar.jpg|link=http://example.com/]]
12504 wgNoFollowDomainExceptions='example.com'
12506 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12511 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12513 [[Image:foobar.jpg|link=http://example.com/|Title]]
12515 wgExternalLinkTarget='foobar'
12517 <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>
12522 Image with empty link parameter
12524 [[File:Foobar.jpg|link=]]
12526 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12529 <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>
12533 Image with link parameter (wiki target) and unnamed parameter
12535 [[File:Foobar.jpg|link=Main_Page|Title]]
12537 <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>
12540 <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>
12544 Image with link parameter (URL target) and unnamed parameter
12546 [[File:Foobar.jpg|link=http://example.com/|Title]]
12548 <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>
12551 <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>
12555 Thumbnail image with link parameter
12558 parsoid=wt2html,wt2wt,html2html
12560 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12562 <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>
12565 <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>
12569 Manually-specified thumbnail image
12573 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12575 <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>
12578 <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>
12582 Manually-specified thumbnail image with explicit link to wiki page
12585 parsoid=wt2html,wt2wt,html2html
12587 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12589 <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>
12592 <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>
12596 Manually-specified thumbnail image with explicit link to url
12599 parsoid=wt2html,wt2wt,html2html
12601 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12603 <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>
12606 <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>
12610 Manually-specified thumbnail image with explicit no link
12613 parsoid=wt2html,wt2wt,html2html
12615 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12617 <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>
12620 <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>
12624 Manually-specified thumbnail image with explicit link and alt text
12627 parsoid=wt2html,wt2wt,html2html
12629 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12631 <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>
12634 <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>
12638 Image with frame and link
12640 parsoid=wt2html,wt2wt,html2html
12642 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12644 <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>
12647 <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>
12651 Image with frame and link and explicit alt
12653 parsoid=wt2html,wt2wt,html2html
12655 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12657 <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>
12660 <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>
12664 Image with wiki markup in implicit alt
12666 parsoid=wt2html,wt2wt,html2html
12668 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12670 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12672 <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>
12673 </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>
12676 <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>
12677 <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>
12681 Alt image option should handle most kinds of wikitext without barfing
12683 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12685 <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>
12688 <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>
12691 ###################
12692 # Conflicting image format options.
12693 # First option specified should 'win'.
12694 # All three cases in each test should be identical.
12697 Image with 'frameless' first.
12699 parsoid=wt2html,wt2wt,html2html
12701 [[File:Foobar.jpg|frameless|caption]]
12703 [[File:Foobar.jpg|frameless|frame|caption]]
12705 [[File:Foobar.jpg|frameless|thumb|caption]]
12707 <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>
12708 </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>
12709 </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>
12712 <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>
12713 <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>
12714 <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>
12718 Image with 'frame' first.
12720 parsoid=wt2html,wt2wt,html2html
12722 [[File:Foobar.jpg|frame|caption]]
12723 [[File:Foobar.jpg|frame|frameless|caption]]
12724 [[File:Foobar.jpg|frame|thumb|caption]]
12726 <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>
12727 <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>
12728 <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>
12731 <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>
12732 <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>
12733 <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>
12737 Image with 'thumb' first.
12739 parsoid=wt2html,wt2wt,html2html
12741 [[File:Foobar.jpg|thumb|caption]]
12742 [[File:Foobar.jpg|thumb|frameless|caption]]
12743 [[File:Foobar.jpg|thumb|frame|caption]]
12745 <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>
12746 <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>
12747 <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>
12750 <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>
12751 <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>
12752 <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>
12755 ###################
12757 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12758 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12759 # Foobar has actual size of 1941x220
12760 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12761 # a scalable format.
12762 # 2. Framed images always ignore size options; always render at default size.
12763 # 3. "Unspecified format" and border are the only types which can be
12767 Image: "unspecified format" and border enlarge
12769 parsoid=wt2html,wt2wt,html2html
12771 [[File:Foobar.jpg|2000px]]
12773 [[File:Foobar.jpg|border|2000px]]
12775 <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>
12776 </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>
12779 <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>
12780 <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>
12784 Image: "unspecified format" and border reduce
12786 parsoid=wt2html,wt2wt,html2html
12788 [[File:Foobar.jpg|1000px]]
12790 [[File:Foobar.jpg|border|1000px]]
12792 <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>
12793 </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>
12796 <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>
12797 <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>
12801 Image: thumbs reduce
12803 parsoid=wt2html,wt2wt,html2html
12805 [[File:Foobar.jpg|thumb|50px]]
12807 <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>
12810 <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>
12814 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12816 parsoid=wt2html,wt2wt,html2html
12818 [[File:Foobar.jpg|thumb|2000px]]
12820 [[File:Foobar.svg|thumb|2000px]]
12822 <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>
12823 <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>
12826 <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>
12827 <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>
12831 Image: frameless can reduce in size
12833 parsoid=wt2html,wt2wt,html2html
12835 [[File:Foobar.jpg|frameless|50px]]
12837 <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>
12840 <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>
12844 Image: bitmap frameless can't be enlarged past original size, but vector can
12846 parsoid=wt2html,wt2wt,html2html
12848 [[File:Foobar.jpg|frameless|2000px]]
12850 [[File:Foobar.svg|frameless|2000px]]
12852 <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>
12853 </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>
12856 <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>
12857 <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>
12861 Image: framed images are always unscaled.
12863 parsoid=wt2html,wt2wt,html2html
12865 [[File:Foobar.jpg|frame]]
12867 [[File:Foobar.jpg|frame|50px]]
12869 [[File:Foobar.jpg|frame|50x50px]]
12871 [[File:Foobar.jpg|frame|2000px]]
12873 <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>
12874 <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>
12875 <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>
12876 <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>
12879 <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>
12880 <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>
12881 <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>
12882 <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>
12885 ###################
12888 Link to image page- image page normally doesn't exists, hence edit link
12889 Add test with existing image page
12890 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12894 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12899 bug 18784 Link to non-existent image page with caption should use caption as link text
12901 [[:Image:test|caption]]
12903 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12908 Frameless image caption with a free URL
12910 [[File:Foobar.jpg|http://example.com]]
12912 <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>
12915 <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>
12919 Thumbnail image caption with a free URL
12923 [[File:Foobar.jpg|thumb|http://example.com]]
12925 <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>
12928 <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>
12932 Thumbnail image caption with a free URL and explicit alt
12935 parsoid=wt2html,wt2wt,html2html
12937 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12939 <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>
12942 <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>
12946 SVG thumbnails with no language set
12949 [[File:Foobar.svg|thumb|caption]]
12951 <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>
12954 <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>
12958 SVG thumbnails with language de
12960 parsoid=wt2html,wt2wt,html2html
12962 [[File:Foobar.svg|thumb|caption|lang=de]]
12964 <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>
12967 <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>
12971 SVG thumbnails with invalid language code
12973 parsoid=wt2html,wt2wt,html2html
12975 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12977 <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>
12980 <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>
12984 BUG 1887: A ISBN with a thumbnail
12986 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12988 <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>
12991 <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>
12995 BUG 1887: A RFC with a thumbnail
12997 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12999 <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>
13002 <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>
13006 BUG 1887: A mailto link with a thumbnail
13008 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13010 <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>
13013 <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>
13016 # Pending resolution to bug 368
13018 BUG 648: Frameless image caption with a link
13020 [[File:Foobar.jpg|text with a [[link]] in it]]
13022 <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>
13025 <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>
13029 BUG 648: Frameless image caption with a link (suffix)
13031 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13033 <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>
13036 <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>
13040 BUG 648: Frameless image caption with an interwiki link
13042 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13044 <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>
13047 <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>
13051 BUG 648: Frameless image caption with a piped interwiki link
13053 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13055 <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>
13058 <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>
13062 Escape HTML special chars in image alt text
13064 [[File:Foobar.jpg|& < > "]]
13066 <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>
13069 <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>
13073 BUG 499: Alt text should have Ӓ, not &1234;
13075 [[File:Foobar.jpg|♀]]
13077 <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>
13080 <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>
13084 Broken image caption with link
13086 parsoid=wt2html,wt2wt,html2html
13088 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13090 <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.
13093 <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>
13097 Image caption containing another image
13099 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13101 <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>
13104 <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>
13108 Image: caption containing a newline
13110 [[File:Foobar.jpg|This
13113 <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>
13116 <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>
13120 Image: caption containing leading space
13121 (The leading space should not trigger nowiki escaping in wt2wt mode)
13123 [[File:Foobar.jpg|thumb| bar]]
13125 <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>
13128 <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>
13132 Image: caption containing a table
13134 parsoid=wt2html,wt2wt,html2html
13136 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13142 and some more text.]]
13144 <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>
13147 <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
13150 <tr><th>Foo </th><th>Bar</th></tr>
13153 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13157 Bug 3090: External links other than http: in image captions
13159 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13161 <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>
13164 <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>
13170 parsoid=wt2html,wt2wt,html2html
13172 [[Image:foobar.jpg|a|class=b]]
13174 <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>
13177 <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>
13181 Localized image handling (1).
13183 parsoid=wt2html,wt2wt,html2html
13186 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13188 <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>
13191 <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>
13195 Localized image handling (2).
13198 parsoid=wt2html,wt2wt,html2html
13201 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13203 <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>
13206 <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>
13210 "border", "frameless" and "class" attributes on an image.
13213 parsoid=wt2html,wt2wt,html2html
13215 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13217 <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>
13220 <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>
13223 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13225 Invalid image attributes (bug 62500)
13228 parsoid=wt2html,wt2wt,html2html
13230 [[File:Foobar.jpg|thumb|float|left|caption]]
13232 [[File:Foobar.jpg|thumb|righ|caption]]
13234 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13236 <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>
13237 <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>
13238 <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>
13241 <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>
13242 <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>
13243 <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>
13249 #REDIRECT [[File:Barfoo.jpg]]
13252 # FIXME: Parsoid should run this test -- but we'd need to teach the
13253 # mockAPI about the redirected Barfoo.jpg image.
13257 [[Image:Barfoo.jpg]]
13259 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13264 Missing image with uploads disabled
13268 [[File:Foobaz.jpg]]
13270 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13273 <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>
13276 # Parsoid-specific testing for images
13277 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13278 # Currently imperfect due to a flaw in the Parsoid testrunner
13280 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13284 Parsoid-specific image handling - simple image with size and middle alignment
13286 [[File:Foobar.jpg|middle|50px]]
13288 <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>
13292 Parsoid-specific image handling - simple image with size, middle alignment,
13293 non-standard namespace alias
13295 parsoid=wt2wt,wt2html,html2html
13297 [[Image:Foobar.jpg|middle|50px]]
13299 <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>
13303 Parsoid-specific image handling - simple image with size and middle alignment
13306 [[File:Foobar.jpg|50px|middle]]
13308 <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>
13312 Parsoid-specific image handling - simple image with size and middle alignment
13313 and non-standard namespace name
13315 parsoid=wt2html,wt2wt,html2html
13317 [[Image:Foobar.jpg|50px|middle]]
13319 <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>
13323 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13325 [[File:Foobar.jpg|500x10px|baseline|caption]]
13327 <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>
13331 Parsoid-specific image handling - simple image with border and size spec
13333 [[File:Foobar.jpg|50px|border|caption]]
13335 <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>
13339 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13341 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13343 <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>
13347 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13350 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13352 <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>
13356 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13358 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13360 <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>
13364 Parsoid-specific image handling - thumbnail with specific size, halign,
13365 valign, and caption (existing content)
13367 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13369 <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>
13373 Parsoid-specific image handling - framed image with specific size and caption
13376 parsoid=wt2html,wt2wt,html2html
13378 [[File:Foobar.jpg|frame|500x50px|caption]]
13380 <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>
13384 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13387 parsoid=wt2html,wt2wt,html2html
13389 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13391 <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>
13395 Parsoid-specific image handling - frameless image with specific size, border, and caption
13397 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13399 <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>
13403 Parsoid-specific image handling - simple image with a formatted caption
13405 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13407 <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>
13411 Parsoid-specific image handling - caption with a template in it
13413 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13415 <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>
13419 Parsoid-specific image handling - caption with unbalanced tags in it
13421 parsoid=wt2html,wt2wt,html2html
13424 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13428 <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>
13433 Parsoid-specific image handling - empty caption (1)
13435 parsoid=wt2html,wt2wt
13437 [[File:Foobar.jpg|thumb|]]
13439 <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>
13442 # empty captions don't get serialized unless we're in the "round trip" case
13444 Parsoid-specific image handling - empty caption (2)
13448 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13449 <a href="./File:Foobar.jpg">
13450 <img resource="./File:Foobar.jpg"
13451 src="//example.com/images/3/3a/Foobar.jpg"
13452 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13453 height="25" width="220"/>
13455 <figcaption></figcaption>
13458 [[File:Foobar.jpg|thumb]]
13462 Parsoid-specific image handling - whitespace caption
13464 [[File:Foobar.jpg|thumb| ]]
13466 <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>
13470 Parsoid-specific image handling - lang option
13473 [[File:Foobar.svg|lang=de|caption]]
13477 <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>
13486 Subpage test/subpage
13494 subpage title=[[Subpage test]]
13498 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13503 Subpage noslash link
13505 subpage title=[[Subpage test]]
13509 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13514 Subpage test/1/2/subpage
13520 Relative subpage noslash link
13522 parsoid=wt2wt,wt2html,html2html
13523 subpage title=[[Subpage test/1/2/3/4]]
13529 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13530 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13533 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13534 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13538 Parsoid: dot-slash prefixed wikilinks
13548 </p><p>[[././baz/]]
13553 </p><p>[[././baz/]]
13558 Render invalid page names as plain text (bug 51090)
13571 [[{{echo|./../foo}}|bar]]
13572 [[{{echo|foo/.}}|bar]]
13573 [[{{echo|foo/..}}|bar]]
13574 [[{{echo|foo~~~~bar}}]]
13575 [[{{echo|foo>bar}}]]
13576 [[{{echo|foo././bar}}]]
13577 [[{{echo|foo{bar}}]]
13578 [[{{echo|foo}bar}}]]
13579 [[{{echo|foo[bar}}]]
13580 [[{{echo|foo]bar}}]]
13581 [[{{echo|foo<bar}}]]
13583 <p>[[./../foo|bar]]
13593 </p><p>[[./../foo|bar]]
13606 <p>[[./../foo|bar]]
13617 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13618 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13619 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13620 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13621 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13622 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13623 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13624 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13625 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
13626 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
13627 [[<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>
13635 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13640 BUG 561: {{/Subpage}}
13642 subpage title=[[Page]]
13646 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13654 Category:MediaWiki User's Guide
13662 [[:Category:MediaWiki User's Guide]]
13664 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13673 [[Category:MediaWiki User's Guide]]
13675 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13679 PAGESINCATEGORY invalid title fatal (r33546 fix)
13681 {{PAGESINCATEGORY:<bogus>}}
13688 Category with different sort key
13692 [[Category:MediaWiki User's Guide|Foo]]
13694 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13698 Category with identical sort key
13702 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13704 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13708 Category with empty sort key
13713 [[Category:MediaWiki User's Guide|]]
13715 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13719 Category with empty sort key and parentheses
13724 [[Category:Foo (bar)|]]
13726 [[Category:Foo (bar)|Foo]]
13730 Category with link tail
13735 123[[Category:Foo]]456
13737 123[[Category:Foo]]456
13741 Category with template
13746 [[Category:{{echo|Foo}}]]
13748 [[Category:{{echo|Foo}}]]
13752 Category with template in sort key
13757 [[Category:Foo|{{echo|Bar}}]]
13759 [[Category:Foo|{{echo|Bar}}]]
13763 Category with template in sort key and title
13768 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13770 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13774 Category / paragraph interactions
13776 Foo [[Category:Baz]] Bar
13778 Foo [[Category:Baz]]
13786 [[Category:Baz]] Bar
13799 {{echo|[[Category:Baz]]}}
13813 ## The whitespace on the empty line is part of the test. Please do not delete
13815 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13817 parsoid=wt2html,wt2wt
13821 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
13823 {{echo|[[Category:Foo]] and so should this!}}
13825 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
13830 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
13832 <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>
13835 ## Parsoid will not try to wt2wt this while preserving newlines because
13836 ## it suppresses excess newlines within list items -- and we don't want to
13837 ## introduce a special case just for categories, which is, in reality somewhat
13838 ## odd behavior -- categories are unlikely to be used in list items like this
13839 ## in top-level pages and are only likely to show up in template-generated
13840 ## list items where this RT-ing is a non-issue.
13842 ## The whitespace on the empty line is part of the test. Please do not delete
13844 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13850 [[Category:Foo]] and this should be part of the same list item
13853 {{echo|[[Category:Foo]] and this should be part of the same list item}}
13855 <ul><li>This and this should be part of the same list item</li>
13856 <li>So should this and this should be part of the same list item</li></ul>
13859 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
13860 <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>
13864 ## Newlines and categories that follow the last item of a list
13865 ## are treated differently because this (list followed by categories)
13866 ## is an extremely common pattern on wikis.
13868 3. Categories and newlines: newline suppression for last list item should RT properly
13881 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13883 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13884 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13888 4. Categories and newlines: newline suppression for last list item should RT properly
13896 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
13898 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13901 ## only wt2html for this to make sure the algo only applies to the rightmost path
13903 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
13916 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
13918 <ul><li> d</li></ul></li></ul>
13919 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13923 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
13925 * a [[Category:Foo]]
13927 <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>
13930 # This test also demonstrates because of newline+category tunneling
13931 # through the list hander, template wrapping doesn't expand to the
13932 # containing list when the list item swallows the category.
13934 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
13939 <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">
13940 </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>
13944 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
13948 {{echo|[[Category:Foo]]
13952 <ul><li> a</li></ul>
13954 <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">
13955 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13956 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13960 Parsoid: Serialize link to category page with colon escape
13966 [[:Category:Foo|Bar]]
13969 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13970 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13974 # html2wt localizes the "Category" namespace.
13975 # XXX the <link> element needs an empty data-parsoid attribute, or
13976 # else the html2html test fails because spaces are inserted.
13978 Link prefix/suffixes aren't applied to category links
13980 parsoid=wt2html,wt2wt,html2html
13988 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
13992 Parsoid: Serialize link to file page with colon escape
13998 [[:File:Foo.png|Bar]]
14001 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14002 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14007 Parsoid: Serialize a genuine category link without colon escape
14012 [[Category:Foo|Bar]]
14014 <link rel="mw:PageProp/Category" href="Category:Foo">
14015 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
14019 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14023 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14025 [[Category:Toxine bactérienne]]
14029 Parsoid: Defaultsort
14031 {{DEFAULTSORT:Foo}}
14033 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14037 Parsoid: Defaultsort (template-generated)
14039 {{{{echo|DEFAULTSORT}}:Foo}}
14041 <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}}]}'/>
14045 ### Inter-language links
14048 Interlanguage links
14056 es:Alimento fr:Nourriture zh:食品
14058 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14059 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14060 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14064 Duplicate interlanguage links (bug 24502)
14075 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14076 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14077 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14078 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14085 Basic section headings
14092 ===Smaller headline===
14095 <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>
14098 <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>
14101 <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>
14107 Section headings with TOC
14110 === Subheadline 1 ===
14111 ===== Skipping a level =====
14112 ====== Skipping a level ======
14116 ===Another headline===
14118 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14120 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14122 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14124 <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>
14126 <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>
14133 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14135 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14141 <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>
14142 <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>
14143 <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>
14144 <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>
14145 <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>
14148 <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>
14153 TOC anchors don't collide
14161 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14163 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14164 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14165 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14166 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14170 <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>
14171 <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>
14172 <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>
14173 <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>
14177 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14179 Handling of sections up to level 6 and beyond
14182 == Level 2 Heading==
14183 === Level 3 Heading===
14184 ==== Level 4 Heading====
14185 ===== Level 5 Heading=====
14186 ====== Level 6 Heading======
14187 ======= Level 7 Heading=======
14188 ======== Level 8 Heading========
14189 ========= Level 9 Heading=========
14190 ========== Level 10 Heading==========
14192 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14194 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14196 <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>
14198 <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>
14200 <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>
14202 <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>
14204 <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>
14205 <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>
14206 <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>
14207 <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>
14208 <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>
14222 <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>
14223 <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>
14224 <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>
14225 <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>
14226 <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>
14227 <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>
14228 <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>
14229 <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>
14230 <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>
14231 <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>
14236 TOC regression (T11764)
14240 ==== title 1.1.1 ====
14245 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14247 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14249 <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>
14251 <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>
14254 <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>
14257 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14259 <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>
14265 <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>
14266 <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>
14267 <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>
14268 <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>
14269 <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>
14270 <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>
14275 TOC for heading containing <span id="..."></span> (T96153)
14278 ==<span id="old-anchor"></span>New title==
14280 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14282 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14286 <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>
14291 TOC with wgMaxTocLevel=3 (bug 6204)
14297 ==== title 1.1.1 ====
14302 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14304 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14306 <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>
14307 <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>
14310 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14312 <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>
14318 <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>
14319 <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>
14320 <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>
14321 <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>
14322 <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>
14323 <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>
14328 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14334 ====Section 1.1.1====
14335 ====Section 1.1.1.1====
14338 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14340 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14342 <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>
14345 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14349 <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>
14350 <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>
14351 <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>
14352 <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>
14353 <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>
14359 Resolving duplicate section names
14364 <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>
14365 <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>
14370 Resolving duplicate section names with differing case (bug 10721)
14375 <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>
14376 <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>
14388 Template with sections, __NOTOC__
14395 <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>
14396 <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>
14397 <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>
14398 <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>
14403 __NOEDITSECTION__ keyword
14409 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14410 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14415 Link inside a section heading
14417 ==Section with a [[Main Page|link]] in it==
14419 <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>
14424 TOC regression (T14077)
14431 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14433 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14435 <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>
14438 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14442 <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>
14443 <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>
14444 <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>
14449 BUG 1219 URL next to image (good)
14451 http://example.com [[File:Foobar.jpg]]
14453 <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>
14456 <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>
14460 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14463 The line above must have a trailing space!
14466 But just in case it doesn't...
14468 <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>
14469 <p>The line above must have a trailing space!
14471 <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>
14472 <p>But just in case it doesn't...
14477 Header with special characters (bug 25462)
14479 The tooltips shall not show entities to the user (ie. be double escaped)
14496 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14498 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14500 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14501 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14502 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14503 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14504 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14508 <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>
14511 <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>
14514 <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>
14517 <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>
14520 <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>
14526 Header with space, plus and underscore as entity
14528 Id should not contain + for spaces
14530 == Space between Text ==
14533 == Space-Entity between Text ==
14536 == Plus+between+Text ==
14539 == Plus-Entity+between+Text ==
14542 == Underscore_between_Text ==
14545 == Underscore-Entity_between_Text ==
14548 [[#Space between Text]]
14549 [[#Space-Entity between Text]]
14550 [[#Plus+between+Text]]
14551 [[#Plus-Entity+between+Text]]
14552 [[#Underscore_between_Text]]
14553 [[#Underscore-Entity_between_Text]]
14555 <p>Id should not contain + for spaces
14557 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14559 <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>
14560 <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>
14561 <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>
14562 <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>
14563 <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>
14564 <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>
14568 <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>
14571 <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>
14574 <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>
14577 <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>
14580 <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>
14583 <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>
14585 </p><p><a href="#Space_between_Text">#Space between Text</a>
14586 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14587 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14588 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14589 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14590 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14595 Headers with excess '=' characters
14596 (Are similar tests necessary beyond the 1st level?)
14600 =''italic'' heading==
14601 ==''italic'' heading=
14603 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14605 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14606 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14607 <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>
14608 <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>
14612 <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>
14613 <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>
14614 <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>
14615 <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>
14620 HTML headers vs TOC (bug 23393)
14621 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14633 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14635 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14637 <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>
14638 <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>
14641 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14643 <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>
14644 <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>
14650 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14651 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14652 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14653 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14654 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14655 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14660 Single-line or multiline-comments can follow headings
14662 parsoid=wt2html,wt2wt
14670 <h2><span class="mw-headline" id="foo">foo</span></h2>
14671 <h2><span class="mw-headline" id="bar">bar</span></h2>
14672 <h2><span class="mw-headline" id="baz">baz</span></h2>
14677 BUG 1219 URL next to image (broken)
14679 http://example.com[[File:Foobar.jpg]]
14681 <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>
14684 <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>
14688 Bug 1186 news: in the middle of text
14690 http://en.wikinews.org/wiki/Wikinews:Workplace
14692 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14698 Namespaced link must have a title
14707 Namespaced link must have a title (bad fragment version)
14709 [[Project:#fragment]]
14711 <p>[[Project:#fragment]]
14717 ### HTML tags and HTML attributes
14721 div with no attributes
14723 <div>HTML rocks</div>
14725 <div>HTML rocks</div>
14730 div with double-quoted attribute
14732 <div id="rock">HTML rocks</div>
14734 <div id="rock">HTML rocks</div>
14739 div with single-quoted attribute
14741 <div id='rock'>HTML rocks</div>
14743 <div id="rock">HTML rocks</div>
14748 div with unquoted attribute
14750 <div id=rock>HTML rocks</div>
14752 <div id="rock">HTML rocks</div>
14757 div with illegal double attributes
14759 <div id="a" id="b">HTML rocks</div>
14761 <div id="b">HTML rocks</div>
14765 # FIXME: produce empty string instead of "class" in the PHP parser, following
14768 div with empty attribute value, space before equals
14772 <div class =>HTML rocks</div>
14774 <div class="">HTML rocks</div>
14779 div with multiple empty attribute values
14783 <div id= title=>HTML rocks</div>
14785 <div id="" title="">HTML rocks</div>
14790 table with multiple empty attribute values
14798 <table title="" id="">
14799 <tbody><tr><td> hi</td></tr>
14804 div with braces in attribute value
14806 <div title="{}">Foo</div>
14808 <div title="{}">Foo</div>
14811 <div title="{}">Foo</div>
14814 # This it very inconsistent in the PHP parser: it returns
14815 # class="class" if there is a space between the name and the equal sign (see
14816 # 'div with empty attribute value, space before equals'), but strips the
14817 # attribute completely if the space is missing. We hope that not much content
14818 # depends on this, so are implementing the behavior below in Parsoid for
14819 # consistencies' sake.
14820 # FIXME: fix this behavior in the PHP parser?
14822 div with empty attribute value, no space before equals
14824 parsoid=wt2html,html2html
14826 <div class=>HTML rocks</div>
14828 <div>HTML rocks</div>
14831 <div class="">HTML rocks</div>
14835 HTML multiple attributes correction
14837 <p class="error" class="awesome">Awesome!</p>
14839 <p class="awesome">Awesome!</p>
14844 Table multiple attributes correction
14847 !+ class="error" class="awesome"| status
14852 <th class="awesome"> status
14860 <DIV ID="x">HTML ROCKS</DIV>
14862 <div id="x">HTML ROCKS</div>
14867 Non-ASCII pseudo-tags are rendered as text
14876 Pseudo-tag with URL 'name' renders as url link
14878 <http://example.com/>
14880 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14885 text with amp in the middle of nowhere
14889 <p>Remember AT&T?
14894 text with character entity: eacute
14896 I always thought é was a cute letter.
14898 <p>I always thought é was a cute letter.
14901 <p>I always thought é was a cute letter.</p>
14905 text with entity-escaped character entity-like string: eacute
14907 I always thought &eacute; was a cute letter.
14909 <p>I always thought &eacute; was a cute letter.
14914 text with undefined character entity: xacute
14916 I always thought &xacute; was a cute letter.
14918 <p>I always thought &xacute; was a cute letter.
14922 # TODO: generalize to PHP parser?
14928 <data value="5">five</data>
14929 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14930 <mark>This highlighted text</mark>
14932 <p><data value="5">five</data>
14933 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14934 <mark>This highlighted text</mark></p>
14938 HTML tag with leading space is parsed as text
14942 <p>< div>foo< /div>
14947 ### Nesting tests (see bug 41545, 50604, 51081)
14950 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14951 # Note that html2wt is considerably more difficult if we use <b> in
14952 # the test case, instead of <big>
14954 Ensure that HTML adoption agency algorithm is properly implemented.
14956 <big>X<big>Y</big>Z</big>
14958 <p><big>X<big>Y</big>Z</big>
14962 # This was bug 41545 in the PHP parser.
14963 # Note that tidy doesn't handle this correctly.
14967 <kbd>X<kbd>Y</kbd>Z</kbd>
14969 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14973 # The following cases were bug 51081 in the PHP parser.
14974 # Note that there are some other nestable tags (b, i, etc) which are
14975 # not covered; see bug 51081 for discussion.
14977 # Note that tidy doesn't handle this correctly.
14981 <em>X<em>Y</em>Z</em>
14983 <p><em>X<em>Y</em>Z</em>
14987 # Note that tidy doesn't handle this correctly.
14989 Nesting of <strong>
14991 <strong>X<strong>Y</strong>Z</strong>
14993 <p><strong>X<strong>Y</strong>Z</strong>
15002 <p><q>X<q>Y</q>Z</q></p>
15005 # Note that tidy doesn't handle this correctly.
15009 <ruby>X<ruby>Y</ruby>Z</ruby>
15011 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15015 # Note that tidy doesn't handle this correctly.
15019 <bdo>X<bdo>Y</bdo>Z</bdo>
15021 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15033 [[Media:Foobar.jpg]]
15035 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15040 Media link with text
15042 [[Media:Foobar.jpg|A neat file to look at]]
15044 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15048 # FIXME: this is still bad HTML tag nesting
15049 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15051 Media link with nasty text
15053 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15055 <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>
15058 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15059 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15063 Media link to nonexistent file (bug 1702)
15065 [[Media:No such.jpg]]
15067 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15072 Image link to nonexistent file (bug 1850 - good)
15074 [[File:No_such.jpg]]
15076 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15079 <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>
15083 :Image link to nonexistent file (bug 1850 - bad)
15085 [[:Image:No such.jpg]]
15087 <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>
15090 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15096 Character reference normalization in link text (bug 1938)
15098 [[Main Page|this&that]]
15100 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15107 Test for unicode normalization
15109 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15113 (bug 19451) Links should refer to the normalized form.
15121 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15122 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15123 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15124 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15125 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15130 Empty attribute crash test (bug 2067)
15132 <font color="">foo</font>
15134 <p><font color="">foo</font>
15139 Empty attribute crash test single-quotes (bug 2067)
15141 <font color=''>foo</font>
15143 <p><font color="">foo</font>
15148 Attribute test: equals, then nothing
15150 <font color=>foo</font>
15152 <p><font>foo</font>
15157 Attribute test: unquoted value
15159 <font color=x>foo</font>
15161 <p><font color="x">foo</font>
15166 Attribute test: unquoted but illegal value (hash)
15168 <font color=#x>foo</font>
15170 <p><font color="#x">foo</font>
15175 Attribute test: no value
15177 <font color>foo</font>
15179 <p><font color="color">foo</font>
15184 Bug 2095: link with three closing brackets
15188 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15191 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15195 Bug 2095: link with pipe and three closing brackets
15197 [[Main Page|link]]]
15199 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15202 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15206 Bug 2095: link with pipe and three closing brackets, version 2
15208 [[Main Page|[http://example.com/]]]
15210 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15213 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15222 Template:Dangerous attribute
15224 " onmouseover="alert(document.cookie)
15228 Template:Dangerous style attribute
15230 border-size: expression(alert(document.cookie))
15236 <div style="float: right; {{{1}}}">Magic div</div>
15240 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15242 <div title="{{test}}"></div>
15244 <div title="This is a test template"></div>
15248 # Parsoid has enough context to handle this case
15250 Bug 2304: HTML attribute safety (dangerous template; 2309)
15252 <div title="{{dangerous attribute}}"></div>
15254 <div title=""></div>
15257 <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>
15261 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15263 <div style="{{dangerous style attribute}}"></div>
15265 <div style="/* insecure input */"></div>
15270 Bug 2304: HTML attribute safety (safe parameter; 2309)
15272 {{div style|width: 200px}}
15274 <div style="float: right; width: 200px">Magic div</div>
15279 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15281 {{div style|width: expression(alert(document.cookie))}}
15283 <div style="/* insecure input */">Magic div</div>
15288 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15290 {{div style|"><script>alert(document.cookie)</script>}}
15292 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15297 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 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 (link)
15308 <div title="[[Main Page]]"></div>
15310 <div title="[[Main Page]]"></div>
15315 Bug 2304: HTML attribute safety (italics)
15317 <div title="''foobar''"></div>
15319 <div title="''foobar''"></div>
15324 Bug 2304: HTML attribute safety (bold)
15326 <div title="'''foobar'''"></div>
15328 <div title="'''foobar'''"></div>
15334 Bug 2304: HTML attribute safety (ISBN)
15336 <div title="ISBN 1234567890"></div>
15338 <div title="ISBN 1234567890"></div>
15343 Bug 2304: HTML attribute safety (RFC)
15345 <div title="RFC 1234"></div>
15347 <div title="RFC 1234"></div>
15352 Bug 2304: HTML attribute safety (PMID)
15354 <div title="PMID 1234567890"></div>
15356 <div title="PMID 1234567890"></div>
15361 Bug 2304: HTML attribute safety (web link)
15363 <div title="http://example.com/"></div>
15365 <div title="http://example.com/"></div>
15370 Bug 2304: HTML attribute safety (named web link)
15372 <div title="[http://example.com/ link]"></div>
15374 <div title="[http://example.com/ link]"></div>
15379 Bug 3244: HTML attribute safety (extension; safe)
15381 <div style="<nowiki>background:blue</nowiki>"></div>
15383 <div style="background:blue"></div>
15388 Bug 3244: HTML attribute safety (extension; unsafe)
15390 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15392 <div style="/* insecure input */"></div>
15396 # More MSIE fun discovered by Tom Gilder
15399 MSIE CSS safety test: spurious slash
15401 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15403 <div style="/* insecure input */">evil</div>
15408 MSIE CSS safety test: hex code
15410 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15412 <div style="/* insecure input */">evil</div>
15417 MSIE CSS safety test: comment in url
15419 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15421 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15426 MSIE CSS safety test: comment in expression
15428 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15430 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15435 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15437 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15439 <p style="/* invalid control char */">A</p>
15444 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15446 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15447 <div style="top:EXPRESSION(alert())">B</div>
15449 <p style="/* insecure input */">A</p>
15450 <div style="/* insecure input */">B</div>
15455 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15457 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15458 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15460 <div style="/* insecure input */">A</div>
15461 <p style="/* insecure input */">B</p>
15466 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15468 <div style="background-image:url⁽javascript:alert())">A</div>
15469 <div style="background-image:url₍javascript:alert())">B</div>
15470 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15472 <div style="/* insecure input */">A</div>
15473 <div style="/* insecure input */">B</div>
15474 <p style="/* insecure input */">C</p>
15482 title="data:text/html,<img src=1 onerror=alert(1)>"
15483 style="-o-link:attr(title);-o-link-source:current">X</div>
15485 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15490 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15492 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15493 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15494 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15495 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15496 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15497 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15498 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15500 <p style="/* insecure input */">A</p>
15501 <p style="/* insecure input */">B</p>
15502 <p style="/* insecure input */">C</p>
15503 <p style="/* insecure input */">D</p>
15504 <p style="/* insecure input */">E</p>
15505 <p style="/* insecure input */">F</p>
15506 <p style="/* insecure input */">G</p>
15511 Table attribute legitimate extension
15514 !+ style="<nowiki>color:blue</nowiki>"| status
15519 <th style="color:blue"> status
15525 Table attribute safety
15528 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15533 <th style="/* insecure input */"> status
15539 CSS line continuation 1
15541 <div style="background-image: u\ rl(test.jpg);"></div>
15543 <div style="/* insecure input */"></div>
15548 CSS line continuation 2
15550 <div style="background-image: u\ rl(test.jpg); "></div>
15552 <div style="/* insecure input */"></div>
15563 Expansion of multi-line templates in attribute values (bug 6255)
15565 <div style="background: {{identity|#00FF00}}">-</div>
15567 <div style="background: #00FF00">-</div>
15573 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15575 <div style="background:
15578 <div style="background: #00FF00">-</div>
15581 <div style="background:
15586 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15588 <div style="background: #00FF00">-</div>
15590 <div style="background: #00FF00">-</div>
15595 evil <math>-wiki-tags without Extension:Math enabled
15597 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15599 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15603 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15606 Parser hook: empty input
15619 Parser hook: empty input using terminated empty elements
15632 Parser hook: empty input using terminated empty elements (space before)
15645 Parser hook: basic input
15659 Parser hook: case insensitive
15673 Parser hook: case insensitive, redux
15686 Parser hook: nested tags
15690 <tag><tag></tag></tag>
15701 Parser hook: basic arguments
15703 <tag width=200 height = "100" depth = '50' square></tag>
15711 'square' => 'square',
15718 Parser hook: argument containing a forward slash (bug 5344)
15720 <tag filename='/tmp/bla'></tag>
15725 'filename' => '/tmp/bla',
15732 Parser hook: empty input using terminated empty elements (bug 2374)
15745 # </tag> should be output literally since there is no matching tag that begins it
15747 Parser hook: basic arguments using terminated empty elements (bug 2374)
15749 <tag width=200 height = "100" depth = '50' square/>
15759 'square' => 'square',
15768 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
15772 Parser hook: static parser hook not inside a comment
15774 <statictag>hello, world</statictag>
15775 <statictag action=flush/>
15783 Parser hook: static parser hook inside a comment
15785 <!-- <statictag>hello, world</statictag> -->
15786 <statictag action=flush/>
15792 # Nested template calls; this case was broken by Parser.php rev 1.506,
15796 Template:One-parameter
15798 (My parameter is: {{{1}}})
15802 Template:Map-one-parameter
15804 {{{{{1}}}|{{{2}}}}}
15808 Nested template calls
15810 {{Map-one-parameter|One-parameter|param}}
15812 <p>(My parameter is: param)
15821 # HTML+Tidy effectively strips out the empty tags completely
15822 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
15823 # which Tidy would have done for the PHP parser had there been content inside it.
15825 Sanitizer: Closing of open tags
15827 <s></s><table></table>
15829 <s></s><table></table>
15832 <p><s></s></p><table></table>
15836 Sanitizer: Closing of open but not closed tags
15845 Sanitizer: Closing of closed but not open tags
15854 Sanitizer: Closing of closed but not open table tags
15856 Table not started</td></tr></table>
15858 <p>Table not started</td></tr></table>
15863 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
15865 <span id="æ: v">byte</span>[[#æ: v|backlink]]
15867 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15871 # In HTML5, the restrictions are that id must contain at least one character,
15872 # and must not contain any space characters.
15874 Sanitizer: Validating the contents of the id attribute (bug 4515)
15878 <br id="" /><br id="a space" />
15883 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
15885 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
15889 <br id="foo" /><br id="foo" />
15891 Something need to be done. foo-2 ?
15895 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
15898 <meta itemprop="hello" content="world">
15899 <meta http-equiv="refresh" content="5">
15900 <meta itemprop="hello" http-equiv="refresh" content="5">
15901 <link itemprop="hello" href="{{SERVER}}">
15902 <link rel="stylesheet" href="{{SERVER}}">
15903 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
15906 <div itemscope="itemscope">
15907 <p> <meta itemprop="hello" content="world" />
15908 <meta http-equiv="refresh" content="5">
15909 <meta itemprop="hello" content="5" />
15911 <link itemprop="hello" href="http://example.org" />
15912 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
15913 <link itemprop="hello" href="http://example.org" />
15919 Language converter: output gets cut off unexpectedly (bug 5757)
15923 this bit is safe: }-
15925 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
15927 then we get cut off here: }-
15929 all additional text is vanished
15931 <p>this bit is safe: }-
15932 </p><p>but if we add a conversion instance: xxx
15933 </p><p>then we get cut off here: }-
15934 </p><p>all additional text is vanished
15939 Self closed html pairs (bug 5487)
15942 <center><font id="bug" />Centered text</center>
15943 <div><font id="bug2" />In div text</div>
15945 <center><font id="bug" />Centered text</center>
15946 <div><font id="bug2" />In div text</div>
15955 Punctuation: nbsp before exclamation
15959 <p>C'est grave !
15964 Punctuation: CSS !important (bug 11874)
15966 <div style="width:50% !important">important</div>
15968 <div style="width:50% !important">important</div>
15973 Punctuation: CSS ! important (bug 11874; with space after)
15975 <div style="width:50% ! important">important</div>
15977 <div style="width:50% ! important">important</div>
15982 HTML bullet list, closed tags (bug 5497)
15995 <ul data-parsoid='{"stx":"html"}'>
15996 <li data-parsoid='{"stx":"html"}'>One</li>
15997 <li data-parsoid='{"stx":"html"}'>Two</li>
16003 HTML bullet list, unclosed tags (bug 5497)
16015 <ul data-parsoid='{"stx":"html"}'>
16016 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16017 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16023 HTML ordered list, closed tags (bug 5497)
16036 <ol data-parsoid='{"stx":"html"}'>
16037 <li data-parsoid='{"stx":"html"}'>One</li>
16038 <li data-parsoid='{"stx":"html"}'>Two</li>
16044 HTML ordered list, unclosed tags (bug 5497)
16057 <ol data-parsoid='{"stx":"html"}'>
16058 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16059 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16065 HTML nested bullet list, closed tags (bug 5497)
16090 HTML nested bullet list, open tags (bug 5497)
16127 HTML nested ordered list, closed tags (bug 5497)
16152 HTML nested ordered list, open tags (bug 5497)
16189 HTML ordered list item with parameters oddity
16191 <ol><li id="fragment">One</li>
16194 <ol><li id="fragment">One</li>
16199 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16201 bug 5918: autonumbering
16203 [http://first/] [http://second] [ftp://ftp]
16207 [mailto:enclosed@mail.tld With target]
16209 [mailto:enclosed@mail.tld]
16211 mailto:inline@mail.tld
16213 <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>
16214 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16215 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16216 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16217 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16220 <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>
16221 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16222 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16223 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16224 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16229 # Security and HTML correctness
16230 # From Nick Jenkins' fuzz testing
16234 Fuzz testing: Parser13
16249 Fuzz testing: Parser14
16254 <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>
16255 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16257 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
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>
16265 <div id="toc" class="toc">
16266 <div id="toctitle">
16270 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16277 Fuzz testing: Parser14-table
16282 <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>
16283 <table style="__TOC__">
16288 <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>
16289 <table style="__TOC__">
16296 # Known to produce bogus xml (extra </td>)
16298 Fuzz testing: Parser16
16327 Fuzz testing: Parser21
16330 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16335 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16345 Fuzz testing: Parser22
16347 http://===r:::https://b
16351 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16359 # Known to produce bad XML for now
16361 Fuzz testing: Parser24
16368 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16369 <br style="onmouseover='alert(document.cookie);' " />
16371 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16376 <u class="|">}}}} >
16377 <br style="onmouseover='alert(document.cookie);'" />
16379 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16388 # Note: the current result listed for this is not what the original one was,
16389 # but the original bug was JavaScript injection, which is fixed in any case.
16390 # It's not clear that the original result listed was any more correct than the
16391 # current one. Original result:
16394 # <li class="||">
16395 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16397 Fuzz testing: Parser25 (bug 6055)
16403 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16405 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16410 Fuzz testing: URL adjacent extension (with space, clean)
16412 http://example.com <nowiki>junk</nowiki>
16414 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16417 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16421 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16423 http://example.com<nowiki>junk</nowiki>
16425 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16428 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16432 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16434 http://example.com<pre>junk</pre>
16436 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16439 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16444 <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>
16448 Fuzz testing: image with bogus manual thumbnail
16450 [[Image:foobar.jpg|thumbnail= ]]
16452 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16455 <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>
16459 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16461 <pre dir=" "></pre>
16463 <pre dir=" "></pre>
16468 Parsing optional HTML elements (Bug 6171)
16473 <td> Some tabular data</td>
16474 <td> More tabular data ...
16475 <td> And yet som tabular data</td>
16481 <td> Some tabular data</td>
16482 <td> More tabular data ...
16483 </td><td> And yet som tabular data</td>
16490 Correct handling of <td>, <tr> (Bug 6171)
16495 <td> Some tabular data</td>
16496 <td> More tabular data ...</td>
16497 <td> And yet som tabular data</td>
16503 <td> Some tabular data</td>
16504 <td> More tabular data ...</td>
16505 <td> And yet som tabular data</td>
16513 Parsing crashing regression (fr:JavaScript)
16517 <p></body></x>
16522 Inline wiki vs wiki block nesting
16528 <p><b>Bold paragraph</b>
16529 </p><p>New wiki paragraph
16533 # FIXME: The current php output is documented
16534 # and desired output is the parsoid target.
16536 Inline HTML vs wiki block nesting
16542 <p><b>Bold paragraph
16543 </p><p>New wiki paragraph</b>
16546 <p><b>Bold paragraph</b>
16547 </p><p>New wiki paragraph
16551 # Original result was this:
16552 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16554 # While that might be marginally more intuitive, maybe, the six-apostrophe
16555 # construct is clearly pathological and the result stated here (which is what
16556 # the parser actually does) is about as reasonable as anything.
16558 Mixing markup for italics and bold
16561 '''bold''''''bold''bolditalics'''''
16563 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16571 Article for special page transclusion test
16575 Special page transclusion
16578 {{Special:Prefixindex/Xyzzyx}}
16580 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16585 Special page transclusion twice (bug 5021)
16588 {{Special:Prefixindex/Xyzzyx}}
16589 {{Special:Prefixindex/Xyzzyx}}
16591 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16592 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16597 Transclusion of default MediaWiki message
16599 {{MediaWiki:Mainpage}}
16606 Transclusion of nonexistent MediaWiki message
16608 {{MediaWiki:Mainpagexxx}}
16610 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16615 Transclusion of MediaWiki message with underscore
16617 {{MediaWiki:history_short}}
16624 Transclusion of MediaWiki message with space
16626 {{MediaWiki:history short}}
16633 Invalid header with following text
16643 Section extraction test (section 0)
16663 Section extraction test (section 1)
16685 Section extraction test (section 2)
16706 Section extraction test (section 3)
16726 Section extraction test (section 4)
16750 Section extraction test (section 5)
16770 Section extraction test (section 6)
16791 Section extraction test (section 7)
16811 Section extraction test (section 8)
16831 Section extraction test (section 9)
16852 Section extraction test (section 10)
16872 Section extraction test (nonexistent section 11)
16891 Section extraction test with bogus heading (section 1)
16896 ==bogus== not a legal section
16900 ==bogus== not a legal section
16904 Section extraction test with bogus heading (section 2)
16909 ==bogus== not a legal section
16916 Section extraction test with comment after heading (section 1)
16928 Section extraction test with comment after heading (section 2)
16940 Section extraction test with bogus <nowiki> heading (section 1)
16945 ==bogus== <nowiki>not a legal section</nowiki>
16949 ==bogus== <nowiki>not a legal section</nowiki>
16953 Section extraction test with bogus <nowiki> heading (section 2)
16958 ==bogus== <nowiki>not a legal section</nowiki>
16965 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16966 # instead of respecting commented sections
16968 Section extraction prefixed by comment (section 1)
16979 Section extraction prefixed by comment (section 2)
16990 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
16991 # instead of respecting HTML-style headings
16993 Section extraction, mixed wiki and html (section 1)
17009 Section extraction, mixed wiki and html (section 2)
17025 # Formerly testing for bug 3342
17027 Section extraction, heading surrounded by <noinclude>
17031 <noinclude>==unmarked==</noinclude>
17037 # Test behavior of bug 19910
17039 Sectiion with all-equals
17044 The line above must have a trailing space
17047 But just in case it doesn't...
17051 But just in case it doesn't...
17055 Section replacement test (section 0)
17086 Section replacement test (section 1)
17115 Section replacement test (section 2)
17145 Section replacement test (section 3)
17176 Section replacement test (section 4)
17203 Section replacement test (section 5)
17234 Section replacement test (section 6)
17264 Section replacement test (section 7)
17295 Section replacement test (section 8)
17326 Section replacement test (section 9)
17355 Section replacement test (section 10)
17385 Section replacement test with initial whitespace (bug 13728)
17389 Preformatted initial line
17393 Preformatted initial line
17400 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17412 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17425 Section extraction, <pre> around bogus header (bug 10309)
17442 Section replacement, <pre> around bogus header (bug 10309)
17444 noxml replace=2,"xxx"
17465 Handling of 
 in URLs
17469 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17472 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17474 a</a></li></ul></li></ul>
17478 Handling of %0A in URLs
17482 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17485 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17489 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17491 5 quotes, code coverage +1 line
17498 <p><b><i></i></b></p>
17501 # same html as previous, but wikitext adjusted to match parsoid html2wt
17502 # note that wt2html and html2html will put the <i> before the <b>
17504 5 quotes, code coverage +1 line w/ nowiki (1)
17506 parsoid=wt2wt,html2wt
17508 '''''<nowiki/>'''''
17513 <p><b><i></i></b></p>
17516 # same as previous, just swapping the <i> and <b>
17518 5 quotes, code coverage +1 line w/ nowiki (2)
17520 '''''<nowiki/>'''''
17525 <p><i><b></b></i></p>
17529 Special:Search page linking.
17533 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17538 {{!}} is a magic word
17540 {{!}} is a magic word there and {{!}} is still a magic word here
17542 <p>| is a magic word there and | is still a magic word here
17545 <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>
17551 title=[[Parser test]]
17556 * {{FULLPAGENAMEE}}
17558 * {{BASEPAGENAMEE}}
17562 * {{ROOTPAGENAMEE}}
17564 * {{TALKPAGENAMEE}}
17565 * {{SUBJECTPAGENAME}}
17566 * {{SUBJECTPAGENAMEE}}
17569 * {{NAMESPACENUMBER}}
17573 * {{SUBJECTSPACEE}}
17574 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17576 <ul><li> Parser test</li>
17577 <li> Parser_test</li>
17578 <li> Parser test</li>
17579 <li> Parser_test</li>
17580 <li> Parser test</li>
17581 <li> Parser_test</li>
17582 <li> Parser test</li>
17583 <li> Parser_test</li>
17584 <li> Parser test</li>
17585 <li> Parser_test</li>
17586 <li> Talk:Parser test</li>
17587 <li> Talk:Parser_test</li>
17588 <li> Parser test</li>
17589 <li> Parser_test</li>
17597 <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>
17600 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17610 image4 |300px| centre
17611 image5.svg| http://///////
17616 <ul class="gallery mw-gallery-traditional">
17617 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17618 <div class="thumb" style="height: 150px;">Image1.png</div>
17619 <div class="gallerytext">
17622 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17623 <div class="thumb" style="height: 150px;">Image2.gif</div>
17624 <div class="gallerytext">
17629 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17630 <div class="thumb" style="height: 150px;">Image3</div>
17631 <div class="gallerytext">
17634 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17635 <div class="thumb" style="height: 150px;">Image4</div>
17636 <div class="gallerytext">
17641 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17642 <div class="thumb" style="height: 150px;">Image5.svg</div>
17643 <div class="gallerytext">
17644 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17648 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17649 <div class="thumb" style="height: 150px;">* image6</div>
17650 <div class="gallerytext">
17658 Gallery (with options)
17660 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17661 File:Nonexistent.jpg|caption
17662 File:Nonexistent.jpg
17663 image:foobar.jpg|some '''caption''' [[Main Page]]
17665 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17668 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17669 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17670 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17671 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17672 <div class="gallerytext">
17677 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17678 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17679 <div class="gallerytext">
17682 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17683 <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>
17684 <div class="gallerytext">
17685 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17689 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17690 <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>
17691 <div class="gallerytext">
17694 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17695 <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>
17696 <div class="gallerytext">
17706 Gallery with link that has fragment
17709 image:foobar.jpg|link=Main_Page
17710 image:foobar.jpg|link=Main_Page#section
17711 image:foobar.jpg|link=Main Page#section|caption
17714 <ul class="gallery mw-gallery-traditional">
17715 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17716 <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>
17717 <div class="gallerytext">
17720 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17721 <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>
17722 <div class="gallerytext">
17725 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17726 <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>
17727 <div class="gallerytext">
17737 Gallery with wikitext inside caption
17740 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
17741 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
17744 <ul class="gallery mw-gallery-traditional">
17745 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17746 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
17747 <div class="gallerytext">
17748 <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>
17752 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17753 <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>
17754 <div class="gallerytext">
17755 <p>This is a test template
17764 gallery (with showfilename option)
17766 <gallery showfilename>
17767 File:Nonexistent.jpg|caption
17768 File:Nonexistent.jpg
17769 image:foobar.jpg|some '''caption''' [[Main Page]]
17773 <ul class="gallery mw-gallery-traditional">
17774 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17775 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17776 <div class="gallerytext">
17777 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17782 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17783 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17784 <div class="gallerytext">
17785 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17789 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17790 <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>
17791 <div class="gallerytext">
17792 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17793 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17797 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17798 <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>
17799 <div class="gallerytext">
17800 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17809 Gallery (with namespace-less filenames)
17812 File:Nonexistent.jpg
17818 <ul class="gallery mw-gallery-traditional">
17819 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17820 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17821 <div class="gallerytext">
17824 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17825 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17826 <div class="gallerytext">
17829 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17830 <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>
17831 <div class="gallerytext">
17834 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17835 <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>
17836 <div class="gallerytext">
17844 HTML Hex character encoding (spells the word "JavaScript")
17846 parsoid=wt2html,wt2wt,html2html
17848 JavaScript
17850 <p>JavaScript
17855 <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>
17859 HTML Hex character encoding bogus encoding (bug 26437 regression check)
17863 <p>&#xsee;&#XSEE;
17866 <p>&#xsee;&#XSEE;</p>
17870 HTML Hex character encoding mixed case
17872 parsoid=wt2html,wt2wt,html2html
17881 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
17885 __FORCETOC__ override
17897 ISBN 978-0-1234-56 789
17899 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
17902 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
17904 <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>
17908 ISBN followed by 5 spaces
17919 ISBN ISBN 1234567890
17921 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17924 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17934 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17935 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17936 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17939 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17940 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17941 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17945 ISBN with empty prefix (parsoid test)
17949 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17952 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17956 Bug 22905: <abbr> followed by ISBN followed by </a>
17958 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17960 <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>
17963 <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>
17971 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17976 Double RFC with a wiki link
17980 <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>
17989 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
17992 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
17996 Centre-aligned image
17998 [[Image:foobar.jpg|centre]]
18000 <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>
18007 [[Image:foobar.jpg|none]]
18009 <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>
18014 Width + Height sized image (using px) (height is ignored)
18016 [[Image:foobar.jpg|640x480px]]
18018 <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>
18023 Width-sized image (using px, no following whitespace)
18025 [[Image:foobar.jpg|640px]]
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, with following whitespace - test regression from r39467)
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 preceding 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 Image with page parameter
18054 [[File:LoremIpsum.djvu|page=2]]
18056 <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>
18059 <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>
18063 Another italics / bold test
18071 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18077 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18080 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18085 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18087 Images with the "|" character in the comment
18089 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18091 <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>
18094 <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>
18098 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18100 <html><script>alert(1);</script></html>
18102 <p><html><script>alert(1);</script></html>
18107 HTML with raw HTML ($wgRawHtml==true)
18111 <html><script>alert(1);</script></html>
18113 <p><script>alert(1);</script>
18118 Parents of subpages, one level up
18120 subpage title=[[Subpage test/L1/L2/L3]]
18124 <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>
18130 Parents of subpages, one level up, not named
18132 subpage title=[[Subpage test/L1/L2/L3]]
18136 <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>
18143 Parents of subpages, two levels up
18145 subpage title=[[Subpage test/L1/L2/L3]]
18151 <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
18152 </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>
18157 Parents of subpages, two levels up, without trailing slash or name.
18159 subpage title=[[Subpage test/L1/L2/L3]]
18168 Parents of subpages, two levels up, with lots of extra trailing slashes.
18170 subpage title=[[Subpage test/L1/L2/L3]]
18174 <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>
18179 Subpage test/L1/L2/L3Sibling
18185 Transclusion of a sibling page (one level up)
18187 subpage title=[[Subpage test/L1/L2/L3]]
18196 Transclusion of a child page
18198 subpage title=[[Subpage test/L1/L2]]
18207 Non-transclusion because of too many up levels
18209 subpage title=[[Subpage test/L1/L2/L3]]
18211 {{../../../../More than parent}}
18213 <p>{{../../../../More than parent}}
18218 Definition list code coverage
18224 <dl><dt> title  </dt>
18226 <dt> title </dt>
18232 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18233 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18234 <dt>title</dt><dd> def</dd></dl>
18238 Don't fall for the self-closing div
18240 <div>hello world</div/>
18242 <div>hello world</div>
18251 <p>[[:Template:Msg]]
18260 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18264 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18266 Always escape literal '>' in output, not just after '<'
18280 <p>This is a test template
18281 This is a test template
18293 Inclusion of !userCanEdit() content
18297 <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>
18303 Out-of-order TOC heading levels
18312 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18314 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18316 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18317 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18320 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18322 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18323 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18329 <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>
18330 <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>
18331 <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>
18332 <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>
18333 <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>
18334 <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>
18340 ISBN with a dummy number
18350 ISBN with space-delimited number
18354 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18360 ISBN with multiple spaces, no number
18379 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18380 </p><p>ISBN 12345678901
18386 ISBN with trailing year (bug 8110)
18388 ISBN 1-234-56789-0 - 2006
18390 ISBN 1 234 56789 0 - 2006
18392 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18393 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18401 {{anchorencode:foo bar©#%n}}
18403 <p>foo_bar.C2.A9.23.25n
18408 anchorencode trims spaces
18410 {{anchorencode: __pretty__please__}}
18417 anchorencode deals with links
18419 {{anchorencode: [[hello|world]] [[hi]]}}
18426 anchorencode deals with templates
18428 {{anchorencode: {{Foo}} }}
18435 anchorencode encodes like the TOC generator: (bug 18431)
18437 === _ +:.3A%3A&&]] ===
18438 {{anchorencode: _ +:.3A%3A&&]] }}
18441 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18442 <p>.2B:.3A.253A.26.26.5D.5D
18447 Bug 6200: blockquotes and paragraph formatting
18468 Bug 8293: Use of center tag ruins paragraph formatting
18489 Parsing of overlapping (improperly nested) inline html tags
18491 <span><s>x</span></s>
18493 <p><span><s>x</span></s></span>
18496 <p><span><s>x</s></span>
18501 ### Language variants related tests
18504 Self-link in language variants
18506 title=[[Dunav]] language=sr
18508 Both [[Dunav]] and [[Дунав]] are names for this river.
18510 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18521 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
18523 title=[[Duna]] language=sr
18525 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
18527 <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.
18532 Link to a section of a variant of this title shouldn't be parsed as self-link
18534 title=[[Duna]] language=sr
18536 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
18538 <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.
18543 Link to pages in language variants
18547 Main Page can be written as [[Маин Паге]]
18549 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18555 Multiple links to pages in language variants
18559 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18561 <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>.
18567 Simple template in language variants
18573 <p>This is a test template
18579 Template with explicit namespace in language variants
18585 <p>This is a test template
18591 Basic test for template parameter in language variants
18595 {{парамтест|param=foo}}
18597 <p>This is a test template with parameter foo
18603 Simple category in language variants
18607 [[Category:МедиаWики Усер'с Гуиде]]
18609 <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>
18626 Don't convert blue categorylinks to another variant (bug 33210)
18630 [[A]][[Category:分类]]
18632 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18637 Stripping -{}- tags (language variants)
18641 Latin proverb: -{Ne nuntium necare}-
18643 <p>Latin proverb: Ne nuntium necare
18649 Prevent conversion with -{}- tags (language variants)
18651 language=sr variant=sr-ec
18653 Latinski: -{Ne nuntium necare}-
18655 <p>Латински: Ne nuntium necare
18661 Prevent conversion of text with -{}- tags (language variants)
18663 language=sr variant=sr-ec
18665 Latinski: -{Ne nuntium necare}-
18667 <p>Латински: Ne nuntium necare
18673 Prevent conversion of links with -{}- tags (language variants)
18675 language=sr variant=sr-ec
18679 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18685 -{}- tags within headlines (within html for parserConvert())
18687 language=sr variant=sr-ec
18691 <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>
18697 Explicit definition of language variant alternatives
18699 language=zh variant=zh-tw
18701 -{zh:China;zh-tw:Taiwan}-, not China
18703 <p>Taiwan, not China
18709 Conversion around HTML tags
18711 language=sr variant=sr-ec
18713 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
18714 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
18717 <span title="ЛаCтин">ски</span>
18723 Explicit session-wise language variant mapping (A flag and - flag)
18725 language=zh variant=zh-tw
18727 Taiwan is not China.
18728 But -{A|zh:China;zh-tw:Taiwan}- is China,
18729 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
18730 and -{China}- is China.
18732 <p>Taiwan is not China.
18733 But Taiwan is Taiwan,
18734 (This should be stripped!)
18735 and China is China.
18740 Explicit session-wise language variant mapping (H flag for hide)
18742 language=zh variant=zh-tw
18744 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
18747 <p>(This should be stripped!)
18753 Adding explicit conversion rule for title (T flag)
18755 language=zh variant=zh-tw showtitle
18757 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18760 <p>Should be stripped!
18765 Testing that changing the language variant here in the tests actually works
18767 language=zh variant=zh showtitle
18769 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18772 <p>Should be stripped!
18777 Recursive conversion of alt and title attrs shouldn't clear converter state
18779 language=zh variant=zh-cn showtitle
18781 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
18782 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
18786 Should be stripped<span title="Exclamation">!</span>
18791 Bug 24072: more test on conversion rule for title
18793 language=zh variant=zh-tw showtitle
18795 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18796 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
18799 <p>This should be stripped!
18800 This won't take interferes with the title rule.
18805 Partly disable title conversion if variant == main language code
18807 language=zh variant=zh title=[[ZH]] showtitle
18809 -{T|zh-cn:CN;zh-tw:TW}-
18817 Partly disable title conversion if variant == main language code, more
18819 language=zh variant=zh title=[[ZH]] showtitle
18829 Raw output of variant escape tags (R flag)
18831 language=zh variant=zh-tw
18833 Raw: -{R|zh:China;zh-tw:Taiwan}-
18835 <p>Raw: zh:China;zh-tw:Taiwan
18840 Strings evaluating false shouldn't be ignored by Language converter (T51072)
18842 language=zh variant=zh-cn
18844 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
18851 Conversion rules from [numeric-only string] to [something else] (T48634)
18853 language=zh variant=zh-cn
18855 -{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
18862 Bidirectional converter rule entries with an empty value should be ignored (T53551)
18864 language=zh variant=zh-cn
18866 -{H|zh-cn:foo;zh-tw:;}-foobar
18873 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
18875 language=zh variant=zh-cn
18877 -{H|=>zh-cn:foo;}-foobar
18884 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
18886 language=zh variant=zh-cn
18895 Nested using of manual convert syntax
18897 language=zh variant=zh-hk
18899 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
18901 <p>Nested: Hello Hong Kong!
18906 Proper conversion of text in external links
18908 language=sr variant=sr-ec
18910 http://www.google.com
18911 gopher://www.google.com
18912 [http://www.google.com http://www.google.com]
18913 [gopher://www.google.com gopher://www.google.com]
18914 [https://www.google.com irc://www.google.com]
18915 [ftp://www.google.com www.google.com/ftp://dir]
18916 [//www.google.com www.google.com]
18918 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18919 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18920 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18921 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18922 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
18923 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
18924 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
18929 Do not convert roman numbers to language variants
18931 language=sr variant=sr-ec
18935 <p>Фридрих IV је цар.
18940 Unclosed language converter markup "-{"
18951 Don't convert raw rule "-{R|=>}-" to "=>"
18962 Don't break link parsing if language converter markup is in the caption.
18964 language=sr variant=sr-ec
18966 [[Main Page|-{R|main page}-]]
18968 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
18972 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18974 Don't break image parsing if language converter markup is in the caption.
18978 [[File:Foobar.jpg|-{R|caption}-]]
18980 <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>
18984 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18986 Don't break list handling if language converter markup is in the item.
18988 language=zh variant=zh-cn
18990 ;-{zh-cn:AAA;zh-tw:BBB}-
18992 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
18999 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19001 Don't break table handling if language converter markup is in the cell.
19003 language=sr variant=sr-ec
19026 Bug 529: Uncovered bullet
19035 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19036 # Templates in Wikipedia rely on this behavior, as tidy has always been
19037 # enabled there. These tests are normally run *without* tidy, so specify the
19038 # full output here.
19039 # To test realistic parsing behavior, apply a tidy-like transformation to both
19040 # the expected output and your parser's output.
19042 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19044 ******* Foo {{bullet}}
19046 <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>
19052 Bug 529: Uncovered table already at line-start
19075 Bug 529: Uncovered bullet in parser function result
19077 * Foo {{lc:{{bullet}} }}
19085 Bug 5678: Double-parsed template argument
19087 {{lc:{{{1}}}|hello}}
19094 Bug 5678: Double-parsed template invocation
19096 {{lc:{{paramtest {{!}} param = hello }} }}
19098 <p>{{paramtest | param = hello }}
19103 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19106 title=[[Main Page]]
19108 {{PRVNÍVELKÉ:ěščř}}
19109 {{prvnívelké:ěščř}}
19129 Morwen/13: Unclosed link followed by heading
19136 <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>
19141 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19148 <h1><span class="mw-headline" id="heading">heading</span></h1>
19153 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19160 <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>
19175 Paragraphs inside divs (no extra line breaks)
19187 Paragraphs inside divs (extra line break on open)
19202 Paragraphs inside divs (extra line break on close)
19217 Paragraphs inside divs (extra line break on open and close)
19234 Nesting tags, paragraphs on lines which begin with <div>
19236 <div></div><strong>A
19239 <p><strong>A</strong></p>
19240 <p><strong>B</strong></p>
19248 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19250 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19252 <blockquote>Line one
19254 Line two</blockquote>
19256 <blockquote>Line one
19257 Line two</blockquote>
19261 <p>Line one Line two</p>
19266 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19271 Line two</blockquote>
19276 Line two</blockquote>
19281 Line two</blockquote>
19285 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19287 <blockquote>Line one
19292 <blockquote>Line one
19305 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19327 Paragraphs inside blockquotes/divs (no extra line breaks)
19329 <blockquote><div>Line one
19331 Line two</div></blockquote>
19333 <blockquote><div>Line one
19334 Line two</div></blockquote>
19339 Paragraphs inside blockquotes/divs (extra line break on open)
19344 Line two</div></blockquote>
19349 Line two</div></blockquote>
19354 Paragraphs inside blockquotes/divs (extra line break on close)
19356 <blockquote><div>Line one
19359 </div></blockquote>
19361 <blockquote><div>Line one
19364 </div></blockquote>
19369 Paragraphs inside blockquotes/divs (extra line break on open and close)
19375 </div></blockquote>
19381 </div></blockquote>
19386 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19388 wgLinkHolderBatchSize=0
19394 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19395 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19396 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19401 Free external link invading image caption
19403 [[Image:Foobar.jpg|thumb|http://x|hello]]
19405 <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>
19410 Bug 15196: localised external link numbers
19414 [http://en.wikipedia.org/]
19416 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19419 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19423 Multibyte character in padleft
19425 {{padleft:-Hello|7|Æ}}
19432 Multibyte character in padright
19434 {{padright:Hello-|7|Æ}}
19441 formatdate parser function
19443 {{#formatdate:2009-03-24}}
19445 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19450 formatdate parser function, with default format
19452 {{#formatdate:2009-03-24|mdy}}
19454 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19459 Spacing of numbers in formatted dates
19461 {{#formatdate:January 15}}
19463 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19468 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
19470 language=nl title=[[MediaWiki:Common.css]]
19472 {{#formatdate:2009-03-24|dmy}}
19474 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19487 Edit comment with link
19491 I like the [[Main Page]] a lot
19493 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19497 Edit comment with link and link text
19501 I like the [[Main Page|best pages]] a lot
19503 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19507 Edit comment with link and link text with suffix
19511 I like the [[Main Page|best page]]s a lot
19513 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19517 Edit comment with section link (non-local, eg in history list)
19519 comment title=[[Main Page]]
19521 /* External links */ removed bogus entries
19523 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19527 Edit comment with section link and text before it (non-local, eg in history list)
19529 comment title=[[Main Page]]
19531 pre-comment text /* External links */ removed bogus entries
19533 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>
19537 Edit comment with section link (local, eg in diff view)
19539 comment local title=[[Main Page]]
19541 /* External links */ removed bogus entries
19543 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19547 Edit comment with subpage link (bug 14080)
19551 title=[[Subpage test]]
19553 Poked at a [[/subpage]] here...
19555 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
19559 Edit comment with subpage link and link text (bug 14080)
19563 title=[[Subpage test]]
19565 Poked at a [[/subpage|neat little page]] here...
19567 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
19571 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
19574 title=[[Subpage test]]
19576 Poked at a [[/subpage]] here...
19578 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
19582 Edit comment with bare anchor link (local, as on diff)
19586 title=[[Main Page]]
19590 <a href="#section">#section</a>
19594 Edit comment with bare anchor link (non-local, as on history)
19597 title=[[Main Page]]
19601 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19605 Anchor starting with underscore
19609 <p><a href="#_ref">One</a>
19614 Id starting with underscore
19616 <div id="_ref"></div>
19618 <div id="_ref"></div>
19623 Space normalisation on autocomment (bug 22784)
19626 title=[[Main Page]]
19628 /* __hello__world__ */
19630 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19634 percent-encoding and + signs in comments (Bug 26410)
19638 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19640 <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>
19643 # Parsoid doesn't support this yet: see bug 73581
19644 # but it *should* omit the 'src' attribute if the image is bad.
19645 # PHP side of tests was disabled in
19646 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19647 # because of issues in the PHP parserTests infrastructure
19648 # (but the output below is indeed what the PHP side emits)
19650 Bad images - basic functionality
19653 !! DISABLED/html/php
19655 <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>
19659 Bad images - bug 16039: text after bad image disappears
19664 !! DISABLED/html/php
19670 <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>
19675 Verify that displaytitle works (bug #22501) no displaytitle
19679 wgAllowDisplayTitle=true
19680 wgRestrictDisplayTitle=false
19682 this is not the the title
19685 <p>this is not the the title
19690 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
19695 wgAllowDisplayTitle=true
19696 wgRestrictDisplayTitle=false
19698 this is not the the title
19699 {{DISPLAYTITLE:whatever}}
19702 <p>this is not the the title
19707 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
19712 wgAllowDisplayTitle=true
19713 wgRestrictDisplayTitle=true
19715 this is not the the title
19716 {{DISPLAYTITLE:whatever}}
19719 <p>this is not the the title
19724 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
19729 wgAllowDisplayTitle=true
19730 wgRestrictDisplayTitle=true
19732 this is not the the title
19733 {{DISPLAYTITLE:screen}}
19736 <p>this is not the the title
19741 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
19746 wgAllowDisplayTitle=false
19748 this is not the the title
19749 {{DISPLAYTITLE:screen}}
19752 <p>this is not the the title
19753 <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>
19758 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
19763 wgAllowDisplayTitle=false
19765 this is not the the title
19768 <p>this is not the the title
19773 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
19778 wgAllowDisplayTitle=true
19779 wgRestrictDisplayTitle=true
19781 this is not the the title
19782 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
19784 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
19785 <p>this is not the the title
19790 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
19795 wgAllowDisplayTitle=true
19796 wgRestrictDisplayTitle=true
19798 this is not the the title
19799 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
19801 <span style="color: red;">s</span>creen
19802 <p>this is not the the title
19807 Page status indicators: Empty name is invalid
19811 <indicator name=" "></indicator>
19812 <indicator></indicator>
19814 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19815 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19820 Page status indicators: Weird syntaxes that are okay
19824 <indicator name="empty" />
19825 <indicator name></indicator>
19834 Page status indicators: Torture test
19838 <indicator name="01">hello world</indicator>
19839 <indicator name="02">[[Main Page]]</indicator>
19840 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
19841 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
19842 <indicator name="05">* foo
19844 <indicator name="06"><nowiki>foo</nowiki></indicator>
19845 <indicator name="07"> Preformatted</indicator>
19846 <indicator name="08"><div>Broken tag</indicator>
19847 <indicator name="09">{| class=wikitable
19850 <indicator name="10">Two
19852 paragraphs</indicator>
19855 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19856 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" />
19857 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>
19858 05=<ul><li> foo</li>
19862 07=<pre>Preformatted
19864 08=<div>Broken tag</div>
19866 09=<table class="wikitable">
19883 preload: check <noinclude> and <includeonly>
19887 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
19893 preload: check <onlyinclude>
19897 Goodbye <onlyinclude>Hello world</onlyinclude>
19903 preload: can pass tags through if we want to
19907 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
19909 <includeonly>Hello world</includeonly>
19913 preload: check that it doesn't try to do tricks
19917 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19919 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19923 Play a bit with r67090 and bug 3158
19925 <div style="width:50% !important"> </div>
19926 <div style="width:50% !important"> </div>
19927 <div style="width:50% !important"> </div>
19928 <div style="border : solid;"> </div>
19930 <div style="width:50% !important"> </div>
19931 <div style="width:50% !important"> </div>
19932 <div style="width:50% !important"> </div>
19933 <div style="border : solid;"> </div>
19936 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19937 <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>
19938 <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>
19939 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19944 HTML5 data attributes
19946 <span data-foo="bar">Baz</span>
19947 <p data-abc-def_hij="">Quuz</p>
19949 <p><span data-foo="bar">Baz</span>
19951 <p data-abc-def_hij="">Quuz</p>
19956 percent-encoding and + signs in internal links (Bug 26410)
19958 [[User:+%]] [[Page+title%]]
19959 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
19960 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
19961 [[%33%45]] [[%33%45+]]
19963 <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>
19964 <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>
19965 <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>
19966 <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>
19969 <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>
19970 <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>
19971 <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>
19972 <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>
19976 Special characters in embedded file links (bug 27679)
19978 [[File:Contains & ampersand.jpg]]
19979 [[File:Does not exist.jpg|Title with & ampersand]]
19981 <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>
19982 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
19985 <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>
19986 <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>
19990 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
19992 Text's been normalized?
19994 <p>Text's been normalized?
19999 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20001 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20003 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20008 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20010 [http://www.example.org/ ideograms]
20012 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20017 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20019 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20021 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20045 Bug 31098 Template which includes system messages which includes the template
20049 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20050 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20055 Bug31490 Turkish: ucfirst 'blah'
20066 Bug31490 Turkish: ucfirst 'ix'
20077 Bug31490 Turkish: lcfirst 'BLAH'
20088 Bug31490 Turkish: ucfırst (with a dotless i)
20094 <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>
20099 Bug31490 ucfırst (with a dotless i) with English language
20105 <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>
20110 Bug 26375: TOC with italics
20112 title=[[Main Page]]
20115 == ''Lost'' episodes ==
20117 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20119 <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>
20123 <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>
20128 Bug 26375: TOC with bold
20130 title=[[Main Page]]
20133 == '''should be bold''' then normal text ==
20135 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20137 <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>
20141 <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>
20146 Bug 33845: Headings become cursive in TOC when they contain an image
20148 title=[[Main Page]]
20151 == Image [[Image:foobar.jpg]] ==
20153 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20155 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20159 <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>
20164 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20166 title=[[Main Page]]
20169 == <blockquote>Quote</blockquote> ==
20171 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20173 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20177 <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>
20181 <div id="toc" class="toc">
20182 <div id="toctitle">
20186 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20190 <h2><span class="mw-headline" id="Quote"></span></h2>
20192 <p><span class="mw-headline" id="Quote">Quote</span></p>
20194 <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>
20198 Unclosed tags in TOC
20200 title=[[Main Page]]
20204 <small>Hanc marginis exiguitas non caperet.</small>
20207 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20209 <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>
20213 <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>
20214 <p><small>Hanc marginis exiguitas non caperet.</small>
20220 Multiple tags in TOC
20223 == <i>Foo</i> <b>Bar</b> ==
20225 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20227 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20229 <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>
20230 <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>
20234 <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>
20235 <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>
20239 <div id="toc" class="toc">
20240 <div id="toctitle">
20244 <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>
20245 <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>
20249 <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>
20250 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20252 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20254 <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>
20258 Tags with parameters in TOC
20261 == <sup class="in-h2">Hello</sup> ==
20263 == <sup class="a > b">Evilbye</sup> ==
20265 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20267 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20268 <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>
20272 <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>
20273 <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>
20278 span tags with directionality in TOC
20281 == <span dir="ltr">C++</span> ==
20283 == <span dir="rtl">זבנג!</span> ==
20285 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20287 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20289 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20291 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20293 <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>
20294 <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>
20295 <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>
20296 <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>
20297 <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>
20301 <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>
20302 <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>
20303 <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>
20304 <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>
20305 <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>
20310 Bug 72884: bdi element in ToC
20313 == <bdi>test</bdi> ==
20315 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20317 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20321 <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>
20325 # Note that the html output does not have the <p></p>, but the
20326 # html+tidy output *does*. This is because the empty <p></p> is
20327 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20329 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20334 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20336 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20340 <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>
20344 <div id="toc" class="toc">
20345 <div id="toctitle">
20349 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20353 <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>
20359 == {{int:headline_sample}} ==
20363 Bug 32057: Title needed when expanding <h> nodes.
20365 title=[[Main Page]]
20369 <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>
20374 Strip marker in urlencode
20376 {{urlencode:x<nowiki/>y}}
20377 {{urlencode:x<nowiki/>y|wiki}}
20378 {{urlencode:x<nowiki/>y|path}}
20379 {{urlencode:x<pre id="one">two</pre>y}}
20407 Strip marker in formatNum
20409 {{formatnum:1<nowiki/>2}}
20410 {{formatnum:1<nowiki/>2|R}}
20418 Check noCommafy in formatNum
20422 {{formatnum:123456.78}}
20423 {{formatnum:123456.78|NOSEP}}
20431 Wrong option for formatNum (bug 56199)
20433 {{formatnum:1,234.56|Random}}
20434 {{formatnum:1,234.56|EVERYTHING}}
20435 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20444 Strip marker in grammar
20448 {{grammar:elative|foo<nowiki/>bar}}
20455 Strip marker in padleft
20457 {{padleft:|2|x<nowiki/>y}}
20464 Strip marker in padright
20466 {{padright:|2|x<nowiki/>y}}
20473 Strip marker in anchorencode
20475 {{anchorencode:x<nowiki/>y}}
20482 nowiki inside link inside heading (bug 18295)
20484 ==[[foo|x<nowiki>y</nowiki>z]]==
20486 <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>
20491 new support for bdi element (bug 31817)
20493 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20495 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20500 Ignore pipe between table row attributes
20504 |- id=foo | style='color: red'
20512 <tr id="foo" style="color: red">
20519 Gallery override link with WikiLink (bug 34852)
20522 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
20525 <ul class="gallery mw-gallery-traditional">
20526 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20527 <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>
20528 <div class="gallerytext">
20538 Gallery override link with absolute external link (bug 34852)
20541 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20544 <ul class="gallery mw-gallery-traditional">
20545 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20546 <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>
20547 <div class="gallerytext">
20557 Gallery override link with malicious javascript (bug 34852)
20560 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20563 <ul class="gallery mw-gallery-traditional">
20564 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20565 <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>
20566 <div class="gallerytext">
20576 Gallery with invalid title as link (bug 43964)
20579 File:foobar.jpg|link=<
20582 <ul class="gallery mw-gallery-traditional">
20583 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20584 <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>
20585 <div class="gallerytext">
20593 Language parser function
20602 Padleft and padright as substr
20604 {{padleft:|3|abcde}}
20605 {{padright:|3|abcde}}
20613 Special parser function
20615 {{#special:RandomPage}}
20616 {{#special:BaDtItLe}}
20617 {{#special:Foobar}}
20626 Bug 34939 - Case insensitive link parsing ([HttP://])
20628 [HttP://MediaWiki.Org/]
20630 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20633 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20637 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20639 [HttP://MediaWiki.Org/ MediaWiki]
20641 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20646 Bug 34939 - Case insensitive link parsing (HttP://)
20648 HttP://MediaWiki.Org/
20650 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20653 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
20671 <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>
20672 <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>
20673 <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>
20674 <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>
20675 <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>
20681 ### Parsoid-specific tests
20682 ### Parsoid-PHP parser incompatibilities
20685 1. SOL-sensitive wikitext tokens as template-args
20687 parsoid=wt2html,wt2wt
20693 <span about="#mwt1" typeof="mw:Transclusion">
20694 </span><ul about="#mwt1"><li>a</li>
20696 <span about="#mwt2" typeof="mw:Transclusion">
20697 </span><ol about="#mwt2"><li>a</li>
20699 <span about="#mwt3" typeof="mw:Transclusion">
20700 </span><dl about="#mwt3"><dd>a</dd>
20704 #### -----------------------------------------------------------------
20705 #### Parsoid-specific functionality tests
20706 #### -----------------------------------------------------------------
20708 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
20709 # We know wt2wt will fail, but we expect selser to pass.
20710 # Due to the nature of our testing, wt2wt and selser tests will enter the
20711 # blacklist and we'll catch selser regressions based on changes to the
20712 # blacklist entries for selser tests.
20714 1. Bad treebuilder fixup of formatting elt is cleaned up
20716 parsoid=wt2html,wt2wt
20721 [[Image:Foobar.jpg|right|Test]]
20728 <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>
20735 2. Bad treebuilder fixup of formatting elt is cleaned up
20737 parsoid=wt2html,wt2wt
20739 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
20741 <small>[[Image:Foobar.jpg|right|300px]]</small>
20745 <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>
20747 <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>
20750 #### ----------------------------------------------------------------
20751 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
20752 #### tags. Parsoid's output for these tags differs from that of the
20754 #### ----------------------------------------------------------------
20757 Ref: 1. ref-location should be replaced with an index span
20762 B <ref name="x">foo</ref>
20766 <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>
20767 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>
20768 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>
20769 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20770 <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>
20771 <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>
20772 <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>
20777 Ref: 2. ref-tags with identical names should all get the same index
20781 A <ref name="x">foo</ref>
20785 <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>
20786 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>
20787 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20788 <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>
20793 Ref: 3. spaces in ref-names should be ignored
20797 A <ref name="x">foo</ref>
20798 B <ref name=" x " />
20802 <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>
20803 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>
20804 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>
20805 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20806 <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>
20810 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
20812 Ref: 4. 'constructor' should be accepted as a valid ref-name
20816 A <ref name="constructor">foo</ref>
20819 <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>
20820 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20821 <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>
20826 Ref: 5. body should accept generic wikitext
20831 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
20836 <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>
20838 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20839 <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>
20845 Ref: 6. indent-pres should not be output in ref-body
20857 <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>
20859 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20860 <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
20868 Ref: 7. No p-wrapping in ref-body
20887 <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>
20889 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20890 <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
20905 Ref: 8. transclusion wikitext has lower precedence
20909 A <ref> foo {{echo|</ref> B C}}
20913 <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>
20914 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20915 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <span typeof="mw:Nowiki" data-parsoid='{"src":"{{","dsr":[12,14,0,0]}'>{{</span>echo|</span></li>
20920 Ref: 9. unclosed comments should not leak out of ref-body
20924 A <ref> foo <!--</ref> B C
20927 <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>
20928 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20929 <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>
20934 Ref: 10. Unclosed HTML tags should not leak out of ref-body
20938 A <ref> <b> foo </ref> B C
20942 <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>
20945 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20946 <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>
20951 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
20959 <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
20960 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>
20961 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20962 <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>
20963 <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>
20968 Ref: 12. ref-tags act as trailing newline migration barrier
20970 <!--the newline at the end of this line moves out of the p tag-->a
20972 b<!--the newline at the end of this line stays inside the p tag--> <ref />
20978 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
20981 <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>
20982 <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>
20985 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20986 <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>
20987 <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>
20991 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21000 <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
21001 <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>
21002 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21003 <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>
21004 <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
21010 Ref: 14. A nested ref-tag should be emitted as plain text
21014 <ref>foo <ref>bar</ref> baz</ref>
21018 <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>
21020 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21021 <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>
21026 Ref: 15. ref-tags with identical names should get identical indexes
21030 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21031 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21035 <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>
21036 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>
21038 <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>
21042 ## We don't bother wt2wt-ing non-standard whitespace
21044 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21052 <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>
21053 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21054 <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>
21058 Ref: 17. Generate valid HTML5 id/about attributes
21062 <ref name="a b">foo</ref>
21066 <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>
21069 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21070 <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>
21075 Ref: 18. T58916: Extension attributes should be parsed as plain text
21079 <ref name="{{echo|a}}">foo</ref>
21083 <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>
21086 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21087 <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>
21092 Ref: 19. ref-tags with identical name encodings should get identical indexes
21096 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21100 <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>
21102 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21103 <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>
21108 Ref: 20. ref-tags with identical names but different content should keep it
21112 A <ref name="foo">Foo one</ref>
21113 B <ref name="foo">Foo two</ref>
21114 C <ref name="foo" />
21118 <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>
21119 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>
21120 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>
21122 <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>
21127 References: 1. references tag without any refs should be handled properly
21131 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21135 References: 2. references tag with group only outputs references from that group
21137 A <ref group="a">foo</ref>
21138 B <ref group="b">bar</ref>
21141 <references group="a" />
21143 <references group="b" />
21145 <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>
21146 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>
21147 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>
21149 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21150 <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>
21152 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21153 <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>
21155 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21156 <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>
21161 References: 3. ref list should be cleared after processing references
21171 <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>
21173 <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>
21176 <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>
21178 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21179 <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>
21184 References: 4. only referenced group should be cleared after processing references
21186 A <ref group="a">afoo</ref>
21189 <references group="a" />
21195 <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>
21196 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>
21198 <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>
21201 <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>
21203 <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>
21208 References: 5. ref tags in references should be processed while ignoring all other content
21211 B <ref name="b">bar</ref>
21214 <ref name="a">foo</ref>
21215 This should just get lost.
21218 <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>
21219 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>
21222 <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>
21227 References: 6. <references /> from a transclusion
21229 <ref>Foo</ref> {{echo|<references />}}
21231 <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>
21236 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21238 A <ref>foo bar for a</ref>
21239 B <ref group="X" name="b" />
21243 <references group="X">
21244 <ref name="b">foo</ref>
21247 <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>
21248 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>
21251 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21252 <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>
21255 <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"}}'>
21256 <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>
21261 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21263 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21266 <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>
21267 <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>
21271 # This test only works in wt2html now as the <references /> are always generated
21272 # unless selser is active. Once T72722 is fixed, we should add a changes test
21273 # here to ensure that unrelated changes don't add the new <references /> in
21276 References: 9. Generate missing references list at the end
21279 B <ref group="inexistent">bar</ref>
21281 <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>
21282 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21283 <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>
21285 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21286 <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>
21291 References: 10. New <references/> shouldn't be added for unrelated edits.
21294 "modes": ["selser"],
21295 "changes": [["#x", "remove"]],
21299 Unrelated text<span id="x"> that's going to disappear</span>.
21307 Entities in ref name
21309 <ref name="test & me">hi</ref>
21312 <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>
21313 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21314 <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>
21318 # This test is wt2html only because we're permitting the serializer to produce
21319 # dirty diffs, normalizing the unclosed references to the self-closed version.
21321 Generate references for unclosed references tag
21329 <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>
21330 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21331 <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>
21335 New reference serializes on its own line
21337 parsoid=wt2wt,html2wt
21342 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21345 #### ----------------------------------------------------------------
21346 #### Parsoid-only testing of Parsoid's impl of LST
21347 #### Not implemented yet, see
21348 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21349 #### ----------------------------------------------------------------
21352 LST Sections: 1. Simple section start and end
21354 <section begin="2011-05-16" />
21355 <section end="2014-04-10 (MW 1.23wmf22)" />
21357 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21358 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21361 #--------- Test stripping of empty nodes in template content ----------
21363 Empty LI and TR nodes should be stripped from template content
21368 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21372 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21385 Empty LI and TR nodes should not be stripped from top-level content
21412 Empty TR nodes should not be stripped if they have any attributes set
21414 {{EmptyTRWithHTMLAttrTest}}
21416 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21417 <tr align="center"></tr>
21418 <tr><td>foo</td></tr>
21419 <tr align="center"></tr>
21420 <tr><td>bar</td></tr>
21424 #### ----------------------------------------------------------------
21425 #### The following section of tests are primarily to test
21426 #### wikitext escaping capabilities of Parsoid. Given that
21427 #### escaping can be done any number of ways, the wikitext (input)
21428 #### is always adjusted to reflect how Parsoid adds nowiki
21431 #### We are marking several tests as parsoid-only since the
21432 #### HTML in the result section is different from what the
21433 #### PHP parser generates for it.
21434 #### ----------------------------------------------------------------
21437 #### --------------- Headings ---------------
21439 #### 1. Nested inside html <h1>=foo=</h1>
21440 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21441 #### 3. Nested inside html with wikitext split by html tags
21442 #### 4. No escape needed
21443 #### 5. Empty headings <h1></h1>
21444 #### 6. Heading chars in SOL context
21445 #### ----------------------------------------
21447 Headings: 0. Unnested
21451 <nowiki>=foo=</nowiki>
21453 <nowiki> =foo= </nowiki>
21455 <nowiki>=foo=</nowiki>
21457 =foo''a''<nowiki>=</nowiki>
21459 <p><span typeof="mw:Nowiki">=foo=</span></p>
21461 <p><span typeof="mw:Nowiki"> =foo= </span>
21463 <span typeof="mw:Nowiki">=foo=</span></p>
21465 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
21468 # New headings and existing headings are handled differently
21470 Headings: 1. Nested inside html
21478 <h1 data-parsoid=''>=foo=</h1>
21479 <h2 data-parsoid=''>=foo=</h2>
21480 <h3 data-parsoid=''>=foo=</h3>
21481 <h4 data-parsoid=''>=foo=</h4>
21482 <h5 data-parsoid=''>=foo=</h5>
21483 <h6 data-parsoid=''>=foo=</h6>
21491 =<nowiki>=foo=</nowiki>=
21492 ==<nowiki>=foo=</nowiki>==
21493 ===<nowiki>=foo=</nowiki>===
21494 ====<nowiki>=foo=</nowiki>====
21495 =====<nowiki>=foo=</nowiki>=====
21496 ======<nowiki>=foo=</nowiki>======
21501 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
21510 <nowiki>*</nowiki>bar
21516 <nowiki>=bar=</nowiki>
21520 Headings: 3. Nested inside html with wikitext split by html tags
21522 parsoid=html2wt,wt2wt
21524 = ='''bold'''<nowiki>foo=</nowiki> =
21526 <h1>=<b>bold</b>foo=</h1>
21530 Headings: 4a. No escaping needed (testing just h1 and h2)
21555 <h1><i>=</i>foo=</h1>
21559 Headings: 4b. No escaping needed (inside p-tags)
21574 Headings: 5. Empty headings
21584 =====<nowiki/>=====
21586 ======<nowiki/>======
21588 <h1 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h1>
21590 <h2 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h2>
21592 <h3 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h3>
21594 <h4 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h4>
21596 <h5 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h5>
21598 <h6 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h6>
21602 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21606 <nowiki>=a=</nowiki>
21608 <nowiki>=a=</nowiki>
21610 <nowiki>=a=</nowiki>
21612 <nowiki>=a=</nowiki>
21621 Headings: 6b. Heading chars in SOL context (with trailing newlines)
21649 Headings: 6c. Heading chars in SOL context (leading newline break)
21654 <nowiki>=b=</nowiki>
21661 Headings: 6d. Heading chars in SOL context (with interspersed comments)
21665 <!--c0--><nowiki>=a=</nowiki>
21667 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
21669 <p><!--c0-->=a=</p>
21670 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
21674 Headings: 6d. Heading chars in SOL context (No escaping needed)
21684 Headings: 7. Insert a newline between new content and headings
21690 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
21691 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
21701 #### --------------- Lists ---------------
21702 #### 0. Outside nests (*foo, etc.)
21703 #### 1. Nested inside html <ul><li>*foo</li></ul>
21704 #### 2. Inside definition lists
21705 #### 3. Only bullets at start should be escaped
21706 #### 4. No escapes needed
21707 #### 5. No unnecessary escapes
21708 #### 6. Escape bullets in SOL position
21709 #### 7. Escape bullets in a multi-line context
21710 #### ----------------------------------------
21713 Lists: 0. Outside nests
21715 <nowiki>*</nowiki>foo
21717 <nowiki>#</nowiki>foo
21719 <nowiki>;Foo:</nowiki>bar
21728 Lists: 1. Nested inside html
21730 *<nowiki>*foo</nowiki>
21732 *<nowiki>#foo</nowiki>
21734 *<nowiki>:foo</nowiki>
21736 *<nowiki>;foo</nowiki>
21738 #<nowiki>*foo</nowiki>
21740 #<nowiki>#foo</nowiki>
21742 #<nowiki>:foo</nowiki>
21744 #<nowiki>;foo</nowiki>
21746 <ul><li>*foo</li></ul>
21747 <ul><li>#foo</li></ul>
21748 <ul><li>:foo</li></ul>
21749 <ul><li>;foo</li></ul>
21750 <ol><li>*foo</li></ol>
21751 <ol><li>#foo</li></ol>
21752 <ol><li>:foo</li></ol>
21753 <ol><li>;foo</li></ol>
21758 Lists: 2. Inside definition lists
21760 ;<nowiki>;foo</nowiki>
21762 ;<nowiki>:foo</nowiki>
21764 ;<nowiki>:foo</nowiki>
21767 :<nowiki>:foo</nowiki>
21769 <dl><dt>;foo</dt></dl>
21770 <dl><dt>:foo</dt></dl>
21773 <dl><dd>:foo</dd></dl>
21778 Lists: 3. Only bullets at start of text should be escaped
21780 *<nowiki>*foo*bar</nowiki>
21782 *<nowiki>*foo</nowiki>''it''*bar
21784 <ul><li>*foo*bar</li></ul>
21785 <ul><li>*foo<i>it</i>*bar</li></ul>
21790 Lists: 4. No escapes needed
21811 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
21815 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
21821 Lists: 5. No unnecessary escapes
21823 * bar <span><nowiki>[[foo]]</nowiki></span>
21825 * =bar <span><nowiki>[[foo]]</nowiki></span>
21827 * [[bar <span><nowiki>[[foo]]</nowiki></span>
21829 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
21831 * =bar <span>foo]]</span>=
21837 <ul><li> bar <span>[[foo]]</span></li></ul>
21838 <ul><li> =bar <span>[[foo]]</span></li></ul>
21839 <ul><li> [[bar <span>[[foo]]</span></li></ul>
21840 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
21841 <ul><li> =bar <span>foo]]</span>=</li></ul>
21842 <ul><li> <s></s>: a</li></ul>
21843 <ul><li> <i>* foo</i></li></ul>
21848 Lists: 6. Escape bullets in SOL position
21852 <p><!--cmt-->*foo</p>
21854 <!--cmt--><nowiki>*</nowiki>foo
21858 Lists: 7. Escape bullets in a multi-line context
21861 <nowiki>*</nowiki>b
21869 Lists: 8. Escape colons only if not present in tags
21873 <dl><dt>a:b<i>c:d</i></dt></dl>
21875 ; <nowiki>a:b</nowiki>''c:d''
21878 #### --------------- HRs ---------------
21879 #### 1. Single line
21880 #### -----------------------------------
21883 HRs: 1. Single line
21885 ----<nowiki>----</nowiki>
21897 #### --------------- Tables ---------------
21898 #### 1a. Simple example
21899 #### 1b. No escaping needed (!foo)
21900 #### 1c. No escaping needed (|foo)
21901 #### 1d. No escaping needed (|}foo)
21903 #### 2a. Nested in td (<td>foo|bar</td>)
21904 #### 2b. Nested in td (<td>foo||bar</td>)
21905 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
21907 #### 3a. Nested in th (<th>foo!bar</th>)
21908 #### 3b. Nested in th (<th>foo!!bar</th>)
21909 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
21913 #### 4c. No escaping needed
21914 #### --------------------------------------
21917 Tables: 1a. Simple example
21928 Tables: 1b. No escaping needed
21937 Tables: 1c. No escaping needed
21946 Tables: 1d. No escaping needed
21955 Tables: 2a. Nested in td
21960 <td>foo|bar</td></tr>
21961 <tr><td>x<div>a|b</div></td>
21965 |<nowiki>foo|bar</nowiki>
21967 |x<div><nowiki>a|b</nowiki></div>
21983 Tables: 2b. Nested in td
21989 <td>a<i>b||c</i></td>
21990 <td>a<i><div>b||c</div></i></td>
21991 </tr></tbody></table>
21994 |<nowiki>foo||bar</nowiki>
21995 |a''<nowiki>b||c</nowiki>''
21996 |a''<div><nowiki>b||c</nowiki></div>''
22005 <td>a<i><div>b||c</div></i>
22011 Tables: 2c. Nested in td -- no escaping needed
22027 Tables: 3a. Nested in th
22043 Tables: 3b. Nested in th
22048 <tr><th>foo!!bar</th>
22049 <th><i>foo|bar</i></th>
22050 <th><i>foo!!bar</i></th>
22051 <th><i><span>foo!!bar</span></i></th>
22052 </tr></tbody></table>
22055 !<nowiki>foo!!bar</nowiki>
22056 !''<nowiki>foo|bar</nowiki>''
22057 !''<nowiki>foo!!bar</nowiki>''
22058 !''<span><nowiki>foo!!bar</nowiki></span>''
22067 <th><i>foo!!bar</i>
22069 <th><i><span>foo!!bar</span></i>
22075 Tables: 3c. Nested in th
22080 <tr><th>foo||bar</th>
22081 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22082 </tr></tbody></table>
22085 !<nowiki>foo||bar</nowiki>
22086 !<nowiki>foo||bar</nowiki>
22099 Tables: 4a. Escape -
22118 |<nowiki>-bar</nowiki>
22123 Tables: 4b. Escape +
22142 |<nowiki>+bar</nowiki>
22147 Tables: 4c. No escaping needed
22190 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22191 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22197 <div>a|b</div></td>
22202 Tables: 4d. No escaping needed
22212 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22221 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22222 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22223 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22228 Tables: Digest broken attributes on table and tr tag
22245 T97430: Don't emit empty nowiki pairs around marker meta tags
22249 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22250 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22252 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22253 <nowiki>|</nowiki>** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22257 Unclosed xmlish element in table line shouldn't eat end delimiters
22273 <tbody><tr><td> <foo</td>
22274 <td> bar></td></tr>
22278 #### --------------- Links ----------------
22279 #### 1. Quote marks in link text
22280 #### 2. Wikilinks: Escapes needed
22281 #### 3. Wikilinks: No escapes needed
22282 #### 4. Extlinks: Escapes needed
22283 #### 5. Extlinks: No escapes needed
22284 #### --------------------------------------
22286 Links 1. WikiLinks: No escapes needed
22290 [[Foo|x [Foobar] x]]
22292 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22293 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22294 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22297 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22298 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22299 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22303 Links 2. WikiLinks: Escapes needed
22307 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22308 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22309 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22310 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22311 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22312 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22313 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22314 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22315 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22316 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22318 [[Foo|<nowiki>Foobar]</nowiki>]]
22319 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22320 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22321 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22322 [[Foo|<nowiki>|Bar</nowiki>]]
22323 [[Foo|<nowiki>]]bar</nowiki>]]
22324 [[Foo|<nowiki>[[bar</nowiki>]]
22325 [[Foo|<nowiki>x [[ y</nowiki>]]
22326 [[Foo|<nowiki>x ]] y</nowiki>]]
22327 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22329 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22330 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22331 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22332 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22333 <a href="/wiki/Foo" title="Foo">|Bar</a>
22334 <a href="/wiki/Foo" title="Foo">]]bar</a>
22335 <a href="/wiki/Foo" title="Foo">[[bar</a>
22336 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22337 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22338 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22343 Links 3. WikiLinks: No escapes needed
22348 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22349 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22352 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22353 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22357 Links 4. ExtLinks: Escapes needed
22361 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22362 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22363 <p>[http://google.com]</p>
22364 <p>[http://google.com google]</p>
22366 [http://google.com <nowiki>[google]</nowiki>]
22367 [http://google.com <nowiki>google]</nowiki>]
22369 <nowiki>[http://google.com]</nowiki>
22371 <nowiki>[http://google.com google]</nowiki>
22374 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22375 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22376 </p><p>[http://google.com]
22377 </p><p>[http://google.com google]
22382 Links 5. ExtLinks: No escapes needed
22384 [http://google.com [google]
22386 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22389 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22393 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22395 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22396 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22397 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22398 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22399 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22400 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22401 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22402 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
22403 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22404 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
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(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22410 x<nowiki/>http://example.com<nowiki/>y
22411 http://example.com<nowiki/>?x
22412 http://example.com<nowiki/>&x
22413 http://example.com<nowiki/>'x
22414 http://example.com<nowiki/>,x
22415 http://example.com<nowiki/>.x
22416 http://example.com<nowiki/>;x
22417 http://example.com<nowiki/>:x
22418 http://example.com<nowiki/>;x
22419 http://example.com<nowiki/>!x
22420 http://example.com<nowiki/>=x
22421 http://example.com<nowiki/>(x)
22422 http://example.com(x<nowiki/>)
22426 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22429 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22431 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22432 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22433 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22434 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22435 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22441 "http://example.com"
22442 (http://example.com)
22443 (http://example.com) foo
22444 http://example.com,
22445 http://example.com, foo
22448 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22450 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22451 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22452 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22453 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22454 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22459 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22461 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22462 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
22464 http://example.com.,;:!?\
22465 -http://example.com:
22467 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
22468 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
22473 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
22475 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
22476 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
22477 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
22481 X<nowiki/>RFC 123<nowiki/>y
22485 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
22487 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
22488 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
22489 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
22496 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
22497 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
22498 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
22503 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
22505 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
22506 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22507 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22511 X<nowiki/>PMID 123<nowiki/>y
22515 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
22517 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
22518 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
22519 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
22526 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
22527 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
22528 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
22533 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
22535 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
22536 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
22537 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
22540 ISBN 1234567890<nowiki/>1
22541 ISBN 1234567890<nowiki/>x
22542 a<nowiki/>ISBN 1234567890<nowiki/>b
22546 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
22548 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
22552 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
22557 Links 14. Protect link-like plain text. (Parsoid bug T78425)
22561 <p>this is not a link: http://example.com
22564 this is not a link: <nowiki>http://example.com</nowiki>
22568 Links 15. Link trails can't become link prefixes.
22572 [[Söfnuður]]-[[00]]
22574 <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>
22577 <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>
22580 #### --------------- Quotes ---------------
22581 #### 1. Quotes inside <b> and <i>
22582 #### 2. Link fragments separated by <i> and <b> tags
22583 #### 3. Link fragments inside <i> and <b>
22584 #### 4. No escaping needed
22585 #### --------------------------------------
22587 1a. Quotes inside <b> and <i>
22589 parsoid=html2wt,wt2wt
22592 ''<nowiki>''foo''</nowiki>''
22593 ''<nowiki>'''foo'''</nowiki>''
22595 '''<nowiki/>'foo''''
22596 '''<nowiki>''foo''</nowiki>'''
22597 '''<nowiki>'''foo'''</nowiki>'''
22598 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
22599 '''foo'''<nowiki/>'s
22605 '''foo'''<nowiki/>'
22606 ''''foo'''<nowiki/>'
22607 ''fools'<span> errand</span>''
22608 ''<span>fool</span>'s errand''
22609 '<nowiki/>''foo'' bar '''baz''
22610 a|!*#-:;+-~[]{}b'''x''
22619 <b>foo'<i>bar'</i>baz</b>
22628 <i>fools'<span> errand</span></i>
22629 <i><span>fool</span>'s errand</i>
22630 '<i>foo</i> bar '<i>baz</i>
22631 a|!*#-:;+-~[]{}b'<i>x</i>
22636 1b. Quotes inside <b> and <i> with other tags on same line
22638 parsoid=html2wt,wt2wt
22640 '''a'' foo ''[[bar]]''
22641 ''a''' foo ''[[bar]]''
22642 ''a''' foo '''{{echo|[[bar]]}}'''
22643 [[foo]] x'''[[bar]]''
22644 '''foo'' <ref>test</ref>
22645 '''foo'' <div title="name">test</div>
22646 '''foo'' and <br> bar
22649 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22650 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22651 <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>
22652 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
22653 '<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>
22654 '<i>foo</i> <div title="name">test</div>
22655 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
22656 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22657 <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>
22662 2. Link fragments separated by <i> and <b> tags
22664 [[''foo''<nowiki>hello]]</nowiki>
22666 [['''foo'''<nowiki>hello]]</nowiki>
22668 <p>[[<i>foo</i>hello]]
22669 </p><p>[[<b>foo</b>hello]]
22673 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
22674 # this is one of the shortcomings of this format
22676 3. Link fragments inside <i> and <b>
22678 ''[[foo''<nowiki>]]</nowiki>
22680 '''[[foo'''<nowiki>]]</nowiki>
22683 </p><p><b>[[foo</b>]]
22688 4. No escaping needed
22690 '<span>''bar''</span>'
22691 '<span>'''bar'''</span>'
22694 <p>'<span><i>bar</i></span>'
22695 '<span><b>bar</b></span>'
22700 #### ----------- Paragraphs ---------------
22701 #### 1. No unnecessary escapes
22702 #### --------------------------------------
22705 1. No unnecessary escapes
22707 bar <span><nowiki>[[foo]]</nowiki></span>
22709 =bar <span><nowiki>[[foo]]</nowiki></span>
22711 [[bar <span><nowiki>[[foo]]</nowiki></span>
22713 ]]bar <span><nowiki>[[foo]]</nowiki></span>
22715 =bar <span>foo]]</span><nowiki>=</nowiki>
22717 <p>bar <span>[[foo]]</span>
22718 </p><p>=bar <span>[[foo]]</span>
22719 </p><p>[[bar <span>[[foo]]</span>
22720 </p><p>]]bar <span>[[foo]]</span>
22721 </p><p>=bar <span>foo]]</span>=
22725 #### ----------------------- PRE --------------------------
22726 #### 1. Leading whitespace in SOL context should be escaped
22727 #### ------------------------------------------------------
22729 1. Leading whitespace in SOL context should be escaped
22733 <nowiki> </nowiki>a
22735 <nowiki> </nowiki> a
22737 <nowiki> </nowiki>a(tab)
22739 <nowiki> </nowiki> a
22741 <nowiki> </nowiki> a
22744 <nowiki> </nowiki>b
22747 <nowiki> </nowiki>b
22750 <nowiki> </nowiki> b
22756 <p><!--cmt--> a</p>
22766 2. Leading whitespace in non-indent-pre contexts should not be escaped
22774 <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>
22775 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22776 <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>
22782 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
22801 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
22805 [[File:Foobar.jpg|thumb|caption]]
22807 <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>
22811 5. Nowiki escaping should account for indent-pres
22821 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
22834 #### --------------- Behavior Switches --------------------
22837 1. Valid behavior switches should be escaped
22844 <nowiki>__TOC__</nowiki>
22845 ''<nowiki>__TOC__</nowiki>''
22849 2. Invalid behavior switches should not be escaped
22860 # We use indent-pre as an indirect way to test for sol-transparent behavior.
22862 Behavior switches should be SOL-transparent
22866 <!-- this one's bogus -->
22873 <meta property="mw:PageProp/toc" />
22875 <!-- this one's bogus -->
22878 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
22880 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
22883 #### --------------- HTML tags ---------------
22886 #### 3. multi-line html tag
22887 #### 4. extension tags
22888 #### -----------------------------------------
22894 <a href="http://google.com">google</a>
22896 <a href="http://google.com">google</a>
22902 * <nowiki><div>foo</div></nowiki>
22903 * <nowiki><div style="color:red">foo</div></nowiki>
22904 * <nowiki><td></nowiki>
22906 <ul><li> <div>foo</div></li>
22907 <li> <div style="color:red">foo</div></li>
22908 <li> <td></li></ul>
22913 3. multi-line html tag
22928 <nowiki><ref>foo</ref></nowiki>
22930 <nowiki><ref>bar</nowiki>
22932 baz<nowiki></ref></nowiki>
22934 <p><ref>foo</ref>
22935 </p><p><ref>bar
22936 </p><p>baz</ref>
22940 #### --------------- Others ---------------
22944 <nowiki>foo</nowiki>
22946 <p><nowiki>foo</nowiki>
22950 ## The quote-char in the input is necessary for triggering the bug
22952 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
22954 parsoid=wt2wt,html2wt
22963 Tag-like HTML structures are passed through as text
22985 </p><p>1<d e>f
22990 HTML tag with necessary entities in attributes
22992 <span title="&amp;">foo</span>
22994 <p><span title="&amp;">foo</span>
22999 HTML tag with 'unnecessary' entity encoding in attributes
23001 <span title="&">foo</span>
23003 <p><span title="&">foo</span>
23008 HTML tag with broken attribute value quoting
23010 <span title="Hello world>Foo</span>
23012 <p><span>Foo</span>
23015 <p><span title="Hello world">Foo</span>
23020 Parsoid-only: HTML tag with broken attribute value quoting
23024 <span title="Hello world>Foo</span>
23026 <p><span title="Hello world">Foo</span>
23031 Table with broken attribute value quoting
23034 | title="Hello world|Foo
23045 <td title="Hello world">Foo
23051 Table with broken attribute value quoting on consecutive lines
23054 | title="Hello world|Foo
23055 | style="color:red|Bar
23068 <td title="Hello world">Foo
23069 </td><td style="color: red">Bar
23070 </td></tr></tbody></table>
23075 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23085 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23095 Accept empty td cell attribute
23098 | align="center" | foo || |
23103 <td align="center"> foo </td>
23110 Non-empty attributes in th-cells
23113 ! Foo !! style="color: red" | Bar
23119 <th style="color: red"> Bar
23125 Accept empty attributes in th-cells
23140 Empty table rows go away
23161 ### Parsoid-centric tests for testing RTing of inter-element separators
23162 ### Edge cases not tested by existing parser tests and specific to
23163 ### Parsoid-specific serialization strategies.
23167 RT-ed inter-element separators should be valid separators
23179 # Parsoid-only since PHP parser relies on Tidy for correct output
23181 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23195 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23196 <p>bar</p></small></td></tr>
23200 <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>
23204 # Note that the "style" attribute is really a template parameter here.
23205 # The = would have to be {{=}} if you wanted the literal.
23207 Empty TD followed by TD with tpl-generated attribute
23212 |{{echo|style='color:red'}}|foo
23226 Indented table with an empty td
23244 ## We have some newline diffs RT-ing this edge case
23245 ## and it is not important enough -- we seem to be emitting
23246 ## at most 2 newlines after a </tr> and this is unrelated to
23247 ## the issue from T85627 that this is testing.
23249 Indented table with blank lines in between (T85627)
23268 Indented block & table
23282 <div data-parsoid='{"stx":"html"}'>foo</div>
23284 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23289 Indent and comment before table row
23304 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23305 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23309 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23311 Empty TR followed by a template-generated TR
23317 {{echo|<tr><td>foo</td></tr>}}
23323 <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}}]}'>
23328 ## PHP and parsoid output differ for this, and since this is primarily
23329 ## for testing Parsoid's serializer, marking this Parsoid only
23331 Empty TR followed by mixed-ws-comment line should RT correctly
23347 <!--c--> </tr><!--d-->
23353 Multi-line image caption generated by templates with/without trailing newlines
23355 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23356 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23358 <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>
23359 <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>
23363 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23367 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23369 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23371 <includeonly>foo</includeonly>
23379 ## PHP emits broken html for this, and since this is primarily
23380 ## a Parsoid serializer test, marking this Parsoid only
23382 Improperly nested inline or quotes tags with whitespace in between
23384 <span> <s>x</span> </s>
23387 <p><span> <s>x</s></span><s> </s>
23388 <b> <i>x</i></b><i> </i>
23393 Encapsulate protected attributes from wt
23395 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23397 <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>
23401 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23402 ## Having nested or stray pre tags results in the attempt to add duplicates,
23403 ## causing an assertion fail. This test tries to prevent that situation.
23405 Ensure ParagraphWrapper can deal with stray closing pre tags
23415 1. Ensure fostered text content is wrapped in element nodes
23419 <table>hi</table><table>ho</table>
23428 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
23430 parsoid=wt2html,wt2wt
23439 <tbody><tr><td> a</td></tr>
23444 Encapsulation properly handles null DSR information from foster box
23446 parsoid=wt2html,wt2wt
23448 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
23450 <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>
23454 1. Encapsulate foster-parented transclusion content
23456 parsoid=wt2wt,wt2html
23458 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
23460 <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>
23470 2. Encapsulate foster-parented transclusion content
23472 parsoid=wt2wt,wt2html
23474 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
23476 <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>
23487 3. Encapsulate foster-parented transclusion content
23489 parsoid=wt2wt,wt2html
23491 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23493 <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>"]}">
23506 4. Encapsulate foster-parented transclusion content
23508 parsoid=wt2wt,wt2html
23510 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23512 <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>"]}">
23525 5. Encapsulate foster-parented transclusion content
23527 parsoid=wt2wt,wt2html
23529 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
23531 <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>
23546 6. Encapsulate foster-parented transclusion content
23548 parsoid=wt2wt,wt2html
23550 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
23552 <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>
23568 7. Encapsulate foster-parented transclusion content
23570 parsoid=wt2wt,wt2html
23572 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
23574 <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>
23584 # Note that the wt is broken on purpose: the = should be {{=}} if you
23585 # don't want it to be a template parameter key.
23587 8. Encapsulate foster-parented transclusion content
23589 parsoid=wt2wt,wt2html
23592 }}{|{{echo|style='color:red'}}
23597 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
23599 <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>
23610 9. Encapsulate foster-parented transclusion content
23612 parsoid=wt2wt,wt2html
23614 <table>{{echo|hi</table>hello}}
23616 <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>
23620 Table in fosterable position
23622 parsoid=wt2html,wt2wt
23631 <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">
23633 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
23639 # Parsoid only for bug 64747
23641 Properly encapsulate empty-content transclusions in fosterable positions
23649 <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":["","","",""]}]]}'>
23655 Support <object> element with .data attribute
23659 <object data="test.swf"></object>
23661 <object data="test.swf"></object>
23665 Don't block XML namespace declaration
23667 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
23669 <p><span>MediaWiki</span>
23672 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
23675 # -----------------------------------------------------------------
23676 # The following section of tests are primarily to spec requirements
23677 # around serialization of new/edited content.
23679 # All these tests are marked Parsoid html2wt and html2html only
23680 # ----------------------------------------------------------------
23682 # 'mi' is a localinterwiki prefix as well as a language
23684 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
23688 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
23695 New wikilinks should be serialized properly
23699 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
23700 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
23707 New wiki links (href variations)
23711 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23712 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
23713 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
23714 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
23719 [[Toxine bactérienne]]
23723 New wiki links (content string variations)
23727 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23728 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
23729 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
23733 [[Foo_bar|./Foo_bar]]
23737 New category links (href variations)
23741 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
23742 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
23743 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
23745 [[Category:Toxine bactérienne]]
23746 [[Category:Toxine bactérienne]]
23747 [[Category:Toxine bactérienne]]
23751 New sol transparent links don't need indent-pre nowiki protection
23756 <link rel="mw:PageProp/redirect" href="./Main_Page">
23757 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
23758 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
23760 #WEITERLEITUNG [[Main Page]]
23761 <!-- this is good --> [[Category:Good]]
23762 <!-- this is great --> [[Kategorie:Great]]
23766 New interlanguage links (href variations)
23770 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
23771 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
23772 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
23774 [[es:Toxine bactérienne]]
23775 [[es:Toxine_bactérienne]]
23776 [[es:Toxine_bactérienne]]
23780 Image: Modifying size of an image (1)
23783 "modes": ["wt2wt"],
23785 ["img[height]", "attr", "height", "22"],
23786 ["img[width]", "attr", "width", "200"]
23790 [[Image:Foobar.jpg|230x230px]]
23792 [[Image:Foobar.jpg|200x200px]]
23796 Image: Modifying size of an image (2)
23799 "modes": ["wt2wt"],
23801 ["img[height]", "attr", "height", "100"],
23802 ["img[width]", "attr", "width", "500"]
23806 [[Image:Foobar.jpg|230x230px]]
23808 [[Image:Foobar.jpg|500x500px]]
23811 # Change in size is ignored so long as class='mw-default-size'
23813 Image: Modifying size of an image (3)
23816 "modes": ["wt2wt"],
23818 ["figure[class]", "removeClass", "mw-default-size"],
23819 ["figure img", "attr", "height", "19"],
23820 ["figure img", "attr", "width", "170"]
23824 [[Image:Foobar.jpg|thumb]]
23826 [[Image:Foobar.jpg|thumb|170x170px]]
23830 Image: Modifying alignment of an image (bug 48665)
23833 "modes": ["wt2wt"],
23835 ["figure[class]", "removeClass", "mw-halign-right"],
23836 ["figure[class]", "addClass", "mw-halign-left"]
23840 [[Image:Foobar.jpg|thumb|caption|right]]
23842 [[Image:Foobar.jpg|thumb|caption|left]]
23846 Image: Modifying mw-default-size of an frameless image (bug 62805)
23849 "modes": ["wt2wt"],
23851 ["figure.mw-default-size", "removeClass", "mw-default-size"]
23855 [[Image:Foobar.jpg|frameless|right]]
23857 [[Image:Foobar.jpg|frameless|right|220x220px]]
23861 Image: Modifying valign of an image (bug 49221)
23864 "modes": ["wt2wt"],
23866 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
23867 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
23871 [[File:Foobar.jpg|20px|middle]]
23873 [[File:Foobar.jpg|20px|text-top]]
23877 Image: Modifying alt attribute of an image (bug 56400)
23880 "modes": ["wt2wt"],
23882 ["img[alt]", "attr", "alt", "some alternate edited text"]
23886 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
23888 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
23892 Image: Modifying caption of an image
23895 "modes": ["wt2wt"],
23897 ["figcaption", "text", "new caption"]
23901 [[Image:Foobar.jpg|thumb|original caption]]
23903 [[Image:Foobar.jpg|thumb|new caption]]
23907 Image: empty alt attribute (bug 48924)
23911 [[File:Foobar.jpg|thumb|alt=|bar]]
23913 <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>
23917 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
23922 #<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>
23924 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
23928 Image: Block level image should have \n before and after
23931 [[File:Foobar.jpg|right|thumb|150x150px]]
23935 <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>
23940 Image: New block level image should have \n before and after (existing content)
23943 [[File:Foobar.jpg|right|thumb|150x150px]]
23947 <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>
23952 Image: upright option (parsoid)
23954 [[File:Foobar.jpg|thumb|upright|caption]]
23955 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
23956 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
23958 <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>
23959 <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>
23960 <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>
23964 Image: upright option is ignored on inline and frame images (parsoid)
23966 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
23968 <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>
23972 Image: from basic HTML (1)
23976 <span typeof="mw:Image">
23977 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
23980 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
23984 Image: from basic HTML (2)
23988 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
23990 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
23994 Image: from basic HTML (3)
23998 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24000 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24004 Image: from basic HTML (4)
24008 <img src="./File:Foobar.jpg">
24010 [[File:Foobar.jpg|link=]]
24014 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24019 <li><p>foo</p></li>
24026 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24030 <ul> <li>foo</li></ul>
24036 Don't strip leading whitespace when handling indent-pre suppressing tags
24041 <tr><td> indented row</td></tr>
24044 <b>This is very bold of you!</b>
24047 indented cell (no pre-wrapping!)
24057 '''This is very bold of you!'''
24061 indented cell (no pre-wrapping!)
24069 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24074 <nowiki> </nowiki><span>bar</span>
24077 <nowiki> </nowiki></span>bar2
24080 <nowiki> </nowiki><span>bar</span>
24083 <nowiki> </nowiki><span>foo</span>
24101 Lists: Dont insert newlines in a serialized list item.
24105 <ul><li>a<br>b</li><li>c</li></ul>
24112 Headings: Force sol-transparent links and behavior switches to serialize before/after
24116 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
24117 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24119 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24120 <h2>it goes well <link href="Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24122 <h2 data-parsoid='{}'>howdy<link href="Category:A5" rel="mw:PageProp/Category" /></h2>
24124 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24132 <!--foo--> [[Category:A3]]
24137 [[Category:A4]] <!--bar-->
24139 ==howdy [[Category:A5]] ==
24147 Headings: Don't hoist metas that come from templates
24151 <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>
24153 == {{echo|foo [[Category:Foo]]}} ==
24157 Headings: Category in ref isn't hoisted
24161 <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>
24163 <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>
24166 [[Category:Baz]] </ref> ==
24172 Parsoid: Serialize positional parameters with = in them as named parameter
24176 <p about="#mwt1" typeof="mw:Transclusion"
24177 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24179 <p about="#mwt1" typeof="mw:Transclusion"
24180 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24182 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24183 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24184 <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>
24188 {{echo|1 = f=oo|2 = bar}}
24190 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24191 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24192 {{echo|<nowiki>f=oo</nowiki>|bar}}
24196 Parsoid: Serialize positional parameters with = in extlink as named parameter
24200 <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>
24202 {{echo|1 = http://stuff?is=ok}}
24206 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24210 <div>a<p>b</p></div>
24231 Substrings resembling wikitext in hrefs should not get nowiki escapes
24235 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24241 Enforce single-line context in the serializer
24248 <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">
24249 </span><span about="#mwt1">you</span> </h2>
24251 <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>
24253 <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
24254 there</span></li></ol>
24267 == hi {{bogus|there
24278 * foo '''bar''' baz
24282 Serialize new placeholder space without spans
24286 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24288 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24290 <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>
24296 <ref>foo : bar</ref>ok
24300 #-----------------------
24301 # Tag minimization tests
24302 #-----------------------
24305 1. I/B quote minimization: wikitext-only tags should be combined
24309 <p><i>A</i><i>B</i></p>
24310 <p><b>A</b><b>B</b></p>
24311 <p><i>A</i><b><i>B</i></b></p>
24312 <p><b>A</b><i><b>B</b></i></p>
24313 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24314 <p><i><b>A</b></i><i><b>B</b></i></p>
24315 <p><i><b>A</b></i><b><i>B</i></b></p>
24316 <p><b><i>A</i></b><i><b>B</b></i></p>
24336 2. I/B quote minimization: wikitext and html tags should not be combined
24340 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24341 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24345 ''A''<nowiki/>'''<i>B</i>'''
24349 3. I/B quote minimization: templated content stops minimization
24353 <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>
24354 <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>
24356 ''A''{{echo|''B''}}
24358 ''A''{{echo|'''''B'''''}}
24362 4. I/B quote minimization: new content should be mimimized with adjacent old content
24366 <p><i>A</i><i>B</i></p>
24367 <p><b>A</b><b>B</b></p>
24368 <p><i>A</i><b><i>B</i></b></p>
24378 5a. Merge adjacent quote nodes if they've been edited
24381 "modes": ["wt2wt", "selser"],
24383 ["p", "contents", "remove", ":contains('b')"]
24393 5b. Merge adjacent quote nodes if they've been edited
24396 "modes": ["wt2wt", "selser"],
24402 ''a''<span id="x">b</span>''c''
24408 1. Merge adjacent link nodes as long as at least one element is new
24411 "modes": ["html2wt"],
24412 "scrubWikitext": true
24415 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24416 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24417 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
24421 [[Football|Foot]][[Football|ball]]
24425 2. Merge adjacent link nodes and enable additional normalizations
24428 "modes": ["html2wt"],
24429 "scrubWikitext": true
24432 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
24434 [[Football|''Football'']]
24438 3. Don't merge adjacent link nodes if scrubWikitext is false
24441 "modes": ["html2wt"],
24442 "scrubWikitext": false
24445 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24447 [[Football|Foot]][[Football|ball]]
24450 #------------------------------
24451 # End of tag minimization tests
24452 #------------------------------
24455 Bug 54262: New entities
24461 <span typeof="mw:Entity"> </span>
24464 ## Note that there is no wikitext output for 'unknownproperty' ##
24465 ## Unknown magic words are silently dropped ##
24472 <meta property='mw:PageProp/toc' />
24473 <meta property='mw:PageProp/notoc' />
24474 <meta property='mw:PageProp/forcetoc' />
24475 <meta property='mw:PageProp/index' />
24476 <meta property='mw:PageProp/noindex' />
24477 <meta property='mw:PageProp/nogallery' />
24478 <meta property='mw:PageProp/noeditsection' />
24479 <meta property='mw:PageProp/notitleconvert' />
24480 <meta property='mw:PageProp/nocontentconvert' />
24481 <meta property='mw:PageProp/unknownproperty' />
24491 __NOCONTENTCONVERT__
24495 Consecutive <pre>s should not get merged
24497 parsoid=html2wt,html2html
24499 <pre>a</pre><pre>b</pre>
24527 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
24531 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
24533 [[Special:BookSources/1234567890|ISBN 1234567895]]
24537 Edited RFC links not serializable as RFC links should serialize as extlinks
24541 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
24543 [//tools.ietf.org/html/rfc123 New RFC]
24547 Edited PMID links not serializable as PMID links should serialize as extlinks
24551 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
24553 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
24557 WTS of autolinks with trailing/surrounding context
24561 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
24562 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
24563 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
24564 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
24565 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
24566 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
24568 http://cscott.net<nowiki/>'''foo'''
24570 http://cscott.net<b>foo</b>
24572 '''http://cscott.net<nowiki/>'''
24574 '''http://cscott.net '''
24576 '''http://cscott.net<nowiki/>x'''
24578 http://cscott.net<nowiki/>x
24582 WTS of autolinks with nowikis (round-trip)
24584 x<nowiki/>http://cscott.net<nowiki/>x
24586 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
24589 # this is the "easy" test because it leaves in place all the
24590 # data-parsoid information indicating this is an autolink
24592 WTS of autolinks with escapes (editing)
24595 "modes": ["wt2wt"],
24597 [ "meta", "remove" ]
24601 x<nowiki/>http://cscott.net<nowiki/>x
24603 x<nowiki/>http://cscott.net<nowiki/>x
24607 Edited Redirect link should emit a non-piped wikitext link
24611 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
24617 T75121: Infer extension name from typeOf if data-mw is not present
24621 <div typeOf="mw:Extension/foo"></div>
24626 # Note that the <p> wrapping isn't present in PHP parser output
24627 # The important thing for this test is that P-wrapping doesn't
24628 # interfere with the <nowiki> protection for leading - in <td>
24629 # (which isn't necessary for <th>).
24631 T88318: p-wrapped dash in table.
24633 parsoid=html2wt,wt2wt
24636 <tr><th><p>-</p></th><th><p>- </p></th></tr>
24637 <tr><td><p>-</p></td><td><p>- </p></td></tr>
24638 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
24645 |<nowiki>-</nowiki>
24646 |<nowiki>- </nowiki>
24665 <td><small>-</small></td>
24677 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
24682 <td id='mwAc'>foo</td>
24683 <td id='serialize-this'>bar</td>
24688 | id="serialize-this" |bar
24693 Parsoid-like element ids should not be serialized to wikitext unless shadowed
24697 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
24699 <div id="hello">ok</div>
24706 "modes": ["wt2wt"],
24708 [ "#xyz", "before", "<b>before</b> stuff " ],
24709 [ "#xyz", "after", " stuff <i>after</i>" ],
24710 [ "#xyz", "html", "x <b>y</b> z" ]
24714 <span id="xyz">hello</span>
24716 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
24720 Never serialize a-tag as html, regardless of what data-parsoid has to say
24724 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
24729 ## SSS FIXME: This is broken output nevertheless.
24730 ## What might be a reasonable non-broken output for this?
24731 ## This is an edge case unlikely to be seen in production
24732 ## that I am not wasting more time on this right now.
24734 Never serialize a-tag as html, no matter what attributes it has
24738 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
24740 [http://boo.org http://boohoo.org]
24743 # --------------------------------------------
24744 # Tests spec'ing wikitext serialization norms |
24745 # --------------------------------------------
24748 Lists: Add space after bullets
24755 <li><span> baz</span></li>
24760 * <span> baz</span>
24764 Headings: Add space before/after == (T53744)
24771 <h2><span> baz</span></h2>
24773 <!-- Even after hoisted content -->
24774 <h2> <link href="Category:A2" rel="mw:PageProp/Category" />ok</h2>
24782 == <span> baz</span> ==
24784 <!-- Even after hoisted content -->
24791 1. Headings: suppress newly created empty headings
24794 "modes": ["html2wt"],
24795 "scrubWikitext": true
24803 2. Headings: don't suppress empty headings if scrubWikitext is false
24813 3. Headings: don't suppress empty headings for existing headings even if scrubWikitext is true
24816 "modes": ["html2wt"],
24817 "scrubWikitext": true
24820 <h2 data-parsoid='{}'></h2>
24826 1. WT Quote Tags: suppress newly created empty style tags
24829 "modes": ["html2wt"],
24830 "scrubWikitext": true
24838 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
24844 ''<nowiki/>'''''<nowiki/>'''
24848 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
24851 "modes": ["html2wt"],
24852 "scrubWikitext": true
24861 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
24867 <nowiki> </nowiki>hi
24870 # ---------------------------------------------------
24871 # End of tests spec'ing wikitext serialization norms |
24872 # ---------------------------------------------------
24874 # -----------------------------------------------------------------
24875 # End of section for Parsoid-only html2wt tests for serialization
24877 # -----------------------------------------------------------------
24879 # -----------------------------------------------------------------
24880 # The following section of tests are primarily to spec behavior of
24881 # the selective serializer. All these tests have manual selser
24882 # changes. The automated selser changes for all tests handle the
24883 # wide variation of changes, but these tests here capture specs
24884 # deterministically.
24885 # ----------------------------------------------------------------
24889 Selser: New comments should not be lost
24892 "modes": ["selser"],
24894 [ "#a", "after", "<!--c1-->" ],
24895 [ "#b", "before", "<!--c2-->" ]
24899 <span id="a">a</span>
24901 <span id="b">b</span>
24903 <span id="a">a</span><!--c1-->
24905 <!--c2--><span id="b">b</span>
24910 Selser: Check for validity of DSR before using it
24913 "modes": ["selser"],
24915 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
24919 <span id="a">a</span>
24921 {{DISPLAYTITLE:foo}}
24922 <span id="a">a</span>
24926 1. DOMDiff: Changes to <ref> content should be looked up using id
24929 "modes": ["selser"],
24931 ["#X", "after", "bar"],
24932 ["#Y", "after", "baz"]
24936 X <ref><span id="X">foo</span></ref>
24939 <ref name="a"><span id="Y">foo</span></ref>
24942 X <ref><span id="X">foo</span>bar</ref>
24945 <ref name="a"><span id="Y">foo</span>baz</ref>
24950 2. DOMDiff: Changes to <ref> content should be looked up using id
24953 "modes": ["selser"],
24955 ["#Z", "after", "bar"]
24959 A <ref>foo bar for a</ref>
24960 B <ref group="X" name="b" />
24964 <references group="X">
24965 <ref name="b"><span id="Z">foo</span></ref>
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>bar</ref>