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>
3682 Definition Lists: Hacky use to indent tables (WS-insensitive)
3691 <dd> <table><tr><td>a</td></tr></table> </dd>
3694 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3695 ## as an empty dt item. It also ignores all but the last ";" when followed
3696 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3697 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3700 ## Ex: ";;t2 ::d2" is transformed into:
3712 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3713 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3724 ## All Parsoid only definition list tests have this difference.
3726 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3727 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3730 Table / list interaction: indented table with lists in table contents
3745 <ul><li> b</li></ul>
3749 <ul><li> d</li></ul>
3750 </td></tr></table></dd></dl>
3755 Table / list interaction: lists nested in tables nested in indented lists
3778 </td></tr></table></dd></dl>
3785 Definition Lists: Nesting: Multi-level (Parsoid only)
3815 Definition Lists: Nesting: Test 2 (Parsoid only)
3835 Definition Lists: Nesting: Test 3 (Parsoid only)
3863 Definition Lists: Nesting: Test 4
3868 <dl><dd><dl><dd><dl><dt>t3</dt>
3869 <dd>d3</dd></dl></dd></dl></dd></dl>
3874 ## The Parsoid team believes the following three test exposes a
3875 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3876 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3877 ## It also exposes a "misfeature" in tidy, which doesn't like
3878 ## <dl> tags with a single <dt> child; it converts the <dt> into
3879 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3881 Definition Lists: Mixed Lists: Test 1
3887 <dl><dd><dl><dt><ul><li> foo</li>
3888 <li> bar</li></ul></dt></dl>
3889 <dl><dt> baz</dt></dl></dd></dl>
3924 Definition Lists: Mixed Lists: Test 2
3929 <ul><li><dl><dd> d1</dd>
3930 <dd> d2</dd></dl></li></ul>
3936 Definition Lists: Mixed Lists: Test 3
3941 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3942 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3948 Definition Lists: Mixed Lists: Test 4
3953 <ul><li><dl><dt>d1 </dt>
3956 <dd>d4</dd></dl></li></ul>
3962 Definition Lists: Mixed Lists: Test 5
3968 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3974 Definition Lists: Mixed Lists: Test 6
3979 <ol><li><ul><li><dl><dd>d1
3980 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3986 Definition Lists: Mixed Lists: Test 7
3991 <dl><dd><ul><li> d1</li>
3992 <li> d2</li></ul></dd></dl>
3998 Definition Lists: Mixed Lists: Test 8
4003 <dl><dd><ul><li> d1</li></ul>
4004 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4010 Definition Lists: Mixed Lists: Test 9
4014 <ul><li><dl><dt>foo </dt>
4015 <dd>bar</dd></dl></li></ul>
4021 Definition Lists: Mixed Lists: Test 10
4025 <ul><li><ol><li><dl><dt>foo </dt>
4026 <dd>bar</dd></dl></li></ol></li></ul>
4030 # The Parsoid team disagrees with the PHP parser's seemingly-random
4031 # rules regarding dd/dt on the next two tests. Parsoid is more
4032 # consistent, and recognizes the shared nesting and keeps the
4033 # still-open tags around until the nesting is complete.
4034 # (And tidy again converts <dt> to <dd> before 'bar'.)
4037 Definition Lists: Mixed Lists: Test 11
4042 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4043 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4044 <dl><dt>boo </dt>
4045 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4100 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4101 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4105 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4106 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4115 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4117 # * The test is wrong, there are two colons where there should be :;
4118 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4120 Definition Lists: Weird Ones: Test 1
4122 *#;*::;; foo : bar (who uses this?)
4124 <ul><li><ol><li><dl><dt> foo </dt>
4125 <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>
4144 <dt>bar (who uses this?)</dt>
4176 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4177 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4189 Definition Lists: colons occurring in tags
4207 <dt><span>a:b</span></dt>
4236 Definition Lists: colons and tables 1
4248 </td></tr></table></dd></dl>
4252 </td></tr></table></dd></dl>
4256 # Parsoid's output (as documented below) differs from php's in this case.
4257 # This is probably a bug. If we fixup parsoid to match php's output, the
4258 # above test should pass and the below test case can be removed. It is
4259 # unclear which output is more desirable.
4262 Definition Lists: colons and tables 2
4274 </td></tr></table></dd>
4278 </td></tr></table></dd></dl>
4282 Definition Lists: template interaction
4284 ::{{definition_list}}
4287 ::{{definition_list}}
4292 <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">
4293 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4295 <dl><dd data-parsoid='{}'>one
4296 <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">
4297 </span><dd about="#mwt2">two
4299 <dd>three</dd></dl></dd>
4300 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4308 External links: non-bracketed
4310 Non-bracketed: http://example.com
4312 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4316 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4318 External links: numbered
4320 Numbered: [http://example.com]
4321 Numbered: [http://example.net]
4322 Numbered: [http://example.com]
4324 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4325 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4326 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4329 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4330 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4331 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4335 External links: specified text
4337 Specified text: [http://example.com link]
4339 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4344 External links: trail
4346 Linktrails should not work for external links: [http://example.com link]s
4348 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4353 External links: dollar sign in URL
4355 http://example.com/1$2345
4357 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4361 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4363 External links: dollar sign in URL (autonumber)
4365 [http://example.com/1$2345]
4367 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4370 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4374 External links: open square bracket forbidden in URL (bug 4377)
4376 parsoid=wt2html,wt2wt,html2html
4378 http://example.com/1[2345
4380 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4383 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4387 External links: open square bracket forbidden in URL (named) (bug 4377)
4389 parsoid=wt2html,html2html
4391 [http://example.com/1[2345]
4393 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4396 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4399 # parsoid adds a space before the link name
4401 External links: open square bracket forbidden in URL (named) (bug 4377)
4404 [http://example.com/1 [2345]
4406 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4411 External links: nowiki in URL link text (bug 6230)
4413 [http://example.com/ <nowiki>''example site''</nowiki>]
4415 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4420 External links: newline forbidden in text (bug 6230 regression check)
4422 [http://example.com/ first
4425 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4431 External links: Pipe char between url and text
4433 [http://example.com | link]
4435 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4440 External links: protocol-relative URL in brackets
4442 [//example.com/ Test]
4444 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4448 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4450 External links: protocol-relative URL in brackets without text
4454 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4457 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4461 External links: protocol-relative URL in free text is left alone
4465 <p>//example.com/Foo
4470 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4472 foo//example.com/Foo
4474 <p>foo//example.com/Foo
4479 External links: with no contents
4481 [http://en.wikipedia.org/wiki/Foo]
4483 [[wikipedia:Foo|Bar]]
4485 [[wikipedia:Foo|<span>Bar</span>]]
4487 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4488 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4489 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4492 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4493 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4494 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4498 External links: Free with trailing punctuation
4508 http://example.com/url_with_(brackets)
4509 (http://example.com/url_without_brackets)
4510 http://example.com/url_with_entity
4511 http://example.com/url_with_entity 
4512 http://example.com/url_with_entity 
4513 http://example.com/url_with_entity<
4514 http://example.com/url_with_entity<
4515 http://example.com/url_with_entity<
4517 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4518 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4519 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4520 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4521 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4522 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4523 <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/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4526 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4527 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4528 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4529 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4530 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4531 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4532 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4535 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4536 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4537 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4538 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4539 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4540 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4541 <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/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4544 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4545 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4546 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4547 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4548 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4549 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4550 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4554 External links: No preceding word characters allowed (bug 65278)
4556 NOPEhttp://example.com
4557 N0http://example.com
4558 ok:http://example.com
4559 ok-http://example.com
4561 <p>NOPEhttp://example.com
4562 N0http://example.com
4563 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4564 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4571 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4573 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4578 External image from https
4580 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4582 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4587 External image (when not allowed)
4589 wgAllowExternalImages=0
4591 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4593 <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>
4598 Link to non-http image, no img tag
4600 Link to non-http image, no img tag: ftp://example.com/test.jpg
4602 <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>
4607 External links: terminating separator
4609 Terminating separator: http://example.com/thing,
4611 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4616 External links: intervening separator
4618 Intervening separator: http://example.com/1,2,3
4620 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4625 External links: old bug with URL in query
4627 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4629 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4634 External links: old URL-in-URL bug, mixed protocols
4636 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4638 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4643 External links: URL in text
4645 URL in text: [http://example.com http://example.com]
4647 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4652 External links: Clickable images
4654 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4656 <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>
4659 <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>
4663 External links: raw ampersand
4665 Old & use: http://x&y
4667 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4672 External links: encoded ampersand
4674 Old & use: http://x&y
4676 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4679 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4683 External links: encoded equals (bug 6102)
4685 http://example.com/?foo=bar
4687 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4690 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4694 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4695 ## does it number them. As discussed in bug 53505, we can identify
4696 ## autonumbered links via CSS.
4700 External links: [raw ampersand]
4702 Old & use: [http://x&y]
4704 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4707 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4710 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4711 # mode will return the [raw ampersand] wikitext
4713 External links: [encoded ampersand]
4715 parsoid=wt2html,wt2wt,html2html
4717 Old & use: [http://x&y]
4719 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4722 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4726 External links: [raw equals]
4728 [http://example.com/?foo=bar]
4730 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4733 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4736 # note that parsoid html is identical to [raw equals] case; so html2wt
4737 # mode will return the [raw equals] wikitext
4739 External links: [encoded equals] (bug 6102)
4741 parsoid=wt2html,wt2wt,html2html
4743 [http://example.com/?foo=bar]
4745 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4748 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4751 # xxx parsoid strips the IDN character, so the round-trip tests will
4752 # obviously fail and are disabled. --cscott
4754 External links: [IDN ignored character reference in hostname; strip it right off]
4756 parsoid=wt2html,wt2wt,html2html
4758 [http://e‌xample.com/]
4760 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4763 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4766 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4767 # Where an external link could easily circumvent the sanitization of the text of
4768 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4769 # test demands a higher standard. That's a bit strange.
4773 # http://example.com -> [http://example.com|http://example.com]
4774 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4776 # The first example is sanitized, but the second is not. Any security benefits
4777 # from this production are trivial to circumvent. Either remove this test and
4778 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4779 # the test accordingly.
4783 # xxx parsoid strips the IDN character, so the round-trip tests will
4784 # obviously fail and are disabled. --cscott
4786 External links: IDN ignored character reference in hostname; strip it right off
4788 parsoid=wt2html,html2html
4790 http://e‌xample.com/
4792 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4795 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4799 External links: www.jpeg.org (bug 554)
4803 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4807 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4809 External links: URL within URL (original bug 2)
4811 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4813 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4816 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4820 BUG 361: URL inside bracketed URL
4822 [http://www.example.com/foo http://www.example.com/bar]
4824 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4829 BUG 361: URL within URL, not bracketed
4831 http://www.example.com/foo?=http://www.example.com/bar
4833 <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>
4838 BUG 289: ">"-token in URL-tail
4840 http://www.example.com/<hello>
4842 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4847 BUG 289: literal ">"-token in URL-tail
4849 http://www.example.com/<b>html</b>
4851 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4854 <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>
4858 BUG 289: ">"-token in bracketed URL
4860 [http://www.example.com/<hello> stuff]
4862 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4867 BUG 289: literal ">"-token in bracketed URL
4869 [http://www.example.com/<b>html</b> stuff]
4871 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4876 BUG 289: literal double quote at end of URL
4878 http://www.example.com/"hello"
4880 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4885 BUG 289: literal double quote in bracketed URL
4887 [http://www.example.com/"hello" stuff]
4889 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4894 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4896 [http://www.example.com test]
4898 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4903 External links: link text with spaces
4905 [http://www.example.com a b c]
4906 [http://www.example.com ''a'' ''b'']
4908 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4909 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4914 External links: wiki links within external link (Bug 3695)
4916 [http://example.com [[wikilink]] embedded in ext link]
4918 <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>
4921 <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>
4925 BUG 787: Links with one slash after the url protocol are invalid
4929 [http:/example.com title]
4931 <p>http:/example.com
4932 </p><p>[http:/example.com title]
4937 Bracketed external links with template-generated invalid target
4939 [{{echo|http:/example.com}} title]
4941 <p>[http:/example.com title]
4946 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4948 ''[http://example.com text'']
4949 [http://example.com '''text]'''
4950 ''Something [http://example.com in italic'']
4951 ''Something [http://example.com mixed''''', even bold]'''
4952 '''''Now [http://example.com both''''']
4954 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4955 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4956 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4957 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4958 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4964 Bug 4781: %26 in URL
4966 http://www.example.com/?title=AT%26T
4968 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4971 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4974 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
4975 # % is actually legal in HTML5. Any change in output would need testing though.
4977 Bug 4781, 5267: %25 in URL
4979 http://www.example.com/?title=100%25_Bran
4981 <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>
4984 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4988 Bug 4781, 5267: %28, %29 in URL
4990 http://www.example.com/?title=Ben-Hur_%281959_film%29
4992 <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>
4995 <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>
5000 Bug 4781: %26 in autonumber URL
5002 [http://www.example.com/?title=AT%26T]
5004 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5007 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5011 Bug 4781, 5267: %26 in autonumber URL
5013 [http://www.example.com/?title=100%25_Bran]
5015 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5018 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5022 Bug 4781, 5267: %28, %29 in autonumber URL
5024 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5026 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5029 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5034 Bug 4781: %26 in bracketed URL
5036 [http://www.example.com/?title=AT%26T link]
5038 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5041 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5045 Bug 4781, 5267: %25 in bracketed URL
5047 [http://www.example.com/?title=100%25_Bran link]
5049 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5054 Bug 4781, 5267: %28, %29 in bracketed URL
5056 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5058 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5061 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5065 External link containing a period in the anchor. (bug 63947)
5067 [//foo.org/bar#baz. bang]
5069 [//foo.org/bar. bang]
5071 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5072 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5075 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5076 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5080 External link containing a single quote. (bug 63947)
5084 [//foo.org/bar'baz bang]
5086 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5087 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5090 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5091 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5096 External link containing a period in the anchor. (bug 63947)
5098 [//foo.org/bar#baz. bang]
5100 [//foo.org/bar. bang]
5102 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5103 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5106 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5107 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5111 External link containing a single quote. (bug 63947)
5115 [//foo.org/bar'baz bang]
5117 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5118 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5121 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5122 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5127 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5129 Some [http://example.com/ pretty ''italics'' and stuff]!
5131 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5136 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5138 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5140 <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>
5145 External link containing double-single-quotes with no space separating the url from text in italics
5147 [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]].]
5149 <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>
5152 <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>
5154 <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>
5158 External link with comments in link text
5160 [http://www.google.com Google <!-- comment -->]
5162 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5167 URL-encoding in URL functions (single parameter)
5169 {{localurl:Some page|amp=&}}
5171 <p>/index.php?title=Some_page&amp=&
5176 URL-encoding in URL functions (multiple parameters)
5178 {{localurl:Some page|q=?&=&}}
5180 <p>/index.php?title=Some_page&q=?&amp=&
5187 http://example.com/index.php?foozoid%5B%5D=bar
5189 http://example.com/index.php?foozoid[]=bar
5191 <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>
5192 </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>
5195 <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>
5197 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5201 IPv6 urls (bug 21261)
5205 http://[2404:130:0:1000::187:2]/index.php
5207 <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>
5212 Non-extlinks in brackets
5221 [{{echo|foo}} ''bar'']
5222 [{{echo|foo}}l's] errand
5223 [{{echo|foo}}l's errand]
5225 [url=http://example.com]
5238 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5243 Percent encoding in external links
5245 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5247 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5250 <p><a rel="mw:ExtLink"
5251 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5255 Use url link syntax for links where the content is equal the link target
5259 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5262 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5266 Parenthesis in external links, especially URL links
5270 http://example.com/test)
5272 http://example.com/(test)
5274 http://example.com/((test)
5276 (http://example.com/(test))
5278 (http://example.com/(test)))))
5280 http://example.com/a)b
5282 [http://example.com) foo]
5284 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5285 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5286 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5287 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5288 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5289 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5290 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5291 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5294 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5295 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5296 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5297 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5298 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5299 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5300 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5301 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5305 Parenthesis in external links, w/ transclusion or comment
5307 (http://example.com/{{echo|hi}})
5309 (http://example.com<!-- hi -->)
5311 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5312 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5315 <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>
5317 <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>
5321 Serialize <a> tags with invalid link targets as plain text
5325 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5326 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5327 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5328 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5331 <nowiki>*</nowiki>text
5332 <nowiki>[[foo]]</nowiki>
5333 <nowiki>*a [[foo]]</nowiki>
5337 mw:ExtLink -vs- mw:WikiLink (T94723)
5341 <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>
5342 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5343 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5344 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5346 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5347 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5352 [[wikipedia:Foo|Bar]]
5353 [[wikipedia:Foo|Bar]]
5355 [[wikipedia:European_Robin|European Robin]]
5356 [[wikipedia:European_Robin|European Robin]]
5360 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5364 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5366 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5377 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5379 Normal text. '''''Bold italic text.''''' Normal text.
5381 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5382 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5387 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5388 # parser strips. The wikitext contains just the first half of the bold
5391 Unclosed and unmatched quotes
5393 '''''Bold italic text '''with bold deactivated''' in between.'''''
5395 '''''Bold italic text ''with italic deactivated'' in between.'''''
5399 ..spanning two paragraphs (should not work).'''
5401 '''Bold tag left open
5403 ''Italic tag left open
5407 <!-- Unmatching number of opening, closing tags: -->
5408 '''This year''''s election ''should'' beat '''last year''''s.
5410 ''Tom'''s car is bigger than ''Susan'''s.
5412 Plain ''italic'''s plain
5414 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5415 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5416 </p><p><b>Bold text..</b>
5417 </p><p>..spanning two paragraphs (should not work).
5418 </p><p><b>Bold tag left open</b>
5419 </p><p><i>Italic tag left open</i>
5421 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5422 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5423 </p><p>Plain <i>italic'</i>s plain
5426 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5427 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5428 </p><p><b>Bold text..</b>
5429 </p><p>..spanning two paragraphs (should not work).<b></b>
5430 </p><p><b>Bold tag left open</b>
5431 </p><p><i>Italic tag left open</i>
5434 <!-- Unmatching number of opening, closing tags: -->
5435 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5436 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5437 </p><p>Plain <i>italic'</i>s plain
5444 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5447 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5448 # is the bare minimum required by the spec, see:
5449 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5450 # Parsoid team replies: empty table tags are legal in HTML5
5452 A table with no data.
5465 A table with stray table end tags on start tag line (wt2html)
5469 {|style="color: red;"|}
5471 {|style="color: red;" |}
5475 {|style="color: red;"|} id="foo"
5479 {|style="color: red;" |} id="foo"
5483 <table style="color: red;"></table>
5485 <table style="color: red;">
5491 <table style="color: red;" id="foo">
5497 <table style="color: red;" id="foo">
5506 A table with no data (take 2)
5514 # A table with nothing but a caption is invalid XHTML, we might want to render
5515 # this as <p>caption</p>
5516 # Parsoid team replies: table with only a caption is legal in HTML5
5518 A table with nothing but a caption
5526 </caption><tr><td></td></tr></table>
5529 <table><caption> caption</caption></table>
5533 A table with caption with default-spaced attributes and a table row
5536 |+ style="color: red;" | caption1
5542 <caption style="color: red;"> caption1
5551 A table with captions with non-default spaced attributes and a table row
5554 |+style="color: red;"|caption2
5555 |+ style="color: red;"| caption3
5561 <caption style="color: red;">caption2
5563 <caption style="color: red;"> caption3
5572 Table td-cell syntax variations
5576 | foo bar foo || baz
5577 | style='color:red;' | baz
5578 | style='color:red;' || baz
5585 <td> foo bar foo </td>
5588 <td style="color:red;"> baz
5590 <td> style='color:red;' </td>
5618 Simple table but with multiple dashes for row wikitext
5637 Multiplication table
5639 {| border="1" cellpadding="2"
5640 |+Multiplication table
5642 ! × !! 1 !! 2 !! 3
5660 <table border="1" cellpadding="2">
5661 <caption>Multiplication table
5708 Accept "||" in table headings
5723 Accept "!!" in table data
5737 <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>
5742 Accept "||" in indented table headings
5752 </th></tr></table></dd></dl>
5757 Accept "!!" in templates
5771 <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>
5775 Accept "!!" in table headings after newline
5792 <p>b!!c</p></th></tr>
5797 Accept "!!" in table data of mixed wikitext / html syntax
5801 <tr><td>b!!c</td></tr>
5814 <tbody><tr><th>a</th></tr>
5815 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
5820 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5837 Accept "| !" at start of line in tables (ignore !-attribute)
5841 | !style="color:red" | bar
5853 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 +/-
5857 |style='color:red;'|+1
5858 |style='color:blue;'|-1
5870 <td style="color:red;">+1
5872 <td style="color:blue;">-1
5896 |rowspan=2| Cell 2, row 1 (and 2)
5907 <td rowspan="2"> Cell 2, row 1 (and 2)
5925 {| bgcolor=#ABCDEF border=2
5930 |the original table again
5938 <table bgcolor="#ABCDEF" border="2">
5946 <td>the original table again
5952 Invalid attributes in table cell (bug 1830)
5966 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
5970 | title="foo<nowiki>|</nowiki>" |bar
5971 | title="foo<nowiki>|</nowiki>" bar
5978 <td title="foo|">bar
5980 <td> title="foo|" bar
5985 # The "|}" to close the table is missing from the input, so parsoid's
5986 # *2wt modes will fail.
5988 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5990 parsoid=wt2html,html2html
5993 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5997 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5998 <td>]" onmouseover="alert(document.cookie)">test
6006 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6009 # FIXME: The php output is broken.
6011 ! and || in td attributes should not be parsed as <th>/<td>
6014 | style="color: red !important;" data-contrived="put this here ||" | foo
6019 <td> style="color: red !important;" data-contrived="put this here </td>
6025 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
6030 Indented table markup mixed with indented pre content (proposed in bug 6200)
6035 Text that should be rendered preformatted
6043 <pre>Text that should be rendered preformatted
6052 1. Template-generated table cell attributes and cell content
6057 || {{table_attribs_5}}
6058 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6059 |align=center {{table_attribs}}
6060 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6065 <td style="color:red;">Foo
6067 <td style="color:red;">Foo
6069 <td> style="color:red;"</td>
6072 <td style="color:red;">Foo
6074 <td align="center" style="color:red;">Foo
6076 <td align="center" style="color:red;">Foo
6082 2. Template-generated table cell attributes and cell content
6085 |{{table_attribs_2}}
6090 <td style="color:red;">Foo
6098 <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>
6099 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6104 3. Template-generated table cell attributes and cell content
6107 !align=center {{table_header_cells}}
6109 |align=center {{table_cells}}
6114 <th align="center" style="color:red;">Foo</th>
6115 <th style="color:red;"><i>Bar</i></th>
6116 <th style="color:brown;"><i>Foo</i> and Baz
6119 <td align="center" style="color:red;">Foo</td>
6120 <td style="color:red;"><i>Bar</i></td>
6121 <td style="color:brown;"><i>Foo</i> and Baz
6126 <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>
6127 <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>
6132 4. Template-generated table cell attributes and cell content inside a templated table
6135 !align=center {{table_header_cells}}
6137 |align=center {{table_cells}}
6142 <th align="center" style="color:red;">Foo</th>
6143 <th style="color:red;"><i>Bar</i></th>
6144 <th style="color:brown;"><i>Foo</i> and Baz
6147 <td align="center" style="color:red;">Foo</td>
6148 <td style="color:red;"><i>Bar</i></td>
6149 <td style="color:brown;"><i>Foo</i> and Baz
6153 <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}}]}'>
6154 <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>
6156 <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>
6161 Table with row followed by newlines and table heading
6179 Table with empty line following the start tag
6196 # FIXME: Preserve the attribute properly (with an empty string as value) in
6197 # the PHP parser. Parsoid implements the behavior below.
6199 Table attributes with empty value
6209 </td></tr></tbody></table>
6214 Wikitext table with a lot of comments
6237 Wikitext table comments represented in parsoid dom
6239 {|<!--c1--><!--c2-->
6250 <table><!--c1--><!--c2-->
6251 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6252 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6257 Wikitext table with double-line table cell
6274 Table cell with a single comment
6291 Table-cell after a comment-only-empty-line
6308 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6310 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6316 Build table with {{!}}
6318 {{{!}} class="wikitable"
6321 {{!}}- style="color:red;"
6322 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6325 <table class="wikitable">
6331 <tr style="color:red;">
6333 <td style="color:red;"> second data
6339 Build table with pipe as data
6341 {| class="wikitable"
6344 |- style="color:red;"
6345 | data || style="color:red;" | second data
6347 | style="color:red;" | data with | || style="color:red;" | second data with |
6349 || data with | ||| second data with |
6352 <table class="wikitable">
6358 <tr style="color:red;">
6360 <td style="color:red;"> second data
6363 <td style="color:red;"> data with | </td>
6364 <td style="color:red;"> second data with |
6367 <td> data with | </td>
6368 <td> second data with |
6374 Build table with wikilink
6376 {| class="wikitable"
6377 ! header || second header
6378 |- style="color:red;"
6379 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6381 | data || second data [[Main Page|link|text with pipe]]
6384 <table class="wikitable">
6389 <tr style="color:red;">
6390 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6391 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6395 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6400 # The expected HTML structure in this test is debatable. The PHP parser does
6401 # not parse this kind of table at all. The main focus for Parsoid is on
6402 # round-tripping, so this output is ok for now. TODO: revisit!
6404 Wikitext table with html-syntax row
6414 <td>foo</td></tr></tbody></table>
6417 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6418 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6419 ## PHP parser, which tidy then compounds by fostering the content
6420 ## entirely out of the table. Parsoid recognizes the table context
6421 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6422 ## depends on PHP's treatment of broken table markup!
6424 Implicit <td> after a |-
6426 parsoid=wt2html,html2html
6446 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6448 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6450 parsoid=wt2html,html2html
6483 <tr><td><pre>a</pre></td></tr>
6484 <tr><td> b</td></tr>
6489 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6490 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6492 Lists should be recognized in an implicit <td> context
6494 parsoid=wt2html,html2html
6521 Table cells not properly parsed in an implicit-td context
6525 {{table_attribs_4}} || a || b
6530 <td style="background-color:#DC241f;" width="10px"></td>
6537 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6538 <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>
6543 Parsoid: Round-trip tables directly followed by content (bug 51219)
6545 parsoid=wt2html,wt2wt
6570 Parsoid: Default to a newline after tables in new content (bug 51219)
6575 <tr><td>foo</td></tr></tbody></table> bar
6577 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6582 <nowiki> </nowiki>bar
6590 Parsoid: newline inducing block nodes don't suppress <nowiki>
6602 Parsoid: Row-syntax table headings followed by comment & table cells
6604 parsoid=wt2html,wt2wt
6608 <!-- foo --> || baz || quux
6622 <tbody><tr><th> foo </th><th> bar
6623 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6628 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6631 Parsoid: Recover better from broken table attributes
6651 <p>foo</p></td></tr>
6656 Strip unsupported table tags
6704 Testing serialization after deletion of table cells
6707 "modes": ["wt2wt", "selser"],
6715 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6728 Plain link, capitalized
6732 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6737 Plain link, uncapitalized
6741 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6748 [[Main Page|The Main Page]]
6750 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6755 Piped link with comment in link text
6757 [[Main Page|The Main<!--front--> Page]]
6759 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6764 Piped link with multiple pipe characters in link text
6766 [[Main Page||The|Main|Page|]]
6768 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6771 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6779 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6784 Broken link with fragment
6786 [[Zigzagzogzagzig#zug]]
6788 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6793 Special page link with fragment
6795 [[Special:Version#anchor]]
6797 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6802 Nonexistent special page link with fragment
6804 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6806 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6813 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6815 <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>
6822 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6824 <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>!!!
6835 Bug 43661: Piped links with identical prefixes
6837 [[prefixed article|prefixed articles with spaces]]
6839 [[prefixed article|prefixed articlesaoeu]]
6841 [[Main Page|Main Page test]]
6843 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6844 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6845 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6851 Link with HTML entity in suffix / tail
6853 [[Main Page]]", [[Main Page]]a
6855 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6858 <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>
6862 Link with 3 brackets
6871 Link with 4 brackets
6875 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6880 Piped link with 3 brackets
6882 [[[main page|the main page]]]
6884 <p>[[[main page|the main page]]]
6889 Piped link with extlink-like text
6892 [[Main Page|This is a [bar]]]
6894 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6895 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6898 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6899 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6903 Link with multiple pipes
6905 [[Main Page|The|Main|Page]]
6907 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6911 # Note that parsoid does not munge anchor text; all non-space
6912 # characters are valid in HTML5 ids.
6914 Anchor containing a #. (bug 63430)
6916 [[Main Page#And#Link]]
6918 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6921 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6927 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6929 <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>
6934 Link with space in namespace
6936 [[User talk:Foo bar]]
6938 <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>
6943 MemoryAlpha:AlphaTest
6945 This is an article in the MemoryAlpha namespace
6946 (which shadows the memoryalpha interwiki link).
6950 Namespace takes precedence over interwiki link (bug 51680)
6952 [[MemoryAlpha:AlphaTest]]
6954 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6958 # The previous test doesn't work correctly in html2*, due to not recognizing the
6959 # link as an internal one. This one checks for the correct behavior.
6961 Link to namespace preferred over interwiki with correct rel attribute
6963 parsoid=html2wt,html2html
6965 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6967 [[MemoryAlpha:AlphaTest]]
6971 Piped link to namespace
6973 [[Meta:Disclaimers|The disclaimers]]
6975 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6982 [[Usually caused by a typo (oops}]]
6984 <p>[[Usually caused by a typo (oops}]]
6991 Just a test of an article title containing a percent.
6995 Link containing % (not as a hex sequence)
6999 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7002 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7005 # note that the parsoid HTML is identical to the previous test output,
7006 # so the previous test ensures that the html2wt mode will generate the
7007 # "not as a hex sequence" wikitext.
7009 Link containing % as a single hex sequence interpreted to char
7011 parsoid=wt2wt,wt2html,html2html
7015 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7018 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7022 Link containing % as a double hex sequence interpreted to hex sequence
7026 <p>[[7%2525 Solution]]
7030 # note that parsoid does not munge anchor text; all non-space
7031 # characters are valid in HTML5 anchors.
7033 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7034 Example for such a section: == < ==
7036 [[%23%3c]][[%23%3e]]
7038 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7041 <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>
7045 Link containing "<#" and ">#" as a hex sequences
7047 [[%3c%23]][[%3e%23]]
7049 <p>[[%3c%23]][[%3e%23]]
7054 Link containing an equals sign
7056 [[Special:BookSources/isbn=4-00-026157-6]]
7058 <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>
7061 <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>
7067 Just a test of an article title containing a tilde.
7070 # note that links containing signatures, like [[Foo~~~~]], are
7071 # massaged by the pre-save transform (PST) and so the tildes are never
7072 # seen by the parser.
7074 Link containing a tilde
7078 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7081 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7085 Link containing double-single-quotes '' (bug 4598)
7087 [[Lista d''e paise d''o munno]]
7089 <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>
7092 <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>
7096 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7098 Some [[Link|pretty ''italics'' and stuff]]!
7100 <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>!
7103 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7107 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7109 ''Some [[Link|pretty ''italics'' and stuff]]!''
7111 <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>
7116 Link with double quotes in title part (literal) and alternate part (interpreted)
7118 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7122 [[''Pentecoste''|Pentecoste]]
7124 [[''Pentecoste''|''Pentecoste'']]
7126 <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>
7127 </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>
7128 </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>
7129 </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>
7132 <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>
7133 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7134 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7135 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7139 Broken image links with HTML captions (bug 39700)
7141 [[File:Nonexistent|<script></script>]]
7142 [[File:Nonexistent|100x100px|<script></script>]]
7143 [[File:Nonexistent|<]]
7144 [[File:Nonexistent|a<i>b</i>c]]
7146 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7147 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7148 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7149 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7152 <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>
7153 <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>
7154 <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>
7155 <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>
7161 [[http://www.example.com]]
7163 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7166 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7170 Plain link to URL with link text
7172 [[http://www.example.com Link text]]
7174 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7179 Plain link to protocol-relative URL
7181 [[//www.example.com]]
7183 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7186 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7190 Plain link to protocol-relative URL with link text
7192 [[//www.example.com Link text]]
7194 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7199 Plain link to page with question mark in title
7205 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7206 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7211 # I'm fairly sure the expected result here is wrong.
7212 # We want these to be URL links, not pseudo-pages with URLs for titles....
7213 # However the current output is also pretty screwy.
7216 # I'm changing it to match the current output--it arguably makes more
7217 # sense in the light of the test above. Old expected result was:
7218 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7220 # But I think this test is bordering on "garbage in, garbage out" anyway.
7225 Piped link to URL: [[http://www.example.com|an example URL]]
7227 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7230 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7234 BUG 2: [[page|http://url/]] should link to page, not http://url/
7236 [[Main Page|http://url/]]
7238 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7241 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7244 # Parsoid does not mark self-links, by design.
7246 BUG 337: Escaped self-links should be bold
7250 [[Bug462]] [[Bug462]]
7252 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7255 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7257 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7261 Self-link to section should not be bold
7265 [[Main Page#section]]
7267 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7278 Self-link to numeric title
7284 <p><strong class="selflink">0</strong>
7289 Link to numeric-equivalent title
7295 <p><a href="/wiki/00" title="00">00</a>
7300 <nowiki> inside a link
7302 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7304 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7309 Non-breaking spaces in title
7311 [[ Main Page ]]
7313 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7318 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7324 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7329 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7335 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7340 Internal link with en linktrail: no apostrophes (bug 27473)
7346 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7351 Internal link with ca linktrail with apostrophes (bug 27473)
7357 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7362 Internal link with kaa linktrail with apostrophes (bug 27473)
7368 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7373 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7375 [[User:Foo/Test/63636:Bar|Test]]
7377 <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>
7380 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7384 Purely hash wikilink
7386 title=[[User:test/123]]
7390 <p><a href="#a">b</a>
7393 <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>
7397 1. Interaction of linktrail and template encapsulation
7403 <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>
7407 2. Interaction of linktrail and template encapsulation
7411 {{echo|Some [[Fool]]}}s
7413 <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>
7417 3. Interaction of linktrail and template encapsulation
7421 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7423 <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>
7433 Internal link with is link prefix
7437 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7439 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7450 Internal link with is link trail and link prefix
7454 [[mótmælendatrú|xxx]]ar
7456 mótmælenda[[söfnuður]]
7457 mótmælenda[[söfnuður|söfnuðir]]
7458 mótmælenda[[söfnuður|söfnuðir]]xxx
7460 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7461 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7462 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7463 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7464 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7469 Parsoid link trail escaping
7471 parsoid=html2wt,html2html
7473 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7479 Parsoid link prefix escaping
7482 parsoid=html2wt,html2html
7484 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7486 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7490 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7498 [http://wp.org ''foo'']
7500 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7501 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7502 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7503 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7508 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7512 [[Foo|{{echo|a}} b {{echo|c}}]]
7514 <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>
7518 Link with angle bracket after anchor
7522 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7525 <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>
7529 ### Interwiki links (see maintenance/interwiki.sql)
7533 Inline interwiki link
7535 parsoid=wt2html,wt2wt,html2html
7537 [[MeatBall:SoftSecurity]]
7539 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7542 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7546 Inline interwiki link with empty title (bug 2372)
7548 parsoid=wt2html,wt2wt,html2html
7552 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7555 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7559 Interwiki link encoding conversion (bug 1636)
7561 *[[Wikipedia:ro:Olteniţa]]
7562 *[[Wikipedia:ro:Olteniţa]]
7564 <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>
7565 <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>
7569 <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>
7570 <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>
7575 Interwiki link with fragment (bug 2130)
7577 [[MeatBall:SoftSecurity#foo]]
7579 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7583 # Ideally the wikipedia: prefix here should be proto-relative too
7584 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7585 # define the 'en' prefix, and originally the test used 'wikipedia',
7586 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7589 Different interwiki prefixes mapping to the same URL
7597 [[:wikipedia:Foo|Foo]]
7599 [[wikipedia:en:Foo]]
7601 [[:wikipedia:en:Foo]]
7605 <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>
7607 <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>
7609 <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>
7611 <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>
7613 <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>
7615 <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>
7617 <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>
7621 Interwiki links that cannot be represented in wiki syntax
7624 [[meatball:ok#foo|ok with fragment]]
7625 [[meatball:ok_as_well?|ok ending with ? mark]]
7626 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7627 [http://de.wikipedia.org/wiki/#foo is just fragment]
7630 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7631 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7632 <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>
7633 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7634 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7637 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7638 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7639 <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>
7640 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7641 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7645 Interwiki links: trail
7647 [[wikipedia:Foo|Ba]]r
7649 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7652 <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>
7656 Local interwiki link
7658 parsoid=wt2html,wt2wt,html2html
7660 [[local:Template:Foo]]
7662 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7665 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7668 # Parsoid does not mark self-links, by design.
7670 Local interwiki link: self-link to current page
7673 parsoid=wt2html,wt2wt,html2html
7677 <p><strong class="selflink">local:Main Page</strong>
7680 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7684 Local interwiki link: prefix only (bug 64167)
7686 parsoid=wt2html,wt2wt,html2html
7690 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7693 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7697 Local interwiki link: with additional interwiki prefix (bug 61357)
7699 parsoid=wt2html,wt2wt,html2html
7701 [[local:meatball:Hello]]
7703 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7706 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7710 Multiple local interwiki link prefixes
7712 [[local:local:local:local:mi:local:Foo]]
7714 parsoid=wt2html,wt2wt,html2html
7716 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7719 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7723 ### Interlanguage links
7724 ### Language links (so that searching for '### language' matches..)
7730 parsoid=wt2html,wt2wt,html2html
7738 <p>Blah blah blah</p>
7739 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7743 Interlanguage link with spacing
7745 parsoid=wt2html,wt2wt,html2html
7753 <p>Blah blah blah</p>
7754 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7758 Double interlanguage link
7760 parsoid=wt2html,wt2wt,html2html
7769 <p>Blah blah blah</p>
7770 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7771 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7775 Interlanguage link variations
7777 parsoid=wt2html,wt2wt,html2html
7787 <p>Blah blah blah</p>
7788 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7789 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7790 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7794 Space and question mark encoding in interlanguage links (T95473)
7796 parsoid=wt2html,wt2wt,html2html
7804 <p>Blah blah blah</p>
7805 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
7809 Interlanguage link, with prefix links
7819 <p>Blah blah blah</p>
7820 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7824 Double interlanguage link, with prefix links (bug 8897)
7835 <p>Blah blah blah</p>
7836 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7837 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7841 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7849 <p>Blah blah blah</p>
7850 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7854 Parsoid-specific test: Wikilinks with should RT properly
7860 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7865 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7869 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7870 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7872 He&nbsp;llo [[Foo|He&nbsp;llo]]
7874 He&nbsp;llo [[He&nbsp;llo]]
7878 Parsoid: handle constructor well
7884 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7885 </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>
7888 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7890 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7899 # Note that `ko` isn't a known interlanguage prefix
7901 Parsoid: recognize interlanguage links without a target page
7911 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7913 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7916 # Note that `ko` isn't a known interwiki prefix
7918 Parsoid: recognize interwiki links without a target page
7920 parsoid=wt2html,wt2wt,html2html
7926 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7927 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7930 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7931 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7935 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7939 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7942 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7946 Interlanguage link with preceding local interwiki link (bug 68085)
7948 parsoid=wt2html,wt2wt,html2html
7951 [[local:es:Spanish]]
7954 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7958 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7962 Looks like an interlanguage link, but is actually a local interwiki
7964 parsoid=wt2html,wt2wt,html2html
7970 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7974 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7978 ### Redirects, Parsoid-only
7982 1. Simple redirect to page
7984 #REDIRECT [[Main Page]]
7986 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
7990 2. Other redirect variants
7992 #REDIRECT [[Main_Page]]
7994 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
7997 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
7998 # This tests the Parsoid bail-out code.
8000 3. Other redirect variants
8002 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8004 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8008 4. Redirect to a templated destination
8010 #REDIRECT [[{{echo|Foo}}bar]]
8012 <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"}]]}'/>
8018 parsoid=wt2html,wt2wt
8023 <li>REDIRECT [[]]</li></ol>
8027 Optional colon in #REDIRECT
8029 # the colon is archaic syntax. we support it for wt2html, but we
8030 # don't care that it roundtrips back to the modern syntax.
8031 parsoid=wt2html,html2html
8033 #REDIRECT:[[Main Page]]
8035 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8039 Whitespace in #REDIRECT with optional colon
8041 # the colon and gratuitous whitespace is archaic syntax. we support
8042 # it for wt2html, but we don't care that it roundtrips back to the
8043 # modern syntax (without extra whitespace)
8044 parsoid=wt2html,html2html
8051 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8055 Piped link in #REDIRECT
8057 # content after piped link is ignored. we support this syntax,
8058 # but don't care that the piped link is lost when we roundtrip this.
8061 #REDIRECT [[Main Page|bar]]
8063 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8067 Redirect to category (T104502)
8069 parsoid=wt2html,wt2wt
8071 #REDIRECT [[Category:Foo]]
8073 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8077 Redirect to category with URL encoding (T104502)
8081 #REDIRECT [[Category%3AFoo]]
8083 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8087 Redirect to category page
8089 #REDIRECT [[:Category:Foo]]
8091 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8095 Redirect to image page (1)
8097 #REDIRECT [[File:Wiki.png]]
8099 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8103 Redirect to image page (2)
8105 #REDIRECT [[Image:Wiki.png]]
8107 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8110 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8111 # Next test confirms this.
8113 Redirect to language (1) (T104918)
8115 parsoid=wt2html,wt2wt,html2html
8117 #REDIRECT [[en:File:Wiki.png]]
8119 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8123 Redirect to language (2) (T104918)
8125 #REDIRECT [[:en:File:Wiki.png]]
8127 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8131 Redirect to interwiki (T104918)
8133 #REDIRECT [[meatball:File:Wiki.png]]
8135 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8139 Non-English #REDIRECT
8143 #TILVÍSUN [[Main Page]]
8145 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8149 Redirect syntax under text isn't considered a redirect
8152 #redirect [[Main Page]]
8155 <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>
8158 # FIXME: Should hoist the redirect to the top of the page and ensure there
8165 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8185 Broken br tag sanitization
8193 # TODO: Fix html2html mode (bug 51055)!
8195 Parsoid: Broken br tag recognition
8208 Incorrecly removing closing slashes from correctly formed XHTML
8210 <br style="clear:both;" />
8212 <p><br style="clear:both;" />
8217 Failing to transform badly formed HTML into correct XHTML
8219 <br style="clear: left;">
8220 <br style="clear: right;">
8221 <br style="clear: both;">
8223 <p><br style="clear: left;" />
8224 <br style="clear: right;" />
8225 <br style="clear: both;" />
8229 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8230 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8232 Handling html with a div self-closing tag
8241 <p><div title />
8245 <p><div title=bar />
8246 <div title=bar/>
8248 <div title="bar/"></div>
8252 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8253 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8254 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8255 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8256 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8257 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8261 Handling html with a br self-closing tag
8270 <p><br title="title" />
8271 <br title="title" />
8288 Horizontal ruler (should it add that extra space?)
8303 Horizontal ruler -- 4+ dashes render hr
8312 Horizontal ruler -- eats additional dashes on the same line
8321 Horizontal ruler -- does not collapse dashes on consecutive lines
8332 Horizontal ruler -- <4 dashes render as plain text
8341 Horizontal ruler -- Supports content following dashes on same line
8353 ### Block-level elements
8362 <ul><li>Common list</li>
8364 <li>item 3</li></ul>
8375 <ol><li>Numbered list</li>
8377 <li> item 3</li></ol>
8391 ***#Number on level 4
8393 **#Number on level 3
8394 **#Number on level 3
8398 #** Level 3, but ordered
8401 <ol><li> with numbers</li></ol>
8402 <ul><li> and bullets</li></ul>
8403 <ol><li> and numbers</li></ol></li>
8405 <ul><li>bullet level 2
8406 <ul><li>bullet level 3
8407 <ol><li>Number on level 4</li></ol></li></ul></li>
8409 <ol><li>Number on level 3</li>
8410 <li>Number on level 3</li></ol></li></ul>
8411 <ol><li>number level 2</li></ol></li>
8413 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8414 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8425 <ul><li>bar</li></ul></li></ul>
8435 <ul><li><ul><li>foo</li></ul></li>
8441 Nested lists 3 (first element empty)
8447 <ul><li>bar</li></ul></li></ul>
8452 Nested lists 4 (first element empty)
8457 <ul><li><ul><li></li></ul></li>
8463 Nested lists 5 (both elements empty)
8468 <ul><li><ul><li></li></ul></li>
8474 Nested lists 6 (both elements empty)
8480 <ul><li></li></ul></li></ul>
8485 Nested lists 7 (skip initial nesting levels)
8489 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8494 Nested lists 8 (multiple nesting transitions)
8502 <ul><li><ul><li> bar</li></ul></li>
8503 <li> baz</li></ul></li>
8509 Nested lists 9 (extension interaction)
8515 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8519 1. Lists with start-of-line-transparent tokens before bullets: Comments
8532 2. Lists with start-of-line-transparent tokens before bullets: Template close
8537 <ul><li>foo bar</li>
8543 List items are not parsed correctly following a <pre> block (bug 785)
8549 <ul><li> <pre>foo</pre></li>
8550 <li> <pre>bar</pre></li>
8554 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8555 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8560 List items from template
8571 * notSOL{{inner list}}
8574 <ul><li> item 1</li>
8575 <li> item 2</li></ul>
8576 <ul><li> item 0</li>
8578 <li> item 2</li></ul>
8579 <ul><li> item 0</li>
8582 <li> item 2</li></ul>
8587 List interrupted by empty line or heading
8595 <ul><li> foo</li></ul>
8596 <ul><li><ul><li> bar</li></ul></li></ul>
8597 <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>
8598 <ul><li> Another list item</li></ul>
8603 Multiple list tags generated by templates
8624 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8627 <!--This line will NOT split the list-->
8629 <!--This line will NOT split the list either-->
8631 <!--foo--> <!----> <!--This line NOT split the list either-->
8642 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8645 <!--This line will NOT split the list-->
8647 <!--This line will NOT split the list either-->
8649 <!--foo--> <!----> <!--This line NOT split the list
8662 (The PHP parser relies on Tidy for the hack)
8664 parsoid=wt2html,wt2wt
8668 * {{echo|<li>templated li-hack}}
8669 * <!--foo--> <li> unsupported li-hack with preceding comments
8672 <li><li>not a li-hack
8679 <li>templated li-hack</li>
8680 <li>unsupported li-hack with preceding comments</li>
8683 <li>not a li-hack</li>
8688 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8715 Parsoid: Test of whitespace serialization with Templated bullets
8722 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8726 # ------------------------------------------------------------------------
8727 # The next set of tests are about Parsoid's ability to handle badly nested
8728 # tags (parse, minimize scope of fixup, and roundtrip back)
8729 # ------------------------------------------------------------------------
8732 Unbalanced closing block tags break a list
8733 (php parser relies on Tidy to fix up)
8751 # Parsoid fails this test, but it might be tricky to support properly.
8754 Unbalanced closing non-block tags don't break a list
8755 (php parser relies on Tidy to fix up)
8762 <li><span>a</span></li>
8763 <li><span>b</span></li>
8777 Unclosed formatting tags that straddle lists are closed and reopened
8778 (php parser relies on Tidy to fix up)
8780 parsoid=wt2html,wt2wt,html2html
8790 <ol><li> <s> a</s></li>
8791 <li><s> b </s></li></ol>
8796 1. List embedded in a formatting tag
8803 <li><small>foo</small></li>
8813 ## Ugly Parsoid output here
8814 ## Not sure what the right output is.
8816 2. List embedded in a formatting tag
8823 <li><small>a</small></li>
8824 <li><small>b</small></li>
8831 <li><small>b</small></li>
8835 # Ugly Parsoid and PHP parser output here
8836 # Not sure if we want to make this a test!
8839 ## 3. Unclosed formatting tags in list elements
8845 ## <li><small>a</small></li>
8846 ## <li><small><small>b</small></small></li>
8850 ## <li><small>a</small></li>
8852 ## <li><small>b</small></li>
8856 # This is a bug in the PHP parser + tidy combination.
8857 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8858 # and then fostered out of the table by tidy.)
8859 # We believe the Parsoid output to be correct.
8861 Table with missing opening <tr> tag
8863 parsoid=wt2html,wt2wt
8881 # Note that the current date is hard-coded as
8882 # 1970-01-01T00:02:03Z (a Thursday)
8883 # when running parser tests. The timezone is also fixed to GMT, so
8884 # local date will be identical to current date.
8887 Magic Word: {{CURRENTDAY}}
8896 Magic Word: {{CURRENTDAY2}}
8905 Magic Word: {{CURRENTDAYNAME}}
8914 Magic Word: {{CURRENTDOW}}
8923 Magic Word: {{CURRENTMONTH}}
8932 Magic Word: {{CURRENTMONTH1}}
8941 Magic Word: {{CURRENTMONTHABBREV}}
8943 {{CURRENTMONTHABBREV}}
8950 Magic Word: {{CURRENTMONTHNAME}}
8952 {{CURRENTMONTHNAME}}
8959 Magic Word: {{CURRENTMONTHNAMEGEN}}
8961 {{CURRENTMONTHNAMEGEN}}
8968 Magic Word: {{CURRENTTIME}}
8977 Magic Word: {{CURRENTHOUR}}
8986 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8995 Magic Word: {{CURRENTYEAR}}
9004 Magic Word: {{CURRENTTIMESTAMP}}
9006 {{CURRENTTIMESTAMP}}
9013 Magic Words LOCAL (UTC)
9017 * {{LOCALMONTHNAME}}
9018 * {{LOCALMONTHNAMEGEN}}
9019 * {{LOCALMONTHABBREV}}
9028 * {{LOCALTIMESTAMP}}
9043 <li> 19700101000203</li></ul>
9048 Magic Word: {{FULLPAGENAME}}
9050 title=[[User:Ævar Arnfjörð Bjarmason]]
9054 <p>User:Ævar Arnfjörð Bjarmason
9059 Magic Word: {{FULLPAGENAMEE}}
9061 title=[[User:Ævar Arnfjörð Bjarmason]]
9065 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9070 Magic Word: {{TALKSPACE}}
9072 title=[[User:Ævar Arnfjörð Bjarmason]]
9081 Magic Word: {{TALKSPACE}}, same namespace
9083 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9092 Magic Word: {{TALKSPACE}}, main namespace
9094 title=[[Parser Test]]
9103 Magic Word: {{TALKSPACEE}}
9105 title=[[User:Ævar Arnfjörð Bjarmason]]
9114 Magic Word: {{SUBJECTSPACE}}
9116 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9125 Magic Word: {{SUBJECTSPACE}}, same namespace
9127 title=[[User:Ævar Arnfjörð Bjarmason]]
9136 Magic Word: {{SUBJECTSPACE}}, main namespace
9138 title=[[Parser Test]]
9146 Magic Word: {{SUBJECTSPACEE}}
9148 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9157 Magic Word: {{NAMESPACE}}
9159 title=[[User:Ævar Arnfjörð Bjarmason]]
9168 Magic Word: {{NAMESPACEE}}
9170 title=[[User:Ævar Arnfjörð Bjarmason]]
9179 Magic Word: {{NAMESPACENUMBER}}
9181 title=[[User:Ævar Arnfjörð Bjarmason]]
9190 Magic Word: {{SUBPAGENAME}}
9192 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9201 Magic Word: {{SUBPAGENAMEE}}
9203 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9212 Magic Word: {{ROOTPAGENAME}}
9214 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9218 <p>Ævar Arnfjörð Bjarmason
9223 Magic Word: {{ROOTPAGENAMEE}}
9225 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9229 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9234 Magic Word: {{BASEPAGENAME}}
9236 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9240 <p>Ævar Arnfjörð Bjarmason
9245 Magic Word: {{BASEPAGENAMEE}}
9247 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9251 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9256 Magic Word: {{TALKPAGENAME}}
9258 title=[[User:Ævar Arnfjörð Bjarmason]]
9262 <p>User talk:Ævar Arnfjörð Bjarmason
9267 Magic Word: {{TALKPAGENAMEE}}
9269 title=[[User:Ævar Arnfjörð Bjarmason]]
9273 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9278 Magic Word: {{SUBJECTPAGENAME}}
9280 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9284 <p>User:Ævar Arnfjörð Bjarmason
9289 Magic Word: {{SUBJECTPAGENAMEE}}
9291 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9293 {{SUBJECTPAGENAMEE}}
9295 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9300 Magic Word: {{NUMBEROFFILES}}
9309 Magic Word: {{PAGENAME}}
9311 title=[[User:Ævar Arnfjörð Bjarmason]]
9315 <p>Ævar Arnfjörð Bjarmason
9320 Magic Word: {{PAGENAME}} with metacharacters
9322 title=[['foo & bar = baz']]
9326 <p><i>'foo & bar = baz'</i>
9329 <p><i>'foo & bar = baz'</i></p>
9333 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9335 title=[[*RFC 1234 http://example.com/]]
9339 <p>*RFC 1234 http://example.com/
9342 <p>*RFC 1234 http://example.com/</p>
9346 Magic Word: {{PAGENAMEE}}
9348 title=[[User:Ævar Arnfjörð Bjarmason]]
9352 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9357 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9359 title=[[*RFC 1234 http://example.com/]]
9363 <p>*RFC_1234_http://example.com/
9366 <p>*RFC_1234_http://example.com/</p>
9370 Magic Word: {{REVISIONID}}
9379 Magic Word: {{SCRIPTPATH}}
9388 Magic Word: {{STYLEPATH}}
9397 Magic Word: {{SERVER}}
9401 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9406 Magic Word: {{SERVERNAME}}
9415 Magic Word: {{SITENAME}}
9424 Case-sensitive magic words, when cased differently, should just be template transclusions
9431 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9432 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9433 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9434 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9439 Case-insensitive magic words should still work with weird casing.
9449 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9453 # From plwiki:PLOS_ONE
9455 Parsoid: Page property magic word with magic word contents
9457 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9459 <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>"}]]}'/>
9463 Parsoid: Template-generated DISPLAYTITLE
9465 {{{{echo|DISPLAYTITLE}}:Foo}}
9467 <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}}]}'/>
9471 Namespace 1 {{ns:1}}
9480 Namespace 1 {{ns:01}}
9489 Namespace 0 {{ns:0}} (bug 4783)
9497 Namespace 0 {{ns:00}} (bug 4783)
9505 Namespace -1 {{ns:-1}}
9514 Namespace User {{ns:User}}
9523 Namespace User talk {{ns:User_talk}}
9532 Namespace User talk {{ns:uSeR tAlK}}
9541 Namespace File {{ns:File}}
9550 Namespace File {{ns:Image}}
9559 Namespace (lang=de) Benutzer {{ns:User}}
9570 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9576 <p>Benutzer Diskussion
9584 {{urlencode:hi world?!}}
9585 {{urlencode:hi world?!|WIKI}}
9586 {{urlencode:hi world?!|PATH}}
9587 {{urlencode:hi world?!|QUERY}}
9597 Magic Word: prioritize type info over data-parsoid
9601 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9607 Magic Word: serialize on separate line (parsoid)
9609 parsoid=wt2wt,html2wt
9615 foo<meta property="mw:PageProp/notoc"/>bar
9619 Magic Word: rt non-english wikis
9626 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9633 Magic links: internal link to RFC (bug 479)
9637 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9642 Magic links: RFC (bug 479)
9646 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9651 Magic links: RFC (bug 65278)
9653 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9655 <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.
9660 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9662 RFC      822
9666 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9673 Magic links: ISBN (bug 1937)
9677 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9682 Magic links: ISBN (bug 65278)
9684 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9686 <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.
9689 <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>
9693 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9695 ISBN      978 0 316 09811 3
9701 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9710 Magic links: PMID incorrectly converts space to underscore
9714 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9719 Magic links: PMID (bug 65278)
9721 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9723 <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.
9728 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9730 PMID      1234
9734 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9745 Nonexistent template
9747 {{thistemplatedoesnotexist}}
9749 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9754 Template with invalid target containing tags
9756 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9758 <p>{{a<b>b</b>|foo|a=b|a = b}}
9763 Template with invalid target containing unclosed tag
9765 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9767 <p>{{a<b>|foo|a=b|a = b}}</b>
9772 Template with invalid target containing wikilink
9776 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9779 <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>
9783 Template with just whitespace in it, bug #68421
9787 <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>
9793 This is a test template
9801 <p>This is a test template
9806 Template with explicit namespace
9810 <p>This is a test template
9818 This is a test template with parameter {{{param}}}
9824 {{paramtest|param=foo}}
9826 <p>This is a test template with parameter foo
9831 Template:paramtestnum
9837 Template unnamed parameter
9839 {{paramtestnum|Main Page|the main page}}
9841 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9846 Template:templatesimple
9852 Template:templateredirect
9854 #redirect [[Template:templatesimple]]
9858 Template:templateasargtestnum
9864 Template:templateasargtest
9866 {{template{{{templ}}}}}
9870 Template:templateasargtest2
9876 Template with template name as unnamed argument
9878 {{templateasargtestnum|templatesimple}}
9885 Template with template name as argument
9887 {{templateasargtest|templ=simple}}
9894 Template with template name as argument (2)
9896 {{templateasargtest2|templ=templatesimple}}
9903 Template:templateasargtestdefault
9905 {{{{{templ|templatesimple}}}}}
9915 Template with default value
9917 {{templateasargtestdefault}}
9924 Template with default value (value set)
9926 {{templateasargtestdefault|templ=templa}}
9935 {{templateredirect}}
9940 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
9944 Template with argument in separate line
9946 {{ templateasargtest |
9954 Template with complex template as argument
9957 param ={{ templateasargtest |
9960 <p>This is a test template with parameter (test)
9965 Template with thumb image (with link in description)
9967 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9969 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>
9972 <p>This is a test template with parameter</p>
9973 <div class="thumb tright">
9974 <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>
9975 <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>
9979 <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>
9983 Template:complextemplate
9985 {{{1}}} {{paramtest|
9986 param ={{{param}}}}}
9990 Template with complex arguments
9993 param ={{ templateasargtest |
9994 templ = simple }}|[[Template:complextemplate|link]]}}
9996 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10001 BUG 553: link with two variables in a piped link
10004 |[[{{{1}}}|{{{2}}}]]
10009 <td>[[{{{1}}}|{{{2}}}]]
10015 Magic variable as template parameter
10017 {{paramtest|param={{SITENAME}}}}
10019 <p>This is a test template with parameter MediaWiki
10026 [[{{{param}}}|link]]
10030 Template parameter as link source
10032 {{linktest|param=Main Page}}
10034 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10039 Template:paramtest2
10041 including another template, {{paramtest|param={{{arg}}}}}
10045 Template passing argument to another template
10047 {{paramtest2|arg='hmm'}}
10049 <p>including another template, This is a test template with parameter 'hmm'
10060 Template as link source
10064 [[{{linktest2}}|Main Page]]
10066 [[{{linktest2}}]]Page
10068 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10069 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10070 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10088 Template infinite loop
10092 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10097 Template from main namespace
10116 BUG 529: Template with table, not included at beginning of line
10135 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10155 BUG 41: Template parameters shown as broken links
10164 Template with targets containing wikilinks
10168 {{[[{{echo|foo}}]]}}
10170 {{{{echo|[[foo}}]]}}
10172 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10173 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10185 Templates: Double quotes as template target
10192 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10197 Template:MSGNW test
10199 ''None'' of '''this''' should be
10201 but rather passed unmodified
10208 # hmm, fix this or just deprecate msgnw and document its behavior?
10212 {{msgnw:MSGNW test}}
10214 <p>''None'' of '''this''' should be
10216  but rather passed unmodified
10217 {{test}}
10227 {{int:youhavenewmessages|lots of money|not!}}
10229 <p>You have lots of money (not!).
10236 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10240 <includeonly> and <noinclude> being included
10251 <onlyinclude>Foo</onlyinclude>bar
10255 <onlyinclude> being included
10267 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10271 <onlyinclude> and <includeonly> being included
10280 <includeonly> and <noinclude> on a page
10282 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10289 Un-closed <noinclude>
10296 <onlyinclude> on a page
10298 <onlyinclude>Foo</onlyinclude>bar
10305 Un-closed <onlyinclude>
10312 Self-closed noinclude, includeonly, onlyinclude tags
10323 Unbalanced includeonly and noinclude tags
10327 |b</noinclude></noinclude>
10328 |c</noinclude></includeonly>
10329 |d</includeonly></includeonly>
10338 <td>c</includeonly>
10340 <td>d</includeonly></includeonly>
10346 Template:Includeonly section
10349 ==Includeonly section==
10355 Bug 6563: Edit link generation for section shown by <includeonly>
10357 {{includeonly section}}
10359 <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>
10360 <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>
10364 # Uses same input as the contents of [[Template:Includeonly section]]
10366 Bug 6563: Section extraction for section shown by <includeonly>
10371 ==Includeonly section==
10379 Bug 6563: Edit link generation for section suppressed by <includeonly>
10382 ==Includeonly section==
10386 <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>
10391 Bug 6563: Section extraction for section suppressed by <includeonly>
10396 ==Includeonly section==
10404 Un-closed <includeonly>
10411 Includes and comments at SOL
10413 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10417 </noinclude>* stuff
10420 <includeonly>can have stuff</includeonly>=== here ===
10423 <h2><span class="mw-headline" id="hu">hu</span></h2>
10426 <ul><li> stuff</li>
10427 <li> here</li></ul>
10428 <h3><span class="mw-headline" id="here">here</span></h3>
10431 <!-- 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>
10433 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10435 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10436 <li> here</li></ul>
10438 <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>
10442 # TODO: test with DOM fragment reuse!
10444 Parsoid: DOM fragment reuse
10446 parsoid=wt2wt,wt2html
10448 a{{echo|b<table></table>c}}d
10460 <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>
10462 <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">
10463 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10464 </span><p about="#mwt2">cd</p>
10466 <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">
10468 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10470 </span><p about="#mwt3">b</p>
10474 Parsoid: Merge double tds (bug 50603)
10479 |{{echo|{{!}} foo}}
10483 <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>
10488 Parsoid: Merge double tds in nested transclusion content (bug 50603)
10494 |{{echo|{{!}} foo}}
10498 <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}}]}'>
10500 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10506 ### <includeonly> and <noinclude> in attributes
10509 0. includeonly around the entire attribute
10511 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10513 <p><span id="v2">bar</span>
10518 1. includeonly in html attr key
10520 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10522 <p><span id="foo">bar</span>
10527 2. includeonly in html attr value
10529 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10530 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10532 <p><span id="v1">bar</span>
10533 <span id="v1">bar</span>
10538 3. includeonly in part of an attr value
10540 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10542 <p><span style="color:red;">bar</span>
10547 4. includeonly in table attributes
10571 ### Token Stream Patcher tests
10573 ### These tests won't always pass wt2wt and other modes because
10574 ### on serialization, the table will be output on a new line.
10575 ### For now, we are blacklisting them, and using this to test selser.
10579 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10581 parsoid=wt2html,wt2wt
10583 {{echo|}}{| width = '100%'
10587 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10588 <tbody><tr><td>foo</td></tr>
10593 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10595 parsoid=wt2html,wt2wt
10597 <includeonly>a</includeonly>{| {{{b}}}
10601 <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}}}":""}}'>
10602 <tbody><tr><td>c</td></tr>
10608 ### Testing parsing of templates where a template arg
10609 ### has the same name as the template itself.
10615 {{{quote|{{{1}}}}}}
10619 Templates: Template Name/Arg clash: 1. Use of positional param
10628 Templates: Template Name/Arg clash: 2. Use of named param
10630 {{quote|quote=foo}}
10637 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10646 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10650 Templates: 1. Simple use
10659 Templates: 2. Inside a block tag
10661 <div>{{echo|Foo}}</div>
10662 <blockquote>{{echo|Foo}}</blockquote>
10665 <blockquote>Foo</blockquote>
10675 Templates: P-wrapping: 1a. Templates on consecutive lines
10686 Templates: P-wrapping: 1b. Templates on consecutive lines
10700 Templates: P-wrapping: 1c. Templates on consecutive lines
10703 {{echo|bar}} <div>baz</div>
10716 Templates: P-wrapping: 1d. Template preceded by comment-only line
10725 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10729 Templates: Inline Text: 1. Multiple template uses
10731 {{echo|Foo}}bar{{echo|baz}}
10738 Templates: Inline Text: 2. Back-to-back template uses
10740 {{echo|Foo}}{{echo|bar}}
10747 Templates: Block Tags: 1. Multiple template uses
10749 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10751 <div>Foo</div><div>bar</div><div>baz</div>
10756 Templates: Block Tags: 2. Back-to-back template uses
10758 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10760 <div>Foo</div><div>bar</div>
10764 # This is an edge case relating to paragraph wrapping.
10766 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10771 <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
10776 Templates: Links: 1. Simple example
10778 {{echo|[[Foo|bar]]}}
10780 <p><a href="/wiki/Foo" title="Foo">bar</a>
10785 Templates: Links: 2. Generation of link href
10787 [[{{echo|Foo}}|bar]]
10789 <p><a href="/wiki/Foo" title="Foo">bar</a>
10794 Templates: Links: 3. Generation of part of a link href
10796 [[Fo{{echo|o}}|bar]]
10798 [[Foo{{echo|bar}}]]
10800 [[Foo{{echo|bar}}baz]]
10802 [[Foo{{echo|bar}}|bar]]
10804 [[:Foo{{echo|bar}}]]
10806 [[:Foo{{echo|bar}}|bar]]
10808 <p><a href="/wiki/Foo" title="Foo">bar</a>
10809 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10810 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10811 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10812 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10813 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10818 Templates: Links: 4. Multiple templates generating link href
10820 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10822 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10827 Templates: Links: 5. Generation of link text
10829 [[Foo|{{echo|bar}}]]
10831 <p><a href="/wiki/Foo" title="Foo">bar</a>
10836 Templates: Links: 5. Nested templates (only outermost template should be marked)
10838 {{echo|[[{{echo|Foo}}|bar]]}}
10840 <p><a href="/wiki/Foo" title="Foo">bar</a>
10845 Templates: HTML Tag: 1. Generation of HTML attr. key
10847 <div {{echo|style}}="color:red;">foo</div>
10849 <div style="color:red;">foo</div>
10854 Templates: HTML Tag: 2. Generation of HTML attr. value
10856 <div style={{echo|'color:red;'}}>foo</div>
10858 <div style="color:red;">foo</div>
10863 Templates: HTML Tag: 3. Generation of HTML attr key and value
10865 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10867 <div style="color:red;">foo</div>
10872 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10874 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10876 <div title="This is a long title with just one piece templated">foo</div>
10881 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10883 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10885 <div title="This is a long title with just one piece templated">foo</div>
10890 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10892 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10894 <div title="This is a long title with just one piece templated">foo</div>
10898 # SSS FIXME: While it is great we added support for all this,
10899 # do we want to make this part of the spec? Maybe we want to
10900 # deprecate this kind of usage in the future?
10902 Templates: HTML Tag: 7. Generation of partial attribute key string
10904 <div st{{echo|yle}}="color:red;">foo</div>
10906 <div style="color:red;">foo</div>
10911 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10913 <div {{echo|1=id="v1"}}>bar</div>
10915 <div id="v1">bar</div>
10920 Templates: HTML Tag: 9. Multiple template-generated attributes
10922 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10924 <div id="v1" title="foo">bar</div>
10929 Templates: Support for templates generating attributes and content
10931 {| {{mixed_attr_content_template}}
10936 <table style="color:red;" title="T48811">
10946 <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|}"]}'>
10955 1. Entities and nowikis inside templated attributes should be handled correctly
10957 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
10959 <div style="background:#f9f9f9;">foo</div>
10962 <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>
10966 2. Entities and nowikis inside templated attributes should be handled correctly
10969 |{{table_attribs_3}}
10974 <td style="background:#f9f9f9;">Foo
10979 <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>
10984 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
10987 |{{table_attribs_3}}
10992 <td style="background:#f9f9f9;">Foo
10996 <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}}]}'>
10997 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11002 Templates: HTML Tables: 1. Generating start of a HTML table
11004 {{echo|<table><tr><td>foo</td>}}</tr></table>
11006 <table><tr><td>foo</td></tr></table>
11011 Templates: HTML Tables: 2a. Generating middle of a HTML table
11013 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11015 <table><tr><td>foo</td></tr></table>
11020 Templates: HTML Tables: 2b. Generating middle of a HTML table
11022 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11024 <table><tr><td>foo</td></tr></table>
11029 Templates: HTML Tables: 3. Generating end of a HTML table
11031 <table><tr>{{echo|<td>foo</td></tr></table>}}
11033 <table><tr><td>foo</td></tr></table>
11038 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11040 {{echo|<table>}}<tr><td>foo</td></tr></table>
11042 <table><tr><td>foo</td></tr></table>
11047 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11049 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11051 <table><tr><td>foo</td></tr></table>
11056 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11058 <table><tr>{{echo|<td>}}foo</td></tr></table>
11060 <table><tr><td>foo</td></tr></table>
11065 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11067 <table><tr><td>foo{{echo|</td>}}</tr></table>
11069 <table><tr><td>foo</td></tr></table>
11074 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11076 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11078 <table><tr><td>foo</td></tr></table>
11083 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11085 <table><tr><td>foo</td></tr>{{echo|</table>}}
11087 <table><tr><td>foo</td></tr></table>
11092 Templates: HTML Tables: 5. Proper fostering of categories from inside
11094 parsoid=wt2html,wt2wt
11096 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11097 <!--Two categories (Bug 50330)-->
11098 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11100 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11101 <!--Two categories (Bug 50330)-->
11102 <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>
11106 Templates: Wiki Tables: 1a. Fostering of entire template content
11114 <tr><td></td></tr></table>
11126 Templates: Wiki Tables: 1b. Fostering of entire template content
11139 <tr><td></td></tr></table>
11153 Templates: Wiki Tables: 2. Fostering of partial template content
11163 <tr><td></td></tr></table>
11176 Templates: Wiki Tables: 3. td-content via multiple templates
11179 {{echo|{{pipe}}a}}{{echo|b}}
11190 Templates: Wiki Tables: 4. Templated tags, no content
11196 <tr><td></td></tr></table>
11201 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11215 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11228 ## This test case is very specific to Parsoid's internals
11229 ## and is hence only tested for Parsoid's code. Parsoid uses
11230 ## a <meta> marker tag for <ref> tags and they are expanded
11231 ## much later. We are verifying that this <meta> tag usage
11232 ## doesn't prevent foster parenting.
11234 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11236 {{PartialTable}}<ref>foo</ref>
11241 <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">
11245 <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>
11249 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11259 <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{{!}}}"]}'>
11260 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11264 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11269 Templates: Lists: Multi-line list-items via templates
11271 *{{echo|a {{nonexistent|
11273 *{{echo|b {{nonexistent|
11276 <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>
11277 <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>
11282 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11284 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11286 <p><i>ab</i>c<i>d</i>e
11291 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11292 (PHP parser generates misnested html)
11294 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11296 <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>
11300 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11301 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11303 parsoid=wt2html,wt2wt
11305 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11307 <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>
11308 <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>
11309 <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>
11313 Templates: Ugly nesting: 4. Divs opened/closed across templates
11315 a<div>b{{echo|c</div>d}}e
11326 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11332 |{{echo|foo</table>}}
11336 <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|}"]}'>
11340 <td>foo</td></tr></tbody></table><span about="#mwt1">
11341 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11346 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11356 <td>1. {{echo|foo </table>}}</td>
11358 <td>2. {{echo|baz </table>}}</td>
11371 <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>"]}'>
11376 <td>1. foo </td></tr></tbody></table></td>
11378 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11379 </span><span about="#mwt2">
11380 </span><span about="#mwt2">
11381 </span><span about="#mwt2">abc</span><span about="#mwt2">
11382 </span><span about="#mwt2">
11383 </span><span about="#mwt2">
11384 </span><span about="#mwt2">
11385 </span><span about="#mwt2">
11386 </span><span about="#mwt2">
11387 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11388 </span><span about="#mwt2">
11393 Templates: Ugly templates: 3. newline-only template parameter
11402 # This looks like a bug: a single newline triggers p/br for some reason.
11404 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11413 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11414 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11416 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11422 <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
11423 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11427 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11428 # that are "identical" and generate nesting cycles in the algorithm
11430 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11432 {{echo|<table><tr><td><table>}}
11436 <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"}'>
11437 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11438 </table></td></tr></tbody></table>
11442 Parser Functions: 1. Simple example
11451 Parser Functions: 2. Nested use (only outermost should be marked up)
11460 ### Pre-save transform tests
11463 pre-save transform: subst:
11469 This is a test template
11473 pre-save transform: normal template
11483 pre-save transform: nonexistent template
11487 {{thistemplatedoesnotexist}}
11489 {{thistemplatedoesnotexist}}
11494 pre-save transform: subst magic variables
11503 # This is bug 89, which I fixed. -- wtm
11505 pre-save transform: subst: templates with parameters
11509 {{subst:paramtest|param="something else"}}
11511 This is a test template with parameter "something else"
11515 Template:nowikitest
11517 <nowiki>'''not wiki'''</nowiki>
11521 pre-save transform: nowiki in subst (bug 1188)
11525 {{subst:nowikitest}}
11527 <nowiki>'''not wiki'''</nowiki>
11532 Template:commenttest
11534 This template has <!-- a comment --> in it.
11538 pre-save transform: comment in subst (bug 1936)
11542 {{subst:commenttest}}
11544 This template has <!-- a comment --> in it.
11548 pre-save transform: unclosed tag
11552 <nowiki>'''not wiki'''
11554 <nowiki>'''not wiki'''
11558 pre-save transform: mixed tag case
11562 <NOwiki>'''not wiki'''</noWIKI>
11564 <NOwiki>'''not wiki'''</noWIKI>
11568 pre-save transform: unclosed comment in <nowiki>
11572 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11574 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11577 # Leading @ in this template definition works around a limitation
11578 # in parsoid's parserTests which otherwise strips the <span> from the
11579 # result (confusing it for a template wrapper)
11583 @<span onmouseover="alert('crap')">Oh no</span>
11587 (confirming safety of fix for subst bug 1936)
11589 {{Template:dangerous}}
11591 <p>@<span>Oh no</span>
11596 pre-save transform: comment containing gallery (bug 5024)
11600 <!-- <gallery>data</gallery> -->
11602 <!-- <gallery>data</gallery> -->
11606 pre-save transform: comment containing extension
11610 <!-- <tag>data</tag> -->
11612 <!-- <tag>data</tag> -->
11616 pre-save transform: comment containing nowiki
11620 <!-- <nowiki>data</nowiki> -->
11622 <!-- <nowiki>data</nowiki> -->
11626 pre-save transform: <noinclude> in subst (bug 3298)
11636 pre-save transform: <onlyinclude> in subst (bug 3298)
11640 {{subst:Includes2}}
11648 {{<includeonly>subst:</includeonly>Includes}}
11652 Template:SafeSubstTest
11654 {{<includeonly>safesubst:</includeonly>Includes}}
11658 bug 22297: safesubst: works during PST
11662 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11668 bug 22297: safesubst: works during normal parse
11677 subst: does not work during normal parse
11681 <p>{{subst:Includes}}
11686 pre-save transform: context links ("pipe trick")
11690 [[Article (context)|]]
11693 [[Bar:Article (context)|]]
11694 [[:Bar:Article (context)|]]
11696 [[|Article (context)]]
11700 [[Article (context)|Article]]
11701 [[Bar:Article|Article]]
11702 [[:Bar:Article|Article]]
11703 [[Bar:Article (context)|Article]]
11704 [[:Bar:Article (context)|Article]]
11706 [[Article (context)]]
11707 [[Bar:X (Y) Z|X (Y) Z]]
11708 [[:Bar:X (Y) Z|X (Y) Z]]
11712 pre-save transform: context links ("pipe trick") with interwiki prefix
11716 [[interwiki:Article|]]
11717 [[:interwiki:Article|]]
11718 [[interwiki:Bar:Article|]]
11719 [[:interwiki:Bar:Article|]]
11721 [[interwiki:Article|Article]]
11722 [[:interwiki:Article|Article]]
11723 [[interwiki:Bar:Article|Bar:Article]]
11724 [[:interwiki:Bar:Article|Bar:Article]]
11728 pre-save transform: context links ("pipe trick") with parens in title
11730 pst title=[[Somearticle (context)]]
11734 [[Article (context)|Article]]
11738 pre-save transform: context links ("pipe trick") with comma in title
11740 pst title=[[Someplace, Somewhere]]
11743 [[Otherplace, Elsewhere|]]
11744 [[Otherplace, Elsewhere, Anywhere|]]
11746 [[Otherplace, Somewhere|Otherplace]]
11747 [[Otherplace, Elsewhere|Otherplace]]
11748 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11752 pre-save transform: context links ("pipe trick") with parens and comma
11754 pst title=[[Someplace (IGNORED), Somewhere]]
11757 [[Otherplace (place), Elsewhere|]]
11759 [[Otherplace, Somewhere|Otherplace]]
11760 [[Otherplace (place), Elsewhere|Otherplace]]
11764 pre-save transform: context links ("pipe trick") with comma and parens
11766 pst title=[[Who, me? (context)]]
11769 [[Me, Myself, and I (1937 song)|]]
11771 [[Yes, you. (context)|Yes, you.]]
11772 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11776 pre-save transform: context links ("pipe trick") with namespace
11778 pst title=[[Ns:Somearticle]]
11782 [[Ns:Article|Article]]
11786 pre-save transform: context links ("pipe trick") with namespace and parens
11788 pst title=[[Ns:Somearticle (context)]]
11792 [[Ns:Article (context)|Article]]
11796 pre-save transform: context links ("pipe trick") with namespace and comma
11798 pst title=[[Ns:Somearticle, Context, Whatever]]
11802 [[Ns:Article, Context, Whatever|Article]]
11806 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11808 pst title=[[Ns:Somearticle, Context (context)]]
11812 [[Ns:Article (context)|Article]]
11816 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11818 pst title=[[Ns:Somearticle (IGNORED), Context]]
11822 [[Ns:Article, Context|Article]]
11826 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11830 [[Article(context)|]]
11831 [[Bar:Article(context)|]]
11832 [[:Bar:Article(context)|]]
11833 [[|Article(context)]]
11837 [[Article(context)|Article]]
11838 [[Bar:Article(context)|Article]]
11839 [[:Bar:Article(context)|Article]]
11840 [[Article(context)]]
11841 [[Bar:X(Y)Z|X(Y)Z]]
11842 [[:Bar:X(Y)Z|X(Y)Z]]
11846 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11850 [[Article (context)|]]
11851 [[Bar:Article (context)|]]
11852 [[:Bar:Article (context)|]]
11853 [[|Article (context)]]
11857 [[Article (context)|Article]]
11858 [[Bar:Article (context)|Article]]
11859 [[:Bar:Article (context)|Article]]
11860 [[Article (context)]]
11861 [[Bar:X (Y) Z|X (Y) Z]]
11862 [[:Bar:X (Y) Z|X (Y) Z]]
11866 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11870 [[Article(context)|]]
11871 [[Bar:Article(context)|]]
11872 [[:Bar:Article(context)|]]
11873 [[|Article(context)]]
11877 [[Article(context)|Article]]
11878 [[Bar:Article(context)|Article]]
11879 [[:Bar:Article(context)|Article]]
11880 [[Article(context)]]
11881 [[Bar:X(Y)Z|X(Y)Z]]
11882 [[:Bar:X(Y)Z|X(Y)Z]]
11886 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11890 [[Article (context), context|]]
11891 [[Article (context),context|]]
11892 [[Bar:Article (context), context|]]
11893 [[Bar:Article (context),context|]]
11894 [[:Bar:Article (context), context|]]
11895 [[:Bar:Article (context),context|]]
11897 [[Article (context), context|Article]]
11898 [[Article (context),context|Article]]
11899 [[Bar:Article (context), context|Article]]
11900 [[Bar:Article (context),context|Article]]
11901 [[:Bar:Article (context), context|Article]]
11902 [[:Bar:Article (context),context|Article]]
11906 pre-save transform: trim trailing empty lines
11910 Empty lines are trimmed
11916 Empty lines are trimmed
11920 pre-save transform: Signature expansion
11925 * <noinclude>~~~</noinclude>
11926 * <includeonly>~~~</includeonly>
11927 * <onlyinclude>~~~</onlyinclude>
11929 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11930 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11931 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11932 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11937 pre-save transform: Signature expansion in nowiki tags (bug 93)
11943 <nowiki>~~~~</nowiki>
11945 <includeonly><nowiki>~~~~</nowiki></includeonly>
11947 <noinclude><nowiki>~~~~</nowiki></noinclude>
11949 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11951 {{subst:Foo}} shall be converted to FOO
11953 As well as inside noinclude/onlyinclude
11954 <noinclude>{{subst:Foo}}</noinclude>
11955 <onlyinclude>{{subst:Foo}}</onlyinclude>
11957 But not inside includeonly
11958 <includeonly>{{subst:Foo}}</includeonly>
11962 <nowiki>~~~~</nowiki>
11964 <includeonly><nowiki>~~~~</nowiki></includeonly>
11966 <noinclude><nowiki>~~~~</nowiki></noinclude>
11968 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11970 FOO shall be converted to FOO
11972 As well as inside noinclude/onlyinclude
11973 <noinclude>FOO</noinclude>
11974 <onlyinclude>FOO</onlyinclude>
11976 But not inside includeonly
11977 <includeonly>{{subst:Foo}}</includeonly>
11981 Parsoid: Recognize nowiki with trailing space in tags
11985 <nowiki ><div>[[foo]]</nowiki >
11993 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12000 Parsoid: Recognize nowiki with odd capitalization
12004 <noWikI ><div>[[foo]]</Nowiki >
12006 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12011 Parsoid: Escape nowiki with trailing space in tags
12015 <p><nowiki > foo </nowiki ></p>
12016 <p>a<nowiki />b</p>
12017 <p>c<nowiki/ >d</p>
12019 <nowiki > foo </nowiki >
12027 Parsoid: Escape weird noWikI capitalizations
12031 <p><noWikI > foo </NoWikI ></p>
12033 <noWikI > foo </NoWikI >
12037 ### Message transform tests
12040 message transform: magic variables
12050 message transform: should not transform wiki markup
12060 message transform: <noinclude> in transcluded template (bug 4926)
12070 message transform: <onlyinclude> in transcluded template (bug 4926)
12080 {{#special:}} page name, known
12084 {{#special:Recentchanges}}
12086 Special:RecentChanges
12090 {{#special:}} page name with subpage, known
12094 {{#special:Recentchanges/param}}
12096 Special:RecentChanges/param
12100 {{#special:}} page name, unknown
12104 {{#special:foobar nonexistent}}
12106 Special:Foobar nonexistent
12110 {{#speciale:}} page name, known
12114 {{#speciale:Recentchanges}}
12116 Special:RecentChanges
12120 {{#speciale:}} page name with subpage, known
12124 {{#speciale:Recentchanges/param}}
12126 Special:RecentChanges/param
12130 {{#speciale:}} page name, unknown
12134 {{#speciale:foobar nonexistent}}
12136 Special:Foobar_nonexistent
12142 ### For Parsoid-specific tests, see
12143 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12148 parsoid=wt2html,wt2wt,html2html
12150 [[Image:foobar.jpg]]
12152 <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>
12155 <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>
12159 Simple image (using File: namespace, now canonical)
12161 [[File:Foobar.jpg]]
12163 <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>
12166 <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>
12170 Right-aligned image
12172 [[File:Foobar.jpg|right]]
12174 <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>
12177 <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>
12183 [[File:Foobar.jpg|right|Caption text]]
12185 <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>
12188 <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>
12192 Image with caption, bug 53312 #1
12194 [[File:Foobar.jpg|right|Caption page stuff]]
12196 <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>
12199 <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>
12203 Image with caption, bug 53312 #2
12205 [[File:Foobar.jpg|right|Caption page=]]
12207 <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>
12210 <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>
12214 Image with caption, bug 53312 #3
12216 [[File:Foobar.jpg|right|Caption page=stuff]]
12218 <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>
12221 <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>
12225 Allow empty links in image captions (Bug 60753)
12229 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12234 <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>
12237 <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>
12239 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12240 </figcaption></figure>
12244 Titles in unlinked images (T23454)
12246 [[File:Foobar.jpg|link=|stuff]]
12248 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12253 Link with empty target
12262 Image with link trail
12264 Linktrails should not work for images: [[File:Foobar.jpg]]s
12266 <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
12269 <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>
12273 Image with empty attribute
12275 parsoid=wt2html,wt2wt,html2html
12277 [[File:Foobar.jpg|right||Caption text]]
12279 <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>
12282 <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>
12286 1. Block image with individual attributes from templates
12288 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12290 <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>
12293 <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>
12297 2. Block Image with individual attributes from templates
12299 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12301 <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>
12304 <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>
12308 3. Inline image with individual attributes from templates
12310 [[File:Foobar.jpg|{{echo|50px}}]]
12312 <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>
12315 <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>
12318 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12319 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12321 Image with multiple attributes from the same template
12323 [[File:Foobar.jpg|{{image_attribs}}]]
12325 <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>
12328 <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>
12332 Image with link tails
12336 123[[File:Foobar.jpg]]456
12337 123[[File:Foobar.jpg|right]]456
12338 123[[File:Foobar.jpg|thumb]]456
12340 <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
12342 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
12343 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
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</p>
12348 <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>
12350 <div class="thumb tright">
12351 <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>
12352 <div class="thumbcaption">
12353 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12359 <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>
12360 <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>
12361 <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>
12365 Image with multiple captions -- only last one is accepted
12367 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12369 <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>
12372 <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>
12376 Image with multiple widths -- use last
12378 [[File:Foobar.jpg|200px|300px|caption]]
12380 <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>
12383 <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>
12387 Image with multiple alignments -- use first (bug 48664)
12391 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12393 [[File:Foobar.jpg|middle|text-top|caption]]
12395 <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>
12396 <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>
12399 <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>
12400 <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>
12404 Image with width attribute at different positions
12406 [[File:Foobar.jpg|200px|right|Caption]]
12407 [[File:Foobar.jpg|right|200px|Caption]]
12408 [[File:Foobar.jpg|right|Caption|200px]]
12410 <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>
12411 <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>
12412 <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>
12415 <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>
12416 <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>
12417 <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>
12420 # a sad bit of backward-compatibility
12422 Image with size specified with pxpx (bug 13500, 51628)
12424 parsoid=wt2html,wt2wt,html2html
12426 [[File:Foobar.jpg|20pxpx]]
12427 [[File:Foobar.jpg|200x20pxpx]]
12429 <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>
12430 <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>
12433 <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>
12437 Image with link parameter, wiki target
12439 [[File:Foobar.jpg|link=Main Page]]
12441 <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>
12444 <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>
12447 # parsoid bug 49293 (part 1)
12449 Image with link parameter, URL target
12451 [[File:Foobar.jpg|link=http://example.com/]]
12453 <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>
12456 <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>
12459 # parsoid bug 49293 (part 2)
12461 Image with link parameter, protocol-less URL target
12463 [[File:Foobar.jpg|link=//example.com/]]
12465 <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>
12468 <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>
12472 Image with link parameter, wgExternalLinkTarget
12474 [[Image:foobar.jpg|link=http://example.com/]]
12476 wgExternalLinkTarget='foobar'
12478 <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>
12483 Image with link parameter, wgNoFollowLinks set to false
12485 [[Image:foobar.jpg|link=http://example.com/]]
12487 wgNoFollowLinks=false
12489 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12494 Image with link parameter, wgNoFollowDomainExceptions
12496 [[Image:foobar.jpg|link=http://example.com/]]
12498 wgNoFollowDomainExceptions='example.com'
12500 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12505 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12507 [[Image:foobar.jpg|link=http://example.com/|Title]]
12509 wgExternalLinkTarget='foobar'
12511 <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>
12516 Image with empty link parameter
12518 [[File:Foobar.jpg|link=]]
12520 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12523 <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>
12527 Image with link parameter (wiki target) and unnamed parameter
12529 [[File:Foobar.jpg|link=Main_Page|Title]]
12531 <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>
12534 <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>
12538 Image with link parameter (URL target) and unnamed parameter
12540 [[File:Foobar.jpg|link=http://example.com/|Title]]
12542 <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>
12545 <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>
12549 Thumbnail image with link parameter
12552 parsoid=wt2html,wt2wt,html2html
12554 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12556 <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>
12559 <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>
12563 Manually-specified thumbnail image
12567 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12569 <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>
12572 <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>
12576 Manually-specified thumbnail image with explicit link to wiki page
12579 parsoid=wt2html,wt2wt,html2html
12581 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12583 <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>
12586 <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>
12590 Manually-specified thumbnail image with explicit link to url
12593 parsoid=wt2html,wt2wt,html2html
12595 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12597 <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>
12600 <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>
12604 Manually-specified thumbnail image with explicit no link
12607 parsoid=wt2html,wt2wt,html2html
12609 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12611 <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>
12614 <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>
12618 Manually-specified thumbnail image with explicit link and alt text
12621 parsoid=wt2html,wt2wt,html2html
12623 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12625 <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>
12628 <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>
12632 Image with frame and link
12634 parsoid=wt2html,wt2wt,html2html
12636 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12638 <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>
12641 <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>
12645 Image with frame and link and explicit alt
12647 parsoid=wt2html,wt2wt,html2html
12649 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12651 <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>
12654 <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>
12658 Image with wiki markup in implicit alt
12660 parsoid=wt2html,wt2wt,html2html
12662 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12664 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12666 <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>
12667 </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>
12670 <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>
12671 <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>
12675 Alt image option should handle most kinds of wikitext without barfing
12677 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12679 <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>
12682 <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>
12685 ###################
12686 # Conflicting image format options.
12687 # First option specified should 'win'.
12688 # All three cases in each test should be identical.
12691 Image with 'frameless' first.
12693 parsoid=wt2html,wt2wt,html2html
12695 [[File:Foobar.jpg|frameless|caption]]
12697 [[File:Foobar.jpg|frameless|frame|caption]]
12699 [[File:Foobar.jpg|frameless|thumb|caption]]
12701 <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>
12702 </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>
12703 </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>
12706 <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>
12707 <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>
12708 <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>
12712 Image with 'frame' first.
12714 parsoid=wt2html,wt2wt,html2html
12716 [[File:Foobar.jpg|frame|caption]]
12717 [[File:Foobar.jpg|frame|frameless|caption]]
12718 [[File:Foobar.jpg|frame|thumb|caption]]
12720 <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>
12721 <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>
12722 <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>
12725 <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>
12726 <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>
12727 <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>
12731 Image with 'thumb' first.
12733 parsoid=wt2html,wt2wt,html2html
12735 [[File:Foobar.jpg|thumb|caption]]
12736 [[File:Foobar.jpg|thumb|frameless|caption]]
12737 [[File:Foobar.jpg|thumb|frame|caption]]
12739 <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>
12740 <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>
12741 <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>
12744 <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>
12745 <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>
12746 <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>
12749 ###################
12751 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12752 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12753 # Foobar has actual size of 1941x220
12754 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12755 # a scalable format.
12756 # 2. Framed images always ignore size options; always render at default size.
12757 # 3. "Unspecified format" and border are the only types which can be
12761 Image: "unspecified format" and border enlarge
12763 parsoid=wt2html,wt2wt,html2html
12765 [[File:Foobar.jpg|2000px]]
12767 [[File:Foobar.jpg|border|2000px]]
12769 <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>
12770 </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>
12773 <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>
12774 <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>
12778 Image: "unspecified format" and border reduce
12780 parsoid=wt2html,wt2wt,html2html
12782 [[File:Foobar.jpg|1000px]]
12784 [[File:Foobar.jpg|border|1000px]]
12786 <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>
12787 </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>
12790 <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>
12791 <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>
12795 Image: thumbs reduce
12797 parsoid=wt2html,wt2wt,html2html
12799 [[File:Foobar.jpg|thumb|50px]]
12801 <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>
12804 <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>
12808 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12810 parsoid=wt2html,wt2wt,html2html
12812 [[File:Foobar.jpg|thumb|2000px]]
12814 [[File:Foobar.svg|thumb|2000px]]
12816 <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>
12817 <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>
12820 <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>
12821 <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>
12825 Image: frameless can reduce in size
12827 parsoid=wt2html,wt2wt,html2html
12829 [[File:Foobar.jpg|frameless|50px]]
12831 <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>
12834 <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>
12838 Image: bitmap frameless can't be enlarged past original size, but vector can
12840 parsoid=wt2html,wt2wt,html2html
12842 [[File:Foobar.jpg|frameless|2000px]]
12844 [[File:Foobar.svg|frameless|2000px]]
12846 <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>
12847 </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>
12850 <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>
12851 <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>
12855 Image: framed images are always unscaled.
12857 parsoid=wt2html,wt2wt,html2html
12859 [[File:Foobar.jpg|frame]]
12861 [[File:Foobar.jpg|frame|50px]]
12863 [[File:Foobar.jpg|frame|50x50px]]
12865 [[File:Foobar.jpg|frame|2000px]]
12867 <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>
12868 <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>
12869 <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>
12870 <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>
12873 <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>
12874 <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>
12875 <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>
12876 <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>
12879 ###################
12882 Link to image page- image page normally doesn't exists, hence edit link
12883 Add test with existing image page
12884 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12888 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12893 bug 18784 Link to non-existent image page with caption should use caption as link text
12895 [[:Image:test|caption]]
12897 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12902 Frameless image caption with a free URL
12904 [[File:Foobar.jpg|http://example.com]]
12906 <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>
12909 <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>
12913 Thumbnail image caption with a free URL
12917 [[File:Foobar.jpg|thumb|http://example.com]]
12919 <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>
12922 <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>
12926 Thumbnail image caption with a free URL and explicit alt
12929 parsoid=wt2html,wt2wt,html2html
12931 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12933 <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>
12936 <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>
12940 SVG thumbnails with no language set
12943 [[File:Foobar.svg|thumb|caption]]
12945 <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>
12948 <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>
12952 SVG thumbnails with language de
12954 parsoid=wt2html,wt2wt,html2html
12956 [[File:Foobar.svg|thumb|caption|lang=de]]
12958 <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>
12961 <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>
12965 SVG thumbnails with invalid language code
12967 parsoid=wt2html,wt2wt,html2html
12969 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12971 <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>
12974 <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>
12978 BUG 1887: A ISBN with a thumbnail
12980 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12982 <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>
12985 <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>
12989 BUG 1887: A RFC with a thumbnail
12991 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12993 <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>
12996 <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>
13000 BUG 1887: A mailto link with a thumbnail
13002 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13004 <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>
13007 <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>
13010 # Pending resolution to bug 368
13012 BUG 648: Frameless image caption with a link
13014 [[File:Foobar.jpg|text with a [[link]] in it]]
13016 <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>
13019 <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>
13023 BUG 648: Frameless image caption with a link (suffix)
13025 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13027 <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>
13030 <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>
13034 BUG 648: Frameless image caption with an interwiki link
13036 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13038 <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>
13041 <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>
13045 BUG 648: Frameless image caption with a piped interwiki link
13047 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13049 <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>
13052 <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>
13056 Escape HTML special chars in image alt text
13058 [[File:Foobar.jpg|& < > "]]
13060 <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>
13063 <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>
13067 BUG 499: Alt text should have Ӓ, not &1234;
13069 [[File:Foobar.jpg|♀]]
13071 <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>
13074 <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>
13078 Broken image caption with link
13080 parsoid=wt2html,wt2wt,html2html
13082 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13084 <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.
13087 <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>
13091 Image caption containing another image
13093 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13095 <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>
13098 <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>
13102 Image: caption containing a newline
13104 [[File:Foobar.jpg|This
13107 <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>
13110 <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>
13114 Image: caption containing leading space
13115 (The leading space should not trigger nowiki escaping in wt2wt mode)
13117 [[File:Foobar.jpg|thumb| bar]]
13119 <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>
13122 <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>
13126 Image: caption containing a table
13128 parsoid=wt2html,wt2wt,html2html
13130 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13136 and some more text.]]
13138 <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>
13141 <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
13144 <tr><th>Foo </th><th>Bar</th></tr>
13147 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13151 Bug 3090: External links other than http: in image captions
13153 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13155 <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>
13158 <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>
13164 parsoid=wt2html,wt2wt,html2html
13166 [[Image:foobar.jpg|a|class=b]]
13168 <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>
13171 <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>
13175 Localized image handling (1).
13177 parsoid=wt2html,wt2wt,html2html
13180 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13182 <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>
13185 <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>
13189 Localized image handling (2).
13192 parsoid=wt2html,wt2wt,html2html
13195 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13197 <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>
13200 <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>
13204 "border", "frameless" and "class" attributes on an image.
13207 parsoid=wt2html,wt2wt,html2html
13209 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13211 <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>
13214 <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>
13217 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13219 Invalid image attributes (bug 62500)
13222 parsoid=wt2html,wt2wt,html2html
13224 [[File:Foobar.jpg|thumb|float|left|caption]]
13226 [[File:Foobar.jpg|thumb|righ|caption]]
13228 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13230 <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>
13231 <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>
13232 <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>
13235 <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>
13236 <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>
13237 <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>
13243 #REDIRECT [[File:Barfoo.jpg]]
13246 # FIXME: Parsoid should run this test -- but we'd need to teach the
13247 # mockAPI about the redirected Barfoo.jpg image.
13251 [[Image:Barfoo.jpg]]
13253 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13258 Missing image with uploads disabled
13262 [[File:Foobaz.jpg]]
13264 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13267 <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>
13270 # Parsoid-specific testing for images
13271 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13272 # Currently imperfect due to a flaw in the Parsoid testrunner
13274 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13278 Parsoid-specific image handling - simple image with size and middle alignment
13280 [[File:Foobar.jpg|middle|50px]]
13282 <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>
13286 Parsoid-specific image handling - simple image with size, middle alignment,
13287 non-standard namespace alias
13289 parsoid=wt2wt,wt2html,html2html
13291 [[Image:Foobar.jpg|middle|50px]]
13293 <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>
13297 Parsoid-specific image handling - simple image with size and middle alignment
13300 [[File:Foobar.jpg|50px|middle]]
13302 <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>
13306 Parsoid-specific image handling - simple image with size and middle alignment
13307 and non-standard namespace name
13309 parsoid=wt2html,wt2wt,html2html
13311 [[Image:Foobar.jpg|50px|middle]]
13313 <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>
13317 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13319 [[File:Foobar.jpg|500x10px|baseline|caption]]
13321 <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>
13325 Parsoid-specific image handling - simple image with border and size spec
13327 [[File:Foobar.jpg|50px|border|caption]]
13329 <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>
13333 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13335 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13337 <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>
13341 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13344 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13346 <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>
13350 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13352 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13354 <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>
13358 Parsoid-specific image handling - thumbnail with specific size, halign,
13359 valign, and caption (existing content)
13361 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13363 <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>
13367 Parsoid-specific image handling - framed image with specific size and caption
13370 parsoid=wt2html,wt2wt,html2html
13372 [[File:Foobar.jpg|frame|500x50px|caption]]
13374 <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>
13378 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13381 parsoid=wt2html,wt2wt,html2html
13383 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13385 <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>
13389 Parsoid-specific image handling - frameless image with specific size, border, and caption
13391 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13393 <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>
13397 Parsoid-specific image handling - simple image with a formatted caption
13399 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13401 <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>
13405 Parsoid-specific image handling - caption with a template in it
13407 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13409 <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>
13413 Parsoid-specific image handling - caption with unbalanced tags in it
13415 parsoid=wt2html,wt2wt,html2html
13418 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13422 <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>
13427 Parsoid-specific image handling - empty caption (1)
13429 parsoid=wt2html,wt2wt
13431 [[File:Foobar.jpg|thumb|]]
13433 <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>
13436 # empty captions don't get serialized unless we're in the "round trip" case
13438 Parsoid-specific image handling - empty caption (2)
13442 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13443 <a href="./File:Foobar.jpg">
13444 <img resource="./File:Foobar.jpg"
13445 src="//example.com/images/3/3a/Foobar.jpg"
13446 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13447 height="25" width="220"/>
13449 <figcaption></figcaption>
13452 [[File:Foobar.jpg|thumb]]
13456 Parsoid-specific image handling - whitespace caption
13458 [[File:Foobar.jpg|thumb| ]]
13460 <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>
13464 Parsoid-specific image handling - lang option
13467 [[File:Foobar.svg|lang=de|caption]]
13471 <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>
13480 Subpage test/subpage
13488 subpage title=[[Subpage test]]
13492 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13497 Subpage noslash link
13499 subpage title=[[Subpage test]]
13503 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13508 Subpage test/1/2/subpage
13514 Relative subpage noslash link
13516 parsoid=wt2wt,wt2html,html2html
13517 subpage title=[[Subpage test/1/2/3/4]]
13523 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13524 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13527 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13528 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13532 Parsoid: dot-slash prefixed wikilinks
13542 </p><p>[[././baz/]]
13547 </p><p>[[././baz/]]
13552 Render invalid page names as plain text (bug 51090)
13565 [[{{echo|./../foo}}|bar]]
13566 [[{{echo|foo/.}}|bar]]
13567 [[{{echo|foo/..}}|bar]]
13568 [[{{echo|foo~~~~bar}}]]
13569 [[{{echo|foo>bar}}]]
13570 [[{{echo|foo././bar}}]]
13571 [[{{echo|foo{bar}}]]
13572 [[{{echo|foo}bar}}]]
13573 [[{{echo|foo[bar}}]]
13574 [[{{echo|foo]bar}}]]
13575 [[{{echo|foo<bar}}]]
13577 <p>[[./../foo|bar]]
13587 </p><p>[[./../foo|bar]]
13600 <p>[[./../foo|bar]]
13611 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13612 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13613 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13614 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13615 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13616 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13617 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13618 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13619 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
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>]]</p>
13629 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13634 BUG 561: {{/Subpage}}
13636 subpage title=[[Page]]
13640 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13648 Category:MediaWiki User's Guide
13656 [[:Category:MediaWiki User's Guide]]
13658 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13667 [[Category:MediaWiki User's Guide]]
13669 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13673 PAGESINCATEGORY invalid title fatal (r33546 fix)
13675 {{PAGESINCATEGORY:<bogus>}}
13682 Category with different sort key
13686 [[Category:MediaWiki User's Guide|Foo]]
13688 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13692 Category with identical sort key
13696 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13698 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13702 Category with empty sort key
13707 [[Category:MediaWiki User's Guide|]]
13709 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13713 Category with empty sort key and parentheses
13718 [[Category:Foo (bar)|]]
13720 [[Category:Foo (bar)|Foo]]
13724 Category with link tail
13729 123[[Category:Foo]]456
13731 123[[Category:Foo]]456
13735 Category with template
13740 [[Category:{{echo|Foo}}]]
13742 [[Category:{{echo|Foo}}]]
13746 Category with template in sort key
13751 [[Category:Foo|{{echo|Bar}}]]
13753 [[Category:Foo|{{echo|Bar}}]]
13757 Category with template in sort key and title
13762 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13764 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13768 Category / paragraph interactions
13770 Foo [[Category:Baz]] Bar
13772 Foo [[Category:Baz]]
13780 [[Category:Baz]] Bar
13793 {{echo|[[Category:Baz]]}}
13807 ## The whitespace on the empty line is part of the test. Please do not delete
13809 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13811 parsoid=wt2html,wt2wt
13815 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
13817 {{echo|[[Category:Foo]] and so should this!}}
13819 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
13824 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
13826 <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>
13829 ## Parsoid will not try to wt2wt this while preserving newlines because
13830 ## it suppresses excess newlines within list items -- and we don't want to
13831 ## introduce a special case just for categories, which is, in reality somewhat
13832 ## odd behavior -- categories are unlikely to be used in list items like this
13833 ## in top-level pages and are only likely to show up in template-generated
13834 ## list items where this RT-ing is a non-issue.
13836 ## The whitespace on the empty line is part of the test. Please do not delete
13838 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13844 [[Category:Foo]] and this should be part of the same list item
13847 {{echo|[[Category:Foo]] and this should be part of the same list item}}
13849 <ul><li>This and this should be part of the same list item</li>
13850 <li>So should this and this should be part of the same list item</li></ul>
13853 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
13854 <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>
13858 ## Newlines and categories that follow the last item of a list
13859 ## are treated differently because this (list followed by categories)
13860 ## is an extremely common pattern on wikis.
13862 3. Categories and newlines: newline suppression for last list item should RT properly
13875 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13877 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13878 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13882 4. Categories and newlines: newline suppression for last list item should RT properly
13890 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
13892 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13895 ## only wt2html for this to make sure the algo only applies to the rightmost path
13897 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
13910 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
13912 <ul><li> d</li></ul></li></ul>
13913 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13917 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
13919 * a [[Category:Foo]]
13921 <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>
13924 # This test also demonstrates because of newline+category tunneling
13925 # through the list hander, template wrapping doesn't expand to the
13926 # containing list when the list item swallows the category.
13928 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
13933 <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">
13934 </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>
13938 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
13942 {{echo|[[Category:Foo]]
13946 <ul><li> a</li></ul>
13948 <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">
13949 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13950 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13954 Parsoid: Serialize link to category page with colon escape
13960 [[:Category:Foo|Bar]]
13963 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13964 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13968 # html2wt localizes the "Category" namespace.
13969 # XXX the <link> element needs an empty data-parsoid attribute, or
13970 # else the html2html test fails because spaces are inserted.
13972 Link prefix/suffixes aren't applied to category links
13974 parsoid=wt2html,wt2wt,html2html
13982 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
13986 Parsoid: Serialize link to file page with colon escape
13992 [[:File:Foo.png|Bar]]
13995 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
13996 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14001 Parsoid: Serialize a genuine category link without colon escape
14006 [[Category:Foo|Bar]]
14008 <link rel="mw:PageProp/Category" href="Category:Foo">
14009 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
14013 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14017 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14019 [[Category:Toxine bactérienne]]
14023 Parsoid: Defaultsort
14025 {{DEFAULTSORT:Foo}}
14027 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14031 Parsoid: Defaultsort (template-generated)
14033 {{{{echo|DEFAULTSORT}}:Foo}}
14035 <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}}]}'/>
14039 ### Inter-language links
14042 Interlanguage links
14050 es:Alimento fr:Nourriture zh:食品
14052 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14053 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14054 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14058 Duplicate interlanguage links (bug 24502)
14069 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14070 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14071 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14072 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14079 Basic section headings
14086 ===Smaller headline===
14089 <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>
14092 <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>
14095 <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>
14101 Section headings with TOC
14104 === Subheadline 1 ===
14105 ===== Skipping a level =====
14106 ====== Skipping a level ======
14110 ===Another headline===
14112 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14114 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14116 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14118 <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>
14120 <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>
14127 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14129 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14135 <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>
14136 <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>
14137 <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>
14138 <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>
14139 <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>
14142 <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>
14147 TOC anchors don't collide
14155 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14157 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14158 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14159 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14160 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14164 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
14165 <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>
14166 <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>
14167 <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>
14171 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14173 Handling of sections up to level 6 and beyond
14176 == Level 2 Heading==
14177 === Level 3 Heading===
14178 ==== Level 4 Heading====
14179 ===== Level 5 Heading=====
14180 ====== Level 6 Heading======
14181 ======= Level 7 Heading=======
14182 ======== Level 8 Heading========
14183 ========= Level 9 Heading=========
14184 ========== Level 10 Heading==========
14186 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14188 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14190 <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>
14192 <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>
14194 <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>
14196 <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>
14198 <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>
14199 <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>
14200 <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>
14201 <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>
14202 <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>
14216 <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>
14217 <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>
14218 <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>
14219 <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>
14220 <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>
14221 <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>
14222 <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>
14223 <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>
14224 <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>
14225 <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>
14230 TOC regression (T11764)
14234 ==== title 1.1.1 ====
14239 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14241 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14243 <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>
14245 <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>
14248 <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>
14251 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14253 <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>
14259 <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>
14260 <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>
14261 <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>
14262 <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>
14263 <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>
14264 <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>
14269 TOC for heading containing <span id="..."></span> (T96153)
14272 ==<span id="old-anchor"></span>New title==
14274 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14276 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14280 <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>
14285 TOC with wgMaxTocLevel=3 (bug 6204)
14291 ==== title 1.1.1 ====
14296 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14298 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14300 <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>
14301 <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>
14304 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14306 <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>
14312 <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>
14313 <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>
14314 <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>
14315 <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>
14316 <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>
14317 <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>
14322 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14328 ====Section 1.1.1====
14329 ====Section 1.1.1.1====
14332 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14334 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14336 <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>
14339 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14343 <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>
14344 <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>
14345 <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>
14346 <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>
14347 <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>
14353 Resolving duplicate section names
14358 <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>
14359 <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>
14364 Resolving duplicate section names with differing case (bug 10721)
14369 <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>
14370 <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>
14382 Template with sections, __NOTOC__
14389 <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>
14390 <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>
14391 <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>
14392 <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>
14397 __NOEDITSECTION__ keyword
14403 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14404 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14409 Link inside a section heading
14411 ==Section with a [[Main Page|link]] in it==
14413 <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>
14418 TOC regression (T14077)
14425 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14427 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14429 <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>
14432 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14436 <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>
14437 <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>
14438 <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>
14443 BUG 1219 URL next to image (good)
14445 http://example.com [[File:Foobar.jpg]]
14447 <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>
14450 <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>
14454 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14457 The line above must have a trailing space!
14460 But just in case it doesn't...
14462 <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>
14463 <p>The line above must have a trailing space!
14465 <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>
14466 <p>But just in case it doesn't...
14471 Header with special characters (bug 25462)
14473 The tooltips shall not show entities to the user (ie. be double escaped)
14490 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14492 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14494 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14495 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14496 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14497 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14498 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14502 <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>
14505 <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>
14508 <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>
14511 <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>
14514 <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>
14520 Header with space, plus and underscore as entity
14522 Id should not contain + for spaces
14524 == Space between Text ==
14527 == Space-Entity between Text ==
14530 == Plus+between+Text ==
14533 == Plus-Entity+between+Text ==
14536 == Underscore_between_Text ==
14539 == Underscore-Entity_between_Text ==
14542 [[#Space between Text]]
14543 [[#Space-Entity between Text]]
14544 [[#Plus+between+Text]]
14545 [[#Plus-Entity+between+Text]]
14546 [[#Underscore_between_Text]]
14547 [[#Underscore-Entity_between_Text]]
14549 <p>Id should not contain + for spaces
14551 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14553 <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>
14554 <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>
14555 <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>
14556 <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>
14557 <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>
14558 <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>
14562 <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>
14565 <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>
14568 <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>
14571 <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>
14574 <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>
14577 <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>
14579 </p><p><a href="#Space_between_Text">#Space between Text</a>
14580 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14581 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14582 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14583 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14584 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14589 Headers with excess '=' characters
14590 (Are similar tests necessary beyond the 1st level?)
14594 =''italic'' heading==
14595 ==''italic'' heading=
14597 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14599 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14600 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14601 <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>
14602 <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>
14606 <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>
14607 <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>
14608 <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>
14609 <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>
14614 HTML headers vs TOC (bug 23393)
14615 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14627 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14629 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14631 <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>
14632 <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>
14635 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14637 <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>
14638 <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>
14644 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14645 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14646 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14647 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14648 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14649 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14654 Single-line or multiline-comments can follow headings
14656 parsoid=wt2html,wt2wt
14664 <h2><span class="mw-headline" id="foo">foo</span></h2>
14665 <h2><span class="mw-headline" id="bar">bar</span></h2>
14666 <h2><span class="mw-headline" id="baz">baz</span></h2>
14671 BUG 1219 URL next to image (broken)
14673 http://example.com[[File:Foobar.jpg]]
14675 <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>
14678 <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>
14682 Bug 1186 news: in the middle of text
14684 http://en.wikinews.org/wiki/Wikinews:Workplace
14686 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14692 Namespaced link must have a title
14701 Namespaced link must have a title (bad fragment version)
14703 [[Project:#fragment]]
14705 <p>[[Project:#fragment]]
14711 ### HTML tags and HTML attributes
14715 div with no attributes
14717 <div>HTML rocks</div>
14719 <div>HTML rocks</div>
14724 div with double-quoted attribute
14726 <div id="rock">HTML rocks</div>
14728 <div id="rock">HTML rocks</div>
14733 div with single-quoted attribute
14735 <div id='rock'>HTML rocks</div>
14737 <div id="rock">HTML rocks</div>
14742 div with unquoted attribute
14744 <div id=rock>HTML rocks</div>
14746 <div id="rock">HTML rocks</div>
14751 div with illegal double attributes
14753 <div id="a" id="b">HTML rocks</div>
14755 <div id="b">HTML rocks</div>
14759 # FIXME: produce empty string instead of "class" in the PHP parser, following
14762 div with empty attribute value, space before equals
14766 <div class =>HTML rocks</div>
14768 <div class="">HTML rocks</div>
14773 div with multiple empty attribute values
14777 <div id= title=>HTML rocks</div>
14779 <div id="" title="">HTML rocks</div>
14784 table with multiple empty attribute values
14792 <table title="" id="">
14793 <tbody><tr><td> hi</td></tr>
14798 div with braces in attribute value
14800 <div title="{}">Foo</div>
14802 <div title="{}">Foo</div>
14805 <div title="{}">Foo</div>
14808 # This it very inconsistent in the PHP parser: it returns
14809 # class="class" if there is a space between the name and the equal sign (see
14810 # 'div with empty attribute value, space before equals'), but strips the
14811 # attribute completely if the space is missing. We hope that not much content
14812 # depends on this, so are implementing the behavior below in Parsoid for
14813 # consistencies' sake.
14814 # FIXME: fix this behavior in the PHP parser?
14816 div with empty attribute value, no space before equals
14818 parsoid=wt2html,html2html
14820 <div class=>HTML rocks</div>
14822 <div>HTML rocks</div>
14825 <div class="">HTML rocks</div>
14829 HTML multiple attributes correction
14831 <p class="error" class="awesome">Awesome!</p>
14833 <p class="awesome">Awesome!</p>
14838 Table multiple attributes correction
14841 !+ class="error" class="awesome"| status
14846 <th class="awesome"> status
14854 <DIV ID="x">HTML ROCKS</DIV>
14856 <div id="x">HTML ROCKS</div>
14861 Non-ASCII pseudo-tags are rendered as text
14870 Pseudo-tag with URL 'name' renders as url link
14872 <http://example.com/>
14874 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14879 text with amp in the middle of nowhere
14883 <p>Remember AT&T?
14888 text with character entity: eacute
14890 I always thought é was a cute letter.
14892 <p>I always thought é was a cute letter.
14895 <p>I always thought é was a cute letter.</p>
14899 text with entity-escaped character entity-like string: eacute
14901 I always thought &eacute; was a cute letter.
14903 <p>I always thought &eacute; was a cute letter.
14908 text with undefined character entity: xacute
14910 I always thought &xacute; was a cute letter.
14912 <p>I always thought &xacute; was a cute letter.
14916 # TODO: generalize to PHP parser?
14922 <data value="5">five</data>
14923 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14924 <mark>This highlighted text</mark>
14926 <p><data value="5">five</data>
14927 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14928 <mark>This highlighted text</mark></p>
14932 HTML tag with leading space is parsed as text
14936 <p>< div>foo< /div>
14941 ### Nesting tests (see bug 41545, 50604, 51081)
14944 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14945 # Note that html2wt is considerably more difficult if we use <b> in
14946 # the test case, instead of <big>
14948 Ensure that HTML adoption agency algorithm is properly implemented.
14950 <big>X<big>Y</big>Z</big>
14952 <p><big>X<big>Y</big>Z</big>
14956 # This was bug 41545 in the PHP parser.
14957 # Note that tidy doesn't handle this correctly.
14961 <kbd>X<kbd>Y</kbd>Z</kbd>
14963 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14967 # The following cases were bug 51081 in the PHP parser.
14968 # Note that there are some other nestable tags (b, i, etc) which are
14969 # not covered; see bug 51081 for discussion.
14971 # Note that tidy doesn't handle this correctly.
14975 <em>X<em>Y</em>Z</em>
14977 <p><em>X<em>Y</em>Z</em>
14981 # Note that tidy doesn't handle this correctly.
14983 Nesting of <strong>
14985 <strong>X<strong>Y</strong>Z</strong>
14987 <p><strong>X<strong>Y</strong>Z</strong>
14996 <p><q>X<q>Y</q>Z</q></p>
14999 # Note that tidy doesn't handle this correctly.
15003 <ruby>X<ruby>Y</ruby>Z</ruby>
15005 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15009 # Note that tidy doesn't handle this correctly.
15013 <bdo>X<bdo>Y</bdo>Z</bdo>
15015 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15027 [[Media:Foobar.jpg]]
15029 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15034 Media link with text
15036 [[Media:Foobar.jpg|A neat file to look at]]
15038 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15042 # FIXME: this is still bad HTML tag nesting
15043 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15045 Media link with nasty text
15047 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15049 <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>
15052 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15053 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15057 Media link to nonexistent file (bug 1702)
15059 [[Media:No such.jpg]]
15061 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15066 Image link to nonexistent file (bug 1850 - good)
15068 [[File:No_such.jpg]]
15070 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15073 <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>
15077 :Image link to nonexistent file (bug 1850 - bad)
15079 [[:Image:No such.jpg]]
15081 <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>
15084 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15090 Character reference normalization in link text (bug 1938)
15092 [[Main Page|this&that]]
15094 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15101 Test for unicode normalization
15103 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15107 (bug 19451) Links should refer to the normalized form.
15115 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15116 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15117 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15118 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15119 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15124 Empty attribute crash test (bug 2067)
15126 <font color="">foo</font>
15128 <p><font color="">foo</font>
15133 Empty attribute crash test single-quotes (bug 2067)
15135 <font color=''>foo</font>
15137 <p><font color="">foo</font>
15142 Attribute test: equals, then nothing
15144 <font color=>foo</font>
15146 <p><font>foo</font>
15151 Attribute test: unquoted value
15153 <font color=x>foo</font>
15155 <p><font color="x">foo</font>
15160 Attribute test: unquoted but illegal value (hash)
15162 <font color=#x>foo</font>
15164 <p><font color="#x">foo</font>
15169 Attribute test: no value
15171 <font color>foo</font>
15173 <p><font color="color">foo</font>
15178 Bug 2095: link with three closing brackets
15182 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15185 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15189 Bug 2095: link with pipe and three closing brackets
15191 [[Main Page|link]]]
15193 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15196 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15200 Bug 2095: link with pipe and three closing brackets, version 2
15202 [[Main Page|[http://example.com/]]]
15204 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15207 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15216 Template:Dangerous attribute
15218 " onmouseover="alert(document.cookie)
15222 Template:Dangerous style attribute
15224 border-size: expression(alert(document.cookie))
15230 <div style="float: right; {{{1}}}">Magic div</div>
15234 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15236 <div title="{{test}}"></div>
15238 <div title="This is a test template"></div>
15242 # Parsoid has enough context to handle this case
15244 Bug 2304: HTML attribute safety (dangerous template; 2309)
15246 <div title="{{dangerous attribute}}"></div>
15248 <div title=""></div>
15251 <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>
15255 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15257 <div style="{{dangerous style attribute}}"></div>
15259 <div style="/* insecure input */"></div>
15264 Bug 2304: HTML attribute safety (safe parameter; 2309)
15266 {{div style|width: 200px}}
15268 <div style="float: right; width: 200px">Magic div</div>
15273 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15275 {{div style|width: expression(alert(document.cookie))}}
15277 <div style="/* insecure input */">Magic div</div>
15282 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15284 {{div style|"><script>alert(document.cookie)</script>}}
15286 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15291 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15293 {{div style|" ><script>alert(document.cookie)</script>}}
15295 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15300 Bug 2304: HTML attribute safety (link)
15302 <div title="[[Main Page]]"></div>
15304 <div title="[[Main Page]]"></div>
15309 Bug 2304: HTML attribute safety (italics)
15311 <div title="''foobar''"></div>
15313 <div title="''foobar''"></div>
15318 Bug 2304: HTML attribute safety (bold)
15320 <div title="'''foobar'''"></div>
15322 <div title="'''foobar'''"></div>
15328 Bug 2304: HTML attribute safety (ISBN)
15330 <div title="ISBN 1234567890"></div>
15332 <div title="ISBN 1234567890"></div>
15337 Bug 2304: HTML attribute safety (RFC)
15339 <div title="RFC 1234"></div>
15341 <div title="RFC 1234"></div>
15346 Bug 2304: HTML attribute safety (PMID)
15348 <div title="PMID 1234567890"></div>
15350 <div title="PMID 1234567890"></div>
15355 Bug 2304: HTML attribute safety (web link)
15357 <div title="http://example.com/"></div>
15359 <div title="http://example.com/"></div>
15364 Bug 2304: HTML attribute safety (named web link)
15366 <div title="[http://example.com/ link]"></div>
15368 <div title="[http://example.com/ link]"></div>
15373 Bug 3244: HTML attribute safety (extension; safe)
15375 <div style="<nowiki>background:blue</nowiki>"></div>
15377 <div style="background:blue"></div>
15382 Bug 3244: HTML attribute safety (extension; unsafe)
15384 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15386 <div style="/* insecure input */"></div>
15390 # More MSIE fun discovered by Tom Gilder
15393 MSIE CSS safety test: spurious slash
15395 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15397 <div style="/* insecure input */">evil</div>
15402 MSIE CSS safety test: hex code
15404 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15406 <div style="/* insecure input */">evil</div>
15411 MSIE CSS safety test: comment in url
15413 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15415 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15420 MSIE CSS safety test: comment in expression
15422 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15424 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15429 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15431 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15433 <p style="/* invalid control char */">A</p>
15438 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15440 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15441 <div style="top:EXPRESSION(alert())">B</div>
15443 <p style="/* insecure input */">A</p>
15444 <div style="/* insecure input */">B</div>
15449 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15451 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15452 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15454 <div style="/* insecure input */">A</div>
15455 <p style="/* insecure input */">B</p>
15460 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15462 <div style="background-image:url⁽javascript:alert())">A</div>
15463 <div style="background-image:url₍javascript:alert())">B</div>
15464 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15466 <div style="/* insecure input */">A</div>
15467 <div style="/* insecure input */">B</div>
15468 <p style="/* insecure input */">C</p>
15476 title="data:text/html,<img src=1 onerror=alert(1)>"
15477 style="-o-link:attr(title);-o-link-source:current">X</div>
15479 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15484 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15486 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15487 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15488 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15489 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15490 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15491 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15492 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15494 <p style="/* insecure input */">A</p>
15495 <p style="/* insecure input */">B</p>
15496 <p style="/* insecure input */">C</p>
15497 <p style="/* insecure input */">D</p>
15498 <p style="/* insecure input */">E</p>
15499 <p style="/* insecure input */">F</p>
15500 <p style="/* insecure input */">G</p>
15505 Table attribute legitimate extension
15508 !+ style="<nowiki>color:blue</nowiki>"| status
15513 <th style="color:blue"> status
15519 Table attribute safety
15522 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15527 <th style="/* insecure input */"> status
15533 CSS line continuation 1
15535 <div style="background-image: u\ rl(test.jpg);"></div>
15537 <div style="/* insecure input */"></div>
15542 CSS line continuation 2
15544 <div style="background-image: u\ rl(test.jpg); "></div>
15546 <div style="/* insecure input */"></div>
15557 Expansion of multi-line templates in attribute values (bug 6255)
15559 <div style="background: {{identity|#00FF00}}">-</div>
15561 <div style="background: #00FF00">-</div>
15567 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15569 <div style="background:
15572 <div style="background: #00FF00">-</div>
15575 <div style="background:
15580 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15582 <div style="background: #00FF00">-</div>
15584 <div style="background: #00FF00">-</div>
15589 evil <math>-wiki-tags without Extension:Math enabled
15591 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15593 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15597 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15600 Parser hook: empty input
15613 Parser hook: empty input using terminated empty elements
15626 Parser hook: empty input using terminated empty elements (space before)
15639 Parser hook: basic input
15653 Parser hook: case insensitive
15667 Parser hook: case insensitive, redux
15680 Parser hook: nested tags
15684 <tag><tag></tag></tag>
15695 Parser hook: basic arguments
15697 <tag width=200 height = "100" depth = '50' square></tag>
15705 'square' => 'square',
15712 Parser hook: argument containing a forward slash (bug 5344)
15714 <tag filename='/tmp/bla'></tag>
15719 'filename' => '/tmp/bla',
15726 Parser hook: empty input using terminated empty elements (bug 2374)
15739 # </tag> should be output literally since there is no matching tag that begins it
15741 Parser hook: basic arguments using terminated empty elements (bug 2374)
15743 <tag width=200 height = "100" depth = '50' square/>
15753 'square' => 'square',
15762 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
15766 Parser hook: static parser hook not inside a comment
15768 <statictag>hello, world</statictag>
15769 <statictag action=flush/>
15777 Parser hook: static parser hook inside a comment
15779 <!-- <statictag>hello, world</statictag> -->
15780 <statictag action=flush/>
15786 # Nested template calls; this case was broken by Parser.php rev 1.506,
15790 Template:One-parameter
15792 (My parameter is: {{{1}}})
15796 Template:Map-one-parameter
15798 {{{{{1}}}|{{{2}}}}}
15802 Nested template calls
15804 {{Map-one-parameter|One-parameter|param}}
15806 <p>(My parameter is: param)
15815 # HTML+Tidy effectively strips out the empty tags completely
15816 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
15817 # which Tidy would have done for the PHP parser had there been content inside it.
15819 Sanitizer: Closing of open tags
15821 <s></s><table></table>
15823 <s></s><table></table>
15826 <p><s></s></p><table></table>
15830 Sanitizer: Closing of open but not closed tags
15839 Sanitizer: Closing of closed but not open tags
15848 Sanitizer: Closing of closed but not open table tags
15850 Table not started</td></tr></table>
15852 <p>Table not started</td></tr></table>
15857 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
15859 <span id="æ: v">byte</span>[[#æ: v|backlink]]
15861 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15865 # In HTML5, the restrictions are that id must contain at least one character,
15866 # and must not contain any space characters.
15868 Sanitizer: Validating the contents of the id attribute (bug 4515)
15872 <br id="" /><br id="a space" />
15877 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
15879 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
15883 <br id="foo" /><br id="foo" />
15885 Something need to be done. foo-2 ?
15889 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
15892 <meta itemprop="hello" content="world">
15893 <meta http-equiv="refresh" content="5">
15894 <meta itemprop="hello" http-equiv="refresh" content="5">
15895 <link itemprop="hello" href="{{SERVER}}">
15896 <link rel="stylesheet" href="{{SERVER}}">
15897 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
15900 <div itemscope="itemscope">
15901 <p> <meta itemprop="hello" content="world" />
15902 <meta http-equiv="refresh" content="5">
15903 <meta itemprop="hello" content="5" />
15905 <link itemprop="hello" href="http://example.org" />
15906 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
15907 <link itemprop="hello" href="http://example.org" />
15913 Language converter: output gets cut off unexpectedly (bug 5757)
15917 this bit is safe: }-
15919 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
15921 then we get cut off here: }-
15923 all additional text is vanished
15925 <p>this bit is safe: }-
15926 </p><p>but if we add a conversion instance: xxx
15927 </p><p>then we get cut off here: }-
15928 </p><p>all additional text is vanished
15933 Self closed html pairs (bug 5487)
15936 <center><font id="bug" />Centered text</center>
15937 <div><font id="bug2" />In div text</div>
15939 <center><font id="bug" />Centered text</center>
15940 <div><font id="bug2" />In div text</div>
15949 Punctuation: nbsp before exclamation
15953 <p>C'est grave !
15958 Punctuation: CSS !important (bug 11874)
15960 <div style="width:50% !important">important</div>
15962 <div style="width:50% !important">important</div>
15967 Punctuation: CSS ! important (bug 11874; with space after)
15969 <div style="width:50% ! important">important</div>
15971 <div style="width:50% ! important">important</div>
15976 HTML bullet list, closed tags (bug 5497)
15989 <ul data-parsoid='{"stx":"html"}'>
15990 <li data-parsoid='{"stx":"html"}'>One</li>
15991 <li data-parsoid='{"stx":"html"}'>Two</li>
15997 HTML bullet list, unclosed tags (bug 5497)
16009 <ul data-parsoid='{"stx":"html"}'>
16010 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16011 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16017 HTML ordered list, closed tags (bug 5497)
16030 <ol data-parsoid='{"stx":"html"}'>
16031 <li data-parsoid='{"stx":"html"}'>One</li>
16032 <li data-parsoid='{"stx":"html"}'>Two</li>
16038 HTML ordered list, unclosed tags (bug 5497)
16051 <ol data-parsoid='{"stx":"html"}'>
16052 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16053 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16059 HTML nested bullet list, closed tags (bug 5497)
16084 HTML nested bullet list, open tags (bug 5497)
16121 HTML nested ordered list, closed tags (bug 5497)
16146 HTML nested ordered list, open tags (bug 5497)
16183 HTML ordered list item with parameters oddity
16185 <ol><li id="fragment">One</li>
16188 <ol><li id="fragment">One</li>
16193 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16195 bug 5918: autonumbering
16197 [http://first/] [http://second] [ftp://ftp]
16201 [mailto:enclosed@mail.tld With target]
16203 [mailto:enclosed@mail.tld]
16205 mailto:inline@mail.tld
16207 <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>
16208 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16209 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16210 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16211 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16214 <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>
16215 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16216 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16217 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16218 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16223 # Security and HTML correctness
16224 # From Nick Jenkins' fuzz testing
16228 Fuzz testing: Parser13
16243 Fuzz testing: Parser14
16248 <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>
16249 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16251 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16257 <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>
16259 <div id="toc" class="toc">
16260 <div id="toctitle">
16264 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16271 Fuzz testing: Parser14-table
16276 <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>
16277 <table style="__TOC__">
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__">
16290 # Known to produce bogus xml (extra </td>)
16292 Fuzz testing: Parser16
16321 Fuzz testing: Parser21
16324 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16329 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16339 Fuzz testing: Parser22
16341 http://===r:::https://b
16345 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16353 # Known to produce bad XML for now
16355 Fuzz testing: Parser24
16362 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16363 <br style="onmouseover='alert(document.cookie);' " />
16365 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16370 <u class="|">}}}} >
16371 <br style="onmouseover='alert(document.cookie);'" />
16373 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16382 # Note: the current result listed for this is not what the original one was,
16383 # but the original bug was JavaScript injection, which is fixed in any case.
16384 # It's not clear that the original result listed was any more correct than the
16385 # current one. Original result:
16388 # <li class="||">
16389 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16391 Fuzz testing: Parser25 (bug 6055)
16397 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16399 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16404 Fuzz testing: URL adjacent extension (with space, clean)
16406 http://example.com <nowiki>junk</nowiki>
16408 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16411 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16415 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16417 http://example.com<nowiki>junk</nowiki>
16419 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16422 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16426 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16428 http://example.com<pre>junk</pre>
16430 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16433 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16438 <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>
16442 Fuzz testing: image with bogus manual thumbnail
16444 [[Image:foobar.jpg|thumbnail= ]]
16446 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16449 <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>
16453 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16455 <pre dir=" "></pre>
16457 <pre dir=" "></pre>
16462 Parsing optional HTML elements (Bug 6171)
16467 <td> Some tabular data</td>
16468 <td> More tabular data ...
16469 <td> And yet som tabular data</td>
16475 <td> Some tabular data</td>
16476 <td> More tabular data ...
16477 </td><td> And yet som tabular data</td>
16484 Correct handling of <td>, <tr> (Bug 6171)
16489 <td> Some tabular data</td>
16490 <td> More tabular data ...</td>
16491 <td> And yet som tabular data</td>
16497 <td> Some tabular data</td>
16498 <td> More tabular data ...</td>
16499 <td> And yet som tabular data</td>
16507 Parsing crashing regression (fr:JavaScript)
16511 <p></body></x>
16516 Inline wiki vs wiki block nesting
16522 <p><b>Bold paragraph</b>
16523 </p><p>New wiki paragraph
16527 # FIXME: The current php output is documented
16528 # and desired output is the parsoid target.
16530 Inline HTML vs wiki block nesting
16536 <p><b>Bold paragraph
16537 </p><p>New wiki paragraph</b>
16540 <p><b>Bold paragraph</b>
16541 </p><p>New wiki paragraph
16545 # Original result was this:
16546 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16548 # While that might be marginally more intuitive, maybe, the six-apostrophe
16549 # construct is clearly pathological and the result stated here (which is what
16550 # the parser actually does) is about as reasonable as anything.
16552 Mixing markup for italics and bold
16555 '''bold''''''bold''bolditalics'''''
16557 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16565 Article for special page transclusion test
16569 Special page transclusion
16572 {{Special:Prefixindex/Xyzzyx}}
16574 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16579 Special page transclusion twice (bug 5021)
16582 {{Special:Prefixindex/Xyzzyx}}
16583 {{Special:Prefixindex/Xyzzyx}}
16585 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16586 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16591 Transclusion of default MediaWiki message
16593 {{MediaWiki:Mainpage}}
16600 Transclusion of nonexistent MediaWiki message
16602 {{MediaWiki:Mainpagexxx}}
16604 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16609 Transclusion of MediaWiki message with underscore
16611 {{MediaWiki:history_short}}
16618 Transclusion of MediaWiki message with space
16620 {{MediaWiki:history short}}
16627 Invalid header with following text
16637 Section extraction test (section 0)
16657 Section extraction test (section 1)
16679 Section extraction test (section 2)
16700 Section extraction test (section 3)
16720 Section extraction test (section 4)
16744 Section extraction test (section 5)
16764 Section extraction test (section 6)
16785 Section extraction test (section 7)
16805 Section extraction test (section 8)
16825 Section extraction test (section 9)
16846 Section extraction test (section 10)
16866 Section extraction test (nonexistent section 11)
16885 Section extraction test with bogus heading (section 1)
16890 ==bogus== not a legal section
16894 ==bogus== not a legal section
16898 Section extraction test with bogus heading (section 2)
16903 ==bogus== not a legal section
16910 Section extraction test with comment after heading (section 1)
16922 Section extraction test with comment after heading (section 2)
16934 Section extraction test with bogus <nowiki> heading (section 1)
16939 ==bogus== <nowiki>not a legal section</nowiki>
16943 ==bogus== <nowiki>not a legal section</nowiki>
16947 Section extraction test with bogus <nowiki> heading (section 2)
16952 ==bogus== <nowiki>not a legal section</nowiki>
16959 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16960 # instead of respecting commented sections
16962 Section extraction prefixed by comment (section 1)
16973 Section extraction prefixed by comment (section 2)
16984 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
16985 # instead of respecting HTML-style headings
16987 Section extraction, mixed wiki and html (section 1)
17003 Section extraction, mixed wiki and html (section 2)
17019 # Formerly testing for bug 3342
17021 Section extraction, heading surrounded by <noinclude>
17025 <noinclude>==unmarked==</noinclude>
17031 # Test behavior of bug 19910
17033 Sectiion with all-equals
17038 The line above must have a trailing space
17041 But just in case it doesn't...
17045 But just in case it doesn't...
17049 Section replacement test (section 0)
17080 Section replacement test (section 1)
17109 Section replacement test (section 2)
17139 Section replacement test (section 3)
17170 Section replacement test (section 4)
17197 Section replacement test (section 5)
17228 Section replacement test (section 6)
17258 Section replacement test (section 7)
17289 Section replacement test (section 8)
17320 Section replacement test (section 9)
17349 Section replacement test (section 10)
17379 Section replacement test with initial whitespace (bug 13728)
17383 Preformatted initial line
17387 Preformatted initial line
17394 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17406 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17419 Section extraction, <pre> around bogus header (bug 10309)
17436 Section replacement, <pre> around bogus header (bug 10309)
17438 noxml replace=2,"xxx"
17459 Handling of 
 in URLs
17463 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17466 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17468 a</a></li></ul></li></ul>
17472 Handling of %0A in URLs
17476 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17479 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17483 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17485 5 quotes, code coverage +1 line
17492 <p><b><i></i></b></p>
17495 # same html as previous, but wikitext adjusted to match parsoid html2wt
17496 # note that wt2html and html2html will put the <i> before the <b>
17498 5 quotes, code coverage +1 line w/ nowiki (1)
17500 parsoid=wt2wt,html2wt
17502 '''''<nowiki/>'''''
17507 <p><b><i></i></b></p>
17510 # same as previous, just swapping the <i> and <b>
17512 5 quotes, code coverage +1 line w/ nowiki (2)
17514 '''''<nowiki/>'''''
17519 <p><i><b></b></i></p>
17523 Special:Search page linking.
17527 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17532 {{!}} is a magic word
17534 {{!}} is a magic word there and {{!}} is still a magic word here
17536 <p>| is a magic word there and | is still a magic word here
17539 <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>
17545 title=[[Parser test]]
17550 * {{FULLPAGENAMEE}}
17552 * {{BASEPAGENAMEE}}
17556 * {{ROOTPAGENAMEE}}
17558 * {{TALKPAGENAMEE}}
17559 * {{SUBJECTPAGENAME}}
17560 * {{SUBJECTPAGENAMEE}}
17563 * {{NAMESPACENUMBER}}
17567 * {{SUBJECTSPACEE}}
17568 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17570 <ul><li> Parser test</li>
17571 <li> Parser_test</li>
17572 <li> Parser test</li>
17573 <li> Parser_test</li>
17574 <li> Parser test</li>
17575 <li> Parser_test</li>
17576 <li> Parser test</li>
17577 <li> Parser_test</li>
17578 <li> Parser test</li>
17579 <li> Parser_test</li>
17580 <li> Talk:Parser test</li>
17581 <li> Talk:Parser_test</li>
17582 <li> Parser test</li>
17583 <li> Parser_test</li>
17591 <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>
17594 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17604 image4 |300px| centre
17605 image5.svg| http://///////
17610 <ul class="gallery mw-gallery-traditional">
17611 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17612 <div class="thumb" style="height: 150px;">Image1.png</div>
17613 <div class="gallerytext">
17616 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17617 <div class="thumb" style="height: 150px;">Image2.gif</div>
17618 <div class="gallerytext">
17623 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17624 <div class="thumb" style="height: 150px;">Image3</div>
17625 <div class="gallerytext">
17628 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17629 <div class="thumb" style="height: 150px;">Image4</div>
17630 <div class="gallerytext">
17635 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17636 <div class="thumb" style="height: 150px;">Image5.svg</div>
17637 <div class="gallerytext">
17638 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17642 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17643 <div class="thumb" style="height: 150px;">* image6</div>
17644 <div class="gallerytext">
17652 Gallery (with options)
17654 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17655 File:Nonexistent.jpg|caption
17656 File:Nonexistent.jpg
17657 image:foobar.jpg|some '''caption''' [[Main Page]]
17659 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17662 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17663 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17664 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17665 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17666 <div class="gallerytext">
17671 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17672 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17673 <div class="gallerytext">
17676 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17677 <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>
17678 <div class="gallerytext">
17679 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17683 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17684 <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>
17685 <div class="gallerytext">
17688 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17689 <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>
17690 <div class="gallerytext">
17700 Gallery with link that has fragment
17703 image:foobar.jpg|link=Main_Page
17704 image:foobar.jpg|link=Main_Page#section
17705 image:foobar.jpg|link=Main Page#section|caption
17708 <ul class="gallery mw-gallery-traditional">
17709 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17710 <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>
17711 <div class="gallerytext">
17714 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17715 <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>
17716 <div class="gallerytext">
17719 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17720 <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>
17721 <div class="gallerytext">
17731 Gallery with wikitext inside caption
17734 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
17735 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
17738 <ul class="gallery mw-gallery-traditional">
17739 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17740 <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>
17741 <div class="gallerytext">
17742 <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>
17746 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17747 <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>
17748 <div class="gallerytext">
17749 <p>This is a test template
17758 gallery (with showfilename option)
17760 <gallery showfilename>
17761 File:Nonexistent.jpg|caption
17762 File:Nonexistent.jpg
17763 image:foobar.jpg|some '''caption''' [[Main Page]]
17767 <ul class="gallery mw-gallery-traditional">
17768 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17769 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17770 <div class="gallerytext">
17771 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17776 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17777 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17778 <div class="gallerytext">
17779 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17783 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17784 <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>
17785 <div class="gallerytext">
17786 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17787 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17791 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17792 <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>
17793 <div class="gallerytext">
17794 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17803 Gallery (with namespace-less filenames)
17806 File:Nonexistent.jpg
17812 <ul class="gallery mw-gallery-traditional">
17813 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17814 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17815 <div class="gallerytext">
17818 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17819 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17820 <div class="gallerytext">
17823 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17824 <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>
17825 <div class="gallerytext">
17828 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17829 <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>
17830 <div class="gallerytext">
17838 HTML Hex character encoding (spells the word "JavaScript")
17840 parsoid=wt2html,wt2wt,html2html
17842 JavaScript
17844 <p>JavaScript
17849 <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>
17853 HTML Hex character encoding bogus encoding (bug 26437 regression check)
17857 <p>&#xsee;&#XSEE;
17860 <p>&#xsee;&#XSEE;</p>
17864 HTML Hex character encoding mixed case
17866 parsoid=wt2html,wt2wt,html2html
17875 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
17879 __FORCETOC__ override
17891 ISBN 978-0-1234-56 789
17893 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
17896 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
17898 <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>
17902 ISBN followed by 5 spaces
17913 ISBN ISBN 1234567890
17915 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17918 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17928 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17929 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17930 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17933 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17934 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17935 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17939 ISBN with empty prefix (parsoid test)
17943 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17946 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17950 Bug 22905: <abbr> followed by ISBN followed by </a>
17952 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17954 <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>
17957 <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>
17965 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17970 Double RFC with a wiki link
17974 <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>
17983 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
17986 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
17990 Centre-aligned image
17992 [[Image:foobar.jpg|centre]]
17994 <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>
18001 [[Image:foobar.jpg|none]]
18003 <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>
18008 Width + Height sized image (using px) (height is ignored)
18010 [[Image:foobar.jpg|640x480px]]
18012 <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>
18017 Width-sized image (using px, no following whitespace)
18019 [[Image:foobar.jpg|640px]]
18021 <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>
18026 Width-sized image (using px, with following whitespace - test regression from r39467)
18028 [[Image:foobar.jpg|640px ]]
18030 <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>
18035 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18037 [[Image:foobar.jpg| 640px]]
18039 <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>
18044 Image with page parameter
18048 [[File:LoremIpsum.djvu|page=2]]
18050 <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>
18053 <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>
18057 Another italics / bold test
18065 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18071 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18074 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18079 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18081 Images with the "|" character in the comment
18083 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18085 <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>
18088 <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>
18092 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18094 <html><script>alert(1);</script></html>
18096 <p><html><script>alert(1);</script></html>
18101 HTML with raw HTML ($wgRawHtml==true)
18105 <html><script>alert(1);</script></html>
18107 <p><script>alert(1);</script>
18112 Parents of subpages, one level up
18114 subpage title=[[Subpage test/L1/L2/L3]]
18118 <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>
18124 Parents of subpages, one level up, not named
18126 subpage title=[[Subpage test/L1/L2/L3]]
18130 <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>
18137 Parents of subpages, two levels up
18139 subpage title=[[Subpage test/L1/L2/L3]]
18145 <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
18146 </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>
18151 Parents of subpages, two levels up, without trailing slash or name.
18153 subpage title=[[Subpage test/L1/L2/L3]]
18162 Parents of subpages, two levels up, with lots of extra trailing slashes.
18164 subpage title=[[Subpage test/L1/L2/L3]]
18168 <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>
18173 Subpage test/L1/L2/L3Sibling
18179 Transclusion of a sibling page (one level up)
18181 subpage title=[[Subpage test/L1/L2/L3]]
18190 Transclusion of a child page
18192 subpage title=[[Subpage test/L1/L2]]
18201 Non-transclusion because of too many up levels
18203 subpage title=[[Subpage test/L1/L2/L3]]
18205 {{../../../../More than parent}}
18207 <p>{{../../../../More than parent}}
18212 Definition list code coverage
18218 <dl><dt> title  </dt>
18220 <dt> title </dt>
18226 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18227 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18228 <dt>title</dt><dd> def</dd></dl>
18232 Don't fall for the self-closing div
18234 <div>hello world</div/>
18236 <div>hello world</div>
18245 <p>[[:Template:Msg]]
18254 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18258 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18260 Always escape literal '>' in output, not just after '<'
18274 <p>This is a test template
18275 This is a test template
18287 Inclusion of !userCanEdit() content
18291 <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>
18297 Out-of-order TOC heading levels
18306 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18308 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18310 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18311 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18314 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18316 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18317 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18323 <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>
18324 <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>
18325 <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>
18326 <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>
18327 <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>
18328 <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>
18334 ISBN with a dummy number
18344 ISBN with space-delimited number
18348 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18354 ISBN with multiple spaces, no number
18373 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18374 </p><p>ISBN 12345678901
18380 ISBN with trailing year (bug 8110)
18382 ISBN 1-234-56789-0 - 2006
18384 ISBN 1 234 56789 0 - 2006
18386 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18387 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18395 {{anchorencode:foo bar©#%n}}
18397 <p>foo_bar.C2.A9.23.25n
18402 anchorencode trims spaces
18404 {{anchorencode: __pretty__please__}}
18411 anchorencode deals with links
18413 {{anchorencode: [[hello|world]] [[hi]]}}
18420 anchorencode deals with templates
18422 {{anchorencode: {{Foo}} }}
18429 anchorencode encodes like the TOC generator: (bug 18431)
18431 === _ +:.3A%3A&&]] ===
18432 {{anchorencode: _ +:.3A%3A&&]] }}
18435 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18436 <p>.2B:.3A.253A.26.26.5D.5D
18441 Bug 6200: blockquotes and paragraph formatting
18462 Bug 8293: Use of center tag ruins paragraph formatting
18483 Parsing of overlapping (improperly nested) inline html tags
18485 <span><s>x</span></s>
18487 <p><span><s>x</span></s></span>
18490 <p><span><s>x</s></span>
18495 ### Language variants related tests
18498 Self-link in language variants
18500 title=[[Dunav]] language=sr
18502 Both [[Dunav]] and [[Дунав]] are names for this river.
18504 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18515 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
18517 title=[[Duna]] language=sr
18519 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
18521 <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.
18526 Link to a section of a variant of this title shouldn't be parsed as self-link
18528 title=[[Duna]] language=sr
18530 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
18532 <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.
18537 Link to pages in language variants
18541 Main Page can be written as [[Маин Паге]]
18543 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18549 Multiple links to pages in language variants
18553 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18555 <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>.
18561 Simple template in language variants
18567 <p>This is a test template
18573 Template with explicit namespace in language variants
18579 <p>This is a test template
18585 Basic test for template parameter in language variants
18589 {{парамтест|param=foo}}
18591 <p>This is a test template with parameter foo
18597 Simple category in language variants
18601 [[Category:МедиаWики Усер'с Гуиде]]
18603 <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>
18620 Don't convert blue categorylinks to another variant (bug 33210)
18624 [[A]][[Category:分类]]
18626 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18631 Stripping -{}- tags (language variants)
18635 Latin proverb: -{Ne nuntium necare}-
18637 <p>Latin proverb: Ne nuntium necare
18643 Prevent conversion with -{}- tags (language variants)
18645 language=sr variant=sr-ec
18647 Latinski: -{Ne nuntium necare}-
18649 <p>Латински: Ne nuntium necare
18655 Prevent conversion of text with -{}- tags (language variants)
18657 language=sr variant=sr-ec
18659 Latinski: -{Ne nuntium necare}-
18661 <p>Латински: Ne nuntium necare
18667 Prevent conversion of links with -{}- tags (language variants)
18669 language=sr variant=sr-ec
18673 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18679 -{}- tags within headlines (within html for parserConvert())
18681 language=sr variant=sr-ec
18685 <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>
18691 Explicit definition of language variant alternatives
18693 language=zh variant=zh-tw
18695 -{zh:China;zh-tw:Taiwan}-, not China
18697 <p>Taiwan, not China
18703 Conversion around HTML tags
18705 language=sr variant=sr-ec
18707 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
18708 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
18711 <span title="ЛаCтин">ски</span>
18717 Explicit session-wise language variant mapping (A flag and - flag)
18719 language=zh variant=zh-tw
18721 Taiwan is not China.
18722 But -{A|zh:China;zh-tw:Taiwan}- is China,
18723 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
18724 and -{China}- is China.
18726 <p>Taiwan is not China.
18727 But Taiwan is Taiwan,
18728 (This should be stripped!)
18729 and China is China.
18734 Explicit session-wise language variant mapping (H flag for hide)
18736 language=zh variant=zh-tw
18738 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
18741 <p>(This should be stripped!)
18747 Adding explicit conversion rule for title (T flag)
18749 language=zh variant=zh-tw showtitle
18751 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18754 <p>Should be stripped!
18759 Testing that changing the language variant here in the tests actually works
18761 language=zh variant=zh showtitle
18763 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18766 <p>Should be stripped!
18771 Recursive conversion of alt and title attrs shouldn't clear converter state
18773 language=zh variant=zh-cn showtitle
18775 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
18776 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
18780 Should be stripped<span title="Exclamation">!</span>
18785 Bug 24072: more test on conversion rule for title
18787 language=zh variant=zh-tw showtitle
18789 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18790 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
18793 <p>This should be stripped!
18794 This won't take interferes with the title rule.
18799 Partly disable title conversion if variant == main language code
18801 language=zh variant=zh title=[[ZH]] showtitle
18803 -{T|zh-cn:CN;zh-tw:TW}-
18811 Partly disable title conversion if variant == main language code, more
18813 language=zh variant=zh title=[[ZH]] showtitle
18823 Raw output of variant escape tags (R flag)
18825 language=zh variant=zh-tw
18827 Raw: -{R|zh:China;zh-tw:Taiwan}-
18829 <p>Raw: zh:China;zh-tw:Taiwan
18834 Strings evaluating false shouldn't be ignored by Language converter (T51072)
18836 language=zh variant=zh-cn
18838 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
18845 Conversion rules from [numeric-only string] to [something else] (T48634)
18847 language=zh variant=zh-cn
18849 -{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
18856 Bidirectional converter rule entries with an empty value should be ignored (T53551)
18858 language=zh variant=zh-cn
18860 -{H|zh-cn:foo;zh-tw:;}-foobar
18867 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
18869 language=zh variant=zh-cn
18871 -{H|=>zh-cn:foo;}-foobar
18878 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
18880 language=zh variant=zh-cn
18889 Nested using of manual convert syntax
18891 language=zh variant=zh-hk
18893 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
18895 <p>Nested: Hello Hong Kong!
18900 Proper conversion of text in external links
18902 language=sr variant=sr-ec
18904 http://www.google.com
18905 gopher://www.google.com
18906 [http://www.google.com http://www.google.com]
18907 [gopher://www.google.com gopher://www.google.com]
18908 [https://www.google.com irc://www.google.com]
18909 [ftp://www.google.com www.google.com/ftp://dir]
18910 [//www.google.com www.google.com]
18912 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18913 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18914 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18915 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18916 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
18917 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
18918 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
18923 Do not convert roman numbers to language variants
18925 language=sr variant=sr-ec
18929 <p>Фридрих IV је цар.
18934 Unclosed language converter markup "-{"
18945 Don't convert raw rule "-{R|=>}-" to "=>"
18956 Don't break link parsing if language converter markup is in the caption.
18958 language=sr variant=sr-ec
18960 [[Main Page|-{R|main page}-]]
18962 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
18966 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18968 Don't break image parsing if language converter markup is in the caption.
18972 [[File:Foobar.jpg|-{R|caption}-]]
18974 <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>
18978 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18980 Don't break list handling if language converter markup is in the item.
18982 language=zh variant=zh-cn
18984 ;-{zh-cn:AAA;zh-tw:BBB}-
18986 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
18993 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18995 Don't break table handling if language converter markup is in the cell.
18997 language=sr variant=sr-ec
19020 Bug 529: Uncovered bullet
19029 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19030 # Templates in Wikipedia rely on this behavior, as tidy has always been
19031 # enabled there. These tests are normally run *without* tidy, so specify the
19032 # full output here.
19033 # To test realistic parsing behavior, apply a tidy-like transformation to both
19034 # the expected output and your parser's output.
19036 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19038 ******* Foo {{bullet}}
19040 <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>
19046 Bug 529: Uncovered table already at line-start
19069 Bug 529: Uncovered bullet in parser function result
19071 * Foo {{lc:{{bullet}} }}
19079 Bug 5678: Double-parsed template argument
19081 {{lc:{{{1}}}|hello}}
19088 Bug 5678: Double-parsed template invocation
19090 {{lc:{{paramtest {{!}} param = hello }} }}
19092 <p>{{paramtest | param = hello }}
19097 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19100 title=[[Main Page]]
19102 {{PRVNÍVELKÉ:ěščř}}
19103 {{prvnívelké:ěščř}}
19123 Morwen/13: Unclosed link followed by heading
19130 <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>
19135 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19142 <h1><span class="mw-headline" id="heading">heading</span></h1>
19147 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19154 <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>
19169 Paragraphs inside divs (no extra line breaks)
19181 Paragraphs inside divs (extra line break on open)
19196 Paragraphs inside divs (extra line break on close)
19211 Paragraphs inside divs (extra line break on open and close)
19228 Nesting tags, paragraphs on lines which begin with <div>
19230 <div></div><strong>A
19233 <p><strong>A</strong></p>
19234 <p><strong>B</strong></p>
19242 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19244 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19246 <blockquote>Line one
19248 Line two</blockquote>
19250 <blockquote>Line one
19251 Line two</blockquote>
19255 <p>Line one Line two</p>
19260 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19265 Line two</blockquote>
19270 Line two</blockquote>
19275 Line two</blockquote>
19279 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19281 <blockquote>Line one
19286 <blockquote>Line one
19299 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19321 Paragraphs inside blockquotes/divs (no extra line breaks)
19323 <blockquote><div>Line one
19325 Line two</div></blockquote>
19327 <blockquote><div>Line one
19328 Line two</div></blockquote>
19333 Paragraphs inside blockquotes/divs (extra line break on open)
19338 Line two</div></blockquote>
19343 Line two</div></blockquote>
19348 Paragraphs inside blockquotes/divs (extra line break on close)
19350 <blockquote><div>Line one
19353 </div></blockquote>
19355 <blockquote><div>Line one
19358 </div></blockquote>
19363 Paragraphs inside blockquotes/divs (extra line break on open and close)
19369 </div></blockquote>
19375 </div></blockquote>
19380 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19382 wgLinkHolderBatchSize=0
19388 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19389 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19390 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19395 Free external link invading image caption
19397 [[Image:Foobar.jpg|thumb|http://x|hello]]
19399 <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>
19404 Bug 15196: localised external link numbers
19408 [http://en.wikipedia.org/]
19410 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19413 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19417 Multibyte character in padleft
19419 {{padleft:-Hello|7|Æ}}
19426 Multibyte character in padright
19428 {{padright:Hello-|7|Æ}}
19435 formatdate parser function
19437 {{#formatdate:2009-03-24}}
19439 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19444 formatdate parser function, with default format
19446 {{#formatdate:2009-03-24|mdy}}
19448 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19453 Spacing of numbers in formatted dates
19455 {{#formatdate:January 15}}
19457 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19462 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
19464 language=nl title=[[MediaWiki:Common.css]]
19466 {{#formatdate:2009-03-24|dmy}}
19468 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19481 Edit comment with link
19485 I like the [[Main Page]] a lot
19487 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19491 Edit comment with link and link text
19495 I like the [[Main Page|best pages]] a lot
19497 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19501 Edit comment with link and link text with suffix
19505 I like the [[Main Page|best page]]s a lot
19507 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19511 Edit comment with section link (non-local, eg in history list)
19513 comment title=[[Main Page]]
19515 /* External links */ removed bogus entries
19517 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19521 Edit comment with section link and text before it (non-local, eg in history list)
19523 comment title=[[Main Page]]
19525 pre-comment text /* External links */ removed bogus entries
19527 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>
19531 Edit comment with section link (local, eg in diff view)
19533 comment local title=[[Main Page]]
19535 /* External links */ removed bogus entries
19537 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19541 Edit comment with subpage link (bug 14080)
19545 title=[[Subpage test]]
19547 Poked at a [[/subpage]] here...
19549 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
19553 Edit comment with subpage link and link text (bug 14080)
19557 title=[[Subpage test]]
19559 Poked at a [[/subpage|neat little page]] here...
19561 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
19565 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
19568 title=[[Subpage test]]
19570 Poked at a [[/subpage]] here...
19572 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
19576 Edit comment with bare anchor link (local, as on diff)
19580 title=[[Main Page]]
19584 <a href="#section">#section</a>
19588 Edit comment with bare anchor link (non-local, as on history)
19591 title=[[Main Page]]
19595 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19599 Anchor starting with underscore
19603 <p><a href="#_ref">One</a>
19608 Id starting with underscore
19610 <div id="_ref"></div>
19612 <div id="_ref"></div>
19617 Space normalisation on autocomment (bug 22784)
19620 title=[[Main Page]]
19622 /* __hello__world__ */
19624 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19628 percent-encoding and + signs in comments (Bug 26410)
19632 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19634 <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>
19637 # Parsoid doesn't support this yet: see bug 73581
19638 # but it *should* omit the 'src' attribute if the image is bad.
19639 # PHP side of tests was disabled in
19640 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19641 # because of issues in the PHP parserTests infrastructure
19642 # (but the output below is indeed what the PHP side emits)
19644 Bad images - basic functionality
19647 !! DISABLED/html/php
19649 <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>
19653 Bad images - bug 16039: text after bad image disappears
19658 !! DISABLED/html/php
19664 <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>
19669 Verify that displaytitle works (bug #22501) no displaytitle
19673 wgAllowDisplayTitle=true
19674 wgRestrictDisplayTitle=false
19676 this is not the the title
19679 <p>this is not the the title
19684 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
19689 wgAllowDisplayTitle=true
19690 wgRestrictDisplayTitle=false
19692 this is not the the title
19693 {{DISPLAYTITLE:whatever}}
19696 <p>this is not the the title
19701 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
19706 wgAllowDisplayTitle=true
19707 wgRestrictDisplayTitle=true
19709 this is not the the title
19710 {{DISPLAYTITLE:whatever}}
19713 <p>this is not the the title
19718 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
19723 wgAllowDisplayTitle=true
19724 wgRestrictDisplayTitle=true
19726 this is not the the title
19727 {{DISPLAYTITLE:screen}}
19730 <p>this is not the the title
19735 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
19740 wgAllowDisplayTitle=false
19742 this is not the the title
19743 {{DISPLAYTITLE:screen}}
19746 <p>this is not the the title
19747 <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>
19752 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
19757 wgAllowDisplayTitle=false
19759 this is not the the title
19762 <p>this is not the the title
19767 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
19772 wgAllowDisplayTitle=true
19773 wgRestrictDisplayTitle=true
19775 this is not the the title
19776 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
19778 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
19779 <p>this is not the the title
19784 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
19789 wgAllowDisplayTitle=true
19790 wgRestrictDisplayTitle=true
19792 this is not the the title
19793 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
19795 <span style="color: red;">s</span>creen
19796 <p>this is not the the title
19801 Page status indicators: Empty name is invalid
19805 <indicator name=" "></indicator>
19806 <indicator></indicator>
19808 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19809 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19814 Page status indicators: Weird syntaxes that are okay
19818 <indicator name="empty" />
19819 <indicator name></indicator>
19828 Page status indicators: Torture test
19832 <indicator name="01">hello world</indicator>
19833 <indicator name="02">[[Main Page]]</indicator>
19834 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
19835 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
19836 <indicator name="05">* foo
19838 <indicator name="06"><nowiki>foo</nowiki></indicator>
19839 <indicator name="07"> Preformatted</indicator>
19840 <indicator name="08"><div>Broken tag</indicator>
19841 <indicator name="09">{| class=wikitable
19844 <indicator name="10">Two
19846 paragraphs</indicator>
19849 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19850 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" />
19851 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>
19852 05=<ul><li> foo</li>
19856 07=<pre>Preformatted
19858 08=<div>Broken tag</div>
19860 09=<table class="wikitable">
19877 preload: check <noinclude> and <includeonly>
19881 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
19887 preload: check <onlyinclude>
19891 Goodbye <onlyinclude>Hello world</onlyinclude>
19897 preload: can pass tags through if we want to
19901 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
19903 <includeonly>Hello world</includeonly>
19907 preload: check that it doesn't try to do tricks
19911 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19913 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19917 Play a bit with r67090 and bug 3158
19919 <div style="width:50% !important"> </div>
19920 <div style="width:50% !important"> </div>
19921 <div style="width:50% !important"> </div>
19922 <div style="border : solid;"> </div>
19924 <div style="width:50% !important"> </div>
19925 <div style="width:50% !important"> </div>
19926 <div style="width:50% !important"> </div>
19927 <div style="border : solid;"> </div>
19930 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19931 <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>
19932 <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>
19933 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19938 HTML5 data attributes
19940 <span data-foo="bar">Baz</span>
19941 <p data-abc-def_hij="">Quuz</p>
19943 <p><span data-foo="bar">Baz</span>
19945 <p data-abc-def_hij="">Quuz</p>
19950 percent-encoding and + signs in internal links (Bug 26410)
19952 [[User:+%]] [[Page+title%]]
19953 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
19954 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
19955 [[%33%45]] [[%33%45+]]
19957 <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>
19958 <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>
19959 <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>
19960 <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>
19963 <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>
19964 <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>
19965 <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>
19966 <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>
19970 Special characters in embedded file links (bug 27679)
19972 [[File:Contains & ampersand.jpg]]
19973 [[File:Does not exist.jpg|Title with & ampersand]]
19975 <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>
19976 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
19979 <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>
19980 <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>
19984 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
19986 Text's been normalized?
19988 <p>Text's been normalized?
19993 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
19995 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
19997 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20002 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20004 [http://www.example.org/ ideograms]
20006 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20011 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20013 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20015 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20039 Bug 31098 Template which includes system messages which includes the template
20043 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20044 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20049 Bug31490 Turkish: ucfirst 'blah'
20060 Bug31490 Turkish: ucfirst 'ix'
20071 Bug31490 Turkish: lcfirst 'BLAH'
20082 Bug31490 Turkish: ucfırst (with a dotless i)
20088 <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>
20093 Bug31490 ucfırst (with a dotless i) with English language
20099 <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>
20104 Bug 26375: TOC with italics
20106 title=[[Main Page]]
20109 == ''Lost'' episodes ==
20111 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20113 <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>
20117 <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>
20122 Bug 26375: TOC with bold
20124 title=[[Main Page]]
20127 == '''should be bold''' then normal text ==
20129 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20131 <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>
20135 <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>
20140 Bug 33845: Headings become cursive in TOC when they contain an image
20142 title=[[Main Page]]
20145 == Image [[Image:foobar.jpg]] ==
20147 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20149 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20153 <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>
20158 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20160 title=[[Main Page]]
20163 == <blockquote>Quote</blockquote> ==
20165 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20167 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20171 <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>
20175 <div id="toc" class="toc">
20176 <div id="toctitle">
20180 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20184 <h2><span class="mw-headline" id="Quote"></span></h2>
20186 <p><span class="mw-headline" id="Quote">Quote</span></p>
20188 <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>
20192 Unclosed tags in TOC
20194 title=[[Main Page]]
20198 <small>Hanc marginis exiguitas non caperet.</small>
20201 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20203 <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>
20207 <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>
20208 <p><small>Hanc marginis exiguitas non caperet.</small>
20214 Multiple tags in TOC
20217 == <i>Foo</i> <b>Bar</b> ==
20219 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20221 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20223 <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>
20224 <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>
20228 <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>
20229 <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>
20233 <div id="toc" class="toc">
20234 <div id="toctitle">
20238 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
20239 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
20243 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
20244 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20246 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20248 <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>
20252 Tags with parameters in TOC
20255 == <sup class="in-h2">Hello</sup> ==
20257 == <sup class="a > b">Evilbye</sup> ==
20259 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20261 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20262 <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>
20266 <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>
20267 <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>
20272 span tags with directionality in TOC
20275 == <span dir="ltr">C++</span> ==
20277 == <span dir="rtl">זבנג!</span> ==
20279 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20281 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20283 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20285 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20287 <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>
20288 <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>
20289 <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>
20290 <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>
20291 <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>
20295 <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>
20296 <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>
20297 <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>
20298 <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>
20299 <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>
20304 Bug 72884: bdi element in ToC
20307 == <bdi>test</bdi> ==
20309 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20311 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20315 <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>
20319 # Note that the html output does not have the <p></p>, but the
20320 # html+tidy output *does*. This is because the empty <p></p> is
20321 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20323 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20328 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20330 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20334 <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>
20338 <div id="toc" class="toc">
20339 <div id="toctitle">
20343 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20347 <h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
20353 == {{int:headline_sample}} ==
20357 Bug 32057: Title needed when expanding <h> nodes.
20359 title=[[Main Page]]
20363 <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>
20368 Strip marker in urlencode
20370 {{urlencode:x<nowiki/>y}}
20371 {{urlencode:x<nowiki/>y|wiki}}
20372 {{urlencode:x<nowiki/>y|path}}
20373 {{urlencode:x<pre id="one">two</pre>y}}
20401 Strip marker in formatNum
20403 {{formatnum:1<nowiki/>2}}
20404 {{formatnum:1<nowiki/>2|R}}
20412 Check noCommafy in formatNum
20416 {{formatnum:123456.78}}
20417 {{formatnum:123456.78|NOSEP}}
20425 Wrong option for formatNum (bug 56199)
20427 {{formatnum:1,234.56|Random}}
20428 {{formatnum:1,234.56|EVERYTHING}}
20429 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20438 Strip marker in grammar
20442 {{grammar:elative|foo<nowiki/>bar}}
20449 Strip marker in padleft
20451 {{padleft:|2|x<nowiki/>y}}
20458 Strip marker in padright
20460 {{padright:|2|x<nowiki/>y}}
20467 Strip marker in anchorencode
20469 {{anchorencode:x<nowiki/>y}}
20476 nowiki inside link inside heading (bug 18295)
20478 ==[[foo|x<nowiki>y</nowiki>z]]==
20480 <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>
20485 new support for bdi element (bug 31817)
20487 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20489 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20494 Ignore pipe between table row attributes
20498 |- id=foo | style='color: red'
20506 <tr id="foo" style="color: red">
20513 Gallery override link with WikiLink (bug 34852)
20516 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
20519 <ul class="gallery mw-gallery-traditional">
20520 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20521 <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>
20522 <div class="gallerytext">
20532 Gallery override link with absolute external link (bug 34852)
20535 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20538 <ul class="gallery mw-gallery-traditional">
20539 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20540 <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>
20541 <div class="gallerytext">
20551 Gallery override link with malicious javascript (bug 34852)
20554 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20557 <ul class="gallery mw-gallery-traditional">
20558 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20559 <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>
20560 <div class="gallerytext">
20570 Gallery with invalid title as link (bug 43964)
20573 File:foobar.jpg|link=<
20576 <ul class="gallery mw-gallery-traditional">
20577 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20578 <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>
20579 <div class="gallerytext">
20587 Language parser function
20596 Padleft and padright as substr
20598 {{padleft:|3|abcde}}
20599 {{padright:|3|abcde}}
20607 Special parser function
20609 {{#special:RandomPage}}
20610 {{#special:BaDtItLe}}
20611 {{#special:Foobar}}
20620 Bug 34939 - Case insensitive link parsing ([HttP://])
20622 [HttP://MediaWiki.Org/]
20624 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20627 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20631 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20633 [HttP://MediaWiki.Org/ MediaWiki]
20635 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20640 Bug 34939 - Case insensitive link parsing (HttP://)
20642 HttP://MediaWiki.Org/
20644 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20647 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
20665 <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>
20666 <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>
20667 <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>
20668 <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>
20669 <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>
20675 ### Parsoid-specific tests
20676 ### Parsoid-PHP parser incompatibilities
20679 1. SOL-sensitive wikitext tokens as template-args
20681 parsoid=wt2html,wt2wt
20687 <span about="#mwt1" typeof="mw:Transclusion">
20688 </span><ul about="#mwt1"><li>a</li>
20690 <span about="#mwt2" typeof="mw:Transclusion">
20691 </span><ol about="#mwt2"><li>a</li>
20693 <span about="#mwt3" typeof="mw:Transclusion">
20694 </span><dl about="#mwt3"><dd>a</dd>
20698 #### -----------------------------------------------------------------
20699 #### Parsoid-specific functionality tests
20700 #### -----------------------------------------------------------------
20702 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
20703 # We know wt2wt will fail, but we expect selser to pass.
20704 # Due to the nature of our testing, wt2wt and selser tests will enter the
20705 # blacklist and we'll catch selser regressions based on changes to the
20706 # blacklist entries for selser tests.
20708 1. Bad treebuilder fixup of formatting elt is cleaned up
20710 parsoid=wt2html,wt2wt
20715 [[Image:Foobar.jpg|right|Test]]
20722 <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>
20729 2. Bad treebuilder fixup of formatting elt is cleaned up
20731 parsoid=wt2html,wt2wt
20733 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
20735 <small>[[Image:Foobar.jpg|right|300px]]</small>
20739 <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>
20741 <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>
20744 #### ----------------------------------------------------------------
20745 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
20746 #### tags. Parsoid's output for these tags differs from that of the
20748 #### ----------------------------------------------------------------
20751 Ref: 1. ref-location should be replaced with an index span
20756 B <ref name="x">foo</ref>
20760 <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>
20761 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>
20762 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>
20763 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20764 <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>
20765 <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>
20766 <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>
20771 Ref: 2. ref-tags with identical names should all get the same index
20775 A <ref name="x">foo</ref>
20779 <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>
20780 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>
20781 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20782 <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>
20787 Ref: 3. spaces in ref-names should be ignored
20791 A <ref name="x">foo</ref>
20792 B <ref name=" x " />
20796 <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>
20797 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>
20798 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>
20799 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20800 <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>
20804 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
20806 Ref: 4. 'constructor' should be accepted as a valid ref-name
20810 A <ref name="constructor">foo</ref>
20813 <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>
20814 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20815 <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>
20820 Ref: 5. body should accept generic wikitext
20825 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
20830 <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>
20832 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20833 <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>
20839 Ref: 6. indent-pres should not be output in ref-body
20851 <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>
20853 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20854 <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
20862 Ref: 7. No p-wrapping in ref-body
20881 <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>
20883 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20884 <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
20899 Ref: 8. transclusion wikitext has lower precedence
20903 A <ref> foo {{echo|</ref> B C}}
20907 <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>
20908 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20909 <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>
20914 Ref: 9. unclosed comments should not leak out of ref-body
20918 A <ref> foo <!--</ref> B C
20921 <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>
20922 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20923 <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>
20928 Ref: 10. Unclosed HTML tags should not leak out of ref-body
20932 A <ref> <b> foo </ref> B C
20936 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
20939 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20940 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></span></li>
20945 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
20953 <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
20954 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>
20955 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20956 <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>
20957 <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>
20962 Ref: 12. ref-tags act as trailing newline migration barrier
20964 <!--the newline at the end of this line moves out of the p tag-->a
20966 b<!--the newline at the end of this line stays inside the p tag--> <ref />
20972 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
20975 <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>
20976 <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>
20979 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20980 <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>
20981 <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>
20985 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
20994 <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
20995 <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>
20996 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20997 <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>
20998 <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
21004 Ref: 14. A nested ref-tag should be emitted as plain text
21008 <ref>foo <ref>bar</ref> baz</ref>
21012 <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>
21014 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21015 <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>
21020 Ref: 15. ref-tags with identical names should get identical indexes
21024 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21025 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21029 <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>
21030 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>
21032 <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>
21036 ## We don't bother wt2wt-ing non-standard whitespace
21038 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21046 <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>
21047 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21048 <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>
21052 Ref: 17. Generate valid HTML5 id/about attributes
21056 <ref name="a b">foo</ref>
21060 <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>
21063 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21064 <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>
21069 Ref: 18. T58916: Extension attributes should be parsed as plain text
21073 <ref name="{{echo|a}}">foo</ref>
21077 <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>
21080 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21081 <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>
21086 Ref: 19. ref-tags with identical name encodings should get identical indexes
21090 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21094 <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>
21096 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21097 <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>
21102 Ref: 20. ref-tags with identical names but different content should keep it
21106 A <ref name="foo">Foo one</ref>
21107 B <ref name="foo">Foo two</ref>
21108 C <ref name="foo" />
21112 <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>
21113 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>
21114 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>
21116 <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>
21121 References: 1. references tag without any refs should be handled properly
21125 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21129 References: 2. references tag with group only outputs references from that group
21131 A <ref group="a">foo</ref>
21132 B <ref group="b">bar</ref>
21135 <references group="a" />
21137 <references group="b" />
21139 <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>
21140 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>
21141 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>
21143 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21144 <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>
21146 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21147 <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>
21149 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21150 <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>
21155 References: 3. ref list should be cleared after processing references
21165 <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>
21167 <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>
21170 <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>
21172 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21173 <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>
21178 References: 4. only referenced group should be cleared after processing references
21180 A <ref group="a">afoo</ref>
21183 <references group="a" />
21189 <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>
21190 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>
21192 <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>
21195 <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>
21197 <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>
21202 References: 5. ref tags in references should be processed while ignoring all other content
21205 B <ref name="b">bar</ref>
21208 <ref name="a">foo</ref>
21209 This should just get lost.
21212 <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>
21213 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>
21216 <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>
21221 References: 6. <references /> from a transclusion
21223 <ref>Foo</ref> {{echo|<references />}}
21225 <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>
21230 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21232 A <ref>foo bar for a</ref>
21233 B <ref group="X" name="b" />
21237 <references group="X">
21238 <ref name="b">foo</ref>
21241 <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>
21242 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>
21245 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21246 <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>
21249 <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"}}'>
21250 <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>
21255 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21257 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21260 <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>
21261 <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>
21265 # This test only works in wt2html now as the <references /> are always generated
21266 # unless selser is active. Once T72722 is fixed, we should add a changes test
21267 # here to ensure that unrelated changes don't add the new <references /> in
21270 References: 9. Generate missing references list at the end
21273 B <ref group="inexistent">bar</ref>
21275 <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>
21276 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21277 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
21279 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21280 <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>
21285 References: 10. New <references/> shouldn't be added for unrelated edits.
21288 "modes": ["selser"],
21289 "changes": [["#x", "remove"]],
21293 Unrelated text<span id="x"> that's going to disappear</span>.
21301 Entities in ref name
21303 <ref name="test & me">hi</ref>
21306 <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>
21307 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21308 <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>
21312 # This test is wt2html only because we're permitting the serializer to produce
21313 # dirty diffs, normalizing the unclosed references to the self-closed version.
21315 Generate references for unclosed references tag
21323 <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>
21324 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21325 <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>
21329 New reference serializes on its own line
21331 parsoid=wt2wt,html2wt
21336 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21339 #### ----------------------------------------------------------------
21340 #### Parsoid-only testing of Parsoid's impl of LST
21341 #### Not implemented yet, see
21342 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21343 #### ----------------------------------------------------------------
21346 LST Sections: 1. Simple section start and end
21348 <section begin="2011-05-16" />
21349 <section end="2014-04-10 (MW 1.23wmf22)" />
21351 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21352 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21355 #--------- Test stripping of empty nodes in template content ----------
21357 Empty LI and TR nodes should be stripped from template content
21362 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21366 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21379 Empty LI and TR nodes should not be stripped from top-level content
21406 Empty TR nodes should not be stripped if they have any attributes set
21408 {{EmptyTRWithHTMLAttrTest}}
21410 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21411 <tr align="center"></tr>
21412 <tr><td>foo</td></tr>
21413 <tr align="center"></tr>
21414 <tr><td>bar</td></tr>
21418 #### ----------------------------------------------------------------
21419 #### The following section of tests are primarily to test
21420 #### wikitext escaping capabilities of Parsoid. Given that
21421 #### escaping can be done any number of ways, the wikitext (input)
21422 #### is always adjusted to reflect how Parsoid adds nowiki
21425 #### We are marking several tests as parsoid-only since the
21426 #### HTML in the result section is different from what the
21427 #### PHP parser generates for it.
21428 #### ----------------------------------------------------------------
21431 #### --------------- Headings ---------------
21433 #### 1. Nested inside html <h1>=foo=</h1>
21434 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21435 #### 3. Nested inside html with wikitext split by html tags
21436 #### 4. No escape needed
21437 #### 5. Empty headings <h1></h1>
21438 #### 6. Heading chars in SOL context
21439 #### ----------------------------------------
21441 Headings: 0. Unnested
21445 <nowiki>=foo=</nowiki>
21447 <nowiki> =foo= </nowiki>
21449 <nowiki>=foo=</nowiki>
21451 =foo''a''<nowiki>=</nowiki>
21453 <p><span typeof="mw:Nowiki">=foo=</span></p>
21455 <p><span typeof="mw:Nowiki"> =foo= </span>
21457 <span typeof="mw:Nowiki">=foo=</span></p>
21459 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
21462 # New headings and existing headings are handled differently
21464 Headings: 1. Nested inside html
21472 <h1 data-parsoid=''>=foo=</h1>
21473 <h2 data-parsoid=''>=foo=</h2>
21474 <h3 data-parsoid=''>=foo=</h3>
21475 <h4 data-parsoid=''>=foo=</h4>
21476 <h5 data-parsoid=''>=foo=</h5>
21477 <h6 data-parsoid=''>=foo=</h6>
21485 =<nowiki>=foo=</nowiki>=
21486 ==<nowiki>=foo=</nowiki>==
21487 ===<nowiki>=foo=</nowiki>===
21488 ====<nowiki>=foo=</nowiki>====
21489 =====<nowiki>=foo=</nowiki>=====
21490 ======<nowiki>=foo=</nowiki>======
21495 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
21504 <nowiki>*</nowiki>bar
21510 <nowiki>=bar=</nowiki>
21514 Headings: 3. Nested inside html with wikitext split by html tags
21516 parsoid=html2wt,wt2wt
21518 = ='''bold'''<nowiki>foo=</nowiki> =
21520 <h1>=<b>bold</b>foo=</h1>
21524 Headings: 4a. No escaping needed (testing just h1 and h2)
21549 <h1><i>=</i>foo=</h1>
21553 Headings: 4b. No escaping needed (inside p-tags)
21568 Headings: 5. Empty headings
21578 =====<nowiki/>=====
21580 ======<nowiki/>======
21582 <h1 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h1>
21584 <h2 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h2>
21586 <h3 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h3>
21588 <h4 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h4>
21590 <h5 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h5>
21592 <h6 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h6>
21596 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21600 <nowiki>=a=</nowiki>
21602 <nowiki>=a=</nowiki>
21604 <nowiki>=a=</nowiki>
21606 <nowiki>=a=</nowiki>
21615 Headings: 6b. Heading chars in SOL context (with trailing newlines)
21643 Headings: 6c. Heading chars in SOL context (leading newline break)
21648 <nowiki>=b=</nowiki>
21655 Headings: 6d. Heading chars in SOL context (with interspersed comments)
21659 <!--c0--><nowiki>=a=</nowiki>
21661 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
21663 <p><!--c0-->=a=</p>
21664 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
21668 Headings: 6d. Heading chars in SOL context (No escaping needed)
21678 Headings: 7. Insert a newline between new content and headings
21684 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
21685 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
21695 #### --------------- Lists ---------------
21696 #### 0. Outside nests (*foo, etc.)
21697 #### 1. Nested inside html <ul><li>*foo</li></ul>
21698 #### 2. Inside definition lists
21699 #### 3. Only bullets at start should be escaped
21700 #### 4. No escapes needed
21701 #### 5. No unnecessary escapes
21702 #### 6. Escape bullets in SOL position
21703 #### 7. Escape bullets in a multi-line context
21704 #### ----------------------------------------
21707 Lists: 0. Outside nests
21709 <nowiki>*</nowiki>foo
21711 <nowiki>#</nowiki>foo
21713 <nowiki>;Foo:</nowiki>bar
21722 Lists: 1. Nested inside html
21724 *<nowiki>*foo</nowiki>
21726 *<nowiki>#foo</nowiki>
21728 *<nowiki>:foo</nowiki>
21730 *<nowiki>;foo</nowiki>
21732 #<nowiki>*foo</nowiki>
21734 #<nowiki>#foo</nowiki>
21736 #<nowiki>:foo</nowiki>
21738 #<nowiki>;foo</nowiki>
21740 <ul><li>*foo</li></ul>
21741 <ul><li>#foo</li></ul>
21742 <ul><li>:foo</li></ul>
21743 <ul><li>;foo</li></ul>
21744 <ol><li>*foo</li></ol>
21745 <ol><li>#foo</li></ol>
21746 <ol><li>:foo</li></ol>
21747 <ol><li>;foo</li></ol>
21752 Lists: 2. Inside definition lists
21754 ;<nowiki>;foo</nowiki>
21756 ;<nowiki>:foo</nowiki>
21758 ;<nowiki>:foo</nowiki>
21761 :<nowiki>:foo</nowiki>
21763 <dl><dt>;foo</dt></dl>
21764 <dl><dt>:foo</dt></dl>
21767 <dl><dd>:foo</dd></dl>
21772 Lists: 3. Only bullets at start of text should be escaped
21774 *<nowiki>*foo*bar</nowiki>
21776 *<nowiki>*foo</nowiki>''it''*bar
21778 <ul><li>*foo*bar</li></ul>
21779 <ul><li>*foo<i>it</i>*bar</li></ul>
21784 Lists: 4. No escapes needed
21805 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
21809 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
21815 Lists: 5. No unnecessary escapes
21817 * bar <span><nowiki>[[foo]]</nowiki></span>
21819 * =bar <span><nowiki>[[foo]]</nowiki></span>
21821 * [[bar <span><nowiki>[[foo]]</nowiki></span>
21823 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
21825 * =bar <span>foo]]</span>=
21831 <ul><li> bar <span>[[foo]]</span></li></ul>
21832 <ul><li> =bar <span>[[foo]]</span></li></ul>
21833 <ul><li> [[bar <span>[[foo]]</span></li></ul>
21834 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
21835 <ul><li> =bar <span>foo]]</span>=</li></ul>
21836 <ul><li> <s></s>: a</li></ul>
21837 <ul><li> <i>* foo</i></li></ul>
21842 Lists: 6. Escape bullets in SOL position
21846 <p><!--cmt-->*foo</p>
21848 <!--cmt--><nowiki>*</nowiki>foo
21852 Lists: 7. Escape bullets in a multi-line context
21855 <nowiki>*</nowiki>b
21863 Lists: 8. Escape colons only if not present in tags
21867 <dl><dt>a:b<i>c:d</i></dt></dl>
21869 ; <nowiki>a:b</nowiki>''c:d''
21872 #### --------------- HRs ---------------
21873 #### 1. Single line
21874 #### -----------------------------------
21877 HRs: 1. Single line
21879 ----<nowiki>----</nowiki>
21891 #### --------------- Tables ---------------
21892 #### 1a. Simple example
21893 #### 1b. No escaping needed (!foo)
21894 #### 1c. No escaping needed (|foo)
21895 #### 1d. No escaping needed (|}foo)
21897 #### 2a. Nested in td (<td>foo|bar</td>)
21898 #### 2b. Nested in td (<td>foo||bar</td>)
21899 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
21901 #### 3a. Nested in th (<th>foo!bar</th>)
21902 #### 3b. Nested in th (<th>foo!!bar</th>)
21903 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
21907 #### 4c. No escaping needed
21908 #### --------------------------------------
21911 Tables: 1a. Simple example
21922 Tables: 1b. No escaping needed
21931 Tables: 1c. No escaping needed
21940 Tables: 1d. No escaping needed
21949 Tables: 2a. Nested in td
21954 <td>foo|bar</td></tr>
21955 <tr><td>x<div>a|b</div></td>
21959 |<nowiki>foo|bar</nowiki>
21961 |x<div><nowiki>a|b</nowiki></div>
21977 Tables: 2b. Nested in td
21983 <td>a<i>b||c</i></td>
21984 <td>a<i><div>b||c</div></i></td>
21985 </tr></tbody></table>
21988 |<nowiki>foo||bar</nowiki>
21989 |a''<nowiki>b||c</nowiki>''
21990 |a''<div><nowiki>b||c</nowiki></div>''
21999 <td>a<i><div>b||c</div></i>
22005 Tables: 2c. Nested in td -- no escaping needed
22021 Tables: 3a. Nested in th
22037 Tables: 3b. Nested in th
22042 <tr><th>foo!!bar</th>
22043 <th><i>foo|bar</i></th>
22044 <th><i>foo!!bar</i></th>
22045 <th><i><span>foo!!bar</span></i></th>
22046 </tr></tbody></table>
22049 !<nowiki>foo!!bar</nowiki>
22050 !''<nowiki>foo|bar</nowiki>''
22051 !''<nowiki>foo!!bar</nowiki>''
22052 !''<span><nowiki>foo!!bar</nowiki></span>''
22061 <th><i>foo!!bar</i>
22063 <th><i><span>foo!!bar</span></i>
22069 Tables: 3c. Nested in th
22074 <tr><th>foo||bar</th>
22075 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22076 </tr></tbody></table>
22079 !<nowiki>foo||bar</nowiki>
22080 !<nowiki>foo||bar</nowiki>
22093 Tables: 4a. Escape -
22112 |<nowiki>-bar</nowiki>
22117 Tables: 4b. Escape +
22136 |<nowiki>+bar</nowiki>
22141 Tables: 4c. No escaping needed
22184 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22185 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22191 <div>a|b</div></td>
22196 Tables: 4d. No escaping needed
22206 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22215 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22216 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22217 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22222 Tables: Digest broken attributes on table and tr tag
22239 T97430: Don't emit empty nowiki pairs around marker meta tags
22243 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22244 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22246 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22247 <nowiki>|</nowiki>** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22251 Unclosed xmlish element in table line shouldn't eat end delimiters
22267 <tbody><tr><td> <foo</td>
22268 <td> bar></td></tr>
22272 #### --------------- Links ----------------
22273 #### 1. Quote marks in link text
22274 #### 2. Wikilinks: Escapes needed
22275 #### 3. Wikilinks: No escapes needed
22276 #### 4. Extlinks: Escapes needed
22277 #### 5. Extlinks: No escapes needed
22278 #### --------------------------------------
22280 Links 1. WikiLinks: No escapes needed
22284 [[Foo|x [Foobar] x]]
22286 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22287 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22288 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22291 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22292 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22293 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22297 Links 2. WikiLinks: Escapes needed
22301 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22302 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22303 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22304 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22305 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22306 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22307 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22308 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22309 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22310 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22312 [[Foo|<nowiki>Foobar]</nowiki>]]
22313 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22314 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22315 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22316 [[Foo|<nowiki>|Bar</nowiki>]]
22317 [[Foo|<nowiki>]]bar</nowiki>]]
22318 [[Foo|<nowiki>[[bar</nowiki>]]
22319 [[Foo|<nowiki>x [[ y</nowiki>]]
22320 [[Foo|<nowiki>x ]] y</nowiki>]]
22321 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22323 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22324 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22325 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22326 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22327 <a href="/wiki/Foo" title="Foo">|Bar</a>
22328 <a href="/wiki/Foo" title="Foo">]]bar</a>
22329 <a href="/wiki/Foo" title="Foo">[[bar</a>
22330 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22331 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22332 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22337 Links 3. WikiLinks: No escapes needed
22342 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22343 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22346 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22347 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22351 Links 4. ExtLinks: Escapes needed
22355 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22356 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22357 <p>[http://google.com]</p>
22358 <p>[http://google.com google]</p>
22360 [http://google.com <nowiki>[google]</nowiki>]
22361 [http://google.com <nowiki>google]</nowiki>]
22363 <nowiki>[http://google.com]</nowiki>
22365 <nowiki>[http://google.com google]</nowiki>
22368 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22369 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22370 </p><p>[http://google.com]
22371 </p><p>[http://google.com google]
22376 Links 5. ExtLinks: No escapes needed
22378 [http://google.com [google]
22380 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22383 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22387 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22389 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22390 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22391 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22392 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22393 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22394 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22395 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
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(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22404 x<nowiki/>http://example.com<nowiki/>y
22405 http://example.com<nowiki/>?x
22406 http://example.com<nowiki/>&x
22407 http://example.com<nowiki/>'x
22408 http://example.com<nowiki/>,x
22409 http://example.com<nowiki/>.x
22410 http://example.com<nowiki/>;x
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(x<nowiki/>)
22420 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22423 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22425 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22426 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22427 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22428 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22429 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22435 "http://example.com"
22436 (http://example.com)
22437 (http://example.com) foo
22438 http://example.com,
22439 http://example.com, foo
22442 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22444 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22445 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22446 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22447 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22448 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22453 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22455 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22456 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
22458 http://example.com.,;:!?\
22459 -http://example.com:
22461 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
22462 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
22467 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
22469 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
22470 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
22471 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
22475 X<nowiki/>RFC 123<nowiki/>y
22479 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
22481 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
22482 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
22483 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
22490 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
22491 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
22492 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
22497 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
22499 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
22500 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22501 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22505 X<nowiki/>PMID 123<nowiki/>y
22509 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
22511 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
22512 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
22513 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
22520 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
22521 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
22522 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
22527 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
22529 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
22530 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
22531 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
22534 ISBN 1234567890<nowiki/>1
22535 ISBN 1234567890<nowiki/>x
22536 a<nowiki/>ISBN 1234567890<nowiki/>b
22540 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
22542 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
22546 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
22551 Links 14. Protect link-like plain text. (Parsoid bug T78425)
22555 <p>this is not a link: http://example.com
22558 this is not a link: <nowiki>http://example.com</nowiki>
22562 Links 15. Link trails can't become link prefixes.
22566 [[Söfnuður]]-[[00]]
22568 <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>
22571 <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>
22574 #### --------------- Quotes ---------------
22575 #### 1. Quotes inside <b> and <i>
22576 #### 2. Link fragments separated by <i> and <b> tags
22577 #### 3. Link fragments inside <i> and <b>
22578 #### 4. No escaping needed
22579 #### --------------------------------------
22581 1a. Quotes inside <b> and <i>
22583 parsoid=html2wt,wt2wt
22586 ''<nowiki>''foo''</nowiki>''
22587 ''<nowiki>'''foo'''</nowiki>''
22589 '''<nowiki/>'foo''''
22590 '''<nowiki>''foo''</nowiki>'''
22591 '''<nowiki>'''foo'''</nowiki>'''
22592 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
22593 '''foo'''<nowiki/>'s
22599 '''foo'''<nowiki/>'
22600 ''''foo'''<nowiki/>'
22601 ''fools'<span> errand</span>''
22602 ''<span>fool</span>'s errand''
22603 '<nowiki/>''foo'' bar '''baz''
22604 a|!*#-:;+-~[]{}b'''x''
22613 <b>foo'<i>bar'</i>baz</b>
22622 <i>fools'<span> errand</span></i>
22623 <i><span>fool</span>'s errand</i>
22624 '<i>foo</i> bar '<i>baz</i>
22625 a|!*#-:;+-~[]{}b'<i>x</i>
22630 1b. Quotes inside <b> and <i> with other tags on same line
22632 parsoid=html2wt,wt2wt
22634 '''a'' foo ''[[bar]]''
22635 ''a''' foo ''[[bar]]''
22636 ''a''' foo '''{{echo|[[bar]]}}'''
22637 [[foo]] x'''[[bar]]''
22638 '''foo'' <ref>test</ref>
22639 '''foo'' <div title="name">test</div>
22640 '''foo'' and <br> bar
22643 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22644 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22645 <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>
22646 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
22647 '<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>
22648 '<i>foo</i> <div title="name">test</div>
22649 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
22650 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22651 <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>
22656 2. Link fragments separated by <i> and <b> tags
22658 [[''foo''<nowiki>hello]]</nowiki>
22660 [['''foo'''<nowiki>hello]]</nowiki>
22662 <p>[[<i>foo</i>hello]]
22663 </p><p>[[<b>foo</b>hello]]
22667 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
22668 # this is one of the shortcomings of this format
22670 3. Link fragments inside <i> and <b>
22672 ''[[foo''<nowiki>]]</nowiki>
22674 '''[[foo'''<nowiki>]]</nowiki>
22677 </p><p><b>[[foo</b>]]
22682 4. No escaping needed
22684 '<span>''bar''</span>'
22685 '<span>'''bar'''</span>'
22688 <p>'<span><i>bar</i></span>'
22689 '<span><b>bar</b></span>'
22694 #### ----------- Paragraphs ---------------
22695 #### 1. No unnecessary escapes
22696 #### --------------------------------------
22699 1. No unnecessary escapes
22701 bar <span><nowiki>[[foo]]</nowiki></span>
22703 =bar <span><nowiki>[[foo]]</nowiki></span>
22705 [[bar <span><nowiki>[[foo]]</nowiki></span>
22707 ]]bar <span><nowiki>[[foo]]</nowiki></span>
22709 =bar <span>foo]]</span><nowiki>=</nowiki>
22711 <p>bar <span>[[foo]]</span>
22712 </p><p>=bar <span>[[foo]]</span>
22713 </p><p>[[bar <span>[[foo]]</span>
22714 </p><p>]]bar <span>[[foo]]</span>
22715 </p><p>=bar <span>foo]]</span>=
22719 #### ----------------------- PRE --------------------------
22720 #### 1. Leading whitespace in SOL context should be escaped
22721 #### ------------------------------------------------------
22723 1. Leading whitespace in SOL context should be escaped
22727 <nowiki> </nowiki>a
22729 <nowiki> </nowiki> a
22731 <nowiki> </nowiki>a(tab)
22733 <nowiki> </nowiki> a
22735 <nowiki> </nowiki> a
22738 <nowiki> </nowiki>b
22741 <nowiki> </nowiki>b
22744 <nowiki> </nowiki> b
22750 <p><!--cmt--> a</p>
22760 2. Leading whitespace in non-indent-pre contexts should not be escaped
22768 <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>
22769 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22770 <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>
22776 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
22795 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
22799 [[File:Foobar.jpg|thumb|caption]]
22801 <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>
22805 5. Nowiki escaping should account for indent-pres
22815 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
22828 #### --------------- Behavior Switches --------------------
22831 1. Valid behavior switches should be escaped
22838 <nowiki>__TOC__</nowiki>
22839 ''<nowiki>__TOC__</nowiki>''
22843 2. Invalid behavior switches should not be escaped
22854 # We use indent-pre as an indirect way to test for sol-transparent behavior.
22856 Behavior switches should be SOL-transparent
22860 <!-- this one's bogus -->
22867 <meta property="mw:PageProp/toc" />
22869 <!-- this one's bogus -->
22872 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
22874 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
22877 #### --------------- HTML tags ---------------
22880 #### 3. multi-line html tag
22881 #### 4. extension tags
22882 #### -----------------------------------------
22888 <a href="http://google.com">google</a>
22890 <a href="http://google.com">google</a>
22896 * <nowiki><div>foo</div></nowiki>
22897 * <nowiki><div style="color:red">foo</div></nowiki>
22898 * <nowiki><td></nowiki>
22900 <ul><li> <div>foo</div></li>
22901 <li> <div style="color:red">foo</div></li>
22902 <li> <td></li></ul>
22907 3. multi-line html tag
22922 <nowiki><ref>foo</ref></nowiki>
22924 <nowiki><ref>bar</nowiki>
22926 baz<nowiki></ref></nowiki>
22928 <p><ref>foo</ref>
22929 </p><p><ref>bar
22930 </p><p>baz</ref>
22934 #### --------------- Others ---------------
22938 <nowiki>foo</nowiki>
22940 <p><nowiki>foo</nowiki>
22944 ## The quote-char in the input is necessary for triggering the bug
22946 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
22948 parsoid=wt2wt,html2wt
22957 Tag-like HTML structures are passed through as text
22979 </p><p>1<d e>f
22984 HTML tag with necessary entities in attributes
22986 <span title="&amp;">foo</span>
22988 <p><span title="&amp;">foo</span>
22993 HTML tag with 'unnecessary' entity encoding in attributes
22995 <span title="&">foo</span>
22997 <p><span title="&">foo</span>
23002 HTML tag with broken attribute value quoting
23004 <span title="Hello world>Foo</span>
23006 <p><span>Foo</span>
23009 <p><span title="Hello world">Foo</span>
23014 Parsoid-only: HTML tag with broken attribute value quoting
23018 <span title="Hello world>Foo</span>
23020 <p><span title="Hello world">Foo</span>
23025 Table with broken attribute value quoting
23028 | title="Hello world|Foo
23039 <td title="Hello world">Foo
23045 Table with broken attribute value quoting on consecutive lines
23048 | title="Hello world|Foo
23049 | style="color:red|Bar
23062 <td title="Hello world">Foo
23063 </td><td style="color: red">Bar
23064 </td></tr></tbody></table>
23069 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23079 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23089 Accept empty td cell attribute
23092 | align="center" | foo || |
23097 <td align="center"> foo </td>
23104 Non-empty attributes in th-cells
23107 ! Foo !! style="color: red" | Bar
23113 <th style="color: red"> Bar
23119 Accept empty attributes in th-cells
23134 Empty table rows go away
23155 ### Parsoid-centric tests for testing RTing of inter-element separators
23156 ### Edge cases not tested by existing parser tests and specific to
23157 ### Parsoid-specific serialization strategies.
23161 RT-ed inter-element separators should be valid separators
23173 # Parsoid-only since PHP parser relies on Tidy for correct output
23175 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23189 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23190 <p>bar</p></small></td></tr>
23194 <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>
23198 # Note that the "style" attribute is really a template parameter here.
23199 # The = would have to be {{=}} if you wanted the literal.
23201 Empty TD followed by TD with tpl-generated attribute
23206 |{{echo|style='color:red'}}|foo
23220 Indented table with an empty td
23238 ## We have some newline diffs RT-ing this edge case
23239 ## and it is not important enough -- we seem to be emitting
23240 ## at most 2 newlines after a </tr> and this is unrelated to
23241 ## the issue from T85627 that this is testing.
23243 Indented table with blank lines in between (T85627)
23262 Indented block & table
23276 <div data-parsoid='{"stx":"html"}'>foo</div>
23278 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23283 Indent and comment before table row
23298 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23299 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23303 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23305 Empty TR followed by a template-generated TR
23311 {{echo|<tr><td>foo</td></tr>}}
23317 <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}}]}'>
23322 ## PHP and parsoid output differ for this, and since this is primarily
23323 ## for testing Parsoid's serializer, marking this Parsoid only
23325 Empty TR followed by mixed-ws-comment line should RT correctly
23341 <!--c--> </tr><!--d-->
23347 Multi-line image caption generated by templates with/without trailing newlines
23349 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23350 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23352 <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>
23353 <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>
23357 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23361 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23363 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23365 <includeonly>foo</includeonly>
23373 ## PHP emits broken html for this, and since this is primarily
23374 ## a Parsoid serializer test, marking this Parsoid only
23376 Improperly nested inline or quotes tags with whitespace in between
23378 <span> <s>x</span> </s>
23381 <p><span> <s>x</s></span><s> </s>
23382 <b> <i>x</i></b><i> </i>
23387 Encapsulate protected attributes from wt
23389 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23391 <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>
23395 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23396 ## Having nested or stray pre tags results in the attempt to add duplicates,
23397 ## causing an assertion fail. This test tries to prevent that situation.
23399 Ensure ParagraphWrapper can deal with stray closing pre tags
23409 1. Ensure fostered text content is wrapped in element nodes
23413 <table>hi</table><table>ho</table>
23422 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
23424 parsoid=wt2html,wt2wt
23433 <tbody><tr><td> a</td></tr>
23438 Encapsulation properly handles null DSR information from foster box
23440 parsoid=wt2html,wt2wt
23442 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
23444 <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>
23448 1. Encapsulate foster-parented transclusion content
23450 parsoid=wt2wt,wt2html
23452 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
23454 <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>
23464 2. Encapsulate foster-parented transclusion content
23466 parsoid=wt2wt,wt2html
23468 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
23470 <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>
23481 3. Encapsulate foster-parented transclusion content
23483 parsoid=wt2wt,wt2html
23485 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23487 <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>"]}">
23500 4. Encapsulate foster-parented transclusion content
23502 parsoid=wt2wt,wt2html
23504 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23506 <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>"]}">
23519 5. Encapsulate foster-parented transclusion content
23521 parsoid=wt2wt,wt2html
23523 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
23525 <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>
23540 6. Encapsulate foster-parented transclusion content
23542 parsoid=wt2wt,wt2html
23544 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
23546 <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>
23562 7. Encapsulate foster-parented transclusion content
23564 parsoid=wt2wt,wt2html
23566 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
23568 <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>
23578 # Note that the wt is broken on purpose: the = should be {{=}} if you
23579 # don't want it to be a template parameter key.
23581 8. Encapsulate foster-parented transclusion content
23583 parsoid=wt2wt,wt2html
23586 }}{|{{echo|style='color:red'}}
23591 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
23593 <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>
23604 9. Encapsulate foster-parented transclusion content
23606 parsoid=wt2wt,wt2html
23608 <table>{{echo|hi</table>hello}}
23610 <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>
23614 Table in fosterable position
23616 parsoid=wt2html,wt2wt
23625 <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">
23627 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
23633 # Parsoid only for bug 64747
23635 Properly encapsulate empty-content transclusions in fosterable positions
23643 <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":["","","",""]}]]}'>
23649 Support <object> element with .data attribute
23653 <object data="test.swf"></object>
23655 <object data="test.swf"></object>
23659 Don't block XML namespace declaration
23661 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
23663 <p><span>MediaWiki</span>
23666 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
23669 # -----------------------------------------------------------------
23670 # The following section of tests are primarily to spec requirements
23671 # around serialization of new/edited content.
23673 # All these tests are marked Parsoid html2wt and html2html only
23674 # ----------------------------------------------------------------
23676 # 'mi' is a localinterwiki prefix as well as a language
23678 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
23682 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
23689 New wikilinks should be serialized properly
23693 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
23694 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
23701 New wiki links (href variations)
23705 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23706 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
23707 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
23708 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
23713 [[Toxine bactérienne]]
23717 New wiki links (content string variations)
23721 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23722 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
23723 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
23727 [[Foo_bar|./Foo_bar]]
23731 New category links (href variations)
23735 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
23736 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
23737 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
23739 [[Category:Toxine bactérienne]]
23740 [[Category:Toxine bactérienne]]
23741 [[Category:Toxine bactérienne]]
23745 New sol transparent links don't need indent-pre nowiki protection
23750 <link rel="mw:PageProp/redirect" href="./Main_Page">
23751 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
23752 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
23754 #WEITERLEITUNG [[Main Page]]
23755 <!-- this is good --> [[Category:Good]]
23756 <!-- this is great --> [[Kategorie:Great]]
23760 New interlanguage links (href variations)
23764 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
23765 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
23766 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
23768 [[es:Toxine bactérienne]]
23769 [[es:Toxine_bactérienne]]
23770 [[es:Toxine_bactérienne]]
23774 Image: Modifying size of an image (1)
23777 "modes": ["wt2wt"],
23779 ["img[height]", "attr", "height", "22"],
23780 ["img[width]", "attr", "width", "200"]
23784 [[Image:Foobar.jpg|230x230px]]
23786 [[Image:Foobar.jpg|200x200px]]
23790 Image: Modifying size of an image (2)
23793 "modes": ["wt2wt"],
23795 ["img[height]", "attr", "height", "100"],
23796 ["img[width]", "attr", "width", "500"]
23800 [[Image:Foobar.jpg|230x230px]]
23802 [[Image:Foobar.jpg|500x500px]]
23805 # Change in size is ignored so long as class='mw-default-size'
23807 Image: Modifying size of an image (3)
23810 "modes": ["wt2wt"],
23812 ["figure[class]", "removeClass", "mw-default-size"],
23813 ["figure img", "attr", "height", "19"],
23814 ["figure img", "attr", "width", "170"]
23818 [[Image:Foobar.jpg|thumb]]
23820 [[Image:Foobar.jpg|thumb|170x170px]]
23824 Image: Modifying alignment of an image (bug 48665)
23827 "modes": ["wt2wt"],
23829 ["figure[class]", "removeClass", "mw-halign-right"],
23830 ["figure[class]", "addClass", "mw-halign-left"]
23834 [[Image:Foobar.jpg|thumb|caption|right]]
23836 [[Image:Foobar.jpg|thumb|caption|left]]
23840 Image: Modifying mw-default-size of an frameless image (bug 62805)
23843 "modes": ["wt2wt"],
23845 ["figure.mw-default-size", "removeClass", "mw-default-size"]
23849 [[Image:Foobar.jpg|frameless|right]]
23851 [[Image:Foobar.jpg|frameless|right|220x220px]]
23855 Image: Modifying valign of an image (bug 49221)
23858 "modes": ["wt2wt"],
23860 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
23861 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
23865 [[File:Foobar.jpg|20px|middle]]
23867 [[File:Foobar.jpg|20px|text-top]]
23871 Image: Modifying alt attribute of an image (bug 56400)
23874 "modes": ["wt2wt"],
23876 ["img[alt]", "attr", "alt", "some alternate edited text"]
23880 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
23882 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
23886 Image: Modifying caption of an image
23889 "modes": ["wt2wt"],
23891 ["figcaption", "text", "new caption"]
23895 [[Image:Foobar.jpg|thumb|original caption]]
23897 [[Image:Foobar.jpg|thumb|new caption]]
23901 Image: empty alt attribute (bug 48924)
23905 [[File:Foobar.jpg|thumb|alt=|bar]]
23907 <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>
23911 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
23916 #<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>
23918 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
23922 Image: Block level image should have \n before and after
23925 [[File:Foobar.jpg|right|thumb|150x150px]]
23929 <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>
23934 Image: New block level image should have \n before and after (existing content)
23937 [[File:Foobar.jpg|right|thumb|150x150px]]
23941 <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>
23946 Image: upright option (parsoid)
23948 [[File:Foobar.jpg|thumb|upright|caption]]
23949 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
23950 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
23952 <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>
23953 <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>
23954 <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>
23958 Image: upright option is ignored on inline and frame images (parsoid)
23960 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
23962 <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>
23966 Image: from basic HTML (1)
23970 <span typeof="mw:Image">
23971 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
23974 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
23978 Image: from basic HTML (2)
23982 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
23984 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
23988 Image: from basic HTML (3)
23992 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
23994 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
23998 Image: from basic HTML (4)
24002 <img src="./File:Foobar.jpg">
24004 [[File:Foobar.jpg|link=]]
24008 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24013 <li><p>foo</p></li>
24020 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24024 <ul> <li>foo</li></ul>
24030 Don't strip leading whitespace when handling indent-pre suppressing tags
24035 <tr><td> indented row</td></tr>
24038 <b>This is very bold of you!</b>
24041 indented cell (no pre-wrapping!)
24051 '''This is very bold of you!'''
24055 indented cell (no pre-wrapping!)
24063 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24068 <nowiki> </nowiki><span>bar</span>
24071 <nowiki> </nowiki></span>bar2
24074 <nowiki> </nowiki><span>bar</span>
24077 <nowiki> </nowiki><span>foo</span>
24095 Lists: Dont insert newlines in a serialized list item.
24099 <ul><li>a<br>b</li><li>c</li></ul>
24106 Headings: Force sol-transparent links and behavior switches to serialize before/after
24110 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
24111 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24113 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24114 <h2>it goes well <link href="Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24116 <h2 data-parsoid='{}'>howdy<link href="Category:A5" rel="mw:PageProp/Category" /></h2>
24118 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24126 <!--foo--> [[Category:A3]]
24131 [[Category:A4]] <!--bar-->
24133 ==howdy [[Category:A5]] ==
24141 Headings: Don't hoist metas that come from templates
24145 <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>
24147 == {{echo|foo [[Category:Foo]]}} ==
24151 Headings: Category in ref isn't hoisted
24155 <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>
24157 <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>
24160 [[Category:Baz]] </ref> ==
24166 Parsoid: Serialize positional parameters with = in them as named parameter
24170 <p about="#mwt1" typeof="mw:Transclusion"
24171 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24173 <p about="#mwt1" typeof="mw:Transclusion"
24174 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24176 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24177 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24178 <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>
24182 {{echo|1 = f=oo|2 = bar}}
24184 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24185 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24186 {{echo|<nowiki>f=oo</nowiki>|bar}}
24190 Parsoid: Serialize positional parameters with = in extlink as named parameter
24194 <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>
24196 {{echo|1 = http://stuff?is=ok}}
24200 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24204 <div>a<p>b</p></div>
24225 Substrings resembling wikitext in hrefs should not get nowiki escapes
24229 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24235 Enforce single-line context in the serializer
24242 <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">
24243 </span><span about="#mwt1">you</span> </h2>
24245 <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>
24247 <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
24248 there</span></li></ol>
24261 == hi {{bogus|there
24272 * foo '''bar''' baz
24276 Serialize new placeholder space without spans
24280 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24282 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24284 <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>
24290 <ref>foo : bar</ref>ok
24294 #-----------------------
24295 # Tag minimization tests
24296 #-----------------------
24299 1. I/B quote minimization: wikitext-only tags should be combined
24303 <p><i>A</i><i>B</i></p>
24304 <p><b>A</b><b>B</b></p>
24305 <p><i>A</i><b><i>B</i></b></p>
24306 <p><b>A</b><i><b>B</b></i></p>
24307 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24308 <p><i><b>A</b></i><i><b>B</b></i></p>
24309 <p><i><b>A</b></i><b><i>B</i></b></p>
24310 <p><b><i>A</i></b><i><b>B</b></i></p>
24330 2. I/B quote minimization: wikitext and html tags should not be combined
24334 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24335 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24339 ''A''<nowiki/>'''<i>B</i>'''
24343 3. I/B quote minimization: templated content stops minimization
24347 <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>
24348 <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>
24350 ''A''{{echo|''B''}}
24352 ''A''{{echo|'''''B'''''}}
24356 4. I/B quote minimization: new content should be mimimized with adjacent old content
24360 <p><i>A</i><i>B</i></p>
24361 <p><b>A</b><b>B</b></p>
24362 <p><i>A</i><b><i>B</i></b></p>
24372 5a. Merge adjacent quote nodes if they've been edited
24375 "modes": ["wt2wt", "selser"],
24377 ["p", "contents", "remove", ":contains('b')"]
24387 5b. Merge adjacent quote nodes if they've been edited
24390 "modes": ["wt2wt", "selser"],
24396 ''a''<span id="x">b</span>''c''
24402 1. Merge adjacent link nodes as long as at least one element is new
24405 "modes": ["html2wt"],
24406 "scrubWikitext": true
24409 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24410 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24411 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
24415 [[Football|Foot]][[Football|ball]]
24419 2. Merge adjacent link nodes and enable additional normalizations
24422 "modes": ["html2wt"],
24423 "scrubWikitext": true
24426 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
24428 [[Football|''Football'']]
24432 3. Don't merge adjacent link nodes if scrubWikitext is false
24435 "modes": ["html2wt"],
24436 "scrubWikitext": false
24439 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24441 [[Football|Foot]][[Football|ball]]
24444 #------------------------------
24445 # End of tag minimization tests
24446 #------------------------------
24449 Bug 54262: New entities
24455 <span typeof="mw:Entity"> </span>
24458 ## Note that there is no wikitext output for 'unknownproperty' ##
24459 ## Unknown magic words are silently dropped ##
24466 <meta property='mw:PageProp/toc' />
24467 <meta property='mw:PageProp/notoc' />
24468 <meta property='mw:PageProp/forcetoc' />
24469 <meta property='mw:PageProp/index' />
24470 <meta property='mw:PageProp/noindex' />
24471 <meta property='mw:PageProp/nogallery' />
24472 <meta property='mw:PageProp/noeditsection' />
24473 <meta property='mw:PageProp/notitleconvert' />
24474 <meta property='mw:PageProp/nocontentconvert' />
24475 <meta property='mw:PageProp/unknownproperty' />
24485 __NOCONTENTCONVERT__
24489 Consecutive <pre>s should not get merged
24491 parsoid=html2wt,html2html
24493 <pre>a</pre><pre>b</pre>
24521 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
24525 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
24527 [[Special:BookSources/1234567890|ISBN 1234567895]]
24531 Edited RFC links not serializable as RFC links should serialize as extlinks
24535 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
24537 [//tools.ietf.org/html/rfc123 New RFC]
24541 Edited PMID links not serializable as PMID links should serialize as extlinks
24545 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
24547 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
24551 WTS of autolinks with trailing/surrounding context
24555 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
24556 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
24557 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
24558 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
24559 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
24560 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
24562 http://cscott.net<nowiki/>'''foo'''
24564 http://cscott.net<b>foo</b>
24566 '''http://cscott.net<nowiki/>'''
24568 '''http://cscott.net '''
24570 '''http://cscott.net<nowiki/>x'''
24572 http://cscott.net<nowiki/>x
24576 WTS of autolinks with nowikis (round-trip)
24578 x<nowiki/>http://cscott.net<nowiki/>x
24580 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
24583 # this is the "easy" test because it leaves in place all the
24584 # data-parsoid information indicating this is an autolink
24586 WTS of autolinks with escapes (editing)
24589 "modes": ["wt2wt"],
24591 [ "meta", "remove" ]
24595 x<nowiki/>http://cscott.net<nowiki/>x
24597 x<nowiki/>http://cscott.net<nowiki/>x
24601 Edited Redirect link should emit a non-piped wikitext link
24605 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
24611 T75121: Infer extension name from typeOf if data-mw is not present
24615 <div typeOf="mw:Extension/foo"></div>
24620 # Note that the <p> wrapping isn't present in PHP parser output
24621 # The important thing for this test is that P-wrapping doesn't
24622 # interfere with the <nowiki> protection for leading - in <td>
24623 # (which isn't necessary for <th>).
24625 T88318: p-wrapped dash in table.
24627 parsoid=html2wt,wt2wt
24630 <tr><th><p>-</p></th><th><p>- </p></th></tr>
24631 <tr><td><p>-</p></td><td><p>- </p></td></tr>
24632 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
24639 |<nowiki>-</nowiki>
24640 |<nowiki>- </nowiki>
24659 <td><small>-</small></td>
24671 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
24676 <td id='mwAc'>foo</td>
24677 <td id='serialize-this'>bar</td>
24682 | id="serialize-this" |bar
24687 Parsoid-like element ids should not be serialized to wikitext unless shadowed
24691 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
24693 <div id="hello">ok</div>
24700 "modes": ["wt2wt"],
24702 [ "#xyz", "before", "<b>before</b> stuff " ],
24703 [ "#xyz", "after", " stuff <i>after</i>" ],
24704 [ "#xyz", "html", "x <b>y</b> z" ]
24708 <span id="xyz">hello</span>
24710 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
24714 Never serialize a-tag as html, regardless of what data-parsoid has to say
24718 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
24723 ## SSS FIXME: This is broken output nevertheless.
24724 ## What might be a reasonable non-broken output for this?
24725 ## This is an edge case unlikely to be seen in production
24726 ## that I am not wasting more time on this right now.
24728 Never serialize a-tag as html, no matter what attributes it has
24732 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
24734 [http://boo.org http://boohoo.org]
24737 # --------------------------------------------
24738 # Tests spec'ing wikitext serialization norms |
24739 # --------------------------------------------
24742 Lists: Add space after bullets
24749 <li><span> baz</span></li>
24754 * <span> baz</span>
24758 Headings: Add space before/after == (T53744)
24765 <h2><span> baz</span></h2>
24767 <!-- Even after hoisted content -->
24768 <h2> <link href="Category:A2" rel="mw:PageProp/Category" />ok</h2>
24776 == <span> baz</span> ==
24778 <!-- Even after hoisted content -->
24785 1. Headings: suppress newly created empty headings
24788 "modes": ["html2wt"],
24789 "scrubWikitext": true
24797 2. Headings: don't suppress empty headings if scrubWikitext is false
24807 3. Headings: don't suppress empty headings for existing headings even if scrubWikitext is true
24810 "modes": ["html2wt"],
24811 "scrubWikitext": true
24814 <h2 data-parsoid='{}'></h2>
24820 1. WT Quote Tags: suppress newly created empty style tags
24823 "modes": ["html2wt"],
24824 "scrubWikitext": true
24832 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
24838 ''<nowiki/>'''''<nowiki/>'''
24842 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
24845 "modes": ["html2wt"],
24846 "scrubWikitext": true
24855 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
24861 <nowiki> </nowiki>hi
24864 # ---------------------------------------------------
24865 # End of tests spec'ing wikitext serialization norms |
24866 # ---------------------------------------------------
24868 # -----------------------------------------------------------------
24869 # End of section for Parsoid-only html2wt tests for serialization
24871 # -----------------------------------------------------------------
24873 # -----------------------------------------------------------------
24874 # The following section of tests are primarily to spec behavior of
24875 # the selective serializer. All these tests have manual selser
24876 # changes. The automated selser changes for all tests handle the
24877 # wide variation of changes, but these tests here capture specs
24878 # deterministically.
24879 # ----------------------------------------------------------------
24883 Selser: New comments should not be lost
24886 "modes": ["selser"],
24888 [ "#a", "after", "<!--c1-->" ],
24889 [ "#b", "before", "<!--c2-->" ]
24893 <span id="a">a</span>
24895 <span id="b">b</span>
24897 <span id="a">a</span><!--c1-->
24899 <!--c2--><span id="b">b</span>
24904 Selser: Check for validity of DSR before using it
24907 "modes": ["selser"],
24909 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
24913 <span id="a">a</span>
24915 {{DISPLAYTITLE:foo}}
24916 <span id="a">a</span>
24920 1. DOMDiff: Changes to <ref> content should be looked up using id
24923 "modes": ["selser"],
24925 ["#X", "after", "bar"],
24926 ["#Y", "after", "baz"]
24930 X <ref><span id="X">foo</span></ref>
24933 <ref name="a"><span id="Y">foo</span></ref>
24936 X <ref><span id="X">foo</span>bar</ref>
24939 <ref name="a"><span id="Y">foo</span>baz</ref>
24944 2. DOMDiff: Changes to <ref> content should be looked up using id
24947 "modes": ["selser"],
24949 ["#Z", "after", "bar"]
24953 A <ref>foo bar for a</ref>
24954 B <ref group="X" name="b" />
24958 <references group="X">
24959 <ref name="b"><span id="Z">foo</span></ref>
24962 A <ref>foo bar for a</ref>
24963 B <ref group="X" name="b" />
24967 <references group="X">
24968 <ref name="b"><span id="Z">foo</span>bar</ref>