1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well-formedness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-specific options (not run by PHP parser unless
25 # the test includes an html/php section)
26 # php php-only test (not run by the parsoid parser unless
27 # the test includes an html/parsoid section)
28 # showtitle make the first line the title
29 # showindicators make the first lines the page status indicators
30 # comment run through Linker::formatComment() instead of main parser
31 # local format section links in edit comment text as local links
32 # notoc disable table of contents
33 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # You can also set the following parser properties via test options:
36 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
37 # wgLinkHolderBatchSize, wgRawHtml
39 # For testing purposes, temporary articles can created:
40 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
41 # where '/' denotes a newline.
43 # This is the standard article assumed to exist.
80 MediaWiki:bad image list
82 * [[File:Bad.jpg]] except [[Nasty page]]
110 Template:echo_with_span
116 Template:echo_with_div
129 Template:table_attribs
132 |</noinclude>style="color:red;"|Foo
136 Template:table_attribs_2
139 |</noinclude>style="color:red;"|Foo
144 Template:table_attribs_3
147 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
151 Template:table_attribs_4
153 | style="background-color:#DC241f;" width="10px" |
157 Template:table_attribs_5
160 |</noinclude>style="color:red;"||Bar
164 Template:table_attribs_6
166 style="background: <nowiki>
173 Template:table_attribs_7
176 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
180 Template:table_header_cells
182 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
188 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
192 Template:PartialTable
199 Template:image_attribs
202 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
205 ## See T48811 for details
207 Template:mixed_attr_content_template
209 style="color:red;" title="T48811"
215 Template:definition_list
262 Template:EmptyTRWithHTMLAttrTest
265 <tr align="center"></tr>
266 <tr><td>foo</td></tr>
267 <tr align="center"></tr>
268 <tr><td>bar</td></tr>
285 This is a simple paragraph.
287 <p>This is a simple paragraph.
292 Paragraphs with extra newline spacing
315 Paragraphs with newline spacing with comment lines in between
323 <!--foo--><!--More than 1 comment, still stripped-->
327 <!--foo--> <!----> <!-- bar -->
388 Paragraphs with newline spacing with non-empty white-space lines in between
415 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
423 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
462 Extra newlines: More paragraphs with indented comment
477 Extra newlines followed by heading
492 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
493 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
496 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
501 Extra newlines between heading and content are swallowed
509 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
510 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
517 http://fr.wikipedia.org/wiki/🍺
518 <!-- EasterEgg we love beer, better be able be able to link to it -->
520 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
524 # Note that the html+tidy output removes the spaces after the <li>,
525 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
526 # This is an issue for all tests with lists. We intentionally do
527 # *not* add html+tidy clauses for these, as we don't want to
528 # document/test the broken behavior. (Parsoid matches the non-tidy
529 # output in these cases.)
538 <li> Item 2</li></ul>
546 * plain''italic''plain
547 * plain''italic''plain''italic''plain
548 * plain'''bold'''plain
549 * plain'''bold'''plain'''bold'''plain
550 * plain''italic''plain'''bold'''plain
551 * plain'''bold'''plain''italic''plain
552 * plain''italic'''bold-italic'''italic''plain
553 * plain'''bold''bold-italic''bold'''plain
554 * plain'''''bold-italic'''italic''plain
555 * plain'''''bold-italic''bold'''plain
556 * plain''italic'''bold-italic'''''plain
557 * plain'''bold''bold-italic'''''plain
558 * plain l'''italic''plain
559 * plain l''''bold''' plain
562 <li> plain<i>italic</i>plain</li>
563 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
564 <li> plain<b>bold</b>plain</li>
565 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
566 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
567 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
568 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
569 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
570 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
571 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
572 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
573 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
574 <li> plain l'<i>italic</i>plain</li>
575 <li> plain l'<b>bold</b> plain</li></ul>
579 # this example taken from the [[simple:Moon]] article (bug 47326)
581 Italics and possessives (1)
583 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
585 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
589 # this example taken from [[en:Flaming Pie]] (bug 49926)
591 Italics and possessives (2)
593 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
595 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
599 # this example taken from [[en:Dictionary]] (bug 49926)
601 Italics and possessives (3)
603 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
605 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
611 ### 2-quote opening sequence tests
614 Italics and bold: 2-quote opening sequence: (2,2)
623 Italics and bold: 2-quote opening sequence: (2,3)
632 Italics and bold: 2-quote opening sequence: (2,4)
642 # same html as previous, but wikitext adjusted to match parsoid html2wt
644 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
646 ''foo<nowiki>''</nowiki>''
652 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
654 Italics and bold: 2-quote opening sequence: (2,5)
667 # same html as previous, but wikitext adjusted to match parsoid html2wt
669 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
671 ''foo'''''<nowiki/>'''
682 ### 3-quote opening sequence tests
686 Italics and bold: 3-quote opening sequence: (3,2)
695 Italics and bold: 3-quote opening sequence: (3,3)
704 Italics and bold: 3-quote opening sequence: (3,4)
712 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
714 Italics and bold: 3-quote opening sequence: (3,5)
727 # same html as previous, but wikitext adjusted to match parsoid html2wt
729 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
731 '''foo'''''<nowiki/>''
742 ### 4-quote opening sequence tests
746 Italics and bold: 4-quote opening sequence: (4,2)
756 # same html as previous, but wikitext adjusted to match parsoid html2wt
758 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
760 <nowiki>''</nowiki>''foo''
767 Italics and bold: 4-quote opening sequence: (4,3)
776 Italics and bold: 4-quote opening sequence: (4,4)
786 # same html as previous, but wikitext adjusted to match parsoid html2wt
788 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
796 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
798 Italics and bold: 4-quote opening sequence: (4,5)
807 <p>'<b>foo</b><i></i>
811 # same html as previous, but wikitext adjusted to match parsoid html2wt
813 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
815 '<nowiki/>'''foo'''''<nowiki/>''
820 <p>'<b>foo</b><i></i>
826 ### 5-quote opening sequence tests
830 Italics and bold: 5-quote opening sequence: (5,2)
840 # same html as previous, but wikitext adjusted to match parsoid html2wt
842 Italics and bold: 5-quote opening sequence: (5,2+3)
851 Italics and bold: 5-quote opening sequence: (5,3)
861 # same html as previous, but wikitext adjusted to match parsoid html2wt
863 Italics and bold: 5-quote opening sequence: (5,3+2)
872 Italics and bold: 5-quote opening sequence: (5,4)
878 <p><i><b>foo'</b></i>
883 Italics and bold: 5-quote opening sequence: (5,5)
892 Italics and bold: 5-quote opening sequence: (5,6)
896 <p><i><b>foo'</b></i>
901 ### multiple quote sequences in a line
904 Italics and bold: multiple quote sequences: (2,4,2)
910 <p><i>foo'<b>bar</b></i>
915 # same html as previous, but wikitext adjusted to match parsoid html2wt
917 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
919 ''foo'<nowiki/>'''bar'''''
921 <p><i>foo'<b>bar</b></i>
927 Italics and bold: multiple quote sequences: (2,4,3)
933 <p><i>foo'<b>bar</b></i>
938 # same html as previous, but wikitext adjusted to match parsoid html2wt
940 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
942 ''foo'<nowiki/>'''bar'''''
944 <p><i>foo'<b>bar</b></i>
950 Italics and bold: multiple quote sequences: (2,4,4)
956 <p><i>foo'<b>bar'</b></i>
961 # same html as previous, but wikitext adjusted to match parsoid html2wt
963 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
965 ''foo'<nowiki/>'''bar'<nowiki/>'''''
967 <p><i>foo'<b>bar'</b></i>
972 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
974 Italics and bold: multiple quote sequences: (3,4,2)
983 <p><b>foo'</b>bar<i></i>
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
993 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
998 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1003 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1005 Italics and bold: multiple quote sequences: (3,4,3)
1014 <p><b>foo'</b>bar<b></b>
1018 # same html as previous, but wikitext adjusted to match parsoid html2wt
1020 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1022 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1027 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1032 ### other quote tests
1035 Italics and bold: other quote tests: (2,3,5)
1037 ''this is about '''foo's family'''''
1039 <p><i>this is about <b>foo's family</b></i>
1045 Italics and bold: other quote tests: (2,(3,3),2)
1047 ''this is about '''foo's''' family''
1049 <p><i>this is about <b>foo's</b> family</i>
1055 Italics and bold: other quote tests: (3,2,3,2)
1059 '''this is about ''foo'''s family''
1061 <p><b>this is about <i>foo</i></b><i>s family</i>
1066 # same html as previous, but wikitext adjusted to match parsoid html2wt
1068 Italics and bold: other quote tests: (3,2,3+2+2,2)
1070 '''this is about ''foo'''''<nowiki/>''s family''
1072 <p><b>this is about <i>foo</i></b><i>s family</i>
1078 Italics and bold: other quote tests: (3,2,3,3)
1080 '''this is about ''foo'''s family'''
1082 <p>'<i>this is about </i>foo<b>s family</b>
1088 Italics and bold: other quote tests: (3,(2,2),3)
1090 '''this is about ''foo's'' family'''
1092 <p><b>this is about <i>foo's</i> family</b>
1098 Italicized possessive
1100 The ''[[Main Page]]'''s talk page.
1102 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1105 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1109 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1110 (Requires tidy for PHP parser output to be fixed up)
1112 parsoid=wt2html,wt2wt
1129 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1130 <td><i>a</i></td><td><i>b</i></td></tr>
1139 Non-html5 tags should be accepted
1141 <center>''foo''</center>
1143 <font>''foo''</font>
1144 <strike>''foo''</strike>
1147 <center><i>foo</i></center>
1148 <p><big><i>foo</i></big>
1149 <font><i>foo</i></font>
1150 <strike><i>foo</i></strike>
1156 <wbr> is valid wikitext (bug 52468)
1164 # <strike> is HTML4, <s> is HTML4/5.
1166 <s> or <strike> for strikethrough
1168 <strike>strike</strike>
1172 <p><strike>strike</strike>
1180 Text-level semantic html elements in wikitext
1183 <strong>text</strong>
1199 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1206 <strong>text</strong>
1222 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1230 # test cases taken from
1231 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1233 Ruby markup (W3C-style)
1235 ; Mono-ruby for individual base characters
1236 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1238 : <ruby>今日<rt>きょう</rt></ruby>
1240 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1242 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1244 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1246 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1247 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1248 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1251 <dl><dt> Mono-ruby for individual base characters</dt>
1252 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1253 <dt> Group ruby</dt>
1254 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1255 <dt> Jukugo ruby</dt>
1256 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1257 <dt> Inline ruby</dt>
1258 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1259 <dt> Double-sided ruby</dt>
1260 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1262 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1263 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1264 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1269 # The next two test different paths in the sanitizer.
1271 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1273 <blockquote|>a</blockquote>
1275 <b→> doesn't terminate </b→>
1277 <bä> doesn't terminate </bä>
1279 <boo> doesn't terminate </boo>
1281 <s.foo> doesn't terminate </s.foo>
1285 <p><blockquote|>a</blockquote>
1286 </p><p><b→> doesn't terminate </b→>
1287 </p><p><bä> doesn't terminate </bä>
1288 </p><p><boo> doesn't terminate </boo>
1289 </p><p><s.foo> doesn't terminate </s.foo>
1290 </p><p><sub-ID#1>
1294 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1295 # If the non-word-character tag made it through the sanitizer, tidy
1296 # would munge it up.
1298 Non-word characters don't terminate tag names + tidy
1300 <blockquote|>a</blockquote>
1302 <b→> doesn't terminate </b→>
1304 <bä> doesn't terminate </bä>
1306 <boo> doesn't terminate </boo>
1308 <s.foo> doesn't terminate </s.foo>
1312 <p><blockquote|>a</p>
1313 <p><b→> doesn't terminate </b→></p>
1314 <p><bä> doesn't terminate </bä></p>
1315 <p><boo> doesn't terminate </boo></p>
1316 <p><s.foo> doesn't terminate </s.foo></p>
1317 <p><sub-ID#1></p>
1321 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1322 ### This checks that HTML5 tags (with non-word characters in the tag
1323 ### name) make it safely through the parser -- the Sanitizer will
1324 ### munge them later, as it should.
1327 Non-word characters are valid in extension tags (T19663)
1340 Isolated close tags should be treated as literal text (bug 52760)
1348 <p><s.foo>s</p>
1350 <p><s.foo>s</p>
1354 ### Special characters
1358 Bare pipe character (bug 52363)
1367 Bare pipe character from a template (bug 52363)
1376 ### <nowiki> test cases
1380 <nowiki> unordered list
1382 <nowiki>* This is not an unordered list item.</nowiki>
1384 <p>* This is not an unordered list item.
1387 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1393 <nowiki>Lorem ipsum dolor
1401 <p>Lorem ipsum dolor
1410 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1422 :There is not nowiki.
1423 :There is <nowiki>nowiki</nowiki>.
1425 #There is not nowiki.
1426 #There is <nowiki>nowiki</nowiki>.
1428 *There is not nowiki.
1429 *There is <nowiki>nowiki</nowiki>.
1431 <dl><dd>There is not nowiki.</dd>
1432 <dd>There is nowiki.</dd></dl>
1433 <ol><li>There is not nowiki.</li>
1434 <li>There is nowiki.</li></ol>
1435 <ul><li>There is not nowiki.</li>
1436 <li>There is nowiki.</li></ul>
1439 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1440 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1442 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1443 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1445 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1446 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1450 Entities inside <nowiki>
1452 <nowiki><</nowiki>
1459 Entities inside template parameters
1465 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1469 Properly escape nowiki when combined with other wiki markup
1473 <p>* </nowiki> tag</p>
1475 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1479 T93824: Put escaped HTML tags inside nowiki
1483 <p><h2>foo</h2></p>
1485 <nowiki><h2>foo</h2></nowiki>
1489 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1493 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1494 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1495 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1497 This text: L'[[Foo]]
1498 This text: L<nowiki>''</nowiki>[[Foo]]
1499 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1502 # This test fails because wikitext whitespace is not normalized before comparing.
1504 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1508 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1511 This text : L<nowiki>''</nowiki>[[Foo]]
1514 # This test and the next one are html2wt only as they test that incorrect wikitext
1515 # passed in template arguments gets escaped or wrapped in nowikis where required.
1517 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1521 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1522 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1524 {{echo|foo{{!}}bar}}
1525 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1529 T53961: Output correct nowikis in template arguments
1533 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1534 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1535 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1536 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1540 {{echo|a <nowiki>}}</nowiki> b}}
1541 {{echo|<nowiki>a [[ b</nowiki>}}
1542 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1543 {{echo|a <nowiki>}</nowiki>}}
1547 Cases where "!!" needs nowiki protection
1552 <tr><th>this needs protection !! here</th></tr>
1556 <tr><th>this does not need
1557 protection !! here</th></tr>
1561 !<nowiki>this needs protection !! here</nowiki>
1574 Comments and Indent-Pre
1576 <!-- comment 1 --> asdf
1578 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1582 <!-- comment 2 -->xyz
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 --> xyz
1641 asdf<!-- comment 1 -->jkl
1651 <!-- foo --> b <!-- bar -->
1665 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1671 Comment semantics and delimiters
1673 <!-- --><!----><!-----><!------>
1677 <!-- --><!----><!-----><!------>
1681 Comment semantics and delimiters, redux
1683 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1684 -- foo -- funky huh? ... -->
1688 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1689 -- foo -- funky huh? ... -->
1693 Comment semantics and delimiters: directors cut
1695 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1696 everything starting with < followed by !-- until the first -- and > we see,
1697 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1703 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1704 everything starting with < followed by !-- until the first -- and > we see,
1705 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1710 Comment semantics: nesting
1712 <!--<!-- no, we're not going to do anything fancy here -->-->
1717 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1720 # Parsoid closes the unclosed comment, even if it means a slight
1723 Comment semantics: unclosed comment at end
1725 parsoid=wt2html,html2html
1727 <!--This comment will run out to the end of the document
1731 <!--This comment will run out to the end of the document-->
1735 Comment semantics: normalize comments to play nice with XML and browsers
1737 <!-- Browsers --!> think this is closed -->
1738 <!--> This would normally be text -->
1739 <!---> As would this -->
1740 <!-- XML doesn't like trailing dashes -------->
1741 <!-- Nor doubled hyphens -- anywhere in the data -->
1742 But this is not a comment.
1744 <p>But this is not a comment.
1747 <!-- Browsers --!> think this is closed -->
1748 <!--> This would normally be text -->
1749 <!---> As would this -->
1750 <!-- XML doesn't like trailing dashes -------->
1751 <!-- Nor doubled hyphens -- anywhere in the data -->
1752 <p>But this is not a comment.</p>
1756 Comment semantics: round-trip even text which contains encoded -->
1758 <!-- hello & goodbye - > --> --&gt; --&xx -->
1760 <!-- hello & goodbye - > --> --&gt; --&xx -->
1764 Comment in template title
1773 Comment on its own line post-expand
1785 Comment on its own line post-expand with non-significant whitespace
1797 Multiple comments should still parse as SOL-transparent
1799 parsoid=wt2html,wt2wt
1802 <!--c2--><!--c3--><!--c4-->*b
1811 <!--c2--><!--c3--><!--c4-->
1818 ### paragraph wrapping tests
1833 Block tag on one line (<div>)
1849 Block tag on one line (<blockquote>)
1851 a <blockquote>foo</blockquote>
1855 a <blockquote>foo</blockquote>
1867 Block tag on both lines (<div>)
1884 Block tag on both lines (<blockquote>)
1886 a <blockquote>foo</blockquote>
1888 b <blockquote>foo</blockquote>
1890 a <blockquote>foo</blockquote>
1891 b <blockquote>foo</blockquote>
1905 Multiple lines without block tags
1929 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1930 # So, we have a separate section for Parsoid. We don't want
1931 # to mimic this stripping behavior in Parsoid. It affects
1932 # editing experience and also requires us to maintain additional
1935 Empty lines between lines with block tags
1973 <div data-parsoid='{"stx":"html"}'></div>
1976 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1979 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1981 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1984 <div data-parsoid='{"stx":"html"}'>e</div>
1987 ## PHP parser emits output which is broken
1989 Unclosed HTML p-tags should be handled properly
2002 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2007 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2008 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2011 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2015 a [[Category:A1]] [[Category:A2]]
2020 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2024 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2030 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2034 ### Preformatted text
2043 And a [[Main Page|link]]
2049 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2054 Tabs don't trigger preformatted text
2058 This is preformatted text.
2064 <pre>This is preformatted text.
2070 Ident preformatting with inline content
2081 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2098 Regression with preformatted in <center>
2112 Bug 52763: Preformatted in <blockquote>
2118 indented cell (no pre-wrapping!)
2128 <p> indented cell (no pre-wrapping!)
2136 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2153 Bug 15491: <ins>/<del> in blockquote
2156 Foo <del>bar</del> <ins>baz</ins> quux
2160 <p>Foo <del>bar</del> <ins>baz</ins> quux
2166 # Note that the p-wrapping is newline sensitive, which could be
2167 # considered a bug: tidy will wrap only the 'Foo' in the example
2168 # below in a <p> tag. (see comment 23-25 of bug #6200)
2170 Bug 15491: <ins>/<del> in blockquote (2)
2172 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2175 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2181 <del>bar</del> <ins>baz</ins> quux</blockquote>
2185 <pre> with attributes (bug 3202)
2187 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2189 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2194 <pre> with width attribute (bug 3202)
2196 <pre width="8">Narrow screen goodies</pre>
2198 <pre width="8">Narrow screen goodies</pre>
2203 <pre> with forbidden attribute (bug 3202)
2205 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2207 <pre width="8">Narrow screen goodies</pre>
2212 Entities inside <pre>
2221 <pre> with forbidden attribute values (bug 3202)
2223 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2225 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2230 <nowiki> inside <pre> (bug 13238)
2238 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2246 <pre><nowiki>Foo</nowiki></pre>
2251 <nowiki> and <pre> preference (first one wins)
2280 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2282 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2285 <p><span typeof="mw:Nowiki">
2294 </pre> inside nowiki
2296 <nowiki></pre></nowiki>
2302 # Parsoid doesn't strip empty tags, like Tidy does.
2304 Empty pre; pre inside other HTML tags (bug 54946)
2306 parsoid=wt2html,wt2wt
2337 HTML pre followed by indent-pre
2347 # Note that tidy removes the empty <p> tags from the start and end.
2348 # Parsoid does not, by design.
2352 <p><pre>foo</pre></p>
2358 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2362 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2370 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2380 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2392 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2413 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2417 {{echo| foo}}{{echo| bar}}
2422 {{echo|<!--cmt--> foo}}
2424 <!--cmt-->{{echo| foo}}
2426 {{echo|{{echo| }}bar}}
2444 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2481 Pres with newline attributes
2486 <pre class="one two">hi</pre>
2490 two" data-parsoid='{"stx":"html"}'>hi</pre>
2494 Things that look like <pre> tags aren't treated as such
2496 Barack Obama <President> of the United States
2497 <President></President>
2499 <p>Barack Obama <President> of the United States
2500 <President></President>
2504 ## PHP parser discards the "<pre " string
2506 Handle broken pre-like tags (bug 64025)
2510 {{echo|<pre <pre>x</pre>}}
2512 <table><pre </table>
2515 <table><pre></pre></table>
2518 <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>
2527 Parsoid: handle pre with space after attribute
2531 <pre style="width:50%;" >{{echo|foo}}</pre>
2533 <pre style="width:50%;">{{echo|foo}}</pre>
2536 <pre style="width:50%;">{{echo|foo}}</pre>
2539 # TODO / maybe: fix wt2wt for this
2541 Parsoid: Don't paragraph-wrap fosterable content
2567 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2595 #--------------------------------------------------------------------
2596 # Transclusion parameter whitespace stripping tests
2597 # Behavior is different for positional and named parameters
2598 #--------------------------------------------------------------------
2600 Templates: Strip leading and trailing whitespace from named-param values
2604 {{echo|1= {{echo|b}} }}
2617 <ul><li> d</li></ul>
2622 Templates: Don't strip whitespace from positional-param values
2626 {{echo|{{echo|b}} }}
2658 <ul><li> f</li></ul>
2666 Templates: Handle empty comment-and-ws-only lines correctly
2669 <!--should be ignored-->
2670 <!--should be ignored as well-->
2679 Templates: Handle comments in the target
2682 <!-- should be ignored -->
2685 {{echo<!-- should be ignored -->
2688 {{echo<!-- should be ignored -->|foo}}
2690 {{<!-- should be ignored -->echo|foo}}
2692 <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>
2694 <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>
2696 <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>
2698 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2702 Templates: Handle comments in parameter names (bug 67657)
2705 <!-- should be ignored -->
2709 <!-- should be ignored -->
2712 {{echo|1<!-- should be ignored --> = foo}}
2714 {{echo|<!-- should be ignored -->1 = foo}}
2716 <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>
2718 <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>
2720 <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>
2722 <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>
2726 Templates: Other wikitext in parameter names (bug 67657)
2730 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2736 #--------------------------------------------------------------------
2737 # Transclusion parameter escaping tests
2738 #--------------------------------------------------------------------
2740 Templates: Parsoid parameter escaping test 1
2742 {{echo|[foo]|{{echo|[bar]}}}}
2746 <p about="#mwt1" typeof="mw:Transclusion"
2747 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2751 Parsoid: Pipes in external links in template parameter
2753 {{echo|[{{echo|http://example.com}} link]}}
2755 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2757 <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>
2761 Parsoid: pipe in transclusion parameter
2763 {{echo|http://foo.com/a|b}}
2765 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2767 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2768 typeof="mw:Transclusion"
2769 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>
2773 Parsoid: Pipe in external link target and content in template parameter
2775 parsoid=html2wt,wt2wt
2777 {{echo|[http://foo.com/a|b a|b]}}
2779 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2781 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2782 typeof="mw:Transclusion"
2783 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2784 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2788 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2792 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2794 <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>
2798 Templates: Don't escape already nowiki-escaped text in template parameters
2800 parsoid=html2wt,wt2wt
2802 {{echo|foo<nowiki>|</nowiki>bar}}
2803 {{echo|<nowiki><div></nowiki>}}
2804 {{echo|<nowiki></nowiki>}}
2806 <p>foo|bar <div></p>
2808 <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>
2809 <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>
2810 <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>
2816 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2818 parsoid=html2wt,wt2wt
2820 {{echo|{{echo|1=bar}}}}
2824 <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>
2829 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2835 <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>
2840 Templates: Preserve blank parameter names
2846 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2850 Templates: Preserve blank parameter names in other positions
2852 {{blank_param|bar|=foo}}
2856 <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
2861 ### Parsoid-centric tests for testing RT edge cases for pre
2865 1a. Indent-Pre and Comments
2878 1b. Indent-Pre and Comments
2891 1c. Indent-Pre and Comments
2904 1d. Indent-Pre and Comments
2905 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2918 2a. Indent-Pre and tables
2939 2b. Indent-Pre and tables
2955 2c. Indent-Pre and tables (bug 42252)
2972 2d. Indent-Pre and tables
2989 <tbody><tr><td> b</td></tr>
2994 2e. Indent-Pre and table-line syntax
3007 2f. Indent-pre started by table-line syntax
3026 3a. Indent-Pre and block tags (single-line html)
3030 c <blockquote> foo </blockquote>
3035 c <blockquote> foo </blockquote>
3036 <pre><span> foo </span>
3039 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3040 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3041 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3042 <pre><span> foo </span>
3059 3b. Indent-Pre and block tags (multi-line html)
3064 <pre>a <span>foo</span>
3069 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3070 b <div data-parsoid='{"stx":"html"}'> foo </div>
3080 3c. Indent-Pre and block tags (pre-content on separate line)
3144 4. Indent-Pre and extension tags
3150 a <ul class="gallery mw-gallery-traditional">
3151 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3152 <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>
3153 <div class="gallerytext">
3160 <ul class="gallery mw-gallery-traditional">
3161 <li class="gallerybox" style="width: 155px">
3162 <div style="width: 155px">
3163 <div class="thumb" style="width: 150px;">
3164 <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>
3166 <div class="gallerytext"></div>
3173 Table wikitext syntax outside wiki-tables
3176 ! not a table heading
3179 | class="foo bar" | baz
3186 ! not a table heading
3189 | class="foo bar" | baz
3198 Render paragraphs when indent-pre is suppressed in blocklevels
3215 4. Multiple spaces at start-of-line
3233 ## NOTE: the leading white-space chars on empty line are significant
3235 5a. White-space in indent-pre
3247 ## NOTE: the leading white-space chars on empty line are significant
3249 5b. White-space in indent-pre
3268 5c. White-space in indent-pre
3281 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3304 7a. Indent-pre and category links
3306 parsoid=wt2html,wt2wt
3308 [[Category:foo]] <!-- No pre-wrapping -->
3309 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3312 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3313 <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 -->
3317 7b. Indent-pre and category links
3319 parsoid=wt2html,wt2wt
3322 [[Category:foo]] {{echo|b}}
3324 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3325 <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>
3329 Indent-Pre: Newlines in comments shouldn't affect sol state
3343 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3347 HTML-pre: 1. embedded newlines
3382 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3384 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3388 <pre data-parsoid='{"stx":"html"}'>
3393 <pre data-parsoid='{"stx":"html"}'>
3401 HTML-pre: big spaces
3437 <pre data-parsoid='{"stx":"html"}'>
3456 HTML-pre: 2: indented text
3469 HTML-pre: 3: other wikitext
3488 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3497 ### Definition lists
3504 <dl><dt> name </dt>
3505 <dd> Definition</dd></dl>
3510 Definition list for indentation only
3514 <dl><dd> Indented text</dd></dl>
3519 Definition list with no space
3524 <dd>Definition</dd></dl>
3529 Definition list with URL link
3531 ; http://example.com/ : definition
3533 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3534 <dd> definition</dd></dl>
3539 Definition list with bracketed URL link
3541 ;[http://www.example.com/ Example]:Something about it
3543 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3544 <dd>Something about it</dd></dl>
3549 Definition list with wikilink containing colon
3551 ; [[Help:FAQ]]: The least-read page on Wikipedia
3553 <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>
3554 <dd> The least-read page on Wikipedia</dd></dl>
3558 # At Brion's and JeLuF's insistence... :)
3560 Definition list with news link containing colon
3562 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3564 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3565 <dd> This isn't even a real newsgroup!</dd></dl>
3568 <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>
3572 Malformed definition list with colon
3574 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3576 <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>
3581 Definition lists: colon in external link text
3583 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3585 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3586 <dd> OK, I made that up</dd></dl>
3591 Definition lists: colon in HTML attribute
3593 ;<b style="display: inline">bold</b>
3595 <dl><dt><b style="display: inline">bold</b></dt></dl>
3600 Definition lists: self-closed tag
3602 ;one<br/>two : two-line fun
3604 <dl><dt>one<br />two </dt>
3605 <dd> two-line fun</dd></dl>
3610 Bug 11748: Literal closing tags
3614 <dd>test test test test test</dd>
3616 <dd>test test test test test</dd>
3621 <dd>test test test test test</dd>
3623 <dd>test test test test test</dd>
3629 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3632 ; term : description
3637 <dl><dt> term </dt>
3638 <dd> description</dd></dl>
3639 <ul><li> unordered</li></ul>
3646 Definition list with empty definition and following paragraph
3658 Nested definition lists using html syntax
3667 Definition Lists: No nesting: Multiple dd's
3680 Definition Lists: Indentation: Regular
3688 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3693 Definition Lists: Indentation: Missing 1st level
3699 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3704 Definition Lists: Indentation: Multi-level indent
3708 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3713 Definition Lists: Hacky use to indent tables
3720 should be left alone
3722 <dl><dd><dl><dd><table>
3727 </td></tr></table></dd></dl></dd></dl>
3729 should be left alone
3734 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3742 should be left alone
3745 <dl><dd><dl><dd><table><tr>
3748 </tr></table><!-- bar --></dd></dl></dd></dl>
3750 should be left alone</p>
3754 Definition Lists: Hacky use to indent tables, with comment before table
3760 <dl><dd><dl><dd><!-- foo --><table><tr>
3762 </tr></table></dd></dl></dd></dl>
3765 # The trailing whitespace in this test is to catch a regression in
3766 # Parsoid after T54473.
3768 Definition Lists: Hacky use to indent tables (WS-insensitive)
3777 </td></tr></table></dd></dl>
3781 <tbody><tr><td>a</td></tr>
3782 </tbody></table> </dd></dl>
3785 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3786 ## as an empty dt item. It also ignores all but the last ";" when followed
3787 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3788 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3791 ## Ex: ";;t2 ::d2" is transformed into:
3803 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3804 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3815 ## All Parsoid only definition list tests have this difference.
3817 ## See also: https://phabricator.wikimedia.org/T8569
3818 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3821 Table / list interaction: indented table with lists in table contents
3836 <ul><li> b</li></ul>
3840 <ul><li> d</li></ul>
3841 </td></tr></table></dd></dl>
3846 Table / list interaction: lists nested in tables nested in indented lists
3869 </td></tr></table></dd></dl>
3876 Definition Lists: Nesting: Multi-level (Parsoid only)
3906 Definition Lists: Nesting: Test 2 (Parsoid only)
3933 Definition Lists: Nesting: Test 3 (Parsoid only)
3976 Definition Lists: Nesting: Test 4
3981 <dl><dd><dl><dd><dl><dt>t3</dt>
3982 <dd>d3</dd></dl></dd></dl></dd></dl>
3987 ## The Parsoid team believes the following three test exposes a
3988 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3989 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3990 ## It also exposes a "misfeature" in tidy, which doesn't like
3991 ## <dl> tags with a single <dt> child; it converts the <dt> into
3992 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3994 Definition Lists: Mixed Lists: Test 1
4000 <dl><dd><dl><dt><ul><li> foo</li>
4001 <li> bar</li></ul></dt></dl>
4002 <dl><dt> baz</dt></dl></dd></dl>
4037 Definition Lists: Mixed Lists: Test 2
4042 <ul><li><dl><dd> d1</dd>
4043 <dd> d2</dd></dl></li></ul>
4049 Definition Lists: Mixed Lists: Test 3
4054 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4055 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4061 Definition Lists: Mixed Lists: Test 4
4066 <ul><li><dl><dt>d1 </dt>
4069 <dd>d4</dd></dl></li></ul>
4075 Definition Lists: Mixed Lists: Test 5
4081 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4087 Definition Lists: Mixed Lists: Test 6
4092 <ol><li><ul><li><dl><dd>d1
4093 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4099 Definition Lists: Mixed Lists: Test 7
4104 <dl><dd><ul><li> d1</li>
4105 <li> d2</li></ul></dd></dl>
4111 Definition Lists: Mixed Lists: Test 8
4116 <dl><dd><ul><li> d1</li></ul>
4117 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4123 Definition Lists: Mixed Lists: Test 9
4127 <ul><li><dl><dt>foo </dt>
4128 <dd>bar</dd></dl></li></ul>
4134 Definition Lists: Mixed Lists: Test 10
4138 <ul><li><ol><li><dl><dt>foo </dt>
4139 <dd>bar</dd></dl></li></ol></li></ul>
4143 # The Parsoid team disagrees with the PHP parser's seemingly-random
4144 # rules regarding dd/dt on the next two tests. Parsoid is more
4145 # consistent, and recognizes the shared nesting and keeps the
4146 # still-open tags around until the nesting is complete.
4147 # (And tidy again converts <dt> to <dd> before 'bar'.)
4150 Definition Lists: Mixed Lists: Test 11
4155 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4156 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4157 <dl><dt>boo </dt>
4158 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4213 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4214 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4218 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4219 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4228 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4230 # * The test is wrong, there are two colons where there should be :;
4231 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4233 Definition Lists: Weird Ones: Test 1
4235 *#;*::;; foo : bar (who uses this?)
4237 <ul><li><ol><li><dl><dt> foo </dt>
4238 <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>
4257 <dt>bar (who uses this?)</dt>
4289 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4290 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4302 Definition Lists: colons occurring in tags
4320 <dt><span>a:b</span></dt>
4347 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4349 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4350 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4351 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4352 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4354 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4355 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4356 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4360 Definition Lists: colons and tables 1
4372 </td></tr></table></dd></dl>
4376 </td></tr></table></dd></dl>
4380 # Parsoid's output (as documented below) differs from php's in this case.
4381 # This is probably a bug. If we fixup parsoid to match php's output, the
4382 # above test should pass and the below test case can be removed. It is
4383 # unclear which output is more desirable.
4386 Definition Lists: colons and tables 2
4398 </td></tr></table></dd>
4402 </td></tr></table></dd></dl>
4406 Definition Lists: template interaction
4408 ::{{definition_list}}
4411 ::{{definition_list}}
4416 <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">
4417 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4419 <dl><dd data-parsoid='{}'>one
4420 <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">
4421 </span><dd about="#mwt2">two
4423 <dd>three</dd></dl></dd>
4424 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4432 External links: non-bracketed
4434 Non-bracketed: http://example.com
4436 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4440 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4442 External links: numbered
4444 Numbered: [http://example.com]
4445 Numbered: [http://example.net]
4446 Numbered: [http://example.com]
4448 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4449 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4450 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4453 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4454 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4455 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4459 External links: specified text
4461 Specified text: [http://example.com link]
4463 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4468 External links: trail
4470 Linktrails should not work for external links: [http://example.com link]s
4472 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4477 External links: dollar sign in URL
4479 http://example.com/1$2345
4481 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4485 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4487 External links: dollar sign in URL (autonumber)
4489 [http://example.com/1$2345]
4491 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4494 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4498 External links: open square bracket forbidden in URL (bug 4377)
4500 parsoid=wt2html,wt2wt,html2html
4502 http://example.com/1[2345
4504 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4507 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4511 External links: open square bracket forbidden in URL (named) (bug 4377)
4513 parsoid=wt2html,html2html
4515 [http://example.com/1[2345]
4517 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4520 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4523 # parsoid adds a space before the link name
4525 External links: open square bracket forbidden in URL (named) (bug 4377)
4528 [http://example.com/1 [2345]
4530 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4535 External links: nowiki in URL link text (bug 6230)
4537 [http://example.com/ <nowiki>''example site''</nowiki>]
4539 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4544 External links: newline forbidden in text (bug 6230 regression check)
4546 [http://example.com/ first
4549 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4555 External links: Pipe char between url and text
4557 [http://example.com | link]
4559 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4564 External links: protocol-relative URL in brackets
4566 [//example.com/ Test]
4568 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4572 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4574 External links: protocol-relative URL in brackets without text
4578 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4581 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4585 External links: protocol-relative URL in free text is left alone
4589 <p>//example.com/Foo
4594 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4596 foo//example.com/Foo
4598 <p>foo//example.com/Foo
4603 External links: with no contents
4605 [http://en.wikipedia.org/wiki/Foo]
4607 [[wikipedia:Foo|Bar]]
4609 [[wikipedia:Foo|<span>Bar</span>]]
4611 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4612 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4613 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4616 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4617 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4618 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4622 External links: Free with trailing punctuation
4632 http://example.com/url_with_(brackets)
4633 (http://example.com/url_without_brackets)
4634 http://example.com/url_with_entity
4635 http://example.com/url_with_entity 
4636 http://example.com/url_with_entity 
4637 http://example.com/url_with_entity<
4638 http://example.com/url_with_entity<
4639 http://example.com/url_with_entity<
4641 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4642 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4643 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4644 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4645 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4646 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4647 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4648 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4649 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4650 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4651 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4652 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4653 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4654 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4655 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4656 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4659 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4660 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4661 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4662 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4663 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4664 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4665 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4666 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4667 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4668 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4669 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4670 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4671 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4672 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4673 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4674 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4678 External links: Lone protocols are never linked (T105697)
4697 External links: No preceding word characters allowed (bug 65278)
4699 NOPEhttp://example.com
4700 N0http://example.com
4701 ok:http://example.com
4702 ok-http://example.com
4704 <p>NOPEhttp://example.com
4705 N0http://example.com
4706 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4707 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4714 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4716 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4721 External image from https
4723 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4725 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4730 External image (when not allowed)
4732 wgAllowExternalImages=0
4734 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4736 <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>
4741 Link to non-http image, no img tag
4743 Link to non-http image, no img tag: ftp://example.com/test.jpg
4745 <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>
4750 External links: terminating separator
4752 Terminating separator: http://example.com/thing,
4754 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4759 External links: intervening separator
4761 Intervening separator: http://example.com/1,2,3
4763 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4768 External links: old bug with URL in query
4770 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4772 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4777 External links: old URL-in-URL bug, mixed protocols
4779 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4781 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4786 External links: URL in text
4788 URL in text: [http://example.com http://example.com]
4790 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4795 External links: Clickable images
4797 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4799 <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>
4802 <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>
4806 External links: raw ampersand
4808 Old & use: http://x&y
4810 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4815 External links: encoded ampersand
4817 Old & use: http://x&y
4819 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4822 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4826 External links: encoded equals (bug 6102)
4828 http://example.com/?foo=bar
4830 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4833 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4837 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4838 ## does it number them. As discussed in bug 53505, we can identify
4839 ## autonumbered links via CSS.
4843 External links: [raw ampersand]
4845 Old & use: [http://x&y]
4847 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4850 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4853 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4854 # mode will return the [raw ampersand] wikitext
4856 External links: [encoded ampersand]
4858 parsoid=wt2html,wt2wt,html2html
4860 Old & use: [http://x&y]
4862 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4865 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4869 External links: [raw equals]
4871 [http://example.com/?foo=bar]
4873 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4876 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4879 # note that parsoid html is identical to [raw equals] case; so html2wt
4880 # mode will return the [raw equals] wikitext
4882 External links: [encoded equals] (bug 6102)
4884 parsoid=wt2html,wt2wt,html2html
4886 [http://example.com/?foo=bar]
4888 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4891 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4894 # xxx parsoid strips the IDN character, so the round-trip tests will
4895 # obviously fail and are disabled. --cscott
4897 External links: [IDN ignored character reference in hostname; strip it right off]
4899 parsoid=wt2html,wt2wt,html2html
4901 [http://e‌xample.com/]
4903 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4906 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4909 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4910 # Where an external link could easily circumvent the sanitization of the text of
4911 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4912 # test demands a higher standard. That's a bit strange.
4916 # http://example.com -> [http://example.com|http://example.com]
4917 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4919 # The first example is sanitized, but the second is not. Any security benefits
4920 # from this production are trivial to circumvent. Either remove this test and
4921 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4922 # the test accordingly.
4926 # xxx parsoid strips the IDN character, so the round-trip tests will
4927 # obviously fail and are disabled. --cscott
4929 External links: IDN ignored character reference in hostname; strip it right off
4931 parsoid=wt2html,html2html
4933 http://e‌xample.com/
4935 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4938 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4942 External links: www.jpeg.org (bug 554)
4946 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4950 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4952 External links: URL within URL (original bug 2)
4954 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4956 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4959 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4963 BUG 361: URL inside bracketed URL
4965 [http://www.example.com/foo http://www.example.com/bar]
4967 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4972 BUG 361: URL within URL, not bracketed
4974 http://www.example.com/foo?=http://www.example.com/bar
4976 <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>
4981 BUG 289: ">"-token in URL-tail
4983 http://www.example.com/<hello>
4985 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4990 BUG 289: literal ">"-token in URL-tail
4992 http://www.example.com/<b>html</b>
4994 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4997 <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>
5001 BUG 289: ">"-token in bracketed URL
5003 [http://www.example.com/<hello> stuff]
5005 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5010 BUG 289: literal ">"-token in bracketed URL
5012 [http://www.example.com/<b>html</b> stuff]
5014 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5019 BUG 289: literal double quote at end of URL
5021 http://www.example.com/"hello"
5023 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5028 BUG 289: literal double quote in bracketed URL
5030 [http://www.example.com/"hello" stuff]
5032 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5037 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5039 [http://www.example.com test]
5041 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5046 External links: link text with spaces
5048 [http://www.example.com a b c]
5049 [http://www.example.com ''a'' ''b'']
5051 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5052 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5057 External links: wiki links within external link (Bug 3695)
5059 [http://example.com [[wikilink]] embedded in ext link]
5061 <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>
5064 <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>
5068 BUG 787: Links with one slash after the url protocol are invalid
5072 [http:/example.com title]
5074 <p>http:/example.com
5075 </p><p>[http:/example.com title]
5080 Bracketed external links with template-generated invalid target
5082 [{{echo|http:/example.com}} title]
5084 <p>[http:/example.com title]
5089 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5091 ''[http://example.com text'']
5092 [http://example.com '''text]'''
5093 ''Something [http://example.com in italic'']
5094 ''Something [http://example.com mixed''''', even bold]'''
5095 '''''Now [http://example.com both''''']
5097 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5098 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5099 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5100 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5101 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5107 Bug 4781: %26 in URL
5109 http://www.example.com/?title=AT%26T
5111 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5114 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5117 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5118 # % is actually legal in HTML5. Any change in output would need testing though.
5120 Bug 4781, 5267: %25 in URL
5122 http://www.example.com/?title=100%25_Bran
5124 <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>
5127 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5131 Bug 4781, 5267: %28, %29 in URL
5133 http://www.example.com/?title=Ben-Hur_%281959_film%29
5135 <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>
5138 <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>
5143 Bug 4781: %26 in autonumber URL
5145 [http://www.example.com/?title=AT%26T]
5147 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5150 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5154 Bug 4781, 5267: %26 in autonumber URL
5156 [http://www.example.com/?title=100%25_Bran]
5158 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5161 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5165 Bug 4781, 5267: %28, %29 in autonumber URL
5167 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5169 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5172 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5177 Bug 4781: %26 in bracketed URL
5179 [http://www.example.com/?title=AT%26T link]
5181 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5184 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5188 Bug 4781, 5267: %25 in bracketed URL
5190 [http://www.example.com/?title=100%25_Bran link]
5192 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5197 Bug 4781, 5267: %28, %29 in bracketed URL
5199 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5201 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5204 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5208 External link containing a period in the anchor. (bug 63947)
5210 [//foo.org/bar#baz. bang]
5212 [//foo.org/bar. bang]
5214 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5215 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5218 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5219 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5223 External link containing a single quote. (bug 63947)
5227 [//foo.org/bar'baz bang]
5229 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5230 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5233 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5234 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5239 External link containing a period in the anchor. (bug 63947)
5241 [//foo.org/bar#baz. bang]
5243 [//foo.org/bar. bang]
5245 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5246 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5249 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5250 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5254 External link containing a single quote. (bug 63947)
5258 [//foo.org/bar'baz bang]
5260 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5261 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5264 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5265 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5270 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5272 Some [http://example.com/ pretty ''italics'' and stuff]!
5274 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5279 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5281 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5283 <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>
5288 External link containing double-single-quotes with no space separating the url from text in italics
5290 [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]].]
5292 <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>
5295 <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>
5297 <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>
5301 External link with comments in link text
5303 [http://www.google.com Google <!-- comment -->]
5305 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5310 URL-encoding in URL functions (single parameter)
5312 {{localurl:Some page|amp=&}}
5314 <p>/index.php?title=Some_page&amp=&
5319 URL-encoding in URL functions (multiple parameters)
5321 {{localurl:Some page|q=?&=&}}
5323 <p>/index.php?title=Some_page&q=?&amp=&
5330 http://example.com/index.php?foozoid%5B%5D=bar
5332 http://example.com/index.php?foozoid[]=bar
5334 <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>
5335 </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>
5338 <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>
5340 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5344 IPv6 urls, autolink format (T23261)
5346 http://[2404:130:0:1000::187:2]/index.php
5348 Examples from RFC2373, section 2.2:
5349 * http://[1080::8:800:200C:417A]/unicast
5350 * http://[FF01::101]/multicast
5351 * http://[::1]/loopback
5352 * http://[::]/unspecified
5353 * http://[::13.1.68.3]/ipv4compat
5354 * http://[::FFFF:129.144.52.38]/ipv4compat
5356 Examples from RFC 2732, section 2:
5357 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5358 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5359 * http://[3ffe:2a00:100:7031::1]
5360 * http://[1080::8:800:200C:417A]/foo
5361 * http://[::192.9.5.5]/ipng
5362 * http://[::FFFF:129.144.52.38]:80/index.html
5363 * http://[2010:836B:4179::836B:4179]
5366 <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>
5367 </p><p>Examples from RFC2373, section 2.2:
5369 <ul><li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5370 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5371 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5372 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5373 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5374 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5375 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5377 <ul><li> <a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5378 <li> <a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5379 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5380 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5381 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5382 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5383 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5388 IPv6 urls, bracketed format (T23261)
5390 [http://[2404:130:0:1000::187:2]/index.php test]
5392 Examples from RFC2373, section 2.2:
5393 * [http://[1080::8:800:200C:417A] unicast]
5394 * [http://[FF01::101] multicast]
5395 * [http://[::1]/ loopback]
5396 * [http://[::] unspecified]
5397 * [http://[::13.1.68.3] ipv4compat]
5398 * [http://[::FFFF:129.144.52.38] ipv4compat]
5400 Examples from RFC 2732, section 2:
5401 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5402 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5403 * [http://[3ffe:2a00:100:7031::1] 3]
5404 * [http://[1080::8:800:200C:417A]/foo 4]
5405 * [http://[::192.9.5.5]/ipng 5]
5406 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5407 * [http://[2010:836B:4179::836B:4179] 7]
5410 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5411 </p><p>Examples from RFC2373, section 2.2:
5413 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5414 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5415 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5416 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5417 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5418 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5419 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5421 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5422 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5423 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5424 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5425 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5426 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5427 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5432 Non-extlinks in brackets
5441 [{{echo|foo}} ''bar'']
5442 [{{echo|foo}}l's] errand
5443 [{{echo|foo}}l's errand]
5445 [url=http://example.com]
5458 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5463 Percent encoding in external links
5465 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5467 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5470 <p><a rel="mw:ExtLink"
5471 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5475 Use url link syntax for links where the content is equal the link target
5479 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5482 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5486 Parenthesis in external links, especially URL links
5490 http://example.com/test)
5492 http://example.com/(test)
5494 http://example.com/((test)
5496 (http://example.com/(test))
5498 (http://example.com/(test)))))
5500 http://example.com/a)b
5502 [http://example.com) foo]
5504 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5505 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5506 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5507 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5508 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5509 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5510 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5511 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5514 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5515 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5516 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5517 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5518 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5519 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5520 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5521 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5525 Parenthesis in external links, w/ transclusion or comment
5527 (http://example.com/{{echo|hi}})
5529 (http://example.com<!-- hi -->)
5531 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5532 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5535 <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>
5537 <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>
5541 Serialize <a> tags with invalid link targets as plain text
5545 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5546 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5547 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5548 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5551 <nowiki>*</nowiki>text
5552 <nowiki>[[foo]]</nowiki>
5553 <nowiki>*a [[foo]]</nowiki>
5557 mw:ExtLink -vs- mw:WikiLink (T94723)
5561 <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>
5562 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5563 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5564 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5566 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5567 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5572 [[wikipedia:Foo|Bar]]
5573 [[wikipedia:Foo|Bar]]
5575 [[wikipedia:European_Robin|European Robin]]
5576 [[wikipedia:European_Robin|European Robin]]
5580 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5584 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5586 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5597 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5599 Normal text. '''''Bold italic text.''''' Normal text.
5601 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5602 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5607 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5608 # parser strips. The wikitext contains just the first half of the bold
5611 Unclosed and unmatched quotes
5613 '''''Bold italic text '''with bold deactivated''' in between.'''''
5615 '''''Bold italic text ''with italic deactivated'' in between.'''''
5619 ..spanning two paragraphs (should not work).'''
5621 '''Bold tag left open
5623 ''Italic tag left open
5627 <!-- Unmatching number of opening, closing tags: -->
5628 '''This year''''s election ''should'' beat '''last year''''s.
5630 ''Tom'''s car is bigger than ''Susan'''s.
5632 Plain ''italic'''s plain
5634 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5635 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5636 </p><p><b>Bold text..</b>
5637 </p><p>..spanning two paragraphs (should not work).
5638 </p><p><b>Bold tag left open</b>
5639 </p><p><i>Italic tag left open</i>
5641 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5642 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5643 </p><p>Plain <i>italic'</i>s plain
5646 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5647 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5648 </p><p><b>Bold text..</b>
5649 </p><p>..spanning two paragraphs (should not work).<b></b>
5650 </p><p><b>Bold tag left open</b>
5651 </p><p><i>Italic tag left open</i>
5654 <!-- Unmatching number of opening, closing tags: -->
5655 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5656 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5657 </p><p>Plain <i>italic'</i>s plain
5664 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5667 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5668 # is the bare minimum required by the spec, see:
5669 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5670 # Parsoid team replies: empty table tags are legal in HTML5
5672 A table with no data.
5685 A table with stray table end tags on start tag line (wt2html)
5689 {|style="color: red;"|}
5691 {|style="color: red;" |}
5695 {|style="color: red;"|} id="foo"
5699 {|style="color: red;" |} id="foo"
5703 <table style="color: red;"></table>
5705 <table style="color: red;">
5711 <table style="color: red;" id="foo">
5717 <table style="color: red;" id="foo">
5726 A table with no data (take 2)
5734 # A table with nothing but a caption is invalid XHTML, we might want to render
5735 # this as <p>caption</p>
5736 # Parsoid team replies: table with only a caption is legal in HTML5
5738 A table with nothing but a caption
5746 </caption><tr><td></td></tr></table>
5749 <table><caption> caption</caption></table>
5753 A table with caption with default-spaced attributes and a table row
5756 |+ style="color: red;" | caption1
5762 <caption style="color: red;"> caption1
5771 A table with captions with non-default spaced attributes and a table row
5774 |+style="color: red;"|caption2
5775 |+ style="color: red;"| caption3
5781 <caption style="color: red;">caption2
5783 <caption style="color: red;"> caption3
5792 Table td-cell syntax variations
5796 | foo bar foo || baz
5797 | style='color:red;' | baz
5798 | style='color:red;' || baz
5805 <td> foo bar foo </td>
5808 <td style="color:red;"> baz
5810 <td> style='color:red;' </td>
5838 Simple table but with multiple dashes for row wikitext
5857 Multiplication table
5859 {| border="1" cellpadding="2"
5860 |+Multiplication table
5862 ! × !! 1 !! 2 !! 3
5880 <table border="1" cellpadding="2">
5881 <caption>Multiplication table
5928 Accept "||" in table headings
5943 Accept "!!" in table data
5957 <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>
5962 Accept "||" in indented table headings
5972 </th></tr></table></dd></dl>
5977 Accept "!!" in templates
5991 <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>
5995 Accept "!!" in table headings after newline
6012 <p>b!!c</p></th></tr>
6017 Accept "!!" in table data of mixed wikitext / html syntax
6021 <tr><td>b!!c</td></tr>
6034 <tbody><tr><th>a</th></tr>
6035 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6040 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6057 Accept "| !" at start of line in tables (ignore !-attribute)
6061 | !style="color:red" | bar
6073 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 +/-
6077 |style='color:red;'|+1
6078 |style='color:blue;'|-1
6090 <td style="color:red;">+1
6092 <td style="color:blue;">-1
6116 |rowspan=2| Cell 2, row 1 (and 2)
6127 <td rowspan="2"> Cell 2, row 1 (and 2)
6145 {| bgcolor=#ABCDEF border=2
6150 |the original table again
6158 <table bgcolor="#ABCDEF" border="2">
6166 <td>the original table again
6172 Invalid attributes in table cell (bug 1830)
6186 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6190 | title="foo<nowiki>|</nowiki>" |bar
6191 | title="foo<nowiki>|</nowiki>" bar
6198 <td title="foo|">bar
6200 <td> title="foo|" bar
6205 # The "|}" to close the table is missing from the input, so parsoid's
6206 # *2wt modes will fail.
6208 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
6210 parsoid=wt2html,html2html
6213 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6217 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6218 <td>]" onmouseover="alert(document.cookie)">test
6226 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6229 # FIXME: The php output is broken.
6231 ! and || in td attributes should not be parsed as <th>/<td>
6234 | style="color: red !important;" data-contrived="put this here ||" | foo
6239 <td> style="color: red !important;" data-contrived="put this here </td>
6245 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
6250 Indented table markup mixed with indented pre content (proposed in bug 6200)
6255 Text that should be rendered preformatted
6263 <pre>Text that should be rendered preformatted
6272 1. Template-generated table cell attributes and cell content
6277 || {{table_attribs_5}}
6278 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6279 |align=center {{table_attribs}}
6280 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6285 <td style="color:red;">Foo
6287 <td style="color:red;">Foo
6289 <td> style="color:red;"</td>
6292 <td style="color:red;">Foo
6294 <td align="center" style="color:red;">Foo
6296 <td align="center" style="color:red;">Foo
6302 2. Template-generated table cell attributes and cell content
6305 |{{table_attribs_2}}
6310 <td style="color:red;">Foo
6318 <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>
6319 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6324 3. Template-generated table cell attributes and cell content
6327 !align=center {{table_header_cells}}
6329 |align=center {{table_cells}}
6334 <th align="center" style="color:red;">Foo</th>
6335 <th style="color:red;"><i>Bar</i></th>
6336 <th style="color:brown;"><i>Foo</i> and Baz
6339 <td align="center" style="color:red;">Foo</td>
6340 <td style="color:red;"><i>Bar</i></td>
6341 <td style="color:brown;"><i>Foo</i> and Baz
6346 <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>
6347 <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>
6352 4. Template-generated table cell attributes and cell content inside a templated table
6355 !align=center {{table_header_cells}}
6357 |align=center {{table_cells}}
6362 <th align="center" style="color:red;">Foo</th>
6363 <th style="color:red;"><i>Bar</i></th>
6364 <th style="color:brown;"><i>Foo</i> and Baz
6367 <td align="center" style="color:red;">Foo</td>
6368 <td style="color:red;"><i>Bar</i></td>
6369 <td style="color:brown;"><i>Foo</i> and Baz
6373 <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}}]}'>
6374 <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>
6376 <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>
6380 ## Edge case fix to prevent future regressions
6382 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6385 |{{table_attribs_7}}
6390 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<span class="mw-ref" id="cite_ref-1" rel="dc:references" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></td></tr>
6392 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
6396 Table with row followed by newlines and table heading
6414 Table with empty line following the start tag
6431 # FIXME: Preserve the attribute properly (with an empty string as value) in
6432 # the PHP parser. Parsoid implements the behavior below.
6434 Table attributes with empty value
6444 </td></tr></tbody></table>
6449 Wikitext table with a lot of comments
6472 Wikitext table comments represented in parsoid dom
6474 {|<!--c1--><!--c2-->
6485 <table><!--c1--><!--c2-->
6486 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6487 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6492 Wikitext table with double-line table cell
6509 Table cell with a single comment
6526 Table-cell after a comment-only-empty-line
6543 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6545 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6551 Build table with {{!}}
6553 {{{!}} class="wikitable"
6556 {{!}}- style="color:red;"
6557 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6560 <table class="wikitable">
6566 <tr style="color:red;">
6568 <td style="color:red;"> second data
6574 Build table with pipe as data
6576 {| class="wikitable"
6579 |- style="color:red;"
6580 | data || style="color:red;" | second data
6582 | style="color:red;" | data with | || style="color:red;" | second data with |
6584 || data with | ||| second data with |
6587 <table class="wikitable">
6593 <tr style="color:red;">
6595 <td style="color:red;"> second data
6598 <td style="color:red;"> data with | </td>
6599 <td style="color:red;"> second data with |
6602 <td> data with | </td>
6603 <td> second data with |
6609 Build table with wikilink
6611 {| class="wikitable"
6612 ! header || second header
6613 |- style="color:red;"
6614 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6616 | data || second data [[Main Page|link|text with pipe]]
6619 <table class="wikitable">
6624 <tr style="color:red;">
6625 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6626 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6630 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6635 # The expected HTML structure in this test is debatable. The PHP parser does
6636 # not parse this kind of table at all. The main focus for Parsoid is on
6637 # round-tripping, so this output is ok for now. TODO: revisit!
6639 Wikitext table with html-syntax row
6649 <td>foo</td></tr></tbody></table>
6652 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6653 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6654 ## PHP parser, which tidy then compounds by fostering the content
6655 ## entirely out of the table. Parsoid recognizes the table context
6656 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6657 ## depends on PHP's treatment of broken table markup!
6659 Implicit <td> after a |-
6661 parsoid=wt2html,html2html
6681 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6683 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6685 parsoid=wt2html,html2html
6718 <tr><td><pre>a</pre></td></tr>
6719 <tr><td> b</td></tr>
6724 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6725 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6727 Lists should be recognized in an implicit <td> context
6729 parsoid=wt2html,html2html
6756 Table cells not properly parsed in an implicit-td context
6760 {{table_attribs_4}} || a || b
6765 <td style="background-color:#DC241f;" width="10px"></td>
6772 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6773 <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>
6778 Parsoid: Round-trip tables directly followed by content (bug 51219)
6780 parsoid=wt2html,wt2wt
6805 Parsoid: Default to a newline after tables in new content (bug 51219)
6810 <tr><td>foo</td></tr></tbody></table> bar
6812 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6817 <nowiki> </nowiki>bar
6825 Parsoid: newline inducing block nodes don't suppress <nowiki>
6837 Parsoid: Row-syntax table headings followed by comment & table cells
6839 parsoid=wt2html,wt2wt
6843 <!-- foo --> || baz || quux
6857 <tbody><tr><th> foo </th><th> bar
6858 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6863 Parsoid: Recover better from broken table attributes
6883 <p>foo</p></td></tr>
6888 Strip unsupported table tags
6936 Testing serialization after deletion of table cells
6939 "modes": ["wt2wt", "selser"],
6947 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6960 Plain link, capitalized
6964 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6969 Plain link, uncapitalized
6973 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6980 [[Main Page|The Main Page]]
6982 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6987 Piped link with comment in link text
6989 [[Main Page|The Main<!--front--> Page]]
6991 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6996 Piped link with multiple pipe characters in link text
6998 [[Main Page||The|Main|Page|]]
7000 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7003 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7011 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7016 Broken link with fragment
7018 [[Zigzagzogzagzig#zug]]
7020 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7025 Special page link with fragment
7027 [[Special:Version#anchor]]
7029 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7034 Nonexistent special page link with fragment
7036 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7038 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7045 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7047 <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>
7054 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7056 <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>!!!
7067 Bug 43661: Piped links with identical prefixes
7069 [[prefixed article|prefixed articles with spaces]]
7071 [[prefixed article|prefixed articlesaoeu]]
7073 [[Main Page|Main Page test]]
7075 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7076 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7077 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7083 Link with HTML entity in suffix / tail
7085 [[Main Page]]", [[Main Page]]a
7087 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7090 <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>
7094 Link with 3 brackets
7103 Link with 4 brackets
7107 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7112 Piped link with 3 brackets
7114 [[[main page|the main page]]]
7116 <p>[[[main page|the main page]]]
7121 Piped link with extlink-like text
7124 [[Main Page|This is a [bar]]]
7126 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7127 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7130 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7131 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7135 Link with multiple pipes
7137 [[Main Page|The|Main|Page]]
7139 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7143 # Note that parsoid does not munge anchor text; all non-space
7144 # characters are valid in HTML5 ids.
7146 Anchor containing a #. (bug 63430)
7148 [[Main Page#And#Link]]
7150 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7153 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7159 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7161 <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>
7166 Link with space in namespace
7168 [[User talk:Foo bar]]
7170 <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>
7175 MemoryAlpha:AlphaTest
7177 This is an article in the MemoryAlpha namespace
7178 (which shadows the memoryalpha interwiki link).
7182 Namespace takes precedence over interwiki link (bug 51680)
7184 [[MemoryAlpha:AlphaTest]]
7186 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7190 # The previous test doesn't work correctly in html2*, due to not recognizing the
7191 # link as an internal one. This one checks for the correct behavior.
7193 Link to namespace preferred over interwiki with correct rel attribute
7195 parsoid=html2wt,html2html
7197 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7199 [[MemoryAlpha:AlphaTest]]
7203 Piped link to namespace
7205 [[Meta:Disclaimers|The disclaimers]]
7207 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7214 [[Usually caused by a typo (oops}]]
7216 <p>[[Usually caused by a typo (oops}]]
7223 Just a test of an article title containing a percent.
7227 Link containing % (not as a hex sequence)
7231 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7234 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7237 # note that the parsoid HTML is identical to the previous test output,
7238 # so the previous test ensures that the html2wt mode will generate the
7239 # "not as a hex sequence" wikitext.
7241 Link containing % as a single hex sequence interpreted to char
7243 parsoid=wt2wt,wt2html,html2html
7247 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7250 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7254 Link containing % as a double hex sequence interpreted to hex sequence
7258 <p>[[7%2525 Solution]]
7262 # note that parsoid does not munge anchor text; all non-space
7263 # characters are valid in HTML5 anchors.
7265 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7266 Example for such a section: == < ==
7268 [[%23%3c]][[%23%3e]]
7270 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7273 <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>
7277 Link containing "<#" and ">#" as a hex sequences
7279 [[%3c%23]][[%3e%23]]
7281 <p>[[%3c%23]][[%3e%23]]
7286 Link containing an equals sign
7288 [[Special:BookSources/isbn=4-00-026157-6]]
7290 <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>
7293 <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>
7299 Just a test of an article title containing a tilde.
7302 # note that links containing signatures, like [[Foo~~~~]], are
7303 # massaged by the pre-save transform (PST) and so the tildes are never
7304 # seen by the parser.
7306 Link containing a tilde
7310 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7313 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7317 Link containing double-single-quotes '' (bug 4598)
7319 [[Lista d''e paise d''o munno]]
7321 <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>
7324 <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>
7328 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7330 Some [[Link|pretty ''italics'' and stuff]]!
7332 <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>!
7335 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7339 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7341 ''Some [[Link|pretty ''italics'' and stuff]]!''
7343 <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>
7348 Link with double quotes in title part (literal) and alternate part (interpreted)
7350 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7354 [[''Pentecoste''|Pentecoste]]
7356 [[''Pentecoste''|''Pentecoste'']]
7358 <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>
7359 </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>
7360 </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>
7361 </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>
7364 <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>
7365 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7366 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7367 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7371 Broken image links with HTML captions (bug 39700)
7373 [[File:Nonexistent|<script></script>]]
7374 [[File:Nonexistent|100x100px|<script></script>]]
7375 [[File:Nonexistent|<]]
7376 [[File:Nonexistent|a<i>b</i>c]]
7378 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7379 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7380 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7381 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7384 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script&gt;&lt;/script&gt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7385 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script&gt;&lt;/script&gt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
7386 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;lt;&quot;,&quot;srcContent&quot;:&quot;<&quot;,&quot;dsr&quot;:[107,111,null,null]}\">&lt;</span>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7387 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[134,142,3,4]}\">b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
7393 [[http://www.example.com]]
7395 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7398 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7402 Plain link to URL with link text
7404 [[http://www.example.com Link text]]
7406 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7411 Plain link to protocol-relative URL
7413 [[//www.example.com]]
7415 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7418 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7422 Plain link to protocol-relative URL with link text
7424 [[//www.example.com Link text]]
7426 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7431 Plain link to page with question mark in title
7437 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7438 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7443 # I'm fairly sure the expected result here is wrong.
7444 # We want these to be URL links, not pseudo-pages with URLs for titles....
7445 # However the current output is also pretty screwy.
7448 # I'm changing it to match the current output--it arguably makes more
7449 # sense in the light of the test above. Old expected result was:
7450 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7452 # But I think this test is bordering on "garbage in, garbage out" anyway.
7457 Piped link to URL: [[http://www.example.com|an example URL]]
7459 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7462 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7466 BUG 2: [[page|http://url/]] should link to page, not http://url/
7468 [[Main Page|http://url/]]
7470 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7473 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7476 # Parsoid does not mark self-links, by design.
7478 BUG 337: Escaped self-links should be bold
7482 [[Bug462]] [[Bug462]]
7484 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7487 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7489 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7493 Self-link to section should not be bold
7497 [[Main Page#section]]
7499 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7510 Self-link to numeric title
7516 <p><strong class="selflink">0</strong>
7521 Link to numeric-equivalent title
7527 <p><a href="/wiki/00" title="00">00</a>
7532 <nowiki> inside a link
7534 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7536 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7541 Non-breaking spaces in title
7543 [[ Main Page ]]
7545 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7550 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7556 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7561 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7567 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7572 Internal link with en linktrail: no apostrophes (bug 27473)
7578 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7583 Internal link with ca linktrail with apostrophes (bug 27473)
7589 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7594 Internal link with kaa linktrail with apostrophes (bug 27473)
7600 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7605 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7607 [[User:Foo/Test/63636:Bar|Test]]
7609 <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>
7612 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7616 Purely hash wikilink
7618 title=[[User:test/123]]
7622 <p><a href="#a">b</a>
7625 <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>
7629 1. Interaction of linktrail and template encapsulation
7635 <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>
7639 2. Interaction of linktrail and template encapsulation
7643 {{echo|Some [[Fool]]}}s
7645 <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>
7649 3. Interaction of linktrail and template encapsulation
7653 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7655 <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>
7665 Internal link with is link prefix
7669 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7671 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7682 Internal link with is link trail and link prefix
7686 [[mótmælendatrú|xxx]]ar
7688 mótmælenda[[söfnuður]]
7689 mótmælenda[[söfnuður|söfnuðir]]
7690 mótmælenda[[söfnuður|söfnuðir]]xxx
7692 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7693 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7694 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7695 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7696 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7701 Parsoid link trail escaping
7703 parsoid=html2wt,html2html
7705 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7711 Parsoid link prefix escaping
7714 parsoid=html2wt,html2html
7716 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7718 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7722 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7730 [http://wp.org ''foo'']
7732 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7733 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7734 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7735 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7740 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7744 [[Foo|{{echo|a}} b {{echo|c}}]]
7746 <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>
7750 Link with angle bracket after anchor
7754 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7757 <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>
7761 ### Interwiki links (see maintenance/interwiki.sql)
7765 Inline interwiki link
7767 parsoid=wt2html,wt2wt,html2html
7769 [[MeatBall:SoftSecurity]]
7771 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7774 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7778 Inline interwiki link with empty title (bug 2372)
7780 parsoid=wt2html,wt2wt,html2html
7784 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7787 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7791 Interwiki link encoding conversion (bug 1636)
7793 *[[Wikipedia:ro:Olteniţa]]
7794 *[[Wikipedia:ro:Olteniţa]]
7796 <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>
7797 <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>
7801 <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>
7802 <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>
7807 Interwiki link with fragment (bug 2130)
7809 [[MeatBall:SoftSecurity#foo]]
7811 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7815 # Ideally the wikipedia: prefix here should be proto-relative too
7816 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7817 # define the 'en' prefix, and originally the test used 'wikipedia',
7818 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7821 Different interwiki prefixes mapping to the same URL
7829 [[:wikipedia:Foo|Foo]]
7831 [[wikipedia:en:Foo]]
7833 [[:wikipedia:en:Foo]]
7837 <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>
7839 <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>
7841 <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>
7843 <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>
7845 <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>
7847 <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>
7849 <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>
7853 Interwiki links that cannot be represented in wiki syntax
7856 [[meatball:ok#foo|ok with fragment]]
7857 [[meatball:ok_as_well?|ok ending with ? mark]]
7858 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7859 [http://de.wikipedia.org/wiki/#foo is just fragment]
7862 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7863 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7864 <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>
7865 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7866 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7869 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7870 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7871 <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>
7872 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7873 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7877 Interwiki links: trail
7879 [[wikipedia:Foo|Ba]]r
7881 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7884 <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>
7888 Local interwiki link
7890 parsoid=wt2html,wt2wt,html2html
7892 [[local:Template:Foo]]
7894 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7897 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7900 # Parsoid does not mark self-links, by design.
7902 Local interwiki link: self-link to current page
7905 parsoid=wt2html,wt2wt,html2html
7909 <p><strong class="selflink">local:Main Page</strong>
7912 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7916 Local interwiki link: prefix only (bug 64167)
7918 parsoid=wt2html,wt2wt,html2html
7922 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7925 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7929 Local interwiki link: with additional interwiki prefix (bug 61357)
7931 parsoid=wt2html,wt2wt,html2html
7933 [[local:meatball:Hello]]
7935 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7938 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7942 Multiple local interwiki link prefixes
7944 [[local:local:local:local:mi:local:Foo]]
7946 parsoid=wt2html,wt2wt,html2html
7948 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7951 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7955 ### Interlanguage links
7956 ### Language links (so that searching for '### language' matches..)
7962 parsoid=wt2html,wt2wt,html2html
7970 <p>Blah blah blah</p>
7971 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7975 Interlanguage link with spacing
7977 parsoid=wt2html,wt2wt,html2html
7985 <p>Blah blah blah</p>
7986 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7990 Double interlanguage link
7992 parsoid=wt2html,wt2wt,html2html
8001 <p>Blah blah blah</p>
8002 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8003 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8007 Interlanguage link variations
8009 parsoid=wt2html,wt2wt,html2html
8019 <p>Blah blah blah</p>
8020 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8021 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8022 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8026 Space and question mark encoding in interlanguage links (T95473)
8028 parsoid=wt2html,wt2wt,html2html
8036 <p>Blah blah blah</p>
8037 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8041 Interlanguage link, with prefix links
8051 <p>Blah blah blah</p>
8052 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8056 Double interlanguage link, with prefix links (bug 8897)
8067 <p>Blah blah blah</p>
8068 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8069 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8073 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8081 <p>Blah blah blah</p>
8082 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8086 Parsoid-specific test: Wikilinks with should RT properly
8092 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8097 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8101 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8102 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8104 He&nbsp;llo [[Foo|He&nbsp;llo]]
8106 He&nbsp;llo [[He&nbsp;llo]]
8110 Parsoid: handle constructor well
8116 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8117 </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>
8120 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8122 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8131 # Note that `ko` isn't a known interlanguage prefix
8133 Parsoid: recognize interlanguage links without a target page
8143 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8145 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8148 # Note that `ko` isn't a known interwiki prefix
8150 Parsoid: recognize interwiki links without a target page
8152 parsoid=wt2html,wt2wt,html2html
8158 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8159 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8162 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8163 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8167 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8171 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8174 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8178 Interlanguage link with preceding local interwiki link (bug 68085)
8180 parsoid=wt2html,wt2wt,html2html
8183 [[local:es:Spanish]]
8186 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8190 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8194 Looks like an interlanguage link, but is actually a local interwiki
8196 parsoid=wt2html,wt2wt,html2html
8202 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8206 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8210 ### Redirects, Parsoid-only
8214 1. Simple redirect to page
8216 #REDIRECT [[Main Page]]
8218 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8222 2. Other redirect variants
8224 #REDIRECT [[Main_Page]]
8226 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8229 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8230 # This tests the Parsoid bail-out code.
8232 3. Other redirect variants
8234 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8236 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8240 4. Redirect to a templated destination
8242 #REDIRECT [[{{echo|Foo}}bar]]
8244 <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"}]]}'/>
8250 parsoid=wt2html,wt2wt
8255 <li>REDIRECT [[]]</li></ol>
8259 Optional colon in #REDIRECT
8261 # the colon is archaic syntax. we support it for wt2html, but we
8262 # don't care that it roundtrips back to the modern syntax.
8263 parsoid=wt2html,html2html
8265 #REDIRECT:[[Main Page]]
8267 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8271 Whitespace in #REDIRECT with optional colon
8273 # the colon and gratuitous whitespace is archaic syntax. we support
8274 # it for wt2html, but we don't care that it roundtrips back to the
8275 # modern syntax (without extra whitespace)
8276 parsoid=wt2html,html2html
8283 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8287 Piped link in #REDIRECT
8289 # content after piped link is ignored. we support this syntax,
8290 # but don't care that the piped link is lost when we roundtrip this.
8293 #REDIRECT [[Main Page|bar]]
8295 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8299 Redirect to category (T104502)
8301 parsoid=wt2html,wt2wt
8303 #REDIRECT [[Category:Foo]]
8305 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8309 Redirect to category with URL encoding (T104502)
8313 #REDIRECT [[Category%3AFoo]]
8315 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8319 Redirect to category page
8321 #REDIRECT [[:Category:Foo]]
8323 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8327 Redirect to image page (1)
8329 #REDIRECT [[File:Wiki.png]]
8331 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8335 Redirect to image page (2)
8337 #REDIRECT [[Image:Wiki.png]]
8339 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8342 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8343 # Next test confirms this.
8345 Redirect to language (1) (T104918)
8347 parsoid=wt2html,wt2wt,html2html
8349 #REDIRECT [[en:File:Wiki.png]]
8351 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8355 Redirect to language (2) (T104918)
8357 #REDIRECT [[:en:File:Wiki.png]]
8359 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8363 Redirect to interwiki (T104918)
8365 #REDIRECT [[meatball:File:Wiki.png]]
8367 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8371 Non-English #REDIRECT
8375 #TILVÍSUN [[Main Page]]
8377 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8381 Redirect syntax under text isn't considered a redirect
8384 #redirect [[Main Page]]
8387 <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>
8390 # FIXME: Should hoist the redirect to the top of the page and ensure there
8397 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8417 Broken br tag sanitization
8425 # TODO: Fix html2html mode (bug 51055)!
8427 Parsoid: Broken br tag recognition
8440 Incorrecly removing closing slashes from correctly formed XHTML
8442 <br style="clear:both;" />
8444 <p><br style="clear:both;" />
8449 Failing to transform badly formed HTML into correct XHTML
8451 <br style="clear: left;">
8452 <br style="clear: right;">
8453 <br style="clear: both;">
8455 <p><br style="clear: left;" />
8456 <br style="clear: right;" />
8457 <br style="clear: both;" />
8461 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8462 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8464 Handling html with a div self-closing tag
8473 <p><div title />
8477 <p><div title=bar />
8478 <div title=bar/>
8480 <div title="bar/"></div>
8484 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8485 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8486 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8487 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8488 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8489 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8493 Handling html with a br self-closing tag
8520 Horizontal ruler (should it add that extra space?)
8535 Horizontal ruler -- 4+ dashes render hr
8544 Horizontal ruler -- eats additional dashes on the same line
8553 Horizontal ruler -- does not collapse dashes on consecutive lines
8564 Horizontal ruler -- <4 dashes render as plain text
8573 Horizontal ruler -- Supports content following dashes on same line
8585 ### Block-level elements
8594 <ul><li>Common list</li>
8596 <li>item 3</li></ul>
8607 <ol><li>Numbered list</li>
8609 <li> item 3</li></ol>
8623 ***#Number on level 4
8625 **#Number on level 3
8626 **#Number on level 3
8630 #** Level 3, but ordered
8633 <ol><li> with numbers</li></ol>
8634 <ul><li> and bullets</li></ul>
8635 <ol><li> and numbers</li></ol></li>
8637 <ul><li>bullet level 2
8638 <ul><li>bullet level 3
8639 <ol><li>Number on level 4</li></ol></li></ul></li>
8641 <ol><li>Number on level 3</li>
8642 <li>Number on level 3</li></ol></li></ul>
8643 <ol><li>number level 2</li></ol></li>
8645 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8646 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8657 <ul><li>bar</li></ul></li></ul>
8667 <ul><li><ul><li>foo</li></ul></li>
8673 Nested lists 3 (first element empty)
8679 <ul><li>bar</li></ul></li></ul>
8684 Nested lists 4 (first element empty)
8689 <ul><li><ul><li></li></ul></li>
8695 Nested lists 5 (both elements empty)
8700 <ul><li><ul><li></li></ul></li>
8706 Nested lists 6 (both elements empty)
8712 <ul><li></li></ul></li></ul>
8717 Nested lists 7 (skip initial nesting levels)
8721 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8726 Nested lists 8 (multiple nesting transitions)
8734 <ul><li><ul><li> bar</li></ul></li>
8735 <li> baz</li></ul></li>
8741 Nested lists 9 (extension interaction)
8747 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8751 1. Lists with start-of-line-transparent tokens before bullets: Comments
8764 2. Lists with start-of-line-transparent tokens before bullets: Template close
8769 <ul><li>foo bar</li>
8775 List items are not parsed correctly following a <pre> block (bug 785)
8781 <ul><li> <pre>foo</pre></li>
8782 <li> <pre>bar</pre></li>
8786 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8787 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8792 List items from template
8803 * notSOL{{inner list}}
8806 <ul><li> item 1</li>
8807 <li> item 2</li></ul>
8808 <ul><li> item 0</li>
8810 <li> item 2</li></ul>
8811 <ul><li> item 0</li>
8814 <li> item 2</li></ul>
8819 List interrupted by empty line or heading
8827 <ul><li> foo</li></ul>
8828 <ul><li><ul><li> bar</li></ul></li></ul>
8829 <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>
8830 <ul><li> Another list item</li></ul>
8835 Multiple list tags generated by templates
8856 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8859 <!--This line will NOT split the list-->
8861 <!--This line will NOT split the list either-->
8863 <!--foo--> <!----> <!--This line NOT split the list either-->
8874 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8877 <!--This line will NOT split the list-->
8879 <!--This line will NOT split the list either-->
8881 <!--foo--> <!----> <!--This line NOT split the list
8894 (The PHP parser relies on Tidy for the hack)
8896 parsoid=wt2html,wt2wt
8900 * {{echo|<li>templated li-hack}}
8901 * <!--foo--> <li> unsupported li-hack with preceding comments
8904 <li><li>not a li-hack
8911 <li>templated li-hack</li>
8912 <li>unsupported li-hack with preceding comments</li>
8915 <li>not a li-hack</li>
8920 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8947 Parsoid: Test of whitespace serialization with Templated bullets
8954 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8958 # ------------------------------------------------------------------------
8959 # The next set of tests are about Parsoid's ability to handle badly nested
8960 # tags (parse, minimize scope of fixup, and roundtrip back)
8961 # ------------------------------------------------------------------------
8964 Unbalanced closing block tags break a list
8965 (php parser relies on Tidy to fix up)
8983 # Parsoid fails this test, but it might be tricky to support properly.
8986 Unbalanced closing non-block tags don't break a list
8987 (php parser relies on Tidy to fix up)
8994 <li><span>a</span></li>
8995 <li><span>b</span></li>
9009 Unclosed formatting tags that straddle lists are closed and reopened
9010 (php parser relies on Tidy to fix up)
9012 parsoid=wt2html,wt2wt,html2html
9022 <ol><li> <s> a</s></li>
9023 <li><s> b </s></li></ol>
9028 1. List embedded in a formatting tag
9035 <li><small>foo</small></li>
9045 ## Ugly Parsoid output here
9046 ## Not sure what the right output is.
9048 2. List embedded in a formatting tag
9055 <li><small>a</small></li>
9056 <li><small>b</small></li>
9063 <li><small>b</small></li>
9067 # Ugly Parsoid and PHP parser output here
9068 # Not sure if we want to make this a test!
9071 ## 3. Unclosed formatting tags in list elements
9077 ## <li><small>a</small></li>
9078 ## <li><small><small>b</small></small></li>
9082 ## <li><small>a</small></li>
9084 ## <li><small>b</small></li>
9088 # This is a bug in the PHP parser + tidy combination.
9089 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9090 # and then fostered out of the table by tidy.)
9091 # We believe the Parsoid output to be correct.
9093 Table with missing opening <tr> tag
9095 parsoid=wt2html,wt2wt
9113 # Note that the current date is hard-coded as
9114 # 1970-01-01T00:02:03Z (a Thursday)
9115 # when running parser tests. The timezone is also fixed to GMT, so
9116 # local date will be identical to current date.
9119 Magic Word: {{CURRENTDAY}}
9128 Magic Word: {{CURRENTDAY2}}
9137 Magic Word: {{CURRENTDAYNAME}}
9146 Magic Word: {{CURRENTDOW}}
9155 Magic Word: {{CURRENTMONTH}}
9164 Magic Word: {{CURRENTMONTH1}}
9173 Magic Word: {{CURRENTMONTHABBREV}}
9175 {{CURRENTMONTHABBREV}}
9182 Magic Word: {{CURRENTMONTHNAME}}
9184 {{CURRENTMONTHNAME}}
9191 Magic Word: {{CURRENTMONTHNAMEGEN}}
9193 {{CURRENTMONTHNAMEGEN}}
9200 Magic Word: {{CURRENTTIME}}
9209 Magic Word: {{CURRENTHOUR}}
9218 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9227 Magic Word: {{CURRENTYEAR}}
9236 Magic Word: {{CURRENTTIMESTAMP}}
9238 {{CURRENTTIMESTAMP}}
9245 Magic Words LOCAL (UTC)
9249 * {{LOCALMONTHNAME}}
9250 * {{LOCALMONTHNAMEGEN}}
9251 * {{LOCALMONTHABBREV}}
9260 * {{LOCALTIMESTAMP}}
9275 <li> 19700101000203</li></ul>
9280 Magic Word: {{FULLPAGENAME}}
9282 title=[[User:Ævar Arnfjörð Bjarmason]]
9286 <p>User:Ævar Arnfjörð Bjarmason
9291 Magic Word: {{FULLPAGENAMEE}}
9293 title=[[User:Ævar Arnfjörð Bjarmason]]
9297 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9302 Magic Word: {{TALKSPACE}}
9304 title=[[User:Ævar Arnfjörð Bjarmason]]
9313 Magic Word: {{TALKSPACE}}, same namespace
9315 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9324 Magic Word: {{TALKSPACE}}, main namespace
9326 title=[[Parser Test]]
9335 Magic Word: {{TALKSPACEE}}
9337 title=[[User:Ævar Arnfjörð Bjarmason]]
9346 Magic Word: {{SUBJECTSPACE}}
9348 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9357 Magic Word: {{SUBJECTSPACE}}, same namespace
9359 title=[[User:Ævar Arnfjörð Bjarmason]]
9368 Magic Word: {{SUBJECTSPACE}}, main namespace
9370 title=[[Parser Test]]
9378 Magic Word: {{SUBJECTSPACEE}}
9380 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9389 Magic Word: {{NAMESPACE}}
9391 title=[[User:Ævar Arnfjörð Bjarmason]]
9400 Magic Word: {{NAMESPACEE}}
9402 title=[[User:Ævar Arnfjörð Bjarmason]]
9411 Magic Word: {{NAMESPACENUMBER}}
9413 title=[[User:Ævar Arnfjörð Bjarmason]]
9422 Magic Word: {{SUBPAGENAME}}
9424 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9433 Magic Word: {{SUBPAGENAMEE}}
9435 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9444 Magic Word: {{ROOTPAGENAME}}
9446 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9450 <p>Ævar Arnfjörð Bjarmason
9455 Magic Word: {{ROOTPAGENAMEE}}
9457 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9461 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9466 Magic Word: {{BASEPAGENAME}}
9468 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9472 <p>Ævar Arnfjörð Bjarmason
9477 Magic Word: {{BASEPAGENAMEE}}
9479 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9483 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9488 Magic Word: {{TALKPAGENAME}}
9490 title=[[User:Ævar Arnfjörð Bjarmason]]
9494 <p>User talk:Ævar Arnfjörð Bjarmason
9499 Magic Word: {{TALKPAGENAMEE}}
9501 title=[[User:Ævar Arnfjörð Bjarmason]]
9505 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9510 Magic Word: {{SUBJECTPAGENAME}}
9512 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9516 <p>User:Ævar Arnfjörð Bjarmason
9521 Magic Word: {{SUBJECTPAGENAMEE}}
9523 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9525 {{SUBJECTPAGENAMEE}}
9527 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9532 Magic Word: {{NUMBEROFFILES}}
9541 Magic Word: {{PAGENAME}}
9543 title=[[User:Ævar Arnfjörð Bjarmason]]
9547 <p>Ævar Arnfjörð Bjarmason
9552 Magic Word: {{PAGENAME}} with metacharacters
9554 title=[['foo & bar = baz']]
9558 <p><i>'foo & bar = baz'</i>
9561 <p><i>'foo & bar = baz'</i></p>
9565 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9567 title=[[*RFC 1234 http://example.com/]]
9571 <p>*RFC 1234 http://example.com/
9574 <p>*RFC 1234 http://example.com/</p>
9578 Magic Word: {{PAGENAMEE}}
9580 title=[[User:Ævar Arnfjörð Bjarmason]]
9584 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9589 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9591 title=[[*RFC 1234 http://example.com/]]
9595 <p>*RFC_1234_http://example.com/
9598 <p>*RFC_1234_http://example.com/</p>
9602 Magic Word: {{REVISIONID}}
9611 Magic Word: {{SCRIPTPATH}}
9620 Magic Word: {{STYLEPATH}}
9629 Magic Word: {{SERVER}}
9633 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9638 Magic Word: {{SERVERNAME}}
9647 Magic Word: {{SITENAME}}
9656 Case-sensitive magic words, when cased differently, should just be template transclusions
9663 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9664 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9665 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9666 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9671 Case-insensitive magic words should still work with weird casing.
9681 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9685 # From plwiki:PLOS_ONE
9687 Parsoid: Page property magic word with magic word contents
9689 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9691 <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>"}]]}'/>
9695 Parsoid: Template-generated DISPLAYTITLE
9697 {{{{echo|DISPLAYTITLE}}:Foo}}
9699 <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}}]}'/>
9703 Namespace 1 {{ns:1}}
9712 Namespace 1 {{ns:01}}
9721 Namespace 0 {{ns:0}} (bug 4783)
9729 Namespace 0 {{ns:00}} (bug 4783)
9737 Namespace -1 {{ns:-1}}
9746 Namespace User {{ns:User}}
9755 Namespace User talk {{ns:User_talk}}
9764 Namespace User talk {{ns:uSeR tAlK}}
9773 Namespace File {{ns:File}}
9782 Namespace File {{ns:Image}}
9791 Namespace (lang=de) Benutzer {{ns:User}}
9802 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9808 <p>Benutzer Diskussion
9816 {{urlencode:hi world?!}}
9817 {{urlencode:hi world?!|WIKI}}
9818 {{urlencode:hi world?!|PATH}}
9819 {{urlencode:hi world?!|QUERY}}
9829 Magic Word: prioritize type info over data-parsoid
9833 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9839 Magic Word: serialize on separate line (parsoid)
9841 parsoid=wt2wt,html2wt
9847 foo<meta property="mw:PageProp/notoc"/>bar
9851 Magic Word: rt non-english wikis
9858 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9862 __proto__ is treated as normal wikitext (T105997)
9874 Magic links: internal link to RFC (bug 479)
9878 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9883 Magic links: RFC (bug 479)
9887 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9892 Magic links: RFC (bug 65278)
9894 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9896 <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.
9901 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9903 RFC      822
9907 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9914 Magic links: ISBN (bug 1937)
9918 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9923 Magic links: ISBN (bug 65278)
9925 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9927 <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.
9930 <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>
9934 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9936 ISBN      978 0 316 09811 3
9942 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9951 Magic links: PMID incorrectly converts space to underscore
9955 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9960 Magic links: PMID (bug 65278)
9962 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9964 <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.
9969 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9971 PMID      1234
9975 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9986 Nonexistent template
9988 {{thistemplatedoesnotexist}}
9990 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9995 Template with invalid target containing tags
9997 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9999 <p>{{a<b>b</b>|foo|a=b|a = b}}
10004 Template with invalid target containing unclosed tag
10006 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10008 <p>{{a<b>|foo|a=b|a = b}}</b>
10013 Template with invalid target containing wikilink
10017 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10020 <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>
10024 Template with just whitespace in it, bug #68421
10028 <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>
10034 This is a test template
10042 <p>This is a test template
10047 Template with explicit namespace
10051 <p>This is a test template
10059 This is a test template with parameter {{{param}}}
10065 {{paramtest|param=foo}}
10067 <p>This is a test template with parameter foo
10072 Template:paramtestnum
10074 [[{{{1}}}|{{{2}}}]]
10078 Template unnamed parameter
10080 {{paramtestnum|Main Page|the main page}}
10082 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10087 Template:templatesimple
10093 Template:templateredirect
10095 #redirect [[Template:templatesimple]]
10099 Template:templateasargtestnum
10105 Template:templateasargtest
10107 {{template{{{templ}}}}}
10111 Template:templateasargtest2
10117 Template with template name as unnamed argument
10119 {{templateasargtestnum|templatesimple}}
10126 Template with template name as argument
10128 {{templateasargtest|templ=simple}}
10135 Template with template name as argument (2)
10137 {{templateasargtest2|templ=templatesimple}}
10144 Template:templateasargtestdefault
10146 {{{{{templ|templatesimple}}}}}
10156 Template with default value
10158 {{templateasargtestdefault}}
10165 Template with default value (value set)
10167 {{templateasargtestdefault|templ=templa}}
10176 {{templateredirect}}
10181 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10185 Template with argument in separate line
10187 {{ templateasargtest |
10195 Template with complex template as argument
10198 param ={{ templateasargtest |
10199 templ = simple }}}}
10201 <p>This is a test template with parameter (test)
10206 Template with thumb image (with link in description)
10208 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10210 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>
10213 <p>This is a test template with parameter</p>
10214 <div class="thumb tright">
10215 <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>
10216 <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>
10220 <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>
10224 Template:complextemplate
10226 {{{1}}} {{paramtest|
10227 param ={{{param}}}}}
10231 Template with complex arguments
10234 param ={{ templateasargtest |
10235 templ = simple }}|[[Template:complextemplate|link]]}}
10237 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10242 BUG 553: link with two variables in a piped link
10245 |[[{{{1}}}|{{{2}}}]]
10250 <td>[[{{{1}}}|{{{2}}}]]
10256 Magic variable as template parameter
10258 {{paramtest|param={{SITENAME}}}}
10260 <p>This is a test template with parameter MediaWiki
10267 [[{{{param}}}|link]]
10271 Template parameter as link source
10273 {{linktest|param=Main Page}}
10275 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10280 Template:paramtest2
10282 including another template, {{paramtest|param={{{arg}}}}}
10286 Template passing argument to another template
10288 {{paramtest2|arg='hmm'}}
10290 <p>including another template, This is a test template with parameter 'hmm'
10301 Template as link source
10305 [[{{linktest2}}|Main Page]]
10307 [[{{linktest2}}]]Page
10309 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10310 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10311 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10329 Template infinite loop
10333 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10338 Template from main namespace
10357 BUG 529: Template with table, not included at beginning of line
10376 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10396 BUG 41: Template parameters shown as broken links
10405 Template with targets containing wikilinks
10409 {{[[{{echo|foo}}]]}}
10411 {{{{echo|[[foo}}]]}}
10413 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10414 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10426 Templates: Double quotes as template target
10433 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10438 Template:MSGNW test
10440 ''None'' of '''this''' should be
10442 but rather passed unmodified
10450 # hmm, fix this or just deprecate msgnw and document its behavior?
10454 {{msgnw:MSGNW test}}
10456 <p>''None'' of '''this''' should be
10458  but rather passed unmodified
10459 {{test}}
10463 <!-- comment -->
10470 {{int:youhavenewmessages|lots of money|not!}}
10472 <p>You have lots of money (not!).
10477 int keyword - non-existing message
10488 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10492 <includeonly> and <noinclude> being included
10503 <onlyinclude>Foo</onlyinclude>bar
10507 <onlyinclude> being included
10519 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10523 <onlyinclude> and <includeonly> being included
10532 <includeonly> and <noinclude> on a page
10534 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10541 Un-closed <noinclude>
10548 <onlyinclude> on a page
10550 <onlyinclude>Foo</onlyinclude>bar
10557 Un-closed <onlyinclude>
10564 Self-closed noinclude, includeonly, onlyinclude tags
10575 Unbalanced includeonly and noinclude tags
10579 |b</noinclude></noinclude>
10580 |c</noinclude></includeonly>
10581 |d</includeonly></includeonly>
10590 <td>c</includeonly>
10592 <td>d</includeonly></includeonly>
10598 Template:Includeonly section
10601 ==Includeonly section==
10607 Bug 6563: Edit link generation for section shown by <includeonly>
10609 {{includeonly section}}
10611 <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>
10612 <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>
10616 # Uses same input as the contents of [[Template:Includeonly section]]
10618 Bug 6563: Section extraction for section shown by <includeonly>
10623 ==Includeonly section==
10631 Bug 6563: Edit link generation for section suppressed by <includeonly>
10634 ==Includeonly section==
10638 <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>
10643 Bug 6563: Section extraction for section suppressed by <includeonly>
10648 ==Includeonly section==
10656 Un-closed <includeonly>
10663 Includes and comments at SOL
10665 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10669 </noinclude>* stuff
10672 <includeonly>can have stuff</includeonly>=== here ===
10675 <h2><span class="mw-headline" id="hu">hu</span></h2>
10678 <ul><li> stuff</li>
10679 <li> here</li></ul>
10680 <h3><span class="mw-headline" id="here">here</span></h3>
10683 <!-- 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>
10685 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10687 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10688 <li> here</li></ul>
10690 <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>
10694 # TODO: test with DOM fragment reuse!
10696 Parsoid: DOM fragment reuse
10698 parsoid=wt2wt,wt2html
10700 a{{echo|b<table></table>c}}d
10712 <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>
10714 <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">
10715 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10716 </span><p about="#mwt2">cd</p>
10718 <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">
10720 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10722 </span><p about="#mwt3">b</p>
10726 Parsoid: Merge double tds (T52603)
10731 |{{echo|{{!}} foo}}
10735 <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>
10740 Parsoid: Merge double tds in nested transclusion content (T52603)
10746 |{{echo|{{!}} foo}}
10750 <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}}]}'>
10752 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10758 ### <includeonly> and <noinclude> in attributes
10761 0. includeonly around the entire attribute
10763 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10765 <p><span id="v2">bar</span>
10770 1. includeonly in html attr key
10772 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10774 <p><span id="foo">bar</span>
10779 2. includeonly in html attr value
10781 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10782 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10784 <p><span id="v1">bar</span>
10785 <span id="v1">bar</span>
10790 3. includeonly in part of an attr value
10792 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10794 <p><span style="color:red;">bar</span>
10799 4. includeonly in table attributes
10823 ### Token Stream Patcher tests
10825 ### These tests won't always pass wt2wt and other modes because
10826 ### on serialization, the table will be output on a new line.
10827 ### For now, we are blacklisting them, and using this to test selser.
10831 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10833 parsoid=wt2html,wt2wt
10835 {{echo|}}{| width = '100%'
10839 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10840 <tbody><tr><td>foo</td></tr>
10845 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10847 parsoid=wt2html,wt2wt
10849 <includeonly>a</includeonly>{| {{{b}}}
10853 <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}}}":""}}'>
10854 <tbody><tr><td>c</td></tr>
10860 ### Testing parsing of templates where a template arg
10861 ### has the same name as the template itself.
10867 {{{quote|{{{1}}}}}}
10871 Templates: Template Name/Arg clash: 1. Use of positional param
10880 Templates: Template Name/Arg clash: 2. Use of named param
10882 {{quote|quote=foo}}
10889 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10898 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10902 Templates: 1. Simple use
10911 Templates: 2. Inside a block tag
10913 <div>{{echo|Foo}}</div>
10914 <blockquote>{{echo|Foo}}</blockquote>
10917 <blockquote>Foo</blockquote>
10927 Templates: P-wrapping: 1a. Templates on consecutive lines
10938 Templates: P-wrapping: 1b. Templates on consecutive lines
10952 Templates: P-wrapping: 1c. Templates on consecutive lines
10955 {{echo|bar}} <div>baz</div>
10968 Templates: P-wrapping: 1d. Template preceded by comment-only line
10977 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10981 Templates: Inline Text: 1. Multiple template uses
10983 {{echo|Foo}}bar{{echo|baz}}
10990 Templates: Inline Text: 2. Back-to-back template uses
10992 {{echo|Foo}}{{echo|bar}}
10999 Templates: Block Tags: 1. Multiple template uses
11001 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11003 <div>Foo</div><div>bar</div><div>baz</div>
11008 Templates: Block Tags: 2. Back-to-back template uses
11010 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11012 <div>Foo</div><div>bar</div>
11016 # This is an edge case relating to paragraph wrapping.
11018 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11023 <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
11028 Templates: Links: 1. Simple example
11030 {{echo|[[Foo|bar]]}}
11032 <p><a href="/wiki/Foo" title="Foo">bar</a>
11037 Templates: Links: 2. Generation of link href
11039 [[{{echo|Foo}}|bar]]
11041 <p><a href="/wiki/Foo" title="Foo">bar</a>
11046 Templates: Links: 3. Generation of part of a link href
11048 [[Fo{{echo|o}}|bar]]
11050 [[Foo{{echo|bar}}]]
11052 [[Foo{{echo|bar}}baz]]
11054 [[Foo{{echo|bar}}|bar]]
11056 [[:Foo{{echo|bar}}]]
11058 [[:Foo{{echo|bar}}|bar]]
11060 <p><a href="/wiki/Foo" title="Foo">bar</a>
11061 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11062 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11063 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11064 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11065 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11070 Templates: Links: 4. Multiple templates generating link href
11072 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11074 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11079 Templates: Links: 5. Generation of link text
11081 [[Foo|{{echo|bar}}]]
11083 <p><a href="/wiki/Foo" title="Foo">bar</a>
11088 Templates: Links: 5. Nested templates (only outermost template should be marked)
11090 {{echo|[[{{echo|Foo}}|bar]]}}
11092 <p><a href="/wiki/Foo" title="Foo">bar</a>
11097 Templates: HTML Tag: 1. Generation of HTML attr. key
11099 <div {{echo|style}}="color:red;">foo</div>
11101 <div style="color:red;">foo</div>
11106 Templates: HTML Tag: 2. Generation of HTML attr. value
11108 <div style={{echo|'color:red;'}}>foo</div>
11110 <div style="color:red;">foo</div>
11115 Templates: HTML Tag: 3. Generation of HTML attr key and value
11117 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11119 <div style="color:red;">foo</div>
11124 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11126 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11128 <div title="This is a long title with just one piece templated">foo</div>
11133 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11135 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11137 <div title="This is a long title with just one piece templated">foo</div>
11142 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11144 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11146 <div title="This is a long title with just one piece templated">foo</div>
11150 # SSS FIXME: While it is great we added support for all this,
11151 # do we want to make this part of the spec? Maybe we want to
11152 # deprecate this kind of usage in the future?
11154 Templates: HTML Tag: 7. Generation of partial attribute key string
11156 <div st{{echo|yle}}="color:red;">foo</div>
11158 <div style="color:red;">foo</div>
11163 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11165 <div {{echo|1=id="v1"}}>bar</div>
11167 <div id="v1">bar</div>
11172 Templates: HTML Tag: 9. Multiple template-generated attributes
11174 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11176 <div id="v1" title="foo">bar</div>
11181 Templates: Support for templates generating attributes and content
11183 {| {{mixed_attr_content_template}}
11188 <table style="color:red;" title="T48811">
11198 <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|}"]}'>
11207 1. Entities and nowikis inside templated attributes should be handled correctly
11209 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11211 <div style="background:#f9f9f9;">foo</div>
11214 <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>
11218 2. Entities and nowikis inside templated attributes should be handled correctly
11221 |{{table_attribs_3}}
11226 <td style="background:#f9f9f9;">Foo
11231 <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>
11236 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11239 |{{table_attribs_3}}
11244 <td style="background:#f9f9f9;">Foo
11248 <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}}]}'>
11249 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11255 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11258 | {{table_attribs_6}} hi
11263 <td style="background: red;"> hi
11268 <tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["| ",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
11273 Templates: HTML Tables: 1. Generating start of a HTML table
11275 {{echo|<table><tr><td>foo</td>}}</tr></table>
11277 <table><tr><td>foo</td></tr></table>
11282 Templates: HTML Tables: 2a. Generating middle of a HTML table
11284 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11286 <table><tr><td>foo</td></tr></table>
11291 Templates: HTML Tables: 2b. Generating middle of a HTML table
11293 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11295 <table><tr><td>foo</td></tr></table>
11300 Templates: HTML Tables: 3. Generating end of a HTML table
11302 <table><tr>{{echo|<td>foo</td></tr></table>}}
11304 <table><tr><td>foo</td></tr></table>
11309 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11311 {{echo|<table>}}<tr><td>foo</td></tr></table>
11313 <table><tr><td>foo</td></tr></table>
11318 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11320 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11322 <table><tr><td>foo</td></tr></table>
11327 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11329 <table><tr>{{echo|<td>}}foo</td></tr></table>
11331 <table><tr><td>foo</td></tr></table>
11336 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11338 <table><tr><td>foo{{echo|</td>}}</tr></table>
11340 <table><tr><td>foo</td></tr></table>
11345 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11347 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11349 <table><tr><td>foo</td></tr></table>
11354 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11356 <table><tr><td>foo</td></tr>{{echo|</table>}}
11358 <table><tr><td>foo</td></tr></table>
11363 Templates: HTML Tables: 5. Proper fostering of categories from inside
11365 parsoid=wt2html,wt2wt
11367 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11368 <!--Two categories (Bug 50330)-->
11369 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11371 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11372 <!--Two categories (Bug 50330)-->
11373 <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>
11377 Templates: Wiki Tables: 1a. Fostering of entire template content
11385 <tr><td></td></tr></table>
11397 Templates: Wiki Tables: 1b. Fostering of entire template content
11410 <tr><td></td></tr></table>
11424 Templates: Wiki Tables: 2. Fostering of partial template content
11434 <tr><td></td></tr></table>
11447 Templates: Wiki Tables: 3. td-content via multiple templates
11450 {{echo|{{pipe}}a}}{{echo|b}}
11461 Templates: Wiki Tables: 4. Templated tags, no content
11467 <tr><td></td></tr></table>
11472 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11486 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11499 ## This test case is very specific to Parsoid's internals
11500 ## and is hence only tested for Parsoid's code. Parsoid uses
11501 ## a <meta> marker tag for <ref> tags and they are expanded
11502 ## much later. We are verifying that this <meta> tag usage
11503 ## doesn't prevent foster parenting.
11505 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11507 {{PartialTable}}<ref>foo</ref>
11512 <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">
11516 <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>
11520 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11530 <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{{!}}}"]}'>
11531 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11535 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11540 Templates: Lists: Multi-line list-items via templates
11542 *{{echo|a {{nonexistent|
11544 *{{echo|b {{nonexistent|
11547 <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>
11548 <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>
11553 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11555 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11557 <p><i>ab</i>c<i>d</i>e
11562 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11563 (PHP parser generates misnested html)
11565 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11567 <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>
11571 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11572 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11574 parsoid=wt2html,wt2wt
11576 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11578 <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>
11579 <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>
11580 <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>
11584 Templates: Ugly nesting: 4. Divs opened/closed across templates
11586 a<div>b{{echo|c</div>d}}e
11597 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11603 |{{echo|foo</table>}}
11607 <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|}"]}'>
11611 <td>foo</td></tr></tbody></table><span about="#mwt1">
11612 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11617 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11627 <td>1. {{echo|foo </table>}}</td>
11629 <td>2. {{echo|baz </table>}}</td>
11642 <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>"]}'>
11647 <td>1. foo </td></tr></tbody></table></td>
11649 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11650 </span><span about="#mwt2">
11651 </span><span about="#mwt2">
11652 </span><span about="#mwt2">abc</span><span about="#mwt2">
11653 </span><span about="#mwt2">
11654 </span><span about="#mwt2">
11655 </span><span about="#mwt2">
11656 </span><span about="#mwt2">
11657 </span><span about="#mwt2">
11658 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11659 </span><span about="#mwt2">
11664 Templates: Ugly templates: 3. newline-only template parameter
11673 # This looks like a bug: a single newline triggers p/br for some reason.
11675 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11684 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11685 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11687 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11693 <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
11694 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11698 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11699 # that are "identical" and generate nesting cycles in the algorithm
11701 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11703 {{echo|<table><tr><td><table>}}
11707 <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"}'>
11708 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11709 </table></td></tr></tbody></table>
11713 Parser Functions: 1. Simple example
11722 Parser Functions: 2. Nested use (only outermost should be marked up)
11731 ### Pre-save transform tests
11734 pre-save transform: subst:
11740 This is a test template
11744 pre-save transform: normal template
11754 pre-save transform: nonexistent template
11758 {{thistemplatedoesnotexist}}
11760 {{thistemplatedoesnotexist}}
11764 pre-save transform: subst magic variables
11773 # This is bug 89, which I fixed. -- wtm
11775 pre-save transform: subst: templates with parameters
11779 {{subst:paramtest|param="something else"}}
11781 This is a test template with parameter "something else"
11785 Template:nowikitest
11787 <nowiki>'''not wiki'''</nowiki>
11791 pre-save transform: nowiki in subst (bug 1188)
11795 {{subst:nowikitest}}
11797 <nowiki>'''not wiki'''</nowiki>
11801 Template:commenttest
11803 This template has <!-- a comment --> in it.
11807 pre-save transform: comment in subst (bug 1936)
11811 {{subst:commenttest}}
11813 This template has <!-- a comment --> in it.
11817 pre-save transform: unclosed tag
11821 <nowiki>'''not wiki'''
11823 <nowiki>'''not wiki'''
11827 pre-save transform: mixed tag case
11831 <NOwiki>'''not wiki'''</noWIKI>
11833 <NOwiki>'''not wiki'''</noWIKI>
11837 pre-save transform: unclosed comment in <nowiki>
11841 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11843 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11846 # Leading @ in this template definition works around a limitation
11847 # in parsoid's parserTests which otherwise strips the <span> from the
11848 # result (confusing it for a template wrapper)
11852 @<span onmouseover="alert('crap')">Oh no</span>
11856 (confirming safety of fix for subst bug 1936)
11858 {{Template:dangerous}}
11860 <p>@<span>Oh no</span>
11865 pre-save transform: comment containing gallery (bug 5024)
11869 <!-- <gallery>data</gallery> -->
11871 <!-- <gallery>data</gallery> -->
11875 pre-save transform: comment containing extension
11879 <!-- <tag>data</tag> -->
11881 <!-- <tag>data</tag> -->
11885 pre-save transform: comment containing nowiki
11889 <!-- <nowiki>data</nowiki> -->
11891 <!-- <nowiki>data</nowiki> -->
11895 pre-save transform: <noinclude> in subst (bug 3298)
11905 pre-save transform: <onlyinclude> in subst (bug 3298)
11909 {{subst:Includes2}}
11917 {{<includeonly>subst:</includeonly>Includes}}
11921 Template:SafeSubstTest
11923 {{<includeonly>safesubst:</includeonly>Includes}}
11927 bug 22297: safesubst: works during PST
11931 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11937 bug 22297: safesubst: works during normal parse
11946 subst: does not work during normal parse
11950 <p>{{subst:Includes}}
11955 pre-save transform: context links ("pipe trick")
11959 [[Article (context)|]]
11962 [[Bar:Article (context)|]]
11963 [[:Bar:Article (context)|]]
11965 [[|Article (context)]]
11969 [[Article (context)|Article]]
11970 [[Bar:Article|Article]]
11971 [[:Bar:Article|Article]]
11972 [[Bar:Article (context)|Article]]
11973 [[:Bar:Article (context)|Article]]
11975 [[Article (context)]]
11976 [[Bar:X (Y) Z|X (Y) Z]]
11977 [[:Bar:X (Y) Z|X (Y) Z]]
11981 pre-save transform: context links ("pipe trick") with interwiki prefix
11985 [[interwiki:Article|]]
11986 [[:interwiki:Article|]]
11987 [[interwiki:Bar:Article|]]
11988 [[:interwiki:Bar:Article|]]
11990 [[interwiki:Article|Article]]
11991 [[:interwiki:Article|Article]]
11992 [[interwiki:Bar:Article|Bar:Article]]
11993 [[:interwiki:Bar:Article|Bar:Article]]
11997 pre-save transform: context links ("pipe trick") with parens in title
11999 pst title=[[Somearticle (context)]]
12003 [[Article (context)|Article]]
12007 pre-save transform: context links ("pipe trick") with comma in title
12009 pst title=[[Someplace, Somewhere]]
12012 [[Otherplace, Elsewhere|]]
12013 [[Otherplace, Elsewhere, Anywhere|]]
12015 [[Otherplace, Somewhere|Otherplace]]
12016 [[Otherplace, Elsewhere|Otherplace]]
12017 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12021 pre-save transform: context links ("pipe trick") with parens and comma
12023 pst title=[[Someplace (IGNORED), Somewhere]]
12026 [[Otherplace (place), Elsewhere|]]
12028 [[Otherplace, Somewhere|Otherplace]]
12029 [[Otherplace (place), Elsewhere|Otherplace]]
12033 pre-save transform: context links ("pipe trick") with comma and parens
12035 pst title=[[Who, me? (context)]]
12038 [[Me, Myself, and I (1937 song)|]]
12040 [[Yes, you. (context)|Yes, you.]]
12041 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12045 pre-save transform: context links ("pipe trick") with namespace
12047 pst title=[[Ns:Somearticle]]
12051 [[Ns:Article|Article]]
12055 pre-save transform: context links ("pipe trick") with namespace and parens
12057 pst title=[[Ns:Somearticle (context)]]
12061 [[Ns:Article (context)|Article]]
12065 pre-save transform: context links ("pipe trick") with namespace and comma
12067 pst title=[[Ns:Somearticle, Context, Whatever]]
12071 [[Ns:Article, Context, Whatever|Article]]
12075 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12077 pst title=[[Ns:Somearticle, Context (context)]]
12081 [[Ns:Article (context)|Article]]
12085 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12087 pst title=[[Ns:Somearticle (IGNORED), Context]]
12091 [[Ns:Article, Context|Article]]
12095 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12099 [[Article(context)|]]
12100 [[Bar:Article(context)|]]
12101 [[:Bar:Article(context)|]]
12102 [[|Article(context)]]
12106 [[Article(context)|Article]]
12107 [[Bar:Article(context)|Article]]
12108 [[:Bar:Article(context)|Article]]
12109 [[Article(context)]]
12110 [[Bar:X(Y)Z|X(Y)Z]]
12111 [[:Bar:X(Y)Z|X(Y)Z]]
12115 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12119 [[Article (context)|]]
12120 [[Bar:Article (context)|]]
12121 [[:Bar:Article (context)|]]
12122 [[|Article (context)]]
12126 [[Article (context)|Article]]
12127 [[Bar:Article (context)|Article]]
12128 [[:Bar:Article (context)|Article]]
12129 [[Article (context)]]
12130 [[Bar:X (Y) Z|X (Y) Z]]
12131 [[:Bar:X (Y) Z|X (Y) Z]]
12135 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12139 [[Article(context)|]]
12140 [[Bar:Article(context)|]]
12141 [[:Bar:Article(context)|]]
12142 [[|Article(context)]]
12146 [[Article(context)|Article]]
12147 [[Bar:Article(context)|Article]]
12148 [[:Bar:Article(context)|Article]]
12149 [[Article(context)]]
12150 [[Bar:X(Y)Z|X(Y)Z]]
12151 [[:Bar:X(Y)Z|X(Y)Z]]
12155 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12159 [[Article (context), context|]]
12160 [[Article (context),context|]]
12161 [[Bar:Article (context), context|]]
12162 [[Bar:Article (context),context|]]
12163 [[:Bar:Article (context), context|]]
12164 [[:Bar:Article (context),context|]]
12166 [[Article (context), context|Article]]
12167 [[Article (context),context|Article]]
12168 [[Bar:Article (context), context|Article]]
12169 [[Bar:Article (context),context|Article]]
12170 [[:Bar:Article (context), context|Article]]
12171 [[:Bar:Article (context),context|Article]]
12175 pre-save transform: trim trailing empty lines
12179 Empty lines are trimmed
12185 Empty lines are trimmed
12189 pre-save transform: Signature expansion
12194 * <noinclude>~~~</noinclude>
12195 * <includeonly>~~~</includeonly>
12196 * <onlyinclude>~~~</onlyinclude>
12198 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12199 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12200 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12201 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12206 pre-save transform: Signature expansion in nowiki tags (bug 93)
12212 <nowiki>~~~~</nowiki>
12214 <includeonly><nowiki>~~~~</nowiki></includeonly>
12216 <noinclude><nowiki>~~~~</nowiki></noinclude>
12218 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12220 {{subst:Foo}} shall be converted to FOO
12222 As well as inside noinclude/onlyinclude
12223 <noinclude>{{subst:Foo}}</noinclude>
12224 <onlyinclude>{{subst:Foo}}</onlyinclude>
12226 But not inside includeonly
12227 <includeonly>{{subst:Foo}}</includeonly>
12231 <nowiki>~~~~</nowiki>
12233 <includeonly><nowiki>~~~~</nowiki></includeonly>
12235 <noinclude><nowiki>~~~~</nowiki></noinclude>
12237 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12239 FOO shall be converted to FOO
12241 As well as inside noinclude/onlyinclude
12242 <noinclude>FOO</noinclude>
12243 <onlyinclude>FOO</onlyinclude>
12245 But not inside includeonly
12246 <includeonly>{{subst:Foo}}</includeonly>
12250 Parsoid: Recognize nowiki with trailing space in tags
12254 <nowiki ><div>[[foo]]</nowiki >
12262 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12269 Parsoid: Recognize nowiki with odd capitalization
12273 <noWikI ><div>[[foo]]</Nowiki >
12275 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12280 Parsoid: Escape nowiki with trailing space in tags
12284 <p><nowiki > foo </nowiki ></p>
12285 <p>a<nowiki />b</p>
12286 <p>c<nowiki/ >d</p>
12288 <nowiki > foo </nowiki >
12296 Parsoid: Escape weird noWikI capitalizations
12300 <p><noWikI > foo </NoWikI ></p>
12302 <noWikI > foo </NoWikI >
12306 ### Message transform tests
12309 message transform: magic variables
12319 message transform: should not transform wiki markup
12329 message transform: <noinclude> in transcluded template (bug 4926)
12339 message transform: <onlyinclude> in transcluded template (bug 4926)
12349 {{#special:}} page name, known
12353 {{#special:Recentchanges}}
12355 Special:RecentChanges
12359 {{#special:}} page name with subpage, known
12363 {{#special:Recentchanges/param}}
12365 Special:RecentChanges/param
12369 {{#special:}} page name, unknown
12373 {{#special:foobar nonexistent}}
12375 Special:Foobar nonexistent
12379 {{#speciale:}} page name, known
12383 {{#speciale:Recentchanges}}
12385 Special:RecentChanges
12389 {{#speciale:}} page name with subpage, known
12393 {{#speciale:Recentchanges/param}}
12395 Special:RecentChanges/param
12399 {{#speciale:}} page name, unknown
12403 {{#speciale:foobar nonexistent}}
12405 Special:Foobar_nonexistent
12411 ### For Parsoid-specific tests, see
12412 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12417 parsoid=wt2html,wt2wt,html2html
12419 [[Image:foobar.jpg]]
12421 <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>
12424 <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>
12428 Simple image (using File: namespace, now canonical)
12430 [[File:Foobar.jpg]]
12432 <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>
12435 <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>
12439 Right-aligned image
12441 [[File:Foobar.jpg|right]]
12443 <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>
12446 <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>
12452 [[File:Foobar.jpg|right|Caption text]]
12454 <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>
12457 <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>
12461 Image with caption, bug 53312 #1
12463 [[File:Foobar.jpg|right|Caption page stuff]]
12465 <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>
12468 <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>
12472 Image with caption, bug 53312 #2
12474 [[File:Foobar.jpg|right|Caption page=]]
12476 <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>
12479 <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>
12483 Image with caption, bug 53312 #3
12485 [[File:Foobar.jpg|right|Caption page=stuff]]
12487 <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>
12490 <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>
12494 Allow empty links in image captions (Bug 60753)
12498 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12503 <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>
12506 <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>
12508 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12509 </figcaption></figure>
12513 Titles in unlinked images (T23454)
12515 [[File:Foobar.jpg|link=|stuff]]
12517 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12522 Link with empty target
12531 Image with link trail
12533 Linktrails should not work for images: [[File:Foobar.jpg]]s
12535 <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
12538 <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>
12542 Image with empty attribute
12544 parsoid=wt2html,wt2wt,html2html
12546 [[File:Foobar.jpg|right||Caption text]]
12548 <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>
12551 <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>
12555 1. Block image with individual attributes from templates
12557 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12559 <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>
12562 <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>
12566 2. Block Image with individual attributes from templates
12568 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12570 <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>
12573 <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>
12577 3. Inline image with individual attributes from templates
12579 [[File:Foobar.jpg|{{echo|50px}}]]
12581 <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>
12584 <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>
12587 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12588 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12590 Image with multiple attributes from the same template
12592 [[File:Foobar.jpg|{{image_attribs}}]]
12594 <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>
12597 <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>
12601 Image with link tails
12605 123[[File:Foobar.jpg]]456
12606 123[[File:Foobar.jpg|right]]456
12607 123[[File:Foobar.jpg|thumb]]456
12609 <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
12611 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
12612 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
12615 <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>
12617 <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>
12619 <div class="thumb tright">
12620 <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>
12621 <div class="thumbcaption">
12622 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12628 <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>
12629 <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>
12630 <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>
12634 Image with multiple captions -- only last one is accepted
12636 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12638 <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>
12641 <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>
12645 Image with multiple widths -- use last
12647 [[File:Foobar.jpg|200px|300px|caption]]
12649 <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>
12652 <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>
12656 Image with multiple alignments -- use first (bug 48664)
12660 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12662 [[File:Foobar.jpg|middle|text-top|caption]]
12664 <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>
12665 <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>
12668 <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>
12669 <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>
12673 Image with width attribute at different positions
12675 [[File:Foobar.jpg|200px|right|Caption]]
12676 [[File:Foobar.jpg|right|200px|Caption]]
12677 [[File:Foobar.jpg|right|Caption|200px]]
12679 <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>
12680 <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>
12681 <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>
12684 <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>
12685 <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>
12686 <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>
12689 # a sad bit of backward-compatibility
12691 Image with size specified with pxpx (bug 13500, 51628)
12693 parsoid=wt2html,wt2wt,html2html
12695 [[File:Foobar.jpg|20pxpx]]
12696 [[File:Foobar.jpg|200x20pxpx]]
12698 <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>
12699 <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>
12702 <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>
12706 Image with link parameter, wiki target
12708 [[File:Foobar.jpg|link=Main Page]]
12710 <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>
12713 <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>
12716 # parsoid bug 49293 (part 1)
12718 Image with link parameter, URL target
12720 [[File:Foobar.jpg|link=http://example.com/]]
12722 <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>
12725 <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>
12728 # parsoid bug 49293 (part 2)
12730 Image with link parameter, protocol-less URL target
12732 [[File:Foobar.jpg|link=//example.com/]]
12734 <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>
12737 <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>
12741 Escaping non-block captions (T107435)
12744 "modes": ["wt2wt"],
12746 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
12750 [[Image:Foobar.jpg|caption]]
12752 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
12756 Image with link parameter, wgExternalLinkTarget
12758 [[Image:foobar.jpg|link=http://example.com/]]
12760 wgExternalLinkTarget='foobar'
12762 <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>
12767 Image with link parameter, wgNoFollowLinks set to false
12769 [[Image:foobar.jpg|link=http://example.com/]]
12771 wgNoFollowLinks=false
12773 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12778 Image with link parameter, wgNoFollowDomainExceptions
12780 [[Image:foobar.jpg|link=http://example.com/]]
12782 wgNoFollowDomainExceptions='example.com'
12784 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12789 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12791 [[Image:foobar.jpg|link=http://example.com/|Title]]
12793 wgExternalLinkTarget='foobar'
12795 <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>
12800 Image with empty link parameter
12802 [[File:Foobar.jpg|link=]]
12804 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12807 <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>
12811 Image with link parameter (wiki target) and unnamed parameter
12813 [[File:Foobar.jpg|link=Main_Page|Title]]
12815 <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>
12818 <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>
12822 Image with link parameter (URL target) and unnamed parameter
12824 [[File:Foobar.jpg|link=http://example.com/|Title]]
12826 <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>
12829 <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>
12833 Thumbnail image with link parameter
12836 parsoid=wt2html,wt2wt,html2html
12838 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12840 <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>
12843 <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>
12847 Manually-specified thumbnail image
12851 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12853 <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>
12856 <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>
12860 Manually-specified thumbnail image with explicit link to wiki page
12863 parsoid=wt2html,wt2wt,html2html
12865 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12867 <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>
12870 <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>
12874 Manually-specified thumbnail image with explicit link to url
12877 parsoid=wt2html,wt2wt,html2html
12879 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12881 <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>
12884 <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>
12888 Manually-specified thumbnail image with explicit no link
12891 parsoid=wt2html,wt2wt,html2html
12893 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12895 <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>
12898 <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>
12902 Manually-specified thumbnail image with explicit link and alt text
12905 parsoid=wt2html,wt2wt,html2html
12907 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12909 <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>
12912 <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>
12916 Image with frame and link
12918 parsoid=wt2html,wt2wt,html2html
12920 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12922 <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>
12925 <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>
12929 Image with frame and link and explicit alt
12931 parsoid=wt2html,wt2wt,html2html
12933 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12935 <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>
12938 <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>
12942 Image with wiki markup in implicit alt
12944 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12946 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12948 <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>
12949 </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>
12952 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"testing <b data-parsoid=\"{&quot;dsr&quot;:[27,37,3,3]}\">bold</b> in alt"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
12953 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></span></p>
12957 Alt image option should handle most kinds of wikitext without barfing
12959 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12961 <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>
12964 <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>
12967 ###################
12968 # Conflicting image format options.
12969 # First option specified should 'win'.
12970 # All three cases in each test should be identical.
12973 Image with 'frameless' first.
12975 parsoid=wt2html,wt2wt,html2html
12977 [[File:Foobar.jpg|frameless|caption]]
12979 [[File:Foobar.jpg|frameless|frame|caption]]
12981 [[File:Foobar.jpg|frameless|thumb|caption]]
12983 <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>
12984 </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>
12985 </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>
12988 <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>
12989 <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>
12990 <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>
12994 Image with 'frame' first.
12996 parsoid=wt2html,wt2wt,html2html
12998 [[File:Foobar.jpg|frame|caption]]
12999 [[File:Foobar.jpg|frame|frameless|caption]]
13000 [[File:Foobar.jpg|frame|thumb|caption]]
13002 <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>
13003 <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>
13004 <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>
13007 <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>
13008 <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>
13009 <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>
13013 Image with 'thumb' first.
13015 parsoid=wt2html,wt2wt,html2html
13017 [[File:Foobar.jpg|thumb|caption]]
13018 [[File:Foobar.jpg|thumb|frameless|caption]]
13019 [[File:Foobar.jpg|thumb|frame|caption]]
13021 <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>
13022 <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>
13023 <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>
13026 <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>
13027 <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>
13028 <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>
13031 ###################
13033 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13034 # and https://phabricator.wikimedia.org/T64258
13035 # Foobar has actual size of 1941x220
13036 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13037 # a scalable format.
13038 # 2. Framed images always ignore size options; always render at default size.
13039 # 3. "Unspecified format" and border are the only types which can be
13043 Image: "unspecified format" and border enlarge
13045 parsoid=wt2html,wt2wt,html2html
13047 [[File:Foobar.jpg|2000px]]
13049 [[File:Foobar.jpg|border|2000px]]
13051 <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>
13052 </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>
13055 <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>
13056 <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>
13060 Image: "unspecified format" and border reduce
13062 parsoid=wt2html,wt2wt,html2html
13064 [[File:Foobar.jpg|1000px]]
13066 [[File:Foobar.jpg|border|1000px]]
13068 <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>
13069 </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>
13072 <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>
13073 <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>
13077 Image: thumbs reduce
13079 parsoid=wt2html,wt2wt,html2html
13081 [[File:Foobar.jpg|thumb|50px]]
13083 <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>
13086 <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>
13090 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13092 parsoid=wt2html,wt2wt,html2html
13094 [[File:Foobar.jpg|thumb|2000px]]
13096 [[File:Foobar.svg|thumb|2000px]]
13098 <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>
13099 <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>
13102 <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>
13103 <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>
13107 Image: frameless can reduce in size
13109 parsoid=wt2html,wt2wt,html2html
13111 [[File:Foobar.jpg|frameless|50px]]
13113 <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>
13116 <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>
13120 Image: bitmap frameless can't be enlarged past original size, but vector can
13122 parsoid=wt2html,wt2wt,html2html
13124 [[File:Foobar.jpg|frameless|2000px]]
13126 [[File:Foobar.svg|frameless|2000px]]
13128 <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>
13129 </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>
13132 <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>
13133 <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>
13137 Image: framed images are always unscaled.
13139 parsoid=wt2html,wt2wt,html2html
13141 [[File:Foobar.jpg|frame]]
13143 [[File:Foobar.jpg|frame|50px]]
13145 [[File:Foobar.jpg|frame|50x50px]]
13147 [[File:Foobar.jpg|frame|2000px]]
13149 <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>
13150 <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>
13151 <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>
13152 <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>
13155 <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>
13156 <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>
13157 <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>
13158 <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>
13161 ###################
13164 Link to image page- image page normally doesn't exists, hence edit link
13165 Add test with existing image page
13166 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13170 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13175 bug 18784 Link to non-existent image page with caption should use caption as link text
13177 [[:Image:test|caption]]
13179 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13184 Frameless image caption with a free URL
13186 [[File:Foobar.jpg|http://example.com]]
13188 <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>
13191 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid=\"{&quot;stx&quot;:&quot;url&quot;,&quot;dsr&quot;:[18,36,0,0]}\">http://example.com</a>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13195 Thumbnail image caption with a free URL
13199 [[File:Foobar.jpg|thumb|http://example.com]]
13201 <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>
13204 <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>
13208 Thumbnail image caption with a free URL and explicit alt
13211 parsoid=wt2html,wt2wt,html2html
13213 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13215 <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>
13218 <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>
13222 SVG thumbnails with no language set
13225 [[File:Foobar.svg|thumb|caption]]
13227 <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>
13230 <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>
13234 SVG thumbnails with language de
13236 parsoid=wt2html,wt2wt,html2html
13238 [[File:Foobar.svg|thumb|caption|lang=de]]
13240 <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>
13243 <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>
13247 SVG thumbnails with invalid language code
13249 parsoid=wt2html,wt2wt,html2html
13251 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13253 <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>
13256 <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>
13260 BUG 1887: A ISBN with a thumbnail
13262 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13264 <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>
13267 <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>
13271 BUG 1887: A RFC with a thumbnail
13273 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13275 <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>
13278 <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>
13282 BUG 1887: A mailto link with a thumbnail
13284 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13286 <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>
13289 <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>
13292 # Pending resolution to bug 368
13294 BUG 648: Frameless image caption with a link
13296 [[File:Foobar.jpg|text with a [[link]] in it]]
13298 <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>
13301 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[30,38,2,2]}\">link</a> in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13305 BUG 648: Frameless image caption with a link (suffix)
13307 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13309 <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>
13312 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[30,41,2,5],&quot;tail&quot;:&quot;foo&quot;}\">linkfoo</a> in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13316 BUG 648: Frameless image caption with an interwiki link
13318 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13320 <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>
13323 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;http://www.usemod.com/cgi-bin/mb.pl?Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;MeatBall:Link&quot;},&quot;isIW&quot;:true,&quot;dsr&quot;:[30,47,2,2]}\">MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13327 BUG 648: Frameless image caption with a piped interwiki link
13329 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13331 <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>
13334 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid=\"{&quot;stx&quot;:&quot;piped&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;http://www.usemod.com/cgi-bin/mb.pl?Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;MeatBall:Link&quot;},&quot;isIW&quot;:true,&quot;dsr&quot;:[30,52,16,2]}\">link</a> in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13338 T107474: Frameless image caption with <nowiki>
13340 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13342 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid=\"{&quot;dsr&quot;:[18,75,8,9]}\">text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13346 Escape HTML special chars in image alt text
13348 [[File:Foobar.jpg|& < > "]]
13350 <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>
13353 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&amp; &lt; &gt; \""}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13357 BUG 499: Alt text should have Ӓ, not &1234;
13359 [[File:Foobar.jpg|♀]]
13361 <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>
13364 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;#9792;&quot;,&quot;srcContent&quot;:&quot;♀&quot;,&quot;dsr&quot;:[18,25,null,null]}\">♀</span>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13368 Broken image caption with link
13370 parsoid=wt2html,wt2wt,html2html
13372 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13374 <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.
13377 <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>
13381 Image caption containing another image
13383 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13385 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a 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>
13388 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is a 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>
13392 Image: caption containing a newline
13394 [[File:Foobar.jpg|This
13397 <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>
13400 <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>
13404 Image: caption containing leading space
13405 (The leading space should not trigger nowiki escaping in wt2wt mode)
13407 [[File:Foobar.jpg|thumb| bar]]
13409 <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>
13412 <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>
13416 Image: caption containing a table
13418 parsoid=wt2html,wt2wt,html2html
13420 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13426 and some more text.]]
13428 <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>
13431 <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
13434 <tr><th>Foo </th><th>Bar</th></tr>
13437 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13441 Bug 3090: External links other than http: in image captions
13443 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13445 <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>
13448 <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>
13454 parsoid=wt2html,wt2wt,html2html
13456 [[Image:foobar.jpg|a|class=b]]
13458 <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>
13461 <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>
13465 Localized image handling (1).
13467 parsoid=wt2html,wt2wt,html2html
13470 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13472 <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>
13475 <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>
13479 Localized image handling (2).
13482 parsoid=wt2html,wt2wt,html2html
13485 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13487 <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>
13490 <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>
13494 "border", "frameless" and "class" attributes on an image.
13497 parsoid=wt2html,wt2wt,html2html
13499 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13501 <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>
13504 <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>
13507 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13509 Invalid image attributes (bug 62500)
13512 parsoid=wt2html,wt2wt,html2html
13514 [[File:Foobar.jpg|thumb|float|left|caption]]
13516 [[File:Foobar.jpg|thumb|righ|caption]]
13518 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13520 <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>
13521 <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>
13522 <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>
13525 <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>
13526 <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>
13527 <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>
13533 #REDIRECT [[File:Barfoo.jpg]]
13536 # FIXME: Parsoid should run this test -- but we'd need to teach the
13537 # mockAPI about the redirected Barfoo.jpg image.
13541 [[Image:Barfoo.jpg]]
13543 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13548 Missing image with uploads disabled
13552 [[File:Foobaz.jpg]]
13554 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13557 <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>
13560 # Parsoid-specific testing for images
13561 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13562 # Currently imperfect due to a flaw in the Parsoid testrunner
13564 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13568 Parsoid-specific image handling - simple image with size and middle alignment
13570 [[File:Foobar.jpg|middle|50px]]
13572 <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>
13576 Parsoid-specific image handling - simple image with size, middle alignment,
13577 non-standard namespace alias
13579 parsoid=wt2wt,wt2html,html2html
13581 [[Image:Foobar.jpg|middle|50px]]
13583 <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>
13587 Parsoid-specific image handling - simple image with size and middle alignment
13590 [[File:Foobar.jpg|50px|middle]]
13592 <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>
13596 Parsoid-specific image handling - simple image with size and middle alignment
13597 and non-standard namespace name
13599 parsoid=wt2html,wt2wt,html2html
13601 [[Image:Foobar.jpg|50px|middle]]
13603 <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>
13607 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13609 [[File:Foobar.jpg|500x10px|baseline|caption]]
13611 <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>
13615 Parsoid-specific image handling - simple image with border and size spec
13617 [[File:Foobar.jpg|50px|border|caption]]
13619 <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>
13623 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13625 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13627 <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>
13631 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13634 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13636 <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>
13640 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13642 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13644 <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>
13648 Parsoid-specific image handling - thumbnail with specific size, halign,
13649 valign, and caption (existing content)
13651 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13653 <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>
13657 Parsoid-specific image handling - framed image with specific size and caption
13660 parsoid=wt2html,wt2wt,html2html
13662 [[File:Foobar.jpg|frame|500x50px|caption]]
13664 <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>
13668 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13671 parsoid=wt2html,wt2wt,html2html
13673 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13675 <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>
13679 Parsoid-specific image handling - frameless image with specific size, border, and caption
13681 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13683 <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>
13687 Parsoid-specific image handling - simple image with a formatted caption
13689 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13691 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[18,81,7,8]}\"><tbody data-parsoid=\"{&quot;dsr&quot;:[25,73,0,0]}\"><tr data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[25,54,4,5]}\"><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[29,39,4,5]}\">a</td><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[39,49,4,5]}\">b</td></tr><tr data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[54,73,4,5]}\"><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[58,68,4,5]}\">c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13695 Parsoid-specific image handling - caption with a template in it
13697 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13699 <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>
13703 Parsoid-specific image handling - caption with unbalanced tags in it
13705 parsoid=wt2html,wt2wt,html2html
13708 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13712 <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>
13717 Parsoid-specific image handling - empty caption (1)
13719 parsoid=wt2html,wt2wt
13721 [[File:Foobar.jpg|thumb|]]
13723 <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>
13726 # empty captions don't get serialized unless we're in the "round trip" case
13728 Parsoid-specific image handling - empty caption (2)
13732 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13733 <a href="./File:Foobar.jpg">
13734 <img resource="./File:Foobar.jpg"
13735 src="//example.com/images/3/3a/Foobar.jpg"
13736 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13737 height="25" width="220"/>
13739 <figcaption></figcaption>
13742 [[File:Foobar.jpg|thumb]]
13746 Parsoid-specific image handling - whitespace caption
13748 [[File:Foobar.jpg|thumb| ]]
13750 <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>
13754 Parsoid-specific image handling - lang option
13757 [[File:Foobar.svg|lang=de|caption]]
13761 <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>
13765 ## Edge case bug in Parsoid
13767 T93580: Templated <ref> inside images
13769 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
13773 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
13775 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
13782 Subpage test/subpage
13790 subpage title=[[Subpage test]]
13794 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13799 Subpage noslash link
13801 subpage title=[[Subpage test]]
13805 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13810 Subpage test/1/2/subpage
13816 Relative subpage noslash link
13818 parsoid=wt2wt,wt2html,html2html
13819 subpage title=[[Subpage test/1/2/3/4]]
13825 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13826 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13829 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13830 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13834 Parsoid: dot-slash prefixed wikilinks
13844 </p><p>[[././baz/]]
13849 </p><p>[[././baz/]]
13854 Render invalid page names as plain text (bug 51090)
13867 [[{{echo|./../foo}}|bar]]
13868 [[{{echo|foo/.}}|bar]]
13869 [[{{echo|foo/..}}|bar]]
13870 [[{{echo|foo~~~~bar}}]]
13871 [[{{echo|foo>bar}}]]
13872 [[{{echo|foo././bar}}]]
13873 [[{{echo|foo{bar}}]]
13874 [[{{echo|foo}bar}}]]
13875 [[{{echo|foo[bar}}]]
13876 [[{{echo|foo]bar}}]]
13877 [[{{echo|foo<bar}}]]
13879 <p>[[./../foo|bar]]
13889 </p><p>[[./../foo|bar]]
13902 <p>[[./../foo|bar]]
13913 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13914 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13915 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13916 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13917 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13918 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13919 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13920 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13921 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
13922 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
13923 [[<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>
13931 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13936 BUG 561: {{/Subpage}}
13938 subpage title=[[Page]]
13942 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13950 Category:MediaWiki User's Guide
13958 [[:Category:MediaWiki User's Guide]]
13960 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13969 [[Category:MediaWiki User's Guide]]
13971 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13975 PAGESINCATEGORY invalid title fatal (r33546 fix)
13977 {{PAGESINCATEGORY:<bogus>}}
13984 Category with different sort key
13988 [[Category:MediaWiki User's Guide|Foo]]
13990 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13994 Category with identical sort key
13998 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14000 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14004 Category with empty sort key
14009 [[Category:MediaWiki User's Guide|]]
14011 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14015 Category with empty sort key and parentheses
14020 [[Category:Foo (bar)|]]
14022 [[Category:Foo (bar)|Foo]]
14026 Category with link tail
14031 123[[Category:Foo]]456
14033 123[[Category:Foo]]456
14037 Category with template
14042 [[Category:{{echo|Foo}}]]
14044 [[Category:{{echo|Foo}}]]
14048 Category with template in sort key
14053 [[Category:Foo|{{echo|Bar}}]]
14055 [[Category:Foo|{{echo|Bar}}]]
14059 Category with template in sort key and title
14064 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14066 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14070 Category / paragraph interactions
14072 Foo [[Category:Baz]] Bar
14074 Foo [[Category:Baz]]
14082 [[Category:Baz]] Bar
14095 {{echo|[[Category:Baz]]}}
14109 ## The whitespace on the empty line is part of the test. Please do not delete
14111 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14113 parsoid=wt2html,wt2wt
14117 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14119 {{echo|[[Category:Foo]] and so should this!}}
14121 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14126 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14128 <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>
14131 ## Parsoid will not try to wt2wt this while preserving newlines because
14132 ## it suppresses excess newlines within list items -- and we don't want to
14133 ## introduce a special case just for categories, which is, in reality somewhat
14134 ## odd behavior -- categories are unlikely to be used in list items like this
14135 ## in top-level pages and are only likely to show up in template-generated
14136 ## list items where this RT-ing is a non-issue.
14138 ## The whitespace on the empty line is part of the test. Please do not delete
14140 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14146 [[Category:Foo]] and this should be part of the same list item
14149 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14151 <ul><li>This and this should be part of the same list item</li>
14152 <li>So should this and this should be part of the same list item</li></ul>
14155 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14156 <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>
14160 ## Newlines and categories that follow the last item of a list
14161 ## are treated differently because this (list followed by categories)
14162 ## is an extremely common pattern on wikis.
14164 3. Categories and newlines: newline suppression for last list item should RT properly
14177 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14179 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14180 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14184 4. Categories and newlines: newline suppression for last list item should RT properly
14192 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14194 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14197 ## only wt2html for this to make sure the algo only applies to the rightmost path
14199 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14212 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14214 <ul><li> d</li></ul></li></ul>
14215 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14219 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14221 * a [[Category:Foo]]
14223 <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>
14226 # This test also demonstrates because of newline+category tunneling
14227 # through the list hander, template wrapping doesn't expand to the
14228 # containing list when the list item swallows the category.
14230 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14235 <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">
14236 </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>
14240 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14244 {{echo|[[Category:Foo]]
14248 <ul><li> a</li></ul>
14250 <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">
14251 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14252 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14256 Parsoid: Serialize link to category page with colon escape
14262 [[:Category:Foo|Bar]]
14265 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14266 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14270 # html2wt localizes the "Category" namespace.
14271 # XXX the <link> element needs an empty data-parsoid attribute, or
14272 # else the html2html test fails because spaces are inserted.
14274 Link prefix/suffixes aren't applied to category links
14276 parsoid=wt2html,wt2wt,html2html
14284 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14288 Parsoid: Serialize link to file page with colon escape
14294 [[:File:Foo.png|Bar]]
14297 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14298 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14303 Parsoid: Serialize a genuine category link without colon escape
14308 [[Category:Foo|Bar]]
14310 <link rel="mw:PageProp/Category" href="./Category:Foo">
14311 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14315 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14319 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14321 [[Category:Toxine bactérienne]]
14325 Parsoid: Defaultsort
14327 {{DEFAULTSORT:Foo}}
14329 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14333 Parsoid: Defaultsort (template-generated)
14335 {{{{echo|DEFAULTSORT}}:Foo}}
14337 <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}}]}'/>
14341 ### Inter-language links
14344 Interlanguage links
14352 es:Alimento fr:Nourriture zh:食品
14354 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14355 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14356 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14360 Duplicate interlanguage links (bug 24502)
14371 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14372 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14373 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14374 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14381 Basic section headings
14388 ===Smaller headline===
14391 <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>
14394 <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>
14397 <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>
14403 Section headings with TOC
14406 === Subheadline 1 ===
14407 ===== Skipping a level =====
14408 ====== Skipping a level ======
14412 ===Another headline===
14414 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14416 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14418 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14420 <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>
14422 <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>
14429 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14431 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14437 <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>
14438 <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>
14439 <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>
14440 <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>
14441 <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>
14444 <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>
14449 TOC anchors don't collide
14457 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14459 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14460 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14461 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14462 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14466 <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>
14467 <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>
14468 <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>
14469 <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>
14473 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14475 Handling of sections up to level 6 and beyond
14478 == Level 2 Heading==
14479 === Level 3 Heading===
14480 ==== Level 4 Heading====
14481 ===== Level 5 Heading=====
14482 ====== Level 6 Heading======
14483 ======= Level 7 Heading=======
14484 ======== Level 8 Heading========
14485 ========= Level 9 Heading=========
14486 ========== Level 10 Heading==========
14488 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14490 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14492 <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>
14494 <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>
14496 <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>
14498 <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>
14500 <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>
14501 <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>
14502 <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>
14503 <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>
14504 <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>
14518 <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>
14519 <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>
14520 <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>
14521 <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>
14522 <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>
14523 <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>
14524 <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>
14525 <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>
14526 <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>
14527 <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>
14532 TOC regression (T11764)
14536 ==== title 1.1.1 ====
14541 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14543 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14545 <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>
14547 <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>
14550 <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>
14553 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14555 <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>
14561 <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>
14562 <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>
14563 <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>
14564 <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>
14565 <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>
14566 <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>
14571 TOC for heading containing <span id="..."></span> (T96153)
14574 ==<span id="old-anchor"></span>New title==
14576 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14578 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14582 <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>
14587 TOC with wgMaxTocLevel=3 (bug 6204)
14593 ==== title 1.1.1 ====
14598 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14600 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14602 <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>
14603 <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>
14606 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14608 <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>
14614 <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>
14615 <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>
14616 <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>
14617 <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>
14618 <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>
14619 <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>
14624 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14630 ====Section 1.1.1====
14631 ====Section 1.1.1.1====
14634 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14636 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14638 <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>
14641 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14645 <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>
14646 <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>
14647 <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>
14648 <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>
14649 <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>
14655 Resolving duplicate section names
14660 <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>
14661 <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>
14666 Resolving duplicate section names with differing case (bug 10721)
14671 <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>
14672 <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>
14684 Template with sections, __NOTOC__
14691 <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>
14692 <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>
14693 <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>
14694 <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>
14699 __NOEDITSECTION__ keyword
14705 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14706 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14711 Link inside a section heading
14713 ==Section with a [[Main Page|link]] in it==
14715 <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>
14720 TOC regression (T14077)
14727 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14729 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14731 <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>
14734 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14738 <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>
14739 <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>
14740 <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>
14745 BUG 1219 URL next to image (good)
14747 http://example.com [[File:Foobar.jpg]]
14749 <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>
14752 <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>
14756 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14759 The line above must have a trailing space!
14762 But just in case it doesn't...
14764 <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>
14765 <p>The line above must have a trailing space!
14767 <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>
14768 <p>But just in case it doesn't...
14773 Header with special characters (bug 25462)
14775 The tooltips shall not show entities to the user (ie. be double escaped)
14792 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14794 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14796 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14797 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14798 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14799 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14800 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14804 <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>
14807 <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>
14810 <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>
14813 <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>
14816 <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>
14822 Header with space, plus and underscore as entity
14824 Id should not contain + for spaces
14826 == Space between Text ==
14829 == Space-Entity between Text ==
14832 == Plus+between+Text ==
14835 == Plus-Entity+between+Text ==
14838 == Underscore_between_Text ==
14841 == Underscore-Entity_between_Text ==
14844 [[#Space between Text]]
14845 [[#Space-Entity between Text]]
14846 [[#Plus+between+Text]]
14847 [[#Plus-Entity+between+Text]]
14848 [[#Underscore_between_Text]]
14849 [[#Underscore-Entity_between_Text]]
14851 <p>Id should not contain + for spaces
14853 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14855 <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>
14856 <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>
14857 <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>
14858 <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>
14859 <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>
14860 <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>
14864 <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>
14867 <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>
14870 <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>
14873 <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>
14876 <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>
14879 <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>
14881 </p><p><a href="#Space_between_Text">#Space between Text</a>
14882 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14883 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14884 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14885 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14886 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14891 Headers with excess '=' characters
14892 (Are similar tests necessary beyond the 1st level?)
14896 =''italic'' heading==
14897 ==''italic'' heading=
14899 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14901 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14902 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14903 <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>
14904 <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>
14908 <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>
14909 <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>
14910 <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>
14911 <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>
14916 HTML headers vs TOC (bug 23393)
14917 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14929 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14931 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14933 <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>
14934 <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>
14937 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14939 <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>
14940 <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>
14946 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14947 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14948 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14949 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14950 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14951 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14956 Single-line or multiline-comments can follow headings
14958 parsoid=wt2html,wt2wt
14966 <h2><span class="mw-headline" id="foo">foo</span></h2>
14967 <h2><span class="mw-headline" id="bar">bar</span></h2>
14968 <h2><span class="mw-headline" id="baz">baz</span></h2>
14973 BUG 1219 URL next to image (broken)
14975 http://example.com[[File:Foobar.jpg]]
14977 <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>
14980 <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>
14984 Bug 1186 news: in the middle of text
14986 http://en.wikinews.org/wiki/Wikinews:Workplace
14988 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14994 Namespaced link must have a title
15003 Namespaced link must have a title (bad fragment version)
15005 [[Project:#fragment]]
15007 <p>[[Project:#fragment]]
15013 ### HTML tags and HTML attributes
15017 div with no attributes
15019 <div>HTML rocks</div>
15021 <div>HTML rocks</div>
15026 div with double-quoted attribute
15028 <div id="rock">HTML rocks</div>
15030 <div id="rock">HTML rocks</div>
15035 div with single-quoted attribute
15037 <div id='rock'>HTML rocks</div>
15039 <div id="rock">HTML rocks</div>
15044 div with unquoted attribute
15046 <div id=rock>HTML rocks</div>
15048 <div id="rock">HTML rocks</div>
15053 div with illegal double attributes
15055 <div id="a" id="b">HTML rocks</div>
15057 <div id="b">HTML rocks</div>
15061 # FIXME: produce empty string instead of "class" in the PHP parser, following
15064 div with empty attribute value, space before equals
15068 <div class =>HTML rocks</div>
15070 <div class="">HTML rocks</div>
15075 div with multiple empty attribute values
15079 <div id= title=>HTML rocks</div>
15081 <div id="" title="">HTML rocks</div>
15086 table with multiple empty attribute values
15094 <table title="" id="">
15095 <tbody><tr><td> hi</td></tr>
15100 div with braces in attribute value
15102 <div title="{}">Foo</div>
15104 <div title="{}">Foo</div>
15107 <div title="{}">Foo</div>
15110 # This it very inconsistent in the PHP parser: it returns
15111 # class="class" if there is a space between the name and the equal sign (see
15112 # 'div with empty attribute value, space before equals'), but strips the
15113 # attribute completely if the space is missing. We hope that not much content
15114 # depends on this, so are implementing the behavior below in Parsoid for
15115 # consistencies' sake.
15116 # FIXME: fix this behavior in the PHP parser?
15118 div with empty attribute value, no space before equals
15120 parsoid=wt2html,html2html
15122 <div class=>HTML rocks</div>
15124 <div>HTML rocks</div>
15127 <div class="">HTML rocks</div>
15131 HTML multiple attributes correction
15133 <p class="error" class="awesome">Awesome!</p>
15135 <p class="awesome">Awesome!</p>
15140 Table multiple attributes correction
15143 !+ class="error" class="awesome"| status
15148 <th class="awesome"> status
15156 <DIV ID="x">HTML ROCKS</DIV>
15158 <div id="x">HTML ROCKS</div>
15163 Non-ASCII pseudo-tags are rendered as text
15172 Pseudo-tag with URL 'name' renders as url link
15174 <http://example.com/>
15176 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15181 text with amp in the middle of nowhere
15185 <p>Remember AT&T?
15190 text with character entity: eacute
15192 I always thought é was a cute letter.
15194 <p>I always thought é was a cute letter.
15197 <p>I always thought é was a cute letter.</p>
15201 text with entity-escaped character entity-like string: eacute
15203 I always thought &eacute; was a cute letter.
15205 <p>I always thought &eacute; was a cute letter.
15210 text with undefined character entity: xacute
15212 I always thought &xacute; was a cute letter.
15214 <p>I always thought &xacute; was a cute letter.
15221 <data value="5">five</data>
15222 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15223 <mark>This highlighted text</mark>
15225 <p><data value="5">five</data>
15226 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15227 <mark>This highlighted text</mark>
15232 HTML tag with leading space is parsed as text
15236 <p>< div>foo< /div>
15241 ### Nesting tests (see bug 41545, 50604, 51081)
15244 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15245 # Note that html2wt is considerably more difficult if we use <b> in
15246 # the test case, instead of <big>
15248 Ensure that HTML adoption agency algorithm is properly implemented.
15250 <big>X<big>Y</big>Z</big>
15252 <p><big>X<big>Y</big>Z</big>
15256 # This was bug 41545 in the PHP parser.
15257 # Note that tidy doesn't handle this correctly.
15261 <kbd>X<kbd>Y</kbd>Z</kbd>
15263 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15267 # The following cases were bug 51081 in the PHP parser.
15268 # Note that there are some other nestable tags (b, i, etc) which are
15269 # not covered; see bug 51081 for discussion.
15271 # Note that tidy doesn't handle this correctly.
15275 <em>X<em>Y</em>Z</em>
15277 <p><em>X<em>Y</em>Z</em>
15281 # Note that tidy doesn't handle this correctly.
15283 Nesting of <strong>
15285 <strong>X<strong>Y</strong>Z</strong>
15287 <p><strong>X<strong>Y</strong>Z</strong>
15296 <p><q>X<q>Y</q>Z</q></p>
15299 # Note that tidy doesn't handle this correctly.
15303 <ruby>X<ruby>Y</ruby>Z</ruby>
15305 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15309 # Note that tidy doesn't handle this correctly.
15313 <bdo>X<bdo>Y</bdo>Z</bdo>
15315 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15327 [[Media:Foobar.jpg]]
15329 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15334 Media link with text
15336 [[Media:Foobar.jpg|A neat file to look at]]
15338 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15342 # FIXME: this is still bad HTML tag nesting
15343 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15345 Media link with nasty text
15347 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15349 <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>
15352 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15353 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15357 Media link to nonexistent file (bug 1702)
15359 [[Media:No such.jpg]]
15361 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15366 Image link to nonexistent file (bug 1850 - good)
15368 [[File:No_such.jpg]]
15370 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15373 <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>
15377 :Image link to nonexistent file (bug 1850 - bad)
15379 [[:Image:No such.jpg]]
15381 <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>
15384 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15390 Character reference normalization in link text (bug 1938)
15392 [[Main Page|this&that]]
15394 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15401 Test for unicode normalization
15403 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15407 (bug 19451) Links should refer to the normalized form.
15415 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15416 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15417 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15418 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15419 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15424 Empty attribute crash test (bug 2067)
15426 <font color="">foo</font>
15428 <p><font color="">foo</font>
15433 Empty attribute crash test single-quotes (bug 2067)
15435 <font color=''>foo</font>
15437 <p><font color="">foo</font>
15442 Attribute test: equals, then nothing
15444 <font color=>foo</font>
15446 <p><font>foo</font>
15451 Attribute test: unquoted value
15453 <font color=x>foo</font>
15455 <p><font color="x">foo</font>
15460 Attribute test: unquoted but illegal value (hash)
15462 <font color=#x>foo</font>
15464 <p><font color="#x">foo</font>
15468 # Parsoid does not serialize to empty attribute syntax,
15469 # so wt2wt and html2wt cases are skipped
15471 Attribute test: no value (T54330)
15473 parsoid=wt2html,html2html
15475 <font color>foo</font>
15477 <p><font color="">foo</font>
15480 <p><font color="">foo</font></p>
15484 Bug 2095: link with three closing brackets
15488 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15491 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15495 Bug 2095: link with pipe and three closing brackets
15497 [[Main Page|link]]]
15499 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15502 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15506 Bug 2095: link with pipe and three closing brackets, version 2
15508 [[Main Page|[http://example.com/]]]
15510 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15513 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15522 Template:Dangerous attribute
15524 " onmouseover="alert(document.cookie)
15528 Template:Dangerous style attribute
15530 border-size: expression(alert(document.cookie))
15536 <div style="float: right; {{{1}}}">Magic div</div>
15540 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15542 <div title="{{test}}"></div>
15544 <div title="This is a test template"></div>
15548 # Parsoid has enough context to handle this case
15550 Bug 2304: HTML attribute safety (dangerous template; 2309)
15552 <div title="{{dangerous attribute}}"></div>
15554 <div title=""></div>
15557 <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>
15561 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15563 <div style="{{dangerous style attribute}}"></div>
15565 <div style="/* insecure input */"></div>
15570 Bug 2304: HTML attribute safety (safe parameter; 2309)
15572 {{div style|width: 200px}}
15574 <div style="float: right; width: 200px">Magic div</div>
15579 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15581 {{div style|width: expression(alert(document.cookie))}}
15583 <div style="/* insecure input */">Magic div</div>
15588 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15590 {{div style|"><script>alert(document.cookie)</script>}}
15592 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15597 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15599 {{div style|" ><script>alert(document.cookie)</script>}}
15601 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15606 Bug 2304: HTML attribute safety (link)
15608 <div title="[[Main Page]]"></div>
15610 <div title="[[Main Page]]"></div>
15615 Bug 2304: HTML attribute safety (italics)
15617 <div title="''foobar''"></div>
15619 <div title="''foobar''"></div>
15624 Bug 2304: HTML attribute safety (bold)
15626 <div title="'''foobar'''"></div>
15628 <div title="'''foobar'''"></div>
15634 Bug 2304: HTML attribute safety (ISBN)
15636 <div title="ISBN 1234567890"></div>
15638 <div title="ISBN 1234567890"></div>
15643 Bug 2304: HTML attribute safety (RFC)
15645 <div title="RFC 1234"></div>
15647 <div title="RFC 1234"></div>
15652 Bug 2304: HTML attribute safety (PMID)
15654 <div title="PMID 1234567890"></div>
15656 <div title="PMID 1234567890"></div>
15661 Bug 2304: HTML attribute safety (web link)
15663 <div title="http://example.com/"></div>
15665 <div title="http://example.com/"></div>
15670 Bug 2304: HTML attribute safety (named web link)
15672 <div title="[http://example.com/ link]"></div>
15674 <div title="[http://example.com/ link]"></div>
15679 Bug 3244: HTML attribute safety (extension; safe)
15681 <div style="<nowiki>background:blue</nowiki>"></div>
15683 <div style="background:blue"></div>
15688 Bug 3244: HTML attribute safety (extension; unsafe)
15690 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15692 <div style="/* insecure input */"></div>
15696 # More MSIE fun discovered by Tom Gilder
15699 MSIE CSS safety test: spurious slash
15701 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15703 <div style="/* insecure input */">evil</div>
15708 MSIE CSS safety test: hex code
15710 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15712 <div style="/* insecure input */">evil</div>
15717 MSIE CSS safety test: comment in url
15719 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15721 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15726 MSIE CSS safety test: comment in expression
15728 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15730 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15735 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15737 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15739 <p style="/* invalid control char */">A</p>
15744 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15746 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15747 <div style="top:EXPRESSION(alert())">B</div>
15749 <p style="/* insecure input */">A</p>
15750 <div style="/* insecure input */">B</div>
15755 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15757 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15758 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15760 <div style="/* insecure input */">A</div>
15761 <p style="/* insecure input */">B</p>
15766 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15768 <div style="background-image:url⁽javascript:alert())">A</div>
15769 <div style="background-image:url₍javascript:alert())">B</div>
15770 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15772 <div style="/* insecure input */">A</div>
15773 <div style="/* insecure input */">B</div>
15774 <p style="/* insecure input */">C</p>
15782 title="data:text/html,<img src=1 onerror=alert(1)>"
15783 style="-o-link:attr(title);-o-link-source:current">X</div>
15785 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15790 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15792 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15793 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15794 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15795 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15796 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15797 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15798 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15800 <p style="/* insecure input */">A</p>
15801 <p style="/* insecure input */">B</p>
15802 <p style="/* insecure input */">C</p>
15803 <p style="/* insecure input */">D</p>
15804 <p style="/* insecure input */">E</p>
15805 <p style="/* insecure input */">F</p>
15806 <p style="/* insecure input */">G</p>
15811 Table attribute legitimate extension
15814 !+ style="<nowiki>color:blue</nowiki>"| status
15819 <th style="color:blue"> status
15825 Table attribute safety
15828 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15833 <th style="/* insecure input */"> status
15839 CSS line continuation 1
15841 <div style="background-image: u\ rl(test.jpg);"></div>
15843 <div style="/* insecure input */"></div>
15848 CSS line continuation 2
15850 <div style="background-image: u\ rl(test.jpg); "></div>
15852 <div style="/* invalid control char */"></div>
15863 Expansion of multi-line templates in attribute values (bug 6255)
15865 <div style="background: {{identity|#00FF00}}">-</div>
15867 <div style="background: #00FF00">-</div>
15873 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15875 <div style="background:
15878 <div style="background: #00FF00">-</div>
15881 <div style="background:
15886 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15888 <div style="background: #00FF00">-</div>
15890 <div style="background: #00FF00">-</div>
15895 evil <math>-wiki-tags without Extension:Math enabled
15897 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15899 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15903 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15906 Parser hook: empty input
15919 Parser hook: empty input using terminated empty elements
15932 Parser hook: empty input using terminated empty elements (space before)
15945 Parser hook: basic input
15959 Parser hook: case insensitive
15973 Parser hook: case insensitive, redux
15986 Parser hook: nested tags
15990 <tag><tag></tag></tag>
16001 Parser hook: basic arguments
16003 <tag width=200 height = "100" depth = '50' square></tag>
16018 Parser hook: argument containing a forward slash (bug 5344)
16020 <tag filename='/tmp/bla'></tag>
16025 'filename' => '/tmp/bla',
16032 Parser hook: empty input using terminated empty elements (bug 2374)
16045 # </tag> should be output literally since there is no matching tag that begins it
16047 Parser hook: basic arguments using terminated empty elements (bug 2374)
16049 <tag width=200 height = "100" depth = '50' square/>
16068 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16072 Parser hook: static parser hook not inside a comment
16074 <statictag>hello, world</statictag>
16075 <statictag action=flush/>
16083 Parser hook: static parser hook inside a comment
16085 <!-- <statictag>hello, world</statictag> -->
16086 <statictag action=flush/>
16092 # Nested template calls; this case was broken by Parser.php rev 1.506,
16096 Template:One-parameter
16098 (My parameter is: {{{1}}})
16102 Template:Map-one-parameter
16104 {{{{{1}}}|{{{2}}}}}
16108 Nested template calls
16110 {{Map-one-parameter|One-parameter|param}}
16112 <p>(My parameter is: param)
16121 # HTML+Tidy effectively strips out the empty tags completely
16122 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16123 # which Tidy would have done for the PHP parser had there been content inside it.
16125 Sanitizer: Closing of open tags
16127 <s></s><table></table>
16129 <s></s><table></table>
16132 <p><s></s></p><table></table>
16136 Sanitizer: Closing of open but not closed tags
16145 Sanitizer: Closing of closed but not open tags
16155 Sanitizer: Closing of closed but not open table tags
16159 Table not started</td></tr></table>
16161 <p>Table not started</p>
16163 <p>Table not started</p>
16167 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16169 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16171 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16175 # In HTML5, the restrictions are that id must contain at least one character,
16176 # and must not contain any space characters.
16178 Sanitizer: Validating the contents of the id attribute (bug 4515)
16182 <br id="" /><br id="a space" />
16187 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16189 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16193 <br id="foo" /><br id="foo" />
16195 Something need to be done. foo-2 ?
16199 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16202 <meta itemprop="hello" content="world">
16203 <meta http-equiv="refresh" content="5">
16204 <meta itemprop="hello" http-equiv="refresh" content="5">
16205 <link itemprop="hello" href="{{SERVER}}">
16206 <link rel="stylesheet" href="{{SERVER}}">
16207 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16211 <p> <meta itemprop="hello" content="world" />
16212 <meta http-equiv="refresh" content="5">
16213 <meta itemprop="hello" content="5" />
16215 <link itemprop="hello" href="http://example.org" />
16216 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16217 <link itemprop="hello" href="http://example.org" />
16223 Language converter: output gets cut off unexpectedly (bug 5757)
16227 this bit is safe: }-
16229 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16231 then we get cut off here: }-
16233 all additional text is vanished
16235 <p>this bit is safe: }-
16236 </p><p>but if we add a conversion instance: xxx
16237 </p><p>then we get cut off here: }-
16238 </p><p>all additional text is vanished
16243 Self closed html pairs (bug 5487)
16246 <center><font id="bug" />Centered text</center>
16247 <div><font id="bug2" />In div text</div>
16249 <center><font id="bug" />Centered text</center>
16250 <div><font id="bug2" />In div text</div>
16259 Punctuation: nbsp before exclamation
16263 <p>C'est grave !
16268 Punctuation: CSS !important (bug 11874)
16270 <div style="width:50% !important">important</div>
16272 <div style="width:50% !important">important</div>
16277 Punctuation: CSS ! important (bug 11874; with space after)
16279 <div style="width:50% ! important">important</div>
16281 <div style="width:50% ! important">important</div>
16286 HTML bullet list, closed tags (bug 5497)
16299 <ul data-parsoid='{"stx":"html"}'>
16300 <li data-parsoid='{"stx":"html"}'>One</li>
16301 <li data-parsoid='{"stx":"html"}'>Two</li>
16307 HTML bullet list, unclosed tags (bug 5497)
16319 <ul data-parsoid='{"stx":"html"}'>
16320 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16321 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16327 HTML ordered list, closed tags (bug 5497)
16340 <ol data-parsoid='{"stx":"html"}'>
16341 <li data-parsoid='{"stx":"html"}'>One</li>
16342 <li data-parsoid='{"stx":"html"}'>Two</li>
16348 HTML ordered list, unclosed tags (bug 5497)
16361 <ol data-parsoid='{"stx":"html"}'>
16362 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16363 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16369 HTML nested bullet list, closed tags (bug 5497)
16394 HTML nested bullet list, open tags (bug 5497)
16431 HTML nested ordered list, closed tags (bug 5497)
16456 HTML nested ordered list, open tags (bug 5497)
16493 HTML ordered list item with parameters oddity
16495 <ol><li id="fragment">One</li>
16498 <ol><li id="fragment">One</li>
16503 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16505 bug 5918: autonumbering
16507 [http://first/] [http://second] [ftp://ftp]
16511 [mailto:enclosed@mail.tld With target]
16513 [mailto:enclosed@mail.tld]
16515 mailto:inline@mail.tld
16517 <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>
16518 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16519 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16520 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16521 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16524 <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>
16525 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16526 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16527 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16528 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16533 # Security and HTML correctness
16534 # From Nick Jenkins' fuzz testing
16538 Fuzz testing: Parser13
16553 Fuzz testing: Parser14
16558 <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>
16559 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16561 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16567 <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>
16569 <div id="toc" class="toc">
16570 <div id="toctitle">
16574 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16581 Fuzz testing: Parser14-table
16586 <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>
16587 <table style="__TOC__">
16592 <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>
16593 <table style="__TOC__">
16600 # Known to produce bogus xml (extra </td>)
16602 Fuzz testing: Parser16
16631 Fuzz testing: Parser21
16634 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16639 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16649 Fuzz testing: Parser22
16651 http://===r:::https://b
16655 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16663 # Known to produce bad XML for now
16665 Fuzz testing: Parser24
16672 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16673 <br style="onmouseover='alert(document.cookie);' " />
16675 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16680 <u class="|">}}}} >
16681 <br style="onmouseover='alert(document.cookie);'" />
16683 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16692 # Note: the current result listed for this is not what the original one was,
16693 # but the original bug was JavaScript injection, which is fixed in any case.
16694 # It's not clear that the original result listed was any more correct than the
16695 # current one. Original result:
16698 # <li class="||">
16699 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16701 Fuzz testing: Parser25 (bug 6055)
16707 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16709 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16714 Fuzz testing: URL adjacent extension (with space, clean)
16716 http://example.com <nowiki>junk</nowiki>
16718 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16721 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16725 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16727 http://example.com<nowiki>junk</nowiki>
16729 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16732 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16736 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16738 http://example.com<pre>junk</pre>
16740 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16743 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16748 <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>
16752 Fuzz testing: image with bogus manual thumbnail
16754 [[Image:foobar.jpg|thumbnail= ]]
16756 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16759 <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>
16763 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16765 <pre dir=" "></pre>
16767 <pre dir=" "></pre>
16772 Parsing optional HTML elements (Bug 6171)
16777 <td> Some tabular data</td>
16778 <td> More tabular data ...
16779 <td> And yet som tabular data</td>
16785 <td> Some tabular data</td>
16786 <td> More tabular data ...
16787 </td><td> And yet som tabular data</td>
16794 Correct handling of <td>, <tr> (Bug 6171)
16799 <td> Some tabular data</td>
16800 <td> More tabular data ...</td>
16801 <td> And yet som tabular data</td>
16807 <td> Some tabular data</td>
16808 <td> More tabular data ...</td>
16809 <td> And yet som tabular data</td>
16817 Parsing crashing regression (fr:JavaScript)
16821 <p></body></x>
16826 Inline wiki vs wiki block nesting
16832 <p><b>Bold paragraph</b>
16833 </p><p>New wiki paragraph
16837 # FIXME: The current php output is documented
16838 # and desired output is the parsoid target.
16840 Inline HTML vs wiki block nesting
16846 <p><b>Bold paragraph
16847 </p><p>New wiki paragraph</b>
16850 <p><b>Bold paragraph</b>
16851 </p><p>New wiki paragraph
16855 # Original result was this:
16856 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16858 # While that might be marginally more intuitive, maybe, the six-apostrophe
16859 # construct is clearly pathological and the result stated here (which is what
16860 # the parser actually does) is about as reasonable as anything.
16862 Mixing markup for italics and bold
16865 '''bold''''''bold''bolditalics'''''
16867 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16875 Article for special page transclusion test
16879 Special page transclusion
16882 {{Special:Prefixindex/Xyzzyx}}
16884 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16889 Special page transclusion twice (bug 5021)
16892 {{Special:Prefixindex/Xyzzyx}}
16893 {{Special:Prefixindex/Xyzzyx}}
16895 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16896 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16901 Transclusion of default MediaWiki message
16903 {{MediaWiki:Mainpage}}
16910 Transclusion of nonexistent MediaWiki message
16912 {{MediaWiki:Mainpagexxx}}
16914 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16919 Transclusion of MediaWiki message with underscore
16921 {{MediaWiki:history_short}}
16928 Transclusion of MediaWiki message with space
16930 {{MediaWiki:history short}}
16937 Invalid header with following text
16947 Section extraction test (section 0)
16967 Section extraction test (section 1)
16989 Section extraction test (section 2)
17010 Section extraction test (section 3)
17030 Section extraction test (section 4)
17054 Section extraction test (section 5)
17074 Section extraction test (section 6)
17095 Section extraction test (section 7)
17115 Section extraction test (section 8)
17135 Section extraction test (section 9)
17156 Section extraction test (section 10)
17176 Section extraction test (nonexistent section 11)
17195 Section extraction test with bogus heading (section 1)
17200 ==bogus== not a legal section
17204 ==bogus== not a legal section
17208 Section extraction test with bogus heading (section 2)
17213 ==bogus== not a legal section
17220 Section extraction test with comment after heading (section 1)
17232 Section extraction test with comment after heading (section 2)
17244 Section extraction test with bogus <nowiki> heading (section 1)
17249 ==bogus== <nowiki>not a legal section</nowiki>
17253 ==bogus== <nowiki>not a legal section</nowiki>
17257 Section extraction test with bogus <nowiki> heading (section 2)
17262 ==bogus== <nowiki>not a legal section</nowiki>
17268 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17269 # instead of respecting commented sections
17271 Section extraction prefixed by comment (section 1)
17282 Section extraction prefixed by comment (section 2)
17292 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17293 # instead of respecting HTML-style headings
17295 Section extraction, mixed wiki and html (section 1)
17311 Section extraction, mixed wiki and html (section 2)
17327 # Formerly testing for bug 3342
17329 Section extraction, heading surrounded by <noinclude>
17333 <noinclude>==unmarked==</noinclude>
17339 # Test behavior of bug 19910
17341 Sectiion with all-equals
17346 The line above must have a trailing space
17349 But just in case it doesn't...
17353 But just in case it doesn't...
17357 Section replacement test (section 0)
17388 Section replacement test (section 1)
17417 Section replacement test (section 2)
17447 Section replacement test (section 3)
17478 Section replacement test (section 4)
17505 Section replacement test (section 5)
17536 Section replacement test (section 6)
17566 Section replacement test (section 7)
17597 Section replacement test (section 8)
17628 Section replacement test (section 9)
17657 Section replacement test (section 10)
17687 Section replacement test with initial whitespace (bug 13728)
17691 Preformatted initial line
17695 Preformatted initial line
17702 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17714 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17727 Section extraction, <pre> around bogus header (bug 10309)
17744 Section replacement, <pre> around bogus header (bug 10309)
17746 noxml replace=2,"xxx"
17766 Handling of 
 in URLs
17770 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17773 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17775 a</a></li></ul></li></ul>
17779 Handling of %0A in URLs
17783 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17786 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17790 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17792 5 quotes, code coverage +1 line
17799 <p><b><i></i></b></p>
17802 # same html as previous, but wikitext adjusted to match parsoid html2wt
17803 # note that wt2html and html2html will put the <i> before the <b>
17805 5 quotes, code coverage +1 line w/ nowiki (1)
17807 parsoid=wt2wt,html2wt
17809 '''''<nowiki/>'''''
17814 <p><b><i></i></b></p>
17817 # same as previous, just swapping the <i> and <b>
17819 5 quotes, code coverage +1 line w/ nowiki (2)
17821 '''''<nowiki/>'''''
17826 <p><i><b></b></i></p>
17830 Special:Search page linking.
17834 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17839 {{!}} is a magic word
17841 {{!}} is a magic word there and {{!}} is still a magic word here
17843 <p>| is a magic word there and | is still a magic word here
17846 <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>
17852 title=[[Parser test]]
17857 * {{FULLPAGENAMEE}}
17859 * {{BASEPAGENAMEE}}
17863 * {{ROOTPAGENAMEE}}
17865 * {{TALKPAGENAMEE}}
17866 * {{SUBJECTPAGENAME}}
17867 * {{SUBJECTPAGENAMEE}}
17870 * {{NAMESPACENUMBER}}
17874 * {{SUBJECTSPACEE}}
17875 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17877 <ul><li> Parser test</li>
17878 <li> Parser_test</li>
17879 <li> Parser test</li>
17880 <li> Parser_test</li>
17881 <li> Parser test</li>
17882 <li> Parser_test</li>
17883 <li> Parser test</li>
17884 <li> Parser_test</li>
17885 <li> Parser test</li>
17886 <li> Parser_test</li>
17887 <li> Talk:Parser test</li>
17888 <li> Talk:Parser_test</li>
17889 <li> Parser test</li>
17890 <li> Parser_test</li>
17898 <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>
17901 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17911 image4 |300px| centre
17912 image5.svg| http://///////
17917 <ul class="gallery mw-gallery-traditional">
17918 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17919 <div class="thumb" style="height: 150px;">Image1.png</div>
17920 <div class="gallerytext">
17923 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17924 <div class="thumb" style="height: 150px;">Image2.gif</div>
17925 <div class="gallerytext">
17930 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17931 <div class="thumb" style="height: 150px;">Image3</div>
17932 <div class="gallerytext">
17935 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17936 <div class="thumb" style="height: 150px;">Image4</div>
17937 <div class="gallerytext">
17942 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17943 <div class="thumb" style="height: 150px;">Image5.svg</div>
17944 <div class="gallerytext">
17945 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17949 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17950 <div class="thumb" style="height: 150px;">* image6</div>
17951 <div class="gallerytext">
17959 Gallery (with options)
17961 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17962 File:Nonexistent.jpg|caption
17963 File:Nonexistent.jpg
17964 image:foobar.jpg|some '''caption''' [[Main Page]]
17966 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17969 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17970 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17971 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17972 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17973 <div class="gallerytext">
17978 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17979 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17980 <div class="gallerytext">
17983 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17984 <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>
17985 <div class="gallerytext">
17986 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17990 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17991 <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>
17992 <div class="gallerytext">
17995 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17996 <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>
17997 <div class="gallerytext">
18007 Gallery with link that has fragment
18010 image:foobar.jpg|link=Main_Page
18011 image:foobar.jpg|link=Main_Page#section
18012 image:foobar.jpg|link=Main Page#section|caption
18015 <ul class="gallery mw-gallery-traditional">
18016 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18017 <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>
18018 <div class="gallerytext">
18021 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18022 <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>
18023 <div class="gallerytext">
18026 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18027 <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>
18028 <div class="gallerytext">
18038 Gallery with wikitext inside caption
18041 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18042 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18045 <ul class="gallery mw-gallery-traditional">
18046 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18047 <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>
18048 <div class="gallerytext">
18049 <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>
18053 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18054 <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>
18055 <div class="gallerytext">
18056 <p>This is a test template
18065 gallery (with showfilename option)
18067 <gallery showfilename>
18068 File:Nonexistent.jpg|caption
18069 File:Nonexistent.jpg
18070 image:foobar.jpg|some '''caption''' [[Main Page]]
18074 <ul class="gallery mw-gallery-traditional">
18075 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18076 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18077 <div class="gallerytext">
18078 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18083 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18084 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18085 <div class="gallerytext">
18086 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18090 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18091 <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>
18092 <div class="gallerytext">
18093 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18094 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18098 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18099 <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>
18100 <div class="gallerytext">
18101 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18110 Gallery (with namespace-less filenames)
18113 File:Nonexistent.jpg
18119 <ul class="gallery mw-gallery-traditional">
18120 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18121 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18122 <div class="gallerytext">
18125 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18126 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18127 <div class="gallerytext">
18130 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18131 <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>
18132 <div class="gallerytext">
18135 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18136 <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>
18137 <div class="gallerytext">
18145 HTML Hex character encoding (spells the word "JavaScript")
18147 parsoid=wt2html,wt2wt,html2html
18149 JavaScript
18151 <p>JavaScript
18156 <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>
18160 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18164 <p>&#xsee;&#XSEE;
18167 <p>&#xsee;&#XSEE;</p>
18171 HTML Hex character encoding mixed case
18173 parsoid=wt2html,wt2wt,html2html
18182 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18185 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18186 # Note that U+000C (form feed) is not a valid XML character, so
18187 # it is banned even though allowed in HTML5.
18189 Illegal character references (T106578)
18194 ; Control (low): 
18195 ; Control (high):  Ÿ
18196 ; Surrogate: ��
18197 ; This is an okay astral character: 💩
18206 <dt>Control (low)</dt>
18208 <dt>Control (high)</dt>
18209 <dd>&#x7F; &#x9F;</dd>
18211 <dd>&#xD83D;&#xDCA9;</dd>
18212 <dt>This is an okay astral character</dt>
18218 __FORCETOC__ override
18230 ISBN 978-0-1234-56 789
18232 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18235 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18237 <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>
18241 ISBN followed by 5 spaces
18252 ISBN ISBN 1234567890
18254 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18257 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18260 # Uppercase X and lowercase x as well
18271 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18272 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18273 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18274 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18275 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18276 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18279 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18280 <a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18281 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18282 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18283 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18284 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18288 ISBN with empty prefix (parsoid test)
18292 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18295 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
18299 Bug 22905: <abbr> followed by ISBN followed by </a>
18301 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18303 <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>
18306 <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>
18314 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18319 Double RFC with a wiki link
18323 <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>
18332 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18335 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18339 Centre-aligned image
18341 [[Image:foobar.jpg|centre]]
18343 <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>
18350 [[Image:foobar.jpg|none]]
18352 <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>
18357 Width + Height sized image (using px) (height is ignored)
18359 [[Image:foobar.jpg|640x480px]]
18361 <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>
18366 Width-sized image (using px, no following whitespace)
18368 [[Image:foobar.jpg|640px]]
18370 <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>
18375 Width-sized image (using px, with following whitespace - test regression from r39467)
18377 [[Image:foobar.jpg|640px ]]
18379 <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>
18384 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18386 [[Image:foobar.jpg| 640px]]
18388 <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>
18393 Image with page parameter
18397 [[File:LoremIpsum.djvu|page=2]]
18399 <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>
18402 <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>
18406 Another italics / bold test
18414 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18420 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18423 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18428 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18430 Images with the "|" character in the comment
18432 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18434 <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>
18437 <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>
18441 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18443 <html><script>alert(1);</script></html>
18445 <p><html><script>alert(1);</script></html>
18450 HTML with raw HTML ($wgRawHtml==true)
18454 <html><script>alert(1);</script></html>
18456 <p><script>alert(1);</script>
18461 Parents of subpages, one level up
18463 subpage title=[[Subpage test/L1/L2/L3]]
18467 <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>
18473 Parents of subpages, one level up, not named
18475 subpage title=[[Subpage test/L1/L2/L3]]
18479 <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>
18486 Parents of subpages, two levels up
18488 subpage title=[[Subpage test/L1/L2/L3]]
18494 <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
18495 </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>
18500 Parents of subpages, two levels up, without trailing slash or name.
18502 subpage title=[[Subpage test/L1/L2/L3]]
18511 Parents of subpages, two levels up, with lots of extra trailing slashes.
18513 subpage title=[[Subpage test/L1/L2/L3]]
18517 <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>
18522 Subpage test/L1/L2/L3Sibling
18528 Transclusion of a sibling page (one level up)
18530 subpage title=[[Subpage test/L1/L2/L3]]
18539 Transclusion of a child page
18541 subpage title=[[Subpage test/L1/L2]]
18550 Non-transclusion because of too many up levels
18552 subpage title=[[Subpage test/L1/L2/L3]]
18554 {{../../../../More than parent}}
18556 <p>{{../../../../More than parent}}
18561 Definition list code coverage
18567 <dl><dt> title  </dt>
18569 <dt> title </dt>
18575 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18576 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18577 <dt>title</dt><dd> def</dd></dl>
18581 Don't fall for the self-closing div
18583 <div>hello world</div/>
18585 <div>hello world</div>
18594 <p>[[:Template:Msg]]
18603 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18607 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18609 Always escape literal '>' in output, not just after '<'
18623 <p>This is a test template
18624 This is a test template
18636 Inclusion of !userCanEdit() content
18640 <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>
18646 Out-of-order TOC heading levels
18655 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18657 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18659 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18660 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18663 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18665 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18666 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18672 <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>
18673 <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>
18674 <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>
18675 <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>
18676 <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>
18677 <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>
18683 ISBN with a dummy number
18693 ISBN with space-delimited number
18697 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18703 ISBN with multiple spaces, no number
18722 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18723 </p><p>ISBN 12345678901
18729 ISBN with trailing year (bug 8110)
18731 ISBN 1-234-56789-0 - 2006
18733 ISBN 1 234 56789 0 - 2006
18735 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18736 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18744 {{anchorencode:foo bar©#%n}}
18746 <p>foo_bar.C2.A9.23.25n
18751 anchorencode trims spaces
18753 {{anchorencode: __pretty__please__}}
18760 anchorencode deals with links
18762 {{anchorencode: [[hello|world]] [[hi]]}}
18769 anchorencode deals with templates
18771 {{anchorencode: {{Foo}} }}
18778 anchorencode encodes like the TOC generator: (bug 18431)
18780 === _ +:.3A%3A&&]] ===
18781 {{anchorencode: _ +:.3A%3A&&]] }}
18784 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18785 <p>.2B:.3A.253A.26.26.5D.5D
18790 Bug 6200: blockquotes and paragraph formatting
18811 Bug 8293: Use of center tag ruins paragraph formatting
18832 Parsing of overlapping (improperly nested) inline html tags
18834 <span><s>x</span></s>
18836 <p><span><s>x</span></s></span>
18839 <p><span><s>x</s></span>
18844 ### Language variants related tests
18847 Self-link in language variants
18849 title=[[Dunav]] language=sr
18851 Both [[Dunav]] and [[Дунав]] are names for this river.
18853 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18864 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
18866 title=[[Duna]] language=sr
18868 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
18870 <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.
18875 Link to a section of a variant of this title shouldn't be parsed as self-link
18877 title=[[Duna]] language=sr
18879 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
18881 <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.
18886 Link to pages in language variants
18890 Main Page can be written as [[Маин Паге]]
18892 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18898 Multiple links to pages in language variants
18902 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18904 <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>.
18910 Simple template in language variants
18916 <p>This is a test template
18922 Template with explicit namespace in language variants
18928 <p>This is a test template
18934 Basic test for template parameter in language variants
18938 {{парамтест|param=foo}}
18940 <p>This is a test template with parameter foo
18946 Simple category in language variants
18950 [[Category:МедиаWики Усер'с Гуиде]]
18952 <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>
18969 Don't convert blue categorylinks to another variant (bug 33210)
18973 [[A]][[Category:分类]]
18975 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18980 Stripping -{}- tags (language variants)
18984 Latin proverb: -{Ne nuntium necare}-
18986 <p>Latin proverb: Ne nuntium necare
18992 Prevent conversion with -{}- tags (language variants)
18994 language=sr variant=sr-ec
18996 Latinski: -{Ne nuntium necare}-
18998 <p>Латински: Ne nuntium necare
19004 Prevent conversion of text with -{}- tags (language variants)
19006 language=sr variant=sr-ec
19008 Latinski: -{Ne nuntium necare}-
19010 <p>Латински: Ne nuntium necare
19016 Prevent conversion of links with -{}- tags (language variants)
19018 language=sr variant=sr-ec
19022 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19028 -{}- tags within headlines (within html for parserConvert())
19030 language=sr variant=sr-ec
19034 <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>
19040 Explicit definition of language variant alternatives
19042 language=zh variant=zh-tw
19044 -{zh:China;zh-tw:Taiwan}-, not China
19046 <p>Taiwan, not China
19052 Conversion around HTML tags
19054 language=sr variant=sr-ec
19056 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19057 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19060 <span title="ЛаCтин">ски</span>
19066 Explicit session-wise language variant mapping (A flag and - flag)
19068 language=zh variant=zh-tw
19070 Taiwan is not China.
19071 But -{A|zh:China;zh-tw:Taiwan}- is China,
19072 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19073 and -{China}- is China.
19075 <p>Taiwan is not China.
19076 But Taiwan is Taiwan,
19077 (This should be stripped!)
19078 and China is China.
19083 Explicit session-wise language variant mapping (H flag for hide)
19085 language=zh variant=zh-tw
19087 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19090 <p>(This should be stripped!)
19096 Adding explicit conversion rule for title (T flag)
19098 language=zh variant=zh-tw showtitle
19100 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19103 <p>Should be stripped!
19108 Testing that changing the language variant here in the tests actually works
19110 language=zh variant=zh showtitle
19112 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19115 <p>Should be stripped!
19120 Recursive conversion of alt and title attrs shouldn't clear converter state
19122 language=zh variant=zh-cn showtitle
19124 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19125 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19129 Should be stripped<span title="Exclamation">!</span>
19134 Bug 24072: more test on conversion rule for title
19136 language=zh variant=zh-tw showtitle
19138 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19139 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19142 <p>This should be stripped!
19143 This won't take interferes with the title rule.
19148 Partly disable title conversion if variant == main language code
19150 language=zh variant=zh title=[[ZH]] showtitle
19152 -{T|zh-cn:CN;zh-tw:TW}-
19160 Partly disable title conversion if variant == main language code, more
19162 language=zh variant=zh title=[[ZH]] showtitle
19172 Raw output of variant escape tags (R flag)
19174 language=zh variant=zh-tw
19176 Raw: -{R|zh:China;zh-tw:Taiwan}-
19178 <p>Raw: zh:China;zh-tw:Taiwan
19183 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19185 language=zh variant=zh-cn
19187 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19194 Conversion rules from [numeric-only string] to [something else] (T48634)
19196 language=zh variant=zh-cn
19198 -{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
19205 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19207 language=zh variant=zh-cn
19209 -{H|zh-cn:foo;zh-tw:;}-foobar
19216 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19218 language=zh variant=zh-cn
19220 -{H|=>zh-cn:foo;}-foobar
19227 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19229 language=zh variant=zh-cn
19238 Nested using of manual convert syntax
19240 language=zh variant=zh-hk
19242 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19244 <p>Nested: Hello Hong Kong!
19249 Proper conversion of text in external links
19251 language=sr variant=sr-ec
19253 http://www.google.com
19254 gopher://www.google.com
19255 [http://www.google.com http://www.google.com]
19256 [gopher://www.google.com gopher://www.google.com]
19257 [https://www.google.com irc://www.google.com]
19258 [ftp://www.google.com www.google.com/ftp://dir]
19259 [//www.google.com www.google.com]
19261 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19262 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19263 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19264 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19265 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19266 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19267 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19272 Do not convert roman numbers to language variants
19274 language=sr variant=sr-ec
19278 <p>Фридрих IV је цар.
19283 Unclosed language converter markup "-{"
19294 Don't convert raw rule "-{R|=>}-" to "=>"
19305 Don't break link parsing if language converter markup is in the caption.
19307 language=sr variant=sr-ec
19309 [[Main Page|-{R|main page}-]]
19311 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19315 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19317 Don't break image parsing if language converter markup is in the caption.
19321 [[File:Foobar.jpg|-{R|caption}-]]
19323 <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>
19327 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19329 Don't break list handling if language converter markup is in the item.
19331 language=zh variant=zh-cn
19333 ;-{zh-cn:AAA;zh-tw:BBB}-
19335 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19342 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19344 Don't break table handling if language converter markup is in the cell.
19346 language=sr variant=sr-ec
19369 Bug 529: Uncovered bullet
19378 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19379 # Templates in Wikipedia rely on this behavior, as tidy has always been
19380 # enabled there. These tests are normally run *without* tidy, so specify the
19381 # full output here.
19382 # To test realistic parsing behavior, apply a tidy-like transformation to both
19383 # the expected output and your parser's output.
19385 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19387 ******* Foo {{bullet}}
19389 <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>
19395 Bug 529: Uncovered table already at line-start
19418 Bug 529: Uncovered bullet in parser function result
19420 * Foo {{lc:{{bullet}} }}
19428 Bug 5678: Double-parsed template argument
19430 {{lc:{{{1}}}|hello}}
19437 Bug 5678: Double-parsed template invocation
19439 {{lc:{{paramtest {{!}} param = hello }} }}
19441 <p>{{paramtest | param = hello }}
19446 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19449 title=[[Main Page]]
19451 {{PRVNÍVELKÉ:ěščř}}
19452 {{prvnívelké:ěščř}}
19472 Morwen/13: Unclosed link followed by heading
19479 <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>
19484 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19491 <h1><span class="mw-headline" id="heading">heading</span></h1>
19496 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19503 <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>
19518 Paragraphs inside divs (no extra line breaks)
19530 Paragraphs inside divs (extra line break on open)
19545 Paragraphs inside divs (extra line break on close)
19560 Paragraphs inside divs (extra line break on open and close)
19577 Nesting tags, paragraphs on lines which begin with <div>
19579 <div></div><strong>A
19582 <p><strong>A</strong></p>
19583 <p><strong>B</strong></p>
19591 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19593 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19595 <blockquote>Line one
19597 Line two</blockquote>
19599 <blockquote>Line one
19600 Line two</blockquote>
19604 <p>Line one Line two</p>
19609 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19614 Line two</blockquote>
19619 Line two</blockquote>
19624 Line two</blockquote>
19628 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19630 <blockquote>Line one
19635 <blockquote>Line one
19648 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19670 Paragraphs inside blockquotes/divs (no extra line breaks)
19672 <blockquote><div>Line one
19674 Line two</div></blockquote>
19676 <blockquote><div>Line one
19677 Line two</div></blockquote>
19682 Paragraphs inside blockquotes/divs (extra line break on open)
19687 Line two</div></blockquote>
19692 Line two</div></blockquote>
19697 Paragraphs inside blockquotes/divs (extra line break on close)
19699 <blockquote><div>Line one
19702 </div></blockquote>
19704 <blockquote><div>Line one
19707 </div></blockquote>
19712 Paragraphs inside blockquotes/divs (extra line break on open and close)
19718 </div></blockquote>
19724 </div></blockquote>
19729 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19731 wgLinkHolderBatchSize=0
19737 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19738 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19739 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19744 Free external link invading image caption
19746 [[Image:Foobar.jpg|thumb|http://x|hello]]
19748 <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>
19753 Bug 15196: localised external link numbers
19757 [http://en.wikipedia.org/]
19759 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19762 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19766 Multibyte character in padleft
19768 {{padleft:-Hello|7|Æ}}
19775 Multibyte character in padright
19777 {{padright:Hello-|7|Æ}}
19784 formatdate parser function
19786 {{#formatdate:2009-03-24}}
19788 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19793 formatdate parser function, with default format
19795 {{#formatdate:2009-03-24|mdy}}
19797 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19802 Spacing of numbers in formatted dates
19804 {{#formatdate:January 15}}
19806 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19811 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
19813 language=nl title=[[MediaWiki:Common.css]]
19815 {{#formatdate:2009-03-24|dmy}}
19817 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19830 Edit comment with link
19834 I like the [[Main Page]] a lot
19836 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19840 Edit comment with link and link text
19844 I like the [[Main Page|best pages]] a lot
19846 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19850 Edit comment with link and link text with suffix
19854 I like the [[Main Page|best page]]s a lot
19856 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19860 Edit comment with section link (non-local, eg in history list)
19862 comment title=[[Main Page]]
19864 /* External links */ removed bogus entries
19866 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19870 Edit comment with section link and text before it (non-local, eg in history list)
19872 comment title=[[Main Page]]
19874 pre-comment text /* External links */ removed bogus entries
19876 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>
19880 Edit comment with section link (local, eg in diff view)
19882 comment local title=[[Main Page]]
19884 /* External links */ removed bogus entries
19886 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19890 Edit comment with subpage link (bug 14080)
19894 title=[[Subpage test]]
19896 Poked at a [[/subpage]] here...
19898 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
19902 Edit comment with subpage link and link text (bug 14080)
19906 title=[[Subpage test]]
19908 Poked at a [[/subpage|neat little page]] here...
19910 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
19914 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
19917 title=[[Subpage test]]
19919 Poked at a [[/subpage]] here...
19921 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
19925 Edit comment with bare anchor link (local, as on diff)
19929 title=[[Main Page]]
19933 <a href="#section">#section</a>
19937 Edit comment with bare anchor link (non-local, as on history)
19940 title=[[Main Page]]
19944 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19948 Anchor starting with underscore
19952 <p><a href="#_ref">One</a>
19957 Id starting with underscore
19959 <div id="_ref"></div>
19961 <div id="_ref"></div>
19966 Space normalisation on autocomment (bug 22784)
19969 title=[[Main Page]]
19971 /* __hello__world__ */
19973 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19977 percent-encoding and + signs in comments (Bug 26410)
19981 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19983 <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>
19986 # Parsoid doesn't support this yet: see bug 73581
19987 # but it *should* omit the 'src' attribute if the image is bad.
19988 # PHP side of tests was disabled in
19989 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19990 # because of issues in the PHP parserTests infrastructure
19991 # (but the output below is indeed what the PHP side emits)
19993 Bad images - basic functionality
19996 !! DISABLED/html/php
19998 <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>
20002 Bad images - bug 16039: text after bad image disappears
20007 !! DISABLED/html/php
20013 <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>
20018 Verify that displaytitle works (bug #22501) no displaytitle
20022 wgAllowDisplayTitle=true
20023 wgRestrictDisplayTitle=false
20025 this is not the the title
20028 <p>this is not the the title
20033 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20038 wgAllowDisplayTitle=true
20039 wgRestrictDisplayTitle=false
20041 this is not the the title
20042 {{DISPLAYTITLE:whatever}}
20045 <p>this is not the the title
20050 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20055 wgAllowDisplayTitle=true
20056 wgRestrictDisplayTitle=true
20058 this is not the the title
20059 {{DISPLAYTITLE:whatever}}
20062 <p>this is not the the title
20067 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20072 wgAllowDisplayTitle=true
20073 wgRestrictDisplayTitle=true
20075 this is not the the title
20076 {{DISPLAYTITLE:screen}}
20079 <p>this is not the the title
20084 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20089 wgAllowDisplayTitle=false
20091 this is not the the title
20092 {{DISPLAYTITLE:screen}}
20095 <p>this is not the the title
20096 <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>
20101 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20106 wgAllowDisplayTitle=false
20108 this is not the the title
20111 <p>this is not the the title
20116 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20121 wgAllowDisplayTitle=true
20122 wgRestrictDisplayTitle=true
20124 this is not the the title
20125 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20127 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20128 <p>this is not the the title
20133 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20138 wgAllowDisplayTitle=true
20139 wgRestrictDisplayTitle=true
20141 this is not the the title
20142 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20144 <span style="color: red;">s</span>creen
20145 <p>this is not the the title
20150 Page status indicators: Empty name is invalid
20154 <indicator name=" "></indicator>
20155 <indicator></indicator>
20157 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20158 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20163 Page status indicators: Weird syntaxes that are okay
20167 <indicator name="empty" />
20168 <indicator name="name"></indicator>
20177 Page status indicators: Torture test
20181 <indicator name="01">hello world</indicator>
20182 <indicator name="02">[[Main Page]]</indicator>
20183 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20184 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20185 <indicator name="05">* foo
20187 <indicator name="06"><nowiki>foo</nowiki></indicator>
20188 <indicator name="07"> Preformatted</indicator>
20189 <indicator name="08"><div>Broken tag</indicator>
20190 <indicator name="09">{| class=wikitable
20193 <indicator name="10">Two
20195 paragraphs</indicator>
20198 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20199 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" />
20200 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>
20201 05=<ul><li> foo</li>
20205 07=<pre>Preformatted
20207 08=<div>Broken tag</div>
20209 09=<table class="wikitable">
20226 preload: check <noinclude> and <includeonly>
20230 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20236 preload: check <onlyinclude>
20240 Goodbye <onlyinclude>Hello world</onlyinclude>
20246 preload: can pass tags through if we want to
20250 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20252 <includeonly>Hello world</includeonly>
20256 preload: check that it doesn't try to do tricks
20260 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20262 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20266 Play a bit with r67090 and bug 3158
20268 <div style="width:50% !important"> </div>
20269 <div style="width:50% !important"> </div>
20270 <div style="width:50% !important"> </div>
20271 <div style="border : solid;"> </div>
20273 <div style="width:50% !important"> </div>
20274 <div style="width:50% !important"> </div>
20275 <div style="width:50% !important"> </div>
20276 <div style="border : solid;"> </div>
20279 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20280 <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>
20281 <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>
20282 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20287 HTML5 data attributes
20289 <span data-foo="bar">Baz</span>
20290 <p data-abc-def_hij="">Quuz</p>
20292 <p><span data-foo="bar">Baz</span>
20294 <p data-abc-def_hij="">Quuz</p>
20299 percent-encoding and + signs in internal links (Bug 26410)
20301 [[User:+%]] [[Page+title%]]
20302 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20303 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20304 [[%33%45]] [[%33%45+]]
20306 <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>
20307 <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>
20308 <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>
20309 <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>
20312 <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>
20313 <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>
20314 <a rel="mw:WikiLink" href="%25" title="%">%</a> <a rel="mw:WikiLink" href="+" title="+">+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Bar&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;bar&quot;},&quot;dsr&quot;:[94,101,2,2]}\">bar</a>"}'><a href="./File:%25+abc9"><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
20315 <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>
20319 Special characters in embedded file links (bug 27679)
20321 [[File:Contains & ampersand.jpg]]
20322 [[File:Does not exist.jpg|Title with & ampersand]]
20324 <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>
20325 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20328 <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>
20329 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"Title with &amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
20333 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20335 Text's been normalized?
20337 <p>Text's been normalized?
20342 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20344 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20346 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20351 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20353 [http://www.example.org/ ideograms]
20355 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20360 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20362 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20364 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20388 Bug 31098 Template which includes system messages which includes the template
20392 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20393 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20398 Bug31490 Turkish: ucfirst 'blah'
20409 Bug31490 Turkish: ucfirst 'ix'
20420 Bug31490 Turkish: lcfirst 'BLAH'
20431 Bug31490 Turkish: ucfırst (with a dotless i)
20437 <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>
20442 Bug31490 ucfırst (with a dotless i) with English language
20448 <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>
20453 Bug 26375: TOC with italics
20455 title=[[Main Page]]
20458 == ''Lost'' episodes ==
20460 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20462 <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>
20466 <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>
20471 Bug 26375: TOC with bold
20473 title=[[Main Page]]
20476 == '''should be bold''' then normal text ==
20478 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20480 <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>
20484 <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>
20489 Bug 33845: Headings become cursive in TOC when they contain an image
20491 title=[[Main Page]]
20494 == Image [[Image:foobar.jpg]] ==
20496 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20498 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20502 <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>
20507 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20509 title=[[Main Page]]
20512 == <blockquote>Quote</blockquote> ==
20514 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20516 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20520 <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>
20524 <div id="toc" class="toc">
20525 <div id="toctitle">
20529 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20533 <h2><span class="mw-headline" id="Quote"></span></h2>
20535 <p><span class="mw-headline" id="Quote">Quote</span></p>
20537 <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>
20541 Unclosed tags in TOC
20543 title=[[Main Page]]
20547 <small>Hanc marginis exiguitas non caperet.</small>
20550 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20552 <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>
20556 <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>
20557 <p><small>Hanc marginis exiguitas non caperet.</small>
20563 Multiple tags in TOC
20566 == <i>Foo</i> <b>Bar</b> ==
20568 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20570 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20572 <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>
20573 <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>
20577 <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>
20578 <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>
20582 <div id="toc" class="toc">
20583 <div id="toctitle">
20587 <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>
20588 <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>
20592 <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>
20593 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20595 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20597 <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>
20601 Tags with parameters in TOC
20604 == <sup class="in-h2">Hello</sup> ==
20606 == <sup class="a > b">Evilbye</sup> ==
20608 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20610 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20611 <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>
20615 <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>
20616 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup class="a"> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
20621 span tags with directionality in TOC
20624 == <span dir="ltr">C++</span> ==
20626 == <span dir="rtl">זבנג!</span> ==
20628 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20630 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20632 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20634 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20636 <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>
20637 <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>
20638 <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>
20639 <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>
20640 <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>
20644 <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>
20645 <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>
20646 <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>
20647 <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>
20648 <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>
20653 Bug 72884: bdi element in ToC
20656 == <bdi>test</bdi> ==
20658 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20660 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20664 <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>
20668 # Note that the html output does not have the <p></p>, but the
20669 # html+tidy output *does*. This is because the empty <p></p> is
20670 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20672 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20677 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20679 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20683 <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>
20687 <div id="toc" class="toc">
20688 <div id="toctitle">
20692 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20696 <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>
20702 == {{int:headline_sample}} ==
20706 Bug 32057: Title needed when expanding <h> nodes.
20708 title=[[Main Page]]
20712 <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>
20717 Strip marker in urlencode
20719 {{urlencode:x<nowiki/>y}}
20720 {{urlencode:x<nowiki/>y|wiki}}
20721 {{urlencode:x<nowiki/>y|path}}
20722 {{urlencode:x<pre id="one">two</pre>y}}
20750 Strip marker in formatNum
20752 {{formatnum:1<nowiki/>2}}
20753 {{formatnum:1<nowiki/>2|R}}
20761 Check noCommafy in formatNum
20765 {{formatnum:123456.78}}
20766 {{formatnum:123456.78|NOSEP}}
20774 Wrong option for formatNum (bug 56199)
20776 {{formatnum:1,234.56|Random}}
20777 {{formatnum:1,234.56|EVERYTHING}}
20778 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20787 Strip marker in grammar
20791 {{grammar:elative|foo<nowiki/>bar}}
20798 Strip marker in padleft
20800 {{padleft:|2|x<nowiki/>y}}
20807 Strip marker in padright
20809 {{padright:|2|x<nowiki/>y}}
20816 Strip marker in anchorencode
20818 {{anchorencode:x<nowiki/>y}}
20825 nowiki inside link inside heading (bug 18295)
20827 ==[[foo|x<nowiki>y</nowiki>z]]==
20829 <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>
20834 new support for bdi element (bug 31817)
20836 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20838 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20843 Ignore pipe between table row attributes
20847 |- id=foo | style='color: red'
20855 <tr id="foo" style="color: red">
20862 Gallery override link with WikiLink (bug 34852)
20865 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
20868 <ul class="gallery mw-gallery-traditional">
20869 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20870 <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>
20871 <div class="gallerytext">
20881 Gallery override link with absolute external link (bug 34852)
20884 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20887 <ul class="gallery mw-gallery-traditional">
20888 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20889 <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>
20890 <div class="gallerytext">
20900 Gallery override link with malicious javascript (bug 34852)
20903 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20906 <ul class="gallery mw-gallery-traditional">
20907 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20908 <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>
20909 <div class="gallerytext">
20919 Gallery with invalid title as link (bug 43964)
20922 File:foobar.jpg|link=<
20925 <ul class="gallery mw-gallery-traditional">
20926 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20927 <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>
20928 <div class="gallerytext">
20936 Language parser function
20945 Padleft and padright as substr
20947 {{padleft:|3|abcde}}
20948 {{padright:|3|abcde}}
20956 Special parser function
20958 {{#special:RandomPage}}
20959 {{#special:BaDtItLe}}
20960 {{#special:Foobar}}
20969 Bug 34939 - Case insensitive link parsing ([HttP://])
20971 [HttP://MediaWiki.Org/]
20973 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20976 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20980 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20982 [HttP://MediaWiki.Org/ MediaWiki]
20984 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20989 Bug 34939 - Case insensitive link parsing (HttP://)
20991 HttP://MediaWiki.Org/
20993 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20996 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21014 <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>
21015 <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>
21016 <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>
21017 <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>
21018 <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>
21024 ### Parsoid-specific tests
21025 ### Parsoid-PHP parser incompatibilities
21028 1. SOL-sensitive wikitext tokens as template-args
21030 parsoid=wt2html,wt2wt
21036 <span about="#mwt1" typeof="mw:Transclusion">
21037 </span><ul about="#mwt1"><li>a</li>
21039 <span about="#mwt2" typeof="mw:Transclusion">
21040 </span><ol about="#mwt2"><li>a</li>
21042 <span about="#mwt3" typeof="mw:Transclusion">
21043 </span><dl about="#mwt3"><dd>a</dd>
21047 #### -----------------------------------------------------------------
21048 #### Parsoid-specific functionality tests
21049 #### -----------------------------------------------------------------
21051 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21052 # We know wt2wt will fail, but we expect selser to pass.
21053 # Due to the nature of our testing, wt2wt and selser tests will enter the
21054 # blacklist and we'll catch selser regressions based on changes to the
21055 # blacklist entries for selser tests.
21057 1. Bad treebuilder fixup of formatting elt is cleaned up
21059 parsoid=wt2html,wt2wt
21064 [[Image:Foobar.jpg|right|Test]]
21071 <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>
21078 2. Bad treebuilder fixup of formatting elt is cleaned up
21080 parsoid=wt2html,wt2wt
21082 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21084 <small>[[Image:Foobar.jpg|right|300px]]</small>
21088 <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>
21090 <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>
21094 3. Bad treebuilder fixup of formatting elt is cleaned up
21096 parsoid=wt2html,wt2wt
21098 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21100 <p><small><b>foo</b></small></p>
21101 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><small><b>caption</b></small></figcaption></figure>
21102 <p><small><b>bar</b></small></p>
21106 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21108 parsoid=wt2html,wt2wt
21110 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21112 <p><b><small></small></b></p>
21113 <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>
21117 #### ----------------------------------------------------------------
21118 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21119 #### tags. Parsoid's output for these tags differs from that of the
21121 #### ----------------------------------------------------------------
21124 Ref: 1. ref-location should be replaced with an index span
21129 B <ref name="x">foo</ref>
21133 <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>
21134 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>
21135 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>
21136 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21137 <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>
21138 <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>
21139 <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>
21144 Ref: 2. ref-tags with identical names should all get the same index
21148 A <ref name="x">foo</ref>
21152 <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>
21153 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>
21154 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21155 <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>
21160 Ref: 3. spaces in ref-names should be ignored
21164 A <ref name="x">foo</ref>
21165 B <ref name=" x " />
21169 <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>
21170 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>
21171 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>
21172 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21173 <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>
21177 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21179 Ref: 4. 'constructor' should be accepted as a valid ref-name
21183 A <ref name="constructor">foo</ref>
21186 <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>
21187 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21188 <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>
21193 Ref: 5. body should accept generic wikitext
21198 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21203 <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>
21205 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21206 <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>
21212 Ref: 6. indent-pres should not be output in ref-body
21224 <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>
21226 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21227 <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
21235 Ref: 7. No p-wrapping in ref-body
21254 <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>
21256 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21257 <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
21272 Ref: 8. transclusion wikitext has lower precedence
21276 A <ref> foo {{echo|</ref> B C}}
21280 <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>
21281 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21282 <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>
21287 Ref: 9. unclosed comments should not leak out of ref-body
21291 A <ref> foo <!--</ref> B C
21294 <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>
21295 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21296 <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>
21301 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21305 A <ref> <b> foo </ref> B C
21309 <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>
21312 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21313 <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>
21318 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21326 <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
21327 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>
21328 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21329 <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>
21330 <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>
21335 Ref: 12. ref-tags act as trailing newline migration barrier
21337 <!--the newline at the end of this line moves out of the p tag-->a
21339 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21345 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21348 <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>
21349 <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>
21352 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21353 <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>
21354 <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>
21358 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21367 <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
21368 <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>
21369 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21370 <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>
21371 <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
21377 Ref: 14. A nested ref-tag should be emitted as plain text
21381 <ref>foo <ref>bar</ref> baz</ref>
21385 <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>
21387 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21388 <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>
21393 Ref: 15. ref-tags with identical names should get identical indexes
21397 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21398 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21402 <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>
21403 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>
21405 <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>
21409 ## We don't bother wt2wt-ing non-standard whitespace
21411 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21419 <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>
21420 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21421 <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>
21425 Ref: 17. Generate valid HTML5 id/about attributes
21429 <ref name="a b">foo</ref>
21433 <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>
21436 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21437 <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>
21442 Ref: 18. T58916: Extension attributes should be parsed as plain text
21446 <ref name="{{echo|a}}">foo</ref>
21450 <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>
21453 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21454 <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>
21459 Ref: 19. ref-tags with identical name encodings should get identical indexes
21463 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21467 <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>
21469 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21470 <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>
21475 Ref: 20. ref-tags with identical names but different content should keep it
21479 A <ref name="foo">Foo one</ref>
21480 B <ref name="foo">Foo two</ref>
21481 C <ref name="foo" />
21485 <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>
21486 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>
21487 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>
21489 <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>
21494 References: 1. references tag without any refs should be handled properly
21498 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21502 References: 2. references tag with group only outputs references from that group
21504 A <ref group="a">foo</ref>
21505 B <ref group="b">bar</ref>
21508 <references group="a" />
21510 <references group="b" />
21512 <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>
21513 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>
21514 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>
21516 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21517 <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>
21519 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21520 <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>
21522 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21523 <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>
21528 References: 3. ref list should be cleared after processing references
21538 <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>
21540 <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>
21543 <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>
21545 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21546 <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>
21551 References: 4. only referenced group should be cleared after processing references
21553 A <ref group="a">afoo</ref>
21556 <references group="a" />
21562 <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>
21563 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>
21565 <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>
21568 <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>
21570 <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>
21575 References: 5. ref tags in references should be processed while ignoring all other content
21578 B <ref name="b">bar</ref>
21581 <ref name="a">foo</ref>
21582 This should just get lost.
21585 <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>
21586 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>
21589 <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>
21594 References: 6. <references /> from a transclusion
21596 <ref>Foo</ref> {{echo|<references />}}
21598 <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>
21603 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21605 A <ref>foo bar for a</ref>
21606 B <ref group="X" name="b" />
21610 <references group="X">
21611 <ref name="b">foo</ref>
21614 <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>
21615 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>
21618 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21619 <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>
21622 <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"}}'>
21623 <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>
21628 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21630 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21633 <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>
21634 <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>
21638 # This test only works in wt2html now as the <references /> are always generated
21639 # unless selser is active. Once T72722 is fixed, we should add a changes test
21640 # here to ensure that unrelated changes don't add the new <references /> in
21643 References: 9. Generate missing references list at the end
21646 B <ref group="inexistent">bar</ref>
21648 <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>
21649 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21650 <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>
21652 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21653 <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>
21658 References: 10. New <references/> shouldn't be added for unrelated edits.
21661 "modes": ["selser"],
21662 "changes": [["#x", "remove"]],
21666 Unrelated text<span id="x"> that's going to disappear</span>.
21674 Entities in ref name
21676 <ref name="test & me">hi</ref>
21679 <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>
21680 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21681 <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>
21685 # This test is wt2html only because we're permitting the serializer to produce
21686 # dirty diffs, normalizing the unclosed references to the self-closed version.
21688 Generate references for unclosed references tag
21696 <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>
21697 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21698 <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>
21702 New reference serializes on its own line
21704 parsoid=wt2wt,html2wt
21709 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21712 #### ----------------------------------------------------------------
21713 #### Parsoid-only testing of Parsoid's impl of LST
21714 #### Not implemented yet, see
21715 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21716 #### ----------------------------------------------------------------
21719 LST Sections: 1. Simple section start and end
21721 <section begin="2011-05-16" />
21722 <section end="2014-04-10 (MW 1.23wmf22)" />
21724 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21725 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21728 #--------- Test stripping of empty nodes in template content ----------
21730 Empty LI and TR nodes should be stripped from template content
21735 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21739 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21752 Empty LI and TR nodes should not be stripped from top-level content
21779 Empty TR nodes should not be stripped if they have any attributes set
21781 {{EmptyTRWithHTMLAttrTest}}
21783 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21784 <tr align="center"></tr>
21785 <tr><td>foo</td></tr>
21786 <tr align="center"></tr>
21787 <tr><td>bar</td></tr>
21791 #### ----------------------------------------------------------------
21792 #### The following section of tests are primarily to test
21793 #### wikitext escaping capabilities of Parsoid. Given that
21794 #### escaping can be done any number of ways, the wikitext (input)
21795 #### is always adjusted to reflect how Parsoid adds nowiki
21798 #### We are marking several tests as parsoid-only since the
21799 #### HTML in the result section is different from what the
21800 #### PHP parser generates for it.
21801 #### ----------------------------------------------------------------
21804 #### --------------- Headings ---------------
21806 #### 1. Nested inside html <h1>=foo=</h1>
21807 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21808 #### 3. Nested inside html with wikitext split by html tags
21809 #### 4. No escape needed
21810 #### 5. Empty headings <h1></h1>
21811 #### 6. Heading chars in SOL context
21812 #### ----------------------------------------
21814 Headings: 0. Unnested
21818 <nowiki>=foo=</nowiki>
21820 <nowiki> =foo= </nowiki>
21822 <nowiki>=foo=</nowiki>
21824 =foo''a''<nowiki>=</nowiki>
21826 <p><span typeof="mw:Nowiki">=foo=</span></p>
21828 <p><span typeof="mw:Nowiki"> =foo= </span>
21830 <span typeof="mw:Nowiki">=foo=</span></p>
21832 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
21835 # New headings and existing headings are handled differently
21837 Headings: 1. Nested inside html
21845 <h1 data-parsoid=''>=foo=</h1>
21846 <h2 data-parsoid=''>=foo=</h2>
21847 <h3 data-parsoid=''>=foo=</h3>
21848 <h4 data-parsoid=''>=foo=</h4>
21849 <h5 data-parsoid=''>=foo=</h5>
21850 <h6 data-parsoid=''>=foo=</h6>
21858 =<nowiki>=foo=</nowiki>=
21859 ==<nowiki>=foo=</nowiki>==
21860 ===<nowiki>=foo=</nowiki>===
21861 ====<nowiki>=foo=</nowiki>====
21862 =====<nowiki>=foo=</nowiki>=====
21863 ======<nowiki>=foo=</nowiki>======
21868 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
21877 <nowiki>*</nowiki>bar
21883 <nowiki>=bar=</nowiki>
21887 Headings: 3. Nested inside html with wikitext split by html tags
21889 parsoid=html2wt,wt2wt
21891 = ='''bold'''<nowiki>foo=</nowiki> =
21893 <h1>=<b>bold</b>foo=</h1>
21897 Headings: 4a. No escaping needed (testing just h1 and h2)
21922 <h1><i>=</i>foo=</h1>
21926 Headings: 4b. No escaping needed (inside p-tags)
21941 Headings: 5. Empty headings
21951 =====<nowiki/>=====
21953 ======<nowiki/>======
21955 <h1 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h1>
21957 <h2 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h2>
21959 <h3 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h3>
21961 <h4 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h4>
21963 <h5 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h5>
21965 <h6 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h6>
21969 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21971 <nowiki>=a=</nowiki>
21973 <nowiki>=a=</nowiki>
21975 <nowiki>=a=</nowiki>
21977 <nowiki>=a=</nowiki>
21985 <p><span typeof="mw:Nowiki">=a=</span></p>
21987 <p><span typeof="mw:Nowiki">=a=</span></p>
21989 <p><span typeof="mw:Nowiki">=a=</span></p>
21991 <p><span typeof="mw:Nowiki">=a=</span></p>
21995 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22019 <p><span typeof="mw:Nowiki">=a=
22022 <p><span typeof="mw:Nowiki">=a=
22025 <p><span typeof="mw:Nowiki">=a=
22028 <p><span typeof="mw:Nowiki">=a=
22033 Headings: 6c. Heading chars in SOL context (leading newline break)
22036 <nowiki>=b=</nowiki>
22043 <span typeof="mw:Nowiki">=b=</span>
22047 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22049 <!--c0--><nowiki>=a=</nowiki>
22051 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22057 <!--c0--><p><span typeof="mw:Nowiki">=a=</span></p>
22059 <!--c1--><p><span typeof="mw:Nowiki">=a=</span></p> <!--c2--> <!--c3-->
22063 Headings: 6d. Heading chars in SOL context (No escaping needed)
22073 Headings: 7. Insert a newline between new content and headings
22079 <h2 data-parsoid='{}'>A</h2>
22080 <p data-parsoid='{}'>a</p>
22090 #### --------------- Lists ---------------
22091 #### 0. Outside nests (*foo, etc.)
22092 #### 1. Nested inside html <ul><li>*foo</li></ul>
22093 #### 2. Inside definition lists
22094 #### 3. Only bullets at start should be escaped
22095 #### 4. No escapes needed
22096 #### 5. No unnecessary escapes
22097 #### 6. Escape bullets in SOL position
22098 #### 7. Escape bullets in a multi-line context
22099 #### ----------------------------------------
22102 Lists: 0. Outside nests
22104 <nowiki>*</nowiki>foo
22106 <nowiki>#</nowiki>foo
22108 <nowiki>;Foo:</nowiki>bar
22115 <p><span typeof="mw:Nowiki">*</span>foo</p>
22117 <p><span typeof="mw:Nowiki">#</span>foo</p>
22119 <p><span typeof="mw:Nowiki">;Foo:</span>bar</p>
22123 Lists: 1. Nested inside html
22125 *<nowiki>*foo</nowiki>
22127 *<nowiki>#foo</nowiki>
22129 *<nowiki>:foo</nowiki>
22131 *<nowiki>;foo</nowiki>
22133 #<nowiki>*foo</nowiki>
22135 #<nowiki>#foo</nowiki>
22137 #<nowiki>:foo</nowiki>
22139 #<nowiki>;foo</nowiki>
22141 <ul><li>*foo</li></ul>
22142 <ul><li>#foo</li></ul>
22143 <ul><li>:foo</li></ul>
22144 <ul><li>;foo</li></ul>
22145 <ol><li>*foo</li></ol>
22146 <ol><li>#foo</li></ol>
22147 <ol><li>:foo</li></ol>
22148 <ol><li>;foo</li></ol>
22153 Lists: 2. Inside definition lists
22155 ;<nowiki>;foo</nowiki>
22157 ;<nowiki>:foo</nowiki>
22159 ;<nowiki>:foo</nowiki>
22162 :<nowiki>:foo</nowiki>
22164 <dl><dt>;foo</dt></dl>
22165 <dl><dt>:foo</dt></dl>
22168 <dl><dd>:foo</dd></dl>
22173 Lists: 3. Only bullets at start of text should be escaped
22175 *<nowiki>*foo*bar</nowiki>
22177 *<nowiki>*foo</nowiki>''it''*bar
22179 <ul><li>*foo*bar</li></ul>
22180 <ul><li>*foo<i>it</i>*bar</li></ul>
22185 Lists: 4. No escapes needed
22206 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22210 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22216 Lists: 5. No unnecessary escapes
22218 * bar <span><nowiki>[[foo]]</nowiki></span>
22220 * =bar <span><nowiki>[[foo]]</nowiki></span>
22222 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22224 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22226 * =bar <span>foo]]</span>=
22232 <ul><li> bar <span>[[foo]]</span></li></ul>
22233 <ul><li> =bar <span>[[foo]]</span></li></ul>
22234 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22235 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22236 <ul><li> =bar <span>foo]]</span>=</li></ul>
22237 <ul><li> <s></s>: a</li></ul>
22238 <ul><li> <i>* foo</i></li></ul>
22243 Lists: 6. Escape bullets in SOL position
22247 <p><!--cmt-->*foo</p>
22249 <!--cmt--><nowiki>*</nowiki>foo
22253 Lists: 7. Escape bullets in a multi-line context
22256 <nowiki>*</nowiki>b
22264 Lists: 8. Escape colons only if not present in tags
22268 <dl><dt>a:b<i>c:d</i></dt></dl>
22270 ; <nowiki>a:b</nowiki>''c:d''
22273 #### --------------- HRs ---------------
22274 #### 1. Single line
22275 #### -----------------------------------
22278 HRs: 1. Single line
22280 ----<nowiki>----</nowiki>
22292 #### --------------- Tables ---------------
22293 #### 1a. Simple example
22294 #### 1b. No escaping needed (!foo)
22295 #### 1c. No escaping needed (|foo)
22296 #### 1d. No escaping needed (|}foo)
22298 #### 2a. Nested in td (<td>foo|bar</td>)
22299 #### 2b. Nested in td (<td>foo||bar</td>)
22300 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22302 #### 3a. Nested in th (<th>foo!bar</th>)
22303 #### 3b. Nested in th (<th>foo!!bar</th>)
22304 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22308 #### 4c. No escaping needed
22309 #### --------------------------------------
22312 Tables: 1a. Simple example
22323 Tables: 1b. No escaping needed
22332 Tables: 1c. No escaping needed
22341 Tables: 1d. No escaping needed
22350 Tables: 2a. Nested in td
22355 <td>foo|bar</td></tr>
22356 <tr><td>x<div>a|b</div></td>
22360 |<nowiki>foo|bar</nowiki>
22362 |x<div><nowiki>a|b</nowiki></div>
22378 Tables: 2b. Nested in td
22384 <td>a<i>b||c</i></td>
22385 <td>a<i><div>b||c</div></i></td>
22386 </tr></tbody></table>
22389 |<nowiki>foo||bar</nowiki>
22390 |a''<nowiki>b||c</nowiki>''
22391 |a''<div><nowiki>b||c</nowiki></div>''
22400 <td>a<i><div>b||c</div></i>
22406 Tables: 2c. Nested in td -- no escaping needed
22422 Tables: 3a. Nested in th
22438 Tables: 3b. Nested in th
22443 <tr><th>foo!!bar</th>
22444 <th><i>foo|bar</i></th>
22445 <th><i>foo!!bar</i></th>
22446 <th><i><span>foo!!bar</span></i></th>
22447 </tr></tbody></table>
22450 !<nowiki>foo!!bar</nowiki>
22451 !''<nowiki>foo|bar</nowiki>''
22452 !''<nowiki>foo!!bar</nowiki>''
22453 !''<span><nowiki>foo!!bar</nowiki></span>''
22462 <th><i>foo!!bar</i>
22464 <th><i><span>foo!!bar</span></i>
22470 Tables: 3c. Nested in th
22475 <tr><th>foo||bar</th>
22476 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22477 </tr></tbody></table>
22480 !<nowiki>foo||bar</nowiki>
22481 !<nowiki>foo||bar</nowiki>
22494 Tables: 4a. Escape -
22513 |<nowiki>-bar</nowiki>
22518 Tables: 4b. Escape +
22537 |<nowiki>+bar</nowiki>
22542 Tables: 4c. No escaping needed
22585 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22586 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22592 <div>a|b</div></td>
22597 Tables: 4d. No escaping needed
22607 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22616 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22617 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22618 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22623 Tables: Digest broken attributes on table and tr tag
22640 T97430: Don't emit empty nowiki pairs around marker meta tags
22644 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22645 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22647 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22648 <nowiki>|</nowiki>** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22652 Unclosed xmlish element in table line shouldn't eat end delimiters
22668 <tbody><tr><td> <foo</td>
22669 <td> bar></td></tr>
22673 #### --------------- Links ----------------
22674 #### 1. Quote marks in link text
22675 #### 2. Wikilinks: Escapes needed
22676 #### 3. Wikilinks: No escapes needed
22677 #### 4. Extlinks: Escapes needed
22678 #### 5. Extlinks: No escapes needed
22679 #### --------------------------------------
22681 Links 1. WikiLinks: No escapes needed
22685 [[Foo|x [Foobar] x]]
22687 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22688 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22689 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22692 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22693 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22694 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22698 Links 2. WikiLinks: Escapes needed
22702 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22703 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22704 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22705 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22706 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22707 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22708 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22709 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22710 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22711 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22713 [[Foo|<nowiki>Foobar]</nowiki>]]
22714 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22715 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22716 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22717 [[Foo|<nowiki>|Bar</nowiki>]]
22718 [[Foo|<nowiki>]]bar</nowiki>]]
22719 [[Foo|<nowiki>[[bar</nowiki>]]
22720 [[Foo|<nowiki>x [[ y</nowiki>]]
22721 [[Foo|<nowiki>x ]] y</nowiki>]]
22722 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22724 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22725 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22726 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22727 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22728 <a href="/wiki/Foo" title="Foo">|Bar</a>
22729 <a href="/wiki/Foo" title="Foo">]]bar</a>
22730 <a href="/wiki/Foo" title="Foo">[[bar</a>
22731 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22732 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22733 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22738 Links 3. WikiLinks: No escapes needed
22743 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22744 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22747 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22748 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22752 Links 4. ExtLinks: Escapes needed
22756 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22757 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22758 <p>[http://google.com]</p>
22759 <p>[http://google.com google]</p>
22761 [http://google.com <nowiki>[google]</nowiki>]
22762 [http://google.com <nowiki>google]</nowiki>]
22764 <nowiki>[http://google.com]</nowiki>
22766 <nowiki>[http://google.com google]</nowiki>
22769 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22770 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22771 </p><p>[http://google.com]
22772 </p><p>[http://google.com google]
22777 Links 5. ExtLinks: No escapes needed
22779 [http://google.com [google]
22781 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22784 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22788 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22790 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22791 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22792 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22793 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22794 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22795 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22796 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22797 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
22798 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22799 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
22800 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
22801 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
22802 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22805 x<nowiki/>http://example.com<nowiki/>y
22806 http://example.com<nowiki/>?x
22807 http://example.com<nowiki/>&x
22808 http://example.com<nowiki/>'x
22809 http://example.com<nowiki/>,x
22810 http://example.com<nowiki/>.x
22811 http://example.com<nowiki/>;x
22812 http://example.com<nowiki/>:x
22813 http://example.com<nowiki/>;x
22814 http://example.com<nowiki/>!x
22815 http://example.com<nowiki/>=x
22816 http://example.com<nowiki/>(x)
22817 http://example.com(x<nowiki/>)
22821 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22824 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22826 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22827 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22828 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22829 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22830 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22836 "http://example.com"
22837 (http://example.com)
22838 (http://example.com) foo
22839 http://example.com,
22840 http://example.com, foo
22843 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22845 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22846 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22847 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22848 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22849 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22854 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22856 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22857 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
22859 http://example.com.,;:!?\
22860 -http://example.com:
22862 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
22863 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
22868 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
22870 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
22871 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
22872 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
22876 X<nowiki/>RFC 123<nowiki/>y
22880 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
22882 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
22883 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
22884 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
22891 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
22892 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
22893 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
22898 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
22900 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
22901 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22902 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22906 X<nowiki/>PMID 123<nowiki/>y
22910 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
22912 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
22913 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
22914 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
22921 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
22922 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
22923 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
22928 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
22930 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
22931 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
22932 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
22935 ISBN 1234567890<nowiki/>1
22936 ISBN 1234567890<nowiki/>x
22937 a<nowiki/>ISBN 1234567890<nowiki/>b
22941 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
22943 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
22947 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
22952 Links 14. Protect link-like plain text. (Parsoid bug T78425)
22956 <p>this is not a link: http://example.com
22959 <nowiki>this is not a link: http://example.com</nowiki>
22963 Links 15. Link trails can't become link prefixes.
22967 [[Söfnuður]]-[[00]]
22969 <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>
22972 <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>
22975 #### --------------- Quotes ---------------
22976 #### 1. Quotes inside <b> and <i>
22977 #### 2. Link fragments separated by <i> and <b> tags
22978 #### 3. Link fragments inside <i> and <b>
22979 #### 4. No escaping needed
22980 #### --------------------------------------
22982 1a. Quotes inside <b> and <i>
22984 parsoid=html2wt,wt2wt
22987 ''<nowiki>''foo''</nowiki>''
22988 ''<nowiki>'''foo'''</nowiki>''
22990 '''<nowiki/>'foo''''
22991 '''<nowiki>''foo''</nowiki>'''
22992 '''<nowiki>'''foo'''</nowiki>'''
22993 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
22994 '''foo'''<nowiki/>'s
23000 '''foo'''<nowiki/>'
23001 ''''foo'''<nowiki/>'
23002 ''fools'<span> errand</span>''
23003 ''<span>fool</span>'s errand''
23004 '<nowiki/>''foo'' bar '''baz''
23005 a|!*#-:;+-~[]{}b'''x''
23014 <b>foo'<i>bar'</i>baz</b>
23023 <i>fools'<span> errand</span></i>
23024 <i><span>fool</span>'s errand</i>
23025 '<i>foo</i> bar '<i>baz</i>
23026 a|!*#-:;+-~[]{}b'<i>x</i>
23031 1b. Quotes inside <b> and <i> with other tags on same line
23033 parsoid=html2wt,wt2wt
23035 '''a'' foo ''[[bar]]''
23036 ''a''' foo ''[[bar]]''
23037 ''a''' foo '''{{echo|[[bar]]}}'''
23038 [[foo]] x'''[[bar]]''
23039 '''foo'' <ref>test</ref>
23040 '''foo'' <div title="name">test</div>
23041 '''foo'' and <br> bar
23044 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23045 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23046 <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>
23047 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23048 '<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>
23049 '<i>foo</i> <div title="name">test</div>
23050 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23051 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23052 <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>
23057 2. Link fragments separated by <i> and <b> tags
23059 [[''foo''<nowiki>hello]]</nowiki>
23061 [['''foo'''<nowiki>hello]]</nowiki>
23063 <p>[[<i>foo</i>hello]]
23064 </p><p>[[<b>foo</b>hello]]
23068 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23069 # this is one of the shortcomings of this format
23071 3. Link fragments inside <i> and <b>
23073 ''[[foo''<nowiki>]]</nowiki>
23075 '''[[foo'''<nowiki>]]</nowiki>
23078 </p><p><b>[[foo</b>]]
23083 4. No escaping needed
23085 '<span>''bar''</span>'
23086 '<span>'''bar'''</span>'
23089 <p>'<span><i>bar</i></span>'
23090 '<span><b>bar</b></span>'
23095 #### ----------- Paragraphs ---------------
23096 #### 1. No unnecessary escapes
23097 #### --------------------------------------
23100 1. No unnecessary escapes
23102 bar <span><nowiki>[[foo]]</nowiki></span>
23104 =bar <span><nowiki>[[foo]]</nowiki></span>
23106 [[bar <span><nowiki>[[foo]]</nowiki></span>
23108 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23110 =bar <span>foo]]</span><nowiki>=</nowiki>
23112 <p>bar <span>[[foo]]</span>
23113 </p><p>=bar <span>[[foo]]</span>
23114 </p><p>[[bar <span>[[foo]]</span>
23115 </p><p>]]bar <span>[[foo]]</span>
23116 </p><p>=bar <span>foo]]</span>=
23120 #### ----------------------- PRE --------------------------
23121 #### 1. Leading whitespace in SOL context should be escaped
23122 #### ------------------------------------------------------
23124 1. Leading whitespace in SOL context should be escaped
23128 <nowiki> </nowiki>a
23130 <nowiki> </nowiki> a
23132 <nowiki> </nowiki>a(tab)
23134 <nowiki> </nowiki> a
23136 <nowiki> </nowiki> a
23139 <nowiki> </nowiki>b
23142 <nowiki> </nowiki>b
23145 <nowiki> </nowiki> b
23151 <p><!--cmt--> a</p>
23161 2. Leading whitespace in non-indent-pre contexts should not be escaped
23169 <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>
23170 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23171 <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>
23177 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23196 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23200 [[File:Foobar.jpg|thumb|caption]]
23202 <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>
23206 5. Nowiki escaping should account for indent-pres
23216 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23229 #### --------------- Behavior Switches --------------------
23232 1. Valid behavior switches should be escaped
23239 <nowiki>__TOC__</nowiki>
23240 ''<nowiki>__TOC__</nowiki>''
23244 2. Invalid behavior switches should not be escaped
23255 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23257 Behavior switches should be SOL-transparent
23261 <!-- this one's bogus -->
23268 <meta property="mw:PageProp/toc" />
23270 <!-- this one's bogus -->
23273 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23275 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23278 #### --------------- HTML tags ---------------
23281 #### 3. multi-line html tag
23282 #### 4. extension tags
23283 #### -----------------------------------------
23289 <a href="http://google.com">google</a>
23291 <a href="http://google.com">google</a>
23297 * <nowiki><div>foo</div></nowiki>
23298 * <nowiki><div style="color:red">foo</div></nowiki>
23299 * <nowiki><td></nowiki>
23301 <ul><li> <div>foo</div></li>
23302 <li> <div style="color:red">foo</div></li>
23303 <li> <td></li></ul>
23308 3. multi-line html tag
23323 <nowiki><ref>foo</ref></nowiki>
23325 <nowiki><ref>bar</nowiki>
23327 baz<nowiki></ref></nowiki>
23329 <p><ref>foo</ref>
23330 </p><p><ref>bar
23331 </p><p>baz</ref>
23335 #### --------------- Others ---------------
23339 <nowiki>foo</nowiki>
23341 <p><nowiki>foo</nowiki>
23345 ## The quote-char in the input is necessary for triggering the bug
23347 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23349 parsoid=wt2wt,html2wt
23358 Tag-like HTML structures are passed through as text
23380 </p><p>1<d e>f
23385 HTML tag with necessary entities in attributes
23387 <span title="&amp;">foo</span>
23389 <p><span title="&amp;">foo</span>
23394 HTML tag with 'unnecessary' entity encoding in attributes
23396 <span title="&">foo</span>
23398 <p><span title="&">foo</span>
23403 HTML tag with broken attribute value quoting
23405 <span title="Hello world>Foo</span>
23407 <p><span title="Hello world">Foo</span>
23410 <p><span title="Hello world">Foo</span>
23415 Table with broken attribute value quoting
23418 | title="Hello world|Foo
23423 <td title="Hello world">Foo
23429 <td title="Hello world">Foo
23435 Table with broken attribute value quoting on consecutive lines
23438 | title="Hello world|Foo
23439 | style="color:red|Bar
23444 <td title="Hello world">Foo
23446 <td style="color:red">Bar
23452 <td title="Hello world">Foo
23453 </td><td style="color: red">Bar
23454 </td></tr></tbody></table>
23459 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23469 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23479 Accept empty td cell attribute
23482 | align="center" | foo || |
23487 <td align="center"> foo </td>
23494 Non-empty attributes in th-cells
23497 ! Foo !! style="color: red" | Bar
23503 <th style="color: red"> Bar
23509 Accept empty attributes in th-cells
23524 Empty table rows go away
23545 ### Parsoid-centric tests for testing RTing of inter-element separators
23546 ### Edge cases not tested by existing parser tests and specific to
23547 ### Parsoid-specific serialization strategies.
23551 RT-ed inter-element separators should be valid separators
23563 # Parsoid-only since PHP parser relies on Tidy for correct output
23565 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23579 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23580 <p>bar</p></small></td></tr>
23584 <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>
23588 # Note that the "style" attribute is really a template parameter here.
23589 # The = would have to be {{=}} if you wanted the literal.
23591 Empty TD followed by TD with tpl-generated attribute
23596 |{{echo|style='color:red'}}|foo
23610 Indented table with an empty td
23628 ## We have some newline diffs RT-ing this edge case
23629 ## and it is not important enough -- we seem to be emitting
23630 ## at most 2 newlines after a </tr> and this is unrelated to
23631 ## the issue from T85627 that this is testing.
23633 Indented table with blank lines in between (T85627)
23652 Indented block & table
23666 <div data-parsoid='{"stx":"html"}'>foo</div>
23668 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23673 Indent and comment before table row
23688 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23689 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23693 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23695 Empty TR followed by a template-generated TR
23701 {{echo|<tr><td>foo</td></tr>}}
23707 <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}}]}'>
23712 ## PHP and parsoid output differ for this, and since this is primarily
23713 ## for testing Parsoid's serializer, marking this Parsoid only
23715 Empty TR followed by mixed-ws-comment line should RT correctly
23731 <!--c--> </tr><!--d-->
23737 Multi-line image caption generated by templates with/without trailing newlines
23739 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23740 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23742 <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>
23743 <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>
23747 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23751 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23753 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23755 <includeonly>foo</includeonly>
23763 ## PHP emits broken html for this, and since this is primarily
23764 ## a Parsoid serializer test, marking this Parsoid only
23766 Improperly nested inline or quotes tags with whitespace in between
23768 <span> <s>x</span> </s>
23771 <p><span> <s>x</s></span><s> </s>
23772 <b> <i>x</i></b><i> </i>
23777 Encapsulate protected attributes from wt
23779 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23781 <body><div data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
23785 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23786 ## Having nested or stray pre tags results in the attempt to add duplicates,
23787 ## causing an assertion fail. This test tries to prevent that situation.
23789 Ensure ParagraphWrapper can deal with stray closing pre tags
23799 1. Ensure fostered text content is wrapped in element nodes
23803 <table>hi</table><table>ho</table>
23812 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
23814 parsoid=wt2html,wt2wt
23823 <tbody><tr><td> a</td></tr>
23828 Encapsulation properly handles null DSR information from foster box
23830 parsoid=wt2html,wt2wt
23832 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
23834 <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>
23838 1. Encapsulate foster-parented transclusion content
23840 parsoid=wt2wt,wt2html
23842 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
23844 <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>
23854 2. Encapsulate foster-parented transclusion content
23856 parsoid=wt2wt,wt2html
23858 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
23860 <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>
23871 3. Encapsulate foster-parented transclusion content
23873 parsoid=wt2wt,wt2html
23875 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23877 <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>"]}">
23890 4. Encapsulate foster-parented transclusion content
23892 parsoid=wt2wt,wt2html
23894 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23896 <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>"]}">
23909 5. Encapsulate foster-parented transclusion content
23911 parsoid=wt2wt,wt2html
23913 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
23915 <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>
23930 6. Encapsulate foster-parented transclusion content
23932 parsoid=wt2wt,wt2html
23934 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
23936 <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>
23952 7. Encapsulate foster-parented transclusion content
23954 parsoid=wt2wt,wt2html
23956 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
23958 <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>
23968 # Note that the wt is broken on purpose: the = should be {{=}} if you
23969 # don't want it to be a template parameter key.
23971 8. Encapsulate foster-parented transclusion content
23973 parsoid=wt2wt,wt2html
23976 }}{|{{echo|style='color:red'}}
23981 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
23983 <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>
23994 9. Encapsulate foster-parented transclusion content
23996 parsoid=wt2wt,wt2html
23998 <table>{{echo|hi</table>hello}}
24000 <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>
24004 Table in fosterable position
24006 parsoid=wt2html,wt2wt
24015 <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">
24017 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24023 # Parsoid only for bug 64747
24025 Properly encapsulate empty-content transclusions in fosterable positions
24033 <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":["","","",""]}]]}'>
24039 Support <object> element with .data attribute
24043 <object data="test.swf"></object>
24045 <object data="test.swf"></object>
24049 Don't block XML namespace declaration
24051 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24053 <p><span>MediaWiki</span>
24056 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24059 # -----------------------------------------------------------------
24060 # The following section of tests are primarily to spec requirements
24061 # around serialization of new/edited content.
24063 # All these tests are marked Parsoid html2wt and html2html only
24064 # ----------------------------------------------------------------
24066 # 'mi' is a localinterwiki prefix as well as a language
24068 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24072 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24079 New wikilinks should be serialized properly
24083 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24084 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24091 New wiki links (href variations)
24095 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24096 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24097 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24098 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24103 [[Toxine bactérienne]]
24107 New wiki links (content string variations)
24111 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24112 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24113 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24117 [[Foo_bar|./Foo_bar]]
24121 New category links (href variations)
24125 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24126 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24127 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24129 [[Category:Toxine bactérienne]]
24130 [[Category:Toxine bactérienne]]
24131 [[Category:Toxine bactérienne]]
24135 New sol transparent links don't need indent-pre nowiki protection
24140 <link rel="mw:PageProp/redirect" href="./Main_Page">
24141 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24142 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24144 #WEITERLEITUNG [[Main Page]]
24145 <!-- this is good --> [[Category:Good]]
24146 <!-- this is great --> [[Kategorie:Great]]
24150 New interlanguage links (href variations)
24154 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24155 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24156 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24158 [[es:Toxine bactérienne]]
24159 [[es:Toxine_bactérienne]]
24160 [[es:Toxine_bactérienne]]
24164 Image: Modifying size of an image (1)
24167 "modes": ["wt2wt"],
24169 ["img[height]", "attr", "height", "22"],
24170 ["img[width]", "attr", "width", "200"]
24174 [[Image:Foobar.jpg|230x230px]]
24176 [[Image:Foobar.jpg|200x200px]]
24180 Image: Modifying size of an image (2)
24183 "modes": ["wt2wt"],
24185 ["img[height]", "attr", "height", "100"],
24186 ["img[width]", "attr", "width", "500"]
24190 [[Image:Foobar.jpg|230x230px]]
24192 [[Image:Foobar.jpg|500x500px]]
24195 # Change in size is ignored so long as class='mw-default-size'
24197 Image: Modifying size of an image (3)
24200 "modes": ["wt2wt"],
24202 ["figure[class]", "removeClass", "mw-default-size"],
24203 ["figure img", "attr", "height", "19"],
24204 ["figure img", "attr", "width", "170"]
24208 [[Image:Foobar.jpg|thumb]]
24210 [[Image:Foobar.jpg|thumb|170x170px]]
24214 Image: Modifying alignment of an image (bug 48665)
24217 "modes": ["wt2wt"],
24219 ["figure[class]", "removeClass", "mw-halign-right"],
24220 ["figure[class]", "addClass", "mw-halign-left"]
24224 [[Image:Foobar.jpg|thumb|caption|right]]
24226 [[Image:Foobar.jpg|thumb|caption|left]]
24230 Image: Modifying mw-default-size of an frameless image (bug 62805)
24233 "modes": ["wt2wt"],
24235 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24239 [[Image:Foobar.jpg|frameless|right]]
24241 [[Image:Foobar.jpg|frameless|right|220x220px]]
24245 Image: Modifying valign of an image (bug 49221)
24248 "modes": ["wt2wt"],
24250 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24251 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24255 [[File:Foobar.jpg|20px|middle]]
24257 [[File:Foobar.jpg|20px|text-top]]
24261 Image: Modifying alt attribute of an image (bug 56400)
24264 "modes": ["wt2wt"],
24266 ["img[alt]", "attr", "alt", "some alternate edited text"]
24270 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24272 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24276 Image: Modifying caption of an image
24279 "modes": ["wt2wt"],
24281 ["figcaption", "text", "new caption"]
24285 [[Image:Foobar.jpg|thumb|original caption]]
24287 [[Image:Foobar.jpg|thumb|new caption]]
24291 Image: empty alt attribute (bug 48924)
24295 [[File:Foobar.jpg|thumb|alt=|bar]]
24297 <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>
24301 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24307 <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>
24309 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24313 Image: Block level image should have \n before and after
24316 [[File:Foobar.jpg|right|thumb|150x150px]]
24320 <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>
24325 Image: New block level image should have \n before and after (existing content)
24328 [[File:Foobar.jpg|right|thumb|150x150px]]
24332 <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>
24337 Image: upright option (parsoid)
24339 [[File:Foobar.jpg|thumb|upright|caption]]
24340 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24341 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24343 <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>
24344 <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>
24345 <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>
24349 Image: upright option is ignored on inline and frame images (parsoid)
24351 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24353 <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>
24357 Image: from basic HTML (1)
24361 <span typeof="mw:Image">
24362 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24365 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24369 Image: from basic HTML (2)
24373 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24375 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24379 Image: from basic HTML (3)
24383 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24385 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24389 Image: from basic HTML (4)
24393 <img src="./File:Foobar.jpg">
24395 [[File:Foobar.jpg|link=]]
24399 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24404 <li><p>foo</p></li>
24411 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24415 <ul> <li>foo</li></ul>
24421 Don't strip leading whitespace when handling indent-pre suppressing tags
24426 <tr><td> indented row</td></tr>
24429 <b>This is very bold of you!</b>
24432 indented cell (no pre-wrapping!)
24442 '''This is very bold of you!'''
24446 indented cell (no pre-wrapping!)
24454 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24472 <nowiki> </nowiki><span>bar</span>
24475 <nowiki> </nowiki></span>bar2
24478 <nowiki> </nowiki><span>bar</span>
24481 <nowiki> </nowiki><span>foo</span>
24486 Lists: Dont insert newlines in a serialized list item.
24490 <ul><li>a<br>b</li><li>c</li></ul>
24497 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24500 "modes": ["html2wt"],
24501 "scrubWikitext": false
24504 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24505 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24507 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24508 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24510 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
24512 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24514 == hello there [[Category:A1]] ==
24516 == [[Category:A2]] hi pal ==
24518 == <!--foo--> [[Category:A3]] how goes it ==
24520 == it goes well [[Category:A4]] <!--bar--> ==
24522 ==howdy [[Category:A5]] ==
24528 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24531 "modes": ["html2wt"],
24532 "scrubWikitext": true
24535 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24536 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24538 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24539 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24541 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24549 <!--foo--> [[Category:A3]]
24554 [[Category:A4]] <!--bar-->
24562 Headings: Don't hoist metas that come from templates
24565 "modes": ["html2wt"],
24566 "scrubWikitext": true
24569 <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>
24571 == {{echo|foo [[Category:Foo]]}} ==
24575 Headings: Category in ref isn't hoisted
24578 "modes": ["html2wt"],
24579 "scrubWikitext": true
24582 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
24584 <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>
24587 [[Category:Baz]] </ref> ==
24593 Parsoid: Serialize positional parameters with = in them as named parameter
24597 <p about="#mwt1" typeof="mw:Transclusion"
24598 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24600 <p about="#mwt1" typeof="mw:Transclusion"
24601 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24603 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24604 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24605 <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>
24609 {{echo|1 = f=oo|2 = bar}}
24611 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24612 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24613 {{echo|<nowiki>f=oo</nowiki>|bar}}
24617 Parsoid: Serialize positional parameters with = in extlink as named parameter
24621 <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>
24623 {{echo|1 = http://stuff?is=ok}}
24627 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24631 <div>a<p>b</p></div>
24652 Substrings resembling wikitext in hrefs should not get nowiki escapes
24656 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24662 Enforce single-line context in the serializer
24669 <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">
24670 </span><span about="#mwt1">you</span> </h2>
24672 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
24674 <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
24675 there</span></li></ol>
24687 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
24694 </tbody></table></dd></dl>
24698 == hi {{bogus|there
24709 * foo '''bar''' baz
24721 Serialize new placeholder space without spans
24725 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24727 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24729 <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>
24735 <ref>foo : bar</ref>ok
24739 #-----------------------
24740 # Tag minimization tests
24741 #-----------------------
24744 1. I/B quote minimization: wikitext-only tags should be combined
24748 <p><i>A</i><i>B</i></p>
24749 <p><b>A</b><b>B</b></p>
24750 <p><i>A</i><b><i>B</i></b></p>
24751 <p><b>A</b><i><b>B</b></i></p>
24752 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24753 <p><i><b>A</b></i><i><b>B</b></i></p>
24754 <p><i><b>A</b></i><b><i>B</i></b></p>
24755 <p><b><i>A</i></b><i><b>B</b></i></p>
24775 2. I/B quote minimization: wikitext and html tags should not be combined
24779 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24780 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24784 ''A''<nowiki/>'''<i>B</i>'''
24788 3. I/B quote minimization: templated content stops minimization
24792 <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>
24793 <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>
24795 ''A''{{echo|''B''}}
24797 ''A''{{echo|'''''B'''''}}
24801 4. I/B quote minimization: new content should be mimimized with adjacent old content
24805 <p><i>A</i><i>B</i></p>
24806 <p><b>A</b><b>B</b></p>
24807 <p><i>A</i><b><i>B</i></b></p>
24817 5a. Merge adjacent quote nodes if they've been edited
24820 "modes": ["wt2wt", "selser"],
24822 ["p", "contents", "remove", ":contains('b')"]
24832 5b. Merge adjacent quote nodes if they've been edited
24835 "modes": ["wt2wt", "selser"],
24841 ''a''<span id="x">b</span>''c''
24847 1. Merge adjacent link nodes as long as at least one element is new
24850 "modes": ["html2wt"],
24851 "scrubWikitext": true
24854 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24855 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24856 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
24860 [[Football|Foot]][[Football|ball]]
24864 2. Merge adjacent link nodes and enable additional normalizations
24867 "modes": ["html2wt"],
24868 "scrubWikitext": true
24871 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
24873 [[Football|''Football'']]
24877 3. Don't merge adjacent link nodes if scrubWikitext is false
24880 "modes": ["html2wt"],
24881 "scrubWikitext": false
24884 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24886 [[Football|Foot]][[Football|ball]]
24889 #------------------------------
24890 # End of tag minimization tests
24891 #------------------------------
24894 Bug 54262: New entities
24898 <span typeof="mw:Entity"> </span>
24903 ## Note that there is no wikitext output for 'unknownproperty' ##
24904 ## Unknown magic words are silently dropped ##
24911 <meta property='mw:PageProp/toc' />
24912 <meta property='mw:PageProp/notoc' />
24913 <meta property='mw:PageProp/forcetoc' />
24914 <meta property='mw:PageProp/index' />
24915 <meta property='mw:PageProp/noindex' />
24916 <meta property='mw:PageProp/nogallery' />
24917 <meta property='mw:PageProp/noeditsection' />
24918 <meta property='mw:PageProp/notitleconvert' />
24919 <meta property='mw:PageProp/nocontentconvert' />
24920 <meta property='mw:PageProp/unknownproperty' />
24930 __NOCONTENTCONVERT__
24934 Consecutive <pre>s should not get merged
24936 parsoid=html2wt,html2html
24938 <pre>a</pre><pre>b</pre>
24966 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
24970 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
24972 [[Special:BookSources/1234567890|ISBN 1234567895]]
24976 Edited RFC links not serializable as RFC links should serialize as extlinks
24980 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
24982 [//tools.ietf.org/html/rfc123 New RFC]
24986 Edited PMID links not serializable as PMID links should serialize as extlinks
24990 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
24992 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
24996 WTS of autolinks with trailing/surrounding context
25000 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25001 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25002 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25003 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25004 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25005 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25007 http://cscott.net<nowiki/>'''foo'''
25009 http://cscott.net<b>foo</b>
25011 '''http://cscott.net<nowiki/>'''
25013 '''http://cscott.net '''
25015 '''http://cscott.net<nowiki/>x'''
25017 http://cscott.net<nowiki/>x
25021 WTS of autolinks with nowikis (round-trip)
25023 x<nowiki/>http://cscott.net<nowiki/>x
25025 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25028 # this is the "easy" test because it leaves in place all the
25029 # data-parsoid information indicating this is an autolink
25031 WTS of autolinks with escapes (editing)
25034 "modes": ["wt2wt"],
25036 [ "meta", "remove" ]
25040 x<nowiki/>http://cscott.net<nowiki/>x
25042 x<nowiki/>http://cscott.net<nowiki/>x
25046 WTS of edited autolink-like text (T103364)
25049 "modes": ["wt2wt"],
25051 [ "span[typeof]", "removeAttr", "typeof" ]
25055 Not a link: <nowiki>http://example.com</nowiki>.
25057 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25061 WTS of newly-authored autolink-like text (T103364)
25065 <p>http://example.com is not a link.</p>
25067 <nowiki>http://example.com is not a link.</nowiki>
25071 WTS of autolink-like text after an autolink (T108563)
25075 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25077 http://example.com<nowiki> http://example.com is not a link.</nowiki>
25081 Edited Redirect link should emit a non-piped wikitext link
25085 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25091 T75121: Infer extension name from typeOf if data-mw is not present
25095 <div typeOf="mw:Extension/foo"></div>
25100 # Note that the <p> wrapping isn't present in PHP parser output
25101 # The important thing for this test is that P-wrapping doesn't
25102 # interfere with the <nowiki> protection for leading - in <td>
25103 # (which isn't necessary for <th>).
25105 T88318: p-wrapped dash in table.
25107 parsoid=html2wt,wt2wt
25110 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25111 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25112 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25119 |<nowiki>-</nowiki>
25120 |<nowiki>- </nowiki>
25139 <td><small>-</small></td>
25151 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25156 <td id='mwAc'>foo</td>
25157 <td id='serialize-this'>bar</td>
25162 | id="serialize-this" |bar
25167 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25171 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25173 <div id="hello">ok</div>
25180 "modes": ["wt2wt"],
25182 [ "#xyz", "before", "<b>before</b> stuff " ],
25183 [ "#xyz", "after", " stuff <i>after</i>" ],
25184 [ "#xyz", "html", "x <b>y</b> z" ]
25188 <span id="xyz">hello</span>
25190 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25194 Never serialize a-tag as html, regardless of what data-parsoid has to say
25198 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25203 ## SSS FIXME: This is broken output nevertheless.
25204 ## What might be a reasonable non-broken output for this?
25205 ## This is an edge case unlikely to be seen in production
25206 ## that I am not wasting more time on this right now.
25208 Never serialize a-tag as html, no matter what attributes it has
25212 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25214 [http://boo.org http://boohoo.org]
25217 # Misnested is an indication that selser can reuse the source but these have
25218 # shown to sneak through on occasion. See T101768.
25219 # The original wikitext here is: [http://test.com [[one]] two three]
25221 Strip span tags added to mark as misnested
25225 <p data-parsoid='{}'><a rel="mw:ExtLink" href="http://test.com" data-parsoid='{"targetOff":17,"contentOffsets":[17,34]}'></a><a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"simple","a":{"href":"./One"},"sa":{"href":"one"},"misnested":true}'>one</a><span data-parsoid='{"misnested":true}'> two three</span></p>
25227 [http://test.com][[one]] two three
25230 # --------------------------------------------
25231 # Tests spec'ing wikitext serialization norms |
25232 # --------------------------------------------
25235 Lists: Add space after bullets
25242 <li><span> baz</span></li>
25247 * <span> baz</span>
25251 1. Headings: Add space before/after == (T53744)
25258 <h2><span> baz</span></h2>
25266 == <span> baz</span> ==
25270 2. Headings: Add space before/after == even after hoisted content
25273 "modes": ["html2wt"],
25274 "scrubWikitext": true
25277 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
25285 1. Headings: suppress newly created empty headings
25288 "modes": ["html2wt"],
25289 "scrubWikitext": true
25297 2. Headings: don't suppress empty headings if scrubWikitext is false
25307 3. Headings: suppress empty headings on edits
25310 "modes": ["selser"],
25311 "scrubWikitext": true,
25317 ==<span id="x">foo</span>==
25322 1. WT Quote Tags: suppress newly created empty style tags
25325 "modes": ["html2wt"],
25326 "scrubWikitext": true
25334 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
25340 ''<nowiki/>'''''<nowiki/>'''
25344 3. WT Quote Tags: suppress empty style tags on edits
25347 "modes": ["selser"],
25348 "scrubWikitext": true,
25354 '''<span id="x">foo</span>'''
25359 1. Anchors: suppress newly created empty anchors
25362 "modes": ["html2wt"],
25363 "scrubWikitext": true
25366 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25371 2. Anchors: don't suppress empty anchors if scrubWikitext is false
25374 "modes": ["html2wt"],
25375 "scrubWikitext": false
25378 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25384 3. Anchors: suppress empty anchors on edits
25387 "modes": ["selser"],
25388 "scrubWikitext": true,
25394 [[Test|<span id="x">foo</span>]]
25399 3a. Anchors: do not suppress numbered extlinks
25402 "modes": ["wt2wt"],
25403 "scrubWikitext": true
25408 <a rel="mw:ExtLink" href="http://foo.com"></a>
25412 3b. Anchors: do not suppress numbered extlinks
25415 "modes": ["wt2wt"],
25416 "scrubWikitext": true,
25422 [http://foo.com <span id="x">foo</span>]
25428 Normalizations should be restricted to edited content
25431 "modes": ["selser"],
25432 "scrubWikitext": true,
25434 [ "h1", "before", "<i></i>"]
25448 1. Multiple normalizations (html2wt)
25451 "modes": ["html2wt"],
25452 "scrubWikitext": true
25456 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
25457 </a><b><i></i></b>x</p>
25466 2. Multiple normalizations (selser)
25469 "modes": ["selser"],
25470 "scrubWikitext": true,
25472 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
25476 <span id="x">foo</span>
25478 <span id="x">foo</span>
25484 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
25487 "modes": ["html2wt"],
25488 "scrubWikitext": true
25500 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
25507 <nowiki> </nowiki>hi
25509 <nowiki> </nowiki> hello
25513 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
25516 "modes": ["html2wt"],
25517 "scrubWikitext": true
25526 baz bang</td></tr></table>
25532 bar<span>boo</span></p>
25548 bar<span>boo</span>
25552 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
25555 "modes": ["selser"],
25556 "scrubWikitext": true,
25558 [ "p", "html", " a\n b" ]
25569 1. New links that end in spaces
25572 "modes": ["html2wt"],
25573 "scrubWikitext": false
25576 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25577 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25578 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
25580 [[Berlin ]]<nowiki/>is the capital of Germany.
25584 [[Boston ]] is a city.
25588 2. New links that end in spaces
25591 "modes": ["html2wt"],
25592 "scrubWikitext": true
25595 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25596 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25597 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
25599 [[Berlin]] is the capital of Germany.
25603 [[Boston]] is a city.
25607 1. Table cells with escapable prefixes
25610 "modes": ["html2wt"],
25611 "scrubWikitext": false
25615 <tr><td>a</td></tr>
25616 <tr><td>-</td></tr>
25617 <tr><td>+</td></tr>
25623 |<nowiki>-</nowiki>
25625 |<nowiki>+</nowiki>
25630 2. Table cells with escapable prefixes
25633 "modes": ["html2wt"],
25634 "scrubWikitext": true
25638 <tr><td>a</td></tr>
25639 <tr><td>-</td></tr>
25640 <tr><td>+</td></tr>
25653 3a. Table cells with escapable prefixes after edits
25656 "modes": ["selser"],
25657 "scrubWikitext": true,
25659 [ "table tbody tr:first-child td:first-child", "remove"]
25673 3b. Table cells with escapable prefixes after edits
25676 "modes": ["selser"],
25677 "scrubWikitext": true,
25679 [ "table tbody tr:first-child td:first-child", "html", "-" ],
25686 |<span id="x">foo</span>+
25695 # FIXME: This test will fail because
25696 # normalization doesn't realize that the id attribute
25697 # will eliminate the escapable scenario
25699 4a. Table cells without escapable prefixes after edits
25702 "modes": ["selser"],
25703 "scrubWikitext": true,
25705 [ "#x", "html", "-" ]
25718 ## This tests normalizer's ability to discriminate between
25719 ## cells having identical content.
25721 4b. Table cells without escapable prefixes after edits
25724 "modes": ["selser"],
25725 "scrubWikitext": true,
25727 [ "td", "html", "-" ]
25740 ## This tests normalizer's ability to not be tripped by
25741 ## comments (and whitespace)
25743 4c. Table cells without escapable prefixes after edits
25746 "modes": ["selser"],
25747 "scrubWikitext": true,
25749 [ "table tbody tr td:first-child", "remove" ]
25764 ## This tests normalizer's ability to handle HTML cells
25766 4d. Table cells without escapable prefixes after edits
25769 "modes": ["selser"],
25770 "scrubWikitext": true,
25772 [ "td", "html", "-" ]
25777 <tr><td>a</td></tr>
25781 <tr><td>-</td></tr>
25785 # ---------------------------------------------------
25786 # End of tests spec'ing wikitext serialization norms |
25787 # ---------------------------------------------------
25789 # -----------------------------------------------------------------
25790 # End of section for Parsoid-only html2wt tests for serialization
25792 # -----------------------------------------------------------------
25794 # -----------------------------------------------------------------
25795 # The following section of tests are primarily to spec behavior of
25796 # the selective serializer. All these tests have manual selser
25797 # changes. The automated selser changes for all tests handle the
25798 # wide variation of changes, but these tests here capture specs
25799 # deterministically.
25800 # ----------------------------------------------------------------
25804 Selser: New comments should not be lost
25807 "modes": ["selser"],
25809 [ "#a", "after", "<!--c1-->" ],
25810 [ "#b", "before", "<!--c2-->" ]
25814 <span id="a">a</span>
25816 <span id="b">b</span>
25818 <span id="a">a</span><!--c1-->
25820 <!--c2--><span id="b">b</span>
25825 Selser: Check for validity of DSR before using it
25828 "modes": ["selser"],
25830 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
25834 <span id="a">a</span>
25836 {{DISPLAYTITLE:foo}}
25837 <span id="a">a</span>
25841 1. DOMDiff: Changes to <ref> content should be looked up using id
25844 "modes": ["selser"],
25846 ["#X", "after", "bar"],
25847 ["#Y", "after", "baz"]
25851 X <ref><span id="X">foo</span></ref>
25854 <ref name="a"><span id="Y">foo</span></ref>
25857 X <ref><span id="X">foo</span>bar</ref>
25860 <ref name="a"><span id="Y">foo</span>baz</ref>
25865 2. DOMDiff: Changes to <ref> content should be looked up using id
25868 "modes": ["selser"],
25870 ["#Z", "after", "bar"]
25874 A <ref>foo bar for a</ref>
25875 B <ref group="X" name="b" />
25879 <references group="X">
25880 <ref name="b"><span id="Z">foo</span></ref>
25883 A <ref>foo bar for a</ref>
25884 B <ref group="X" name="b" />
25888 <references group="X">
25889 <ref name="b"><span id="Z">foo</span>bar</ref>