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
841 # skipping wt2html and html2html because it wants to put <i> before <b>
843 Italics and bold: 5-quote opening sequence: (5,2+3)
845 parsoid=wt2wt,html2wt
854 Italics and bold: 5-quote opening sequence: (5,3)
864 # same html as previous, but wikitext adjusted to match parsoid html2wt
866 Italics and bold: 5-quote opening sequence: (5,3+2)
875 Italics and bold: 5-quote opening sequence: (5,4)
881 <p><i><b>foo'</b></i>
886 Italics and bold: 5-quote opening sequence: (5,5)
895 Italics and bold: 5-quote opening sequence: (5,6)
899 <p><i><b>foo'</b></i>
904 ### multiple quote sequences in a line
907 Italics and bold: multiple quote sequences: (2,4,2)
913 <p><i>foo'<b>bar</b></i>
918 # same html as previous, but wikitext adjusted to match parsoid html2wt
920 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
922 ''foo'<nowiki/>'''bar'''''
924 <p><i>foo'<b>bar</b></i>
930 Italics and bold: multiple quote sequences: (2,4,3)
936 <p><i>foo'<b>bar</b></i>
941 # same html as previous, but wikitext adjusted to match parsoid html2wt
943 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
945 ''foo'<nowiki/>'''bar'''''
947 <p><i>foo'<b>bar</b></i>
953 Italics and bold: multiple quote sequences: (2,4,4)
959 <p><i>foo'<b>bar'</b></i>
964 # same html as previous, but wikitext adjusted to match parsoid html2wt
966 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
968 ''foo'<nowiki/>'''bar'<nowiki/>'''''
970 <p><i>foo'<b>bar'</b></i>
975 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
977 Italics and bold: multiple quote sequences: (3,4,2)
986 <p><b>foo'</b>bar<i></i>
990 # same html as previous, but wikitext adjusted to match parsoid html2wt
992 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
996 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
1001 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1006 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1008 Italics and bold: multiple quote sequences: (3,4,3)
1017 <p><b>foo'</b>bar<b></b>
1021 # same html as previous, but wikitext adjusted to match parsoid html2wt
1023 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1025 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1030 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1035 ### other quote tests
1038 Italics and bold: other quote tests: (2,3,5)
1040 ''this is about '''foo's family'''''
1042 <p><i>this is about <b>foo's family</b></i>
1048 Italics and bold: other quote tests: (2,(3,3),2)
1050 ''this is about '''foo's''' family''
1052 <p><i>this is about <b>foo's</b> family</i>
1058 Italics and bold: other quote tests: (3,2,3,2)
1062 '''this is about ''foo'''s family''
1064 <p><b>this is about <i>foo</i></b><i>s family</i>
1069 # same html as previous, but wikitext adjusted to match parsoid html2wt
1071 Italics and bold: other quote tests: (3,2,3+2+2,2)
1073 '''this is about ''foo'''''<nowiki/>''s family''
1075 <p><b>this is about <i>foo</i></b><i>s family</i>
1081 Italics and bold: other quote tests: (3,2,3,3)
1083 '''this is about ''foo'''s family'''
1085 <p>'<i>this is about </i>foo<b>s family</b>
1091 Italics and bold: other quote tests: (3,(2,2),3)
1093 '''this is about ''foo's'' family'''
1095 <p><b>this is about <i>foo's</i> family</b>
1101 Italicized possessive
1103 The ''[[Main Page]]'''s talk page.
1105 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1108 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1112 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1113 (Requires tidy for PHP parser output to be fixed up)
1115 parsoid=wt2html,wt2wt
1132 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1133 <td><i>a</i></td><td><i>b</i></td></tr>
1142 Non-html5 tags should be accepted
1144 <center>''foo''</center>
1146 <font>''foo''</font>
1147 <strike>''foo''</strike>
1150 <center><i>foo</i></center>
1151 <p><big><i>foo</i></big>
1152 <font><i>foo</i></font>
1153 <strike><i>foo</i></strike>
1159 <wbr> is valid wikitext (bug 52468)
1167 # <strike> is HTML4, <s> is HTML4/5.
1169 <s> or <strike> for strikethrough
1171 <strike>strike</strike>
1175 <p><strike>strike</strike>
1183 Text-level semantic html elements in wikitext
1186 <strong>text</strong>
1202 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1209 <strong>text</strong>
1225 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1233 # test cases taken from
1234 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1236 Ruby markup (W3C-style)
1238 ; Mono-ruby for individual base characters
1239 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1241 : <ruby>今日<rt>きょう</rt></ruby>
1243 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1245 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1247 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1249 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1250 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1251 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1254 <dl><dt> Mono-ruby for individual base characters</dt>
1255 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1256 <dt> Group ruby</dt>
1257 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1258 <dt> Jukugo ruby</dt>
1259 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1260 <dt> Inline ruby</dt>
1261 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1262 <dt> Double-sided ruby</dt>
1263 <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>
1265 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1266 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1267 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1272 # The next two test different paths in the sanitizer.
1274 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1276 <blockquote|>a</blockquote>
1278 <b→> doesn't terminate </b→>
1280 <bä> doesn't terminate </bä>
1282 <boo> doesn't terminate </boo>
1284 <s.foo> doesn't terminate </s.foo>
1288 <p><blockquote|>a</blockquote>
1289 </p><p><b→> doesn't terminate </b→>
1290 </p><p><bä> doesn't terminate </bä>
1291 </p><p><boo> doesn't terminate </boo>
1292 </p><p><s.foo> doesn't terminate </s.foo>
1293 </p><p><sub-ID#1>
1297 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1298 # If the non-word-character tag made it through the sanitizer, tidy
1299 # would munge it up.
1301 Non-word characters don't terminate tag names + tidy
1303 <blockquote|>a</blockquote>
1305 <b→> doesn't terminate </b→>
1307 <bä> doesn't terminate </bä>
1309 <boo> doesn't terminate </boo>
1311 <s.foo> doesn't terminate </s.foo>
1315 <p><blockquote|>a</p>
1316 <p><b→> doesn't terminate </b→></p>
1317 <p><bä> doesn't terminate </bä></p>
1318 <p><boo> doesn't terminate </boo></p>
1319 <p><s.foo> doesn't terminate </s.foo></p>
1320 <p><sub-ID#1></p>
1324 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1325 ### This checks that HTML5 tags (with non-word characters in the tag
1326 ### name) make it safely through the parser -- the Sanitizer will
1327 ### munge them later, as it should.
1330 Non-word characters are valid in extension tags (T19663)
1343 Isolated close tags should be treated as literal text (bug 52760)
1351 <p><s.foo>s</p>
1353 <p><s.foo>s</p>
1357 ### Special characters
1361 Bare pipe character (bug 52363)
1370 Bare pipe character from a template (bug 52363)
1379 ### <nowiki> test cases
1383 <nowiki> unordered list
1385 <nowiki>* This is not an unordered list item.</nowiki>
1387 <p>* This is not an unordered list item.
1390 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1396 <nowiki>Lorem ipsum dolor
1404 <p>Lorem ipsum dolor
1413 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1425 :There is not nowiki.
1426 :There is <nowiki>nowiki</nowiki>.
1428 #There is not nowiki.
1429 #There is <nowiki>nowiki</nowiki>.
1431 *There is not nowiki.
1432 *There is <nowiki>nowiki</nowiki>.
1434 <dl><dd>There is not nowiki.</dd>
1435 <dd>There is nowiki.</dd></dl>
1436 <ol><li>There is not nowiki.</li>
1437 <li>There is nowiki.</li></ol>
1438 <ul><li>There is not nowiki.</li>
1439 <li>There is nowiki.</li></ul>
1442 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1443 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1445 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1446 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1448 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1449 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1453 Entities inside <nowiki>
1455 <nowiki><</nowiki>
1462 Entities inside template parameters
1468 <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>
1472 Properly escape nowiki when combined with other wiki markup
1476 <p>* </nowiki> tag</p>
1478 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1482 T93824: Put escaped HTML tags inside nowiki
1486 <p><h2>foo</h2></p>
1488 <nowiki><h2>foo</h2></nowiki>
1492 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1496 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1497 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1498 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1500 This text: L'[[Foo]]
1501 This text: L<nowiki>''</nowiki>[[Foo]]
1502 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1505 # This test fails because wikitext whitespace is not normalized before comparing.
1507 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1511 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1514 This text : L<nowiki>''</nowiki>[[Foo]]
1517 # This test and the next one are html2wt only as they test that incorrect wikitext
1518 # passed in template arguments gets escaped or wrapped in nowikis where required.
1520 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1524 <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>
1525 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1527 {{echo|foo{{!}}bar}}
1528 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1532 T53961: Output correct nowikis in template arguments
1536 <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>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1540 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1543 {{echo|a <nowiki>}}</nowiki> b}}
1544 {{echo|<nowiki>a [[ b</nowiki>}}
1545 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1546 {{echo|a <nowiki>}</nowiki>}}
1550 Cases where "!!" needs nowiki protection
1555 <tr><th>this needs protection !! here</th></tr>
1559 <tr><th>this does not need
1560 protection !! here</th></tr>
1564 !<nowiki>this needs protection !! here</nowiki>
1577 Comments and Indent-Pre
1579 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 -->xyz
1587 <!-- comment 1 --> asdf
1588 <!-- comment 2 --> xyz
1644 asdf<!-- comment 1 -->jkl
1654 <!-- foo --> b <!-- bar -->
1668 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1674 Comment semantics and delimiters
1676 <!-- --><!----><!-----><!------>
1680 <!-- --><!----><!-----><!------>
1684 Comment semantics and delimiters, redux
1686 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1687 -- foo -- funky huh? ... -->
1691 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1692 -- foo -- funky huh? ... -->
1696 Comment semantics and delimiters: directors cut
1698 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1699 everything starting with < followed by !-- until the first -- and > we see,
1700 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1706 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1707 everything starting with < followed by !-- until the first -- and > we see,
1708 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1713 Comment semantics: nesting
1715 <!--<!-- no, we're not going to do anything fancy here -->-->
1720 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1723 # Parsoid closes the unclosed comment, even if it means a slight
1726 Comment semantics: unclosed comment at end
1728 parsoid=wt2html,html2html
1730 <!--This comment will run out to the end of the document
1734 <!--This comment will run out to the end of the document-->
1738 Comment semantics: normalize comments to play nice with XML and browsers
1740 <!-- Browsers --!> think this is closed -->
1741 <!--> This would normally be text -->
1742 <!---> As would this -->
1743 <!-- XML doesn't like trailing dashes -------->
1744 <!-- Nor doubled hyphens -- anywhere in the data -->
1745 But this is not a comment.
1747 <p>But this is not a comment.
1750 <!-- Browsers --!> think this is closed -->
1751 <!--> This would normally be text -->
1752 <!---> As would this -->
1753 <!-- XML doesn't like trailing dashes -------->
1754 <!-- Nor doubled hyphens -- anywhere in the data -->
1755 <p>But this is not a comment.</p>
1759 Comment semantics: round-trip even text which contains encoded -->
1761 <!-- hello & goodbye - > --> --&gt; --&xx -->
1763 <!-- hello & goodbye - > --> --&gt; --&xx -->
1767 Comment in template title
1776 Comment on its own line post-expand
1788 Comment on its own line post-expand with non-significant whitespace
1800 Multiple comments should still parse as SOL-transparent
1802 parsoid=wt2html,wt2wt
1805 <!--c2--><!--c3--><!--c4-->*b
1810 <!--c2--><!--c3--><!--c4-->
1817 ### paragraph wrapping tests
1832 Block tag on one line (<div>)
1848 Block tag on one line (<blockquote>)
1850 a <blockquote>foo</blockquote>
1854 a <blockquote>foo</blockquote>
1866 Block tag on both lines (<div>)
1883 Block tag on both lines (<blockquote>)
1885 a <blockquote>foo</blockquote>
1887 b <blockquote>foo</blockquote>
1889 a <blockquote>foo</blockquote>
1890 b <blockquote>foo</blockquote>
1904 Multiple lines without block tags
1928 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1929 # So, we have a separate section for Parsoid. We don't want
1930 # to mimic this stripping behavior in Parsoid. It affects
1931 # editing experience and also requires us to maintain additional
1934 Empty lines between lines with block tags
1972 <div data-parsoid='{"stx":"html"}'></div>
1975 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1978 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1980 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1983 <div data-parsoid='{"stx":"html"}'>e</div>
1986 ## PHP parser emits output which is broken
1988 Unclosed HTML p-tags should be handled properly
2001 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2006 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2007 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2010 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2014 a [[Category:A1]] [[Category:A2]]
2019 <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"/>
2023 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2029 <link rel="mw:PageProp/Category" href="Category:A1"/><p>a</p>
2033 ### Preformatted text
2042 And a [[Main Page|link]]
2048 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2053 Tabs don't trigger preformatted text
2057 This is preformatted text.
2063 <pre>This is preformatted text.
2069 Ident preformatting with inline content
2080 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2097 Regression with preformatted in <center>
2111 Bug 52763: Preformatted in <blockquote>
2117 indented cell (no pre-wrapping!)
2127 <p> indented cell (no pre-wrapping!)
2135 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2152 Bug 15491: <ins>/<del> in blockquote
2155 Foo <del>bar</del> <ins>baz</ins> quux
2159 <p>Foo <del>bar</del> <ins>baz</ins> quux
2165 # Note that the p-wrapping is newline sensitive, which could be
2166 # considered a bug: tidy will wrap only the 'Foo' in the example
2167 # below in a <p> tag. (see comment 23-25 of bug #6200)
2169 Bug 15491: <ins>/<del> in blockquote (2)
2171 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2174 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2180 <del>bar</del> <ins>baz</ins> quux</blockquote>
2184 <pre> with attributes (bug 3202)
2186 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2188 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2193 <pre> with width attribute (bug 3202)
2195 <pre width="8">Narrow screen goodies</pre>
2197 <pre width="8">Narrow screen goodies</pre>
2202 <pre> with forbidden attribute (bug 3202)
2204 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2206 <pre width="8">Narrow screen goodies</pre>
2211 Entities inside <pre>
2220 <pre> with forbidden attribute values (bug 3202)
2222 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2224 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2229 <nowiki> inside <pre> (bug 13238)
2237 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2245 <pre><nowiki>Foo</nowiki></pre>
2250 <nowiki> and <pre> preference (first one wins)
2279 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2281 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2284 <p><span typeof="mw:Nowiki">
2293 </pre> inside nowiki
2295 <nowiki></pre></nowiki>
2301 # Parsoid doesn't strip empty tags, like Tidy does.
2303 Empty pre; pre inside other HTML tags (bug 54946)
2305 parsoid=wt2html,wt2wt
2336 HTML pre followed by indent-pre
2351 <p><pre>foo</pre></p>
2353 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2357 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2365 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2375 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2387 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2408 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2412 {{echo| foo}}{{echo| bar}}
2417 {{echo|<!--cmt--> foo}}
2419 <!--cmt-->{{echo| foo}}
2421 {{echo|{{echo| }}bar}}
2439 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2476 Things that look like <pre> tags aren't treated as such
2478 Barack Obama <President> of the United States
2479 <President></President>
2481 <p>Barack Obama <President> of the United States
2482 <President></President>
2486 ## PHP parser discards the "<pre " string
2488 Handle broken pre-like tags (bug 64025)
2492 {{echo|<pre <pre>x</pre>}}
2494 <table><pre </table>
2497 <table><pre></pre></table>
2500 <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>
2509 Parsoid: handle pre with space after attribute
2513 <pre style="width:50%;" >{{echo|foo}}</pre>
2515 <pre style="width:50%;">{{echo|foo}}</pre>
2518 # TODO / maybe: fix wt2wt for this
2520 Parsoid: Don't paragraph-wrap fosterable content
2546 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2574 #--------------------------------------------------------------------
2575 # Transclusion parameter whitespace stripping tests
2576 # Behavior is different for positional and named parameters
2577 #--------------------------------------------------------------------
2579 Templates: Strip leading and trailing whitespace from named-param values
2583 {{echo|1= {{echo|b}} }}
2596 <ul><li> d</li></ul>
2601 Templates: Don't strip whitespace from positional-param values
2605 {{echo|{{echo|b}} }}
2637 <ul><li> f</li></ul>
2645 Templates: Handle empty comment-and-ws-only lines correctly
2648 <!--should be ignored-->
2649 <!--should be ignored as well-->
2658 Templates: Handle comments in the target
2661 <!-- should be ignored -->
2664 {{echo<!-- should be ignored -->
2667 {{echo<!-- should be ignored -->|foo}}
2669 {{<!-- should be ignored -->echo|foo}}
2671 <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>
2673 <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>
2675 <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>
2677 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2681 Templates: Handle comments in parameter names (bug 67657)
2684 <!-- should be ignored -->
2688 <!-- should be ignored -->
2691 {{echo|1<!-- should be ignored --> = foo}}
2693 {{echo|<!-- should be ignored -->1 = foo}}
2695 <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>
2697 <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>
2699 <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>
2701 <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>
2705 Templates: Other wikitext in parameter names (bug 67657)
2709 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2715 #--------------------------------------------------------------------
2716 # Transclusion parameter escaping tests
2717 #--------------------------------------------------------------------
2719 Templates: Parsoid parameter escaping test 1
2723 {{echo|[foo]|{{echo|[bar]}}}}
2725 <p about="#mwt1" typeof="mw:Transclusion"
2726 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2730 Parsoid: Pipes in external links in template parameter
2734 {{echo|[{{echo|http://example.com}} link]}}
2736 <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>
2740 Parsoid: pipe in transclusion parameter
2744 {{echo|http://foo.com/a|b}}
2746 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2747 typeof="mw:Transclusion"
2748 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>
2752 Parsoid: Pipe in external link target and content in template parameter
2754 parsoid=html2wt,wt2wt
2756 {{echo|[http://foo.com/a|b a|b]}}
2758 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2759 typeof="mw:Transclusion"
2760 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2761 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2765 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2769 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2771 <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>
2775 Templates: Don't escape already nowiki-escaped text in template parameters
2777 parsoid=html2wt,wt2wt
2779 {{echo|foo<nowiki>|</nowiki>bar}}
2780 {{echo|<nowiki><div></nowiki>}}
2781 {{echo|<nowiki></nowiki>}}
2783 <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>
2784 <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>
2785 <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>
2791 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2793 parsoid=html2wt,wt2wt
2795 {{echo|{{echo|1=bar}}}}
2797 <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>
2802 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2808 <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>
2813 Templates: Preserve blank parameter names
2820 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2824 Templates: Preserve blank parameter names in other positions
2826 {{blank_param|bar|=foo}}
2832 <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
2837 ### Parsoid-centric tests for testing RT edge cases for pre
2841 1a. Indent-Pre and Comments
2854 1b. Indent-Pre and Comments
2867 1c. Indent-Pre and Comments
2880 1d. Indent-Pre and Comments
2881 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2894 2a. Indent-Pre and tables
2915 2b. Indent-Pre and tables
2931 2c. Indent-Pre and tables (bug 42252)
2948 2d. Indent-Pre and tables
2965 <tbody><tr><td> b</td></tr>
2970 2e. Indent-Pre and table-line syntax
2983 2f. Indent-pre started by table-line syntax
3002 3a. Indent-Pre and block tags (single-line html)
3006 c <blockquote> foo </blockquote>
3011 c <blockquote> foo </blockquote>
3012 <pre><span> foo </span>
3015 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3016 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3017 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3018 <pre><span> foo </span>
3035 3b. Indent-Pre and block tags (multi-line html)
3040 <pre>a <span>foo</span>
3045 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3046 b <div data-parsoid='{"stx":"html"}'> foo </div>
3056 3c. Indent-Pre and block tags (pre-content on separate line)
3120 4. Indent-Pre and extension tags
3126 a <ul class="gallery mw-gallery-traditional">
3127 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3128 <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>
3129 <div class="gallerytext">
3136 <ul class="gallery mw-gallery-traditional">
3137 <li class="gallerybox" style="width: 155px">
3138 <div style="width: 155px">
3139 <div class="thumb" style="width: 150px;">
3140 <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>
3142 <div class="gallerytext"></div>
3149 Table wikitext syntax outside wiki-tables
3152 ! not a table heading
3155 | class="foo bar" | baz
3162 ! not a table heading
3165 | class="foo bar" | baz
3174 Render paragraphs when indent-pre is suppressed in blocklevels
3191 4. Multiple spaces at start-of-line
3209 ## NOTE: the leading white-space chars on empty line are significant
3211 5a. White-space in indent-pre
3223 ## NOTE: the leading white-space chars on empty line are significant
3225 5b. White-space in indent-pre
3244 5c. White-space in indent-pre
3257 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3280 7a. Indent-pre and category links
3282 parsoid=wt2html,wt2wt
3284 [[Category:foo]] <!-- No pre-wrapping -->
3285 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3287 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3288 <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 -->
3292 7b. Indent-pre and category links
3294 parsoid=wt2html,wt2wt
3297 [[Category:foo]] {{echo|b}}
3299 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3300 <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>
3304 Indent-Pre: Newlines in comments shouldn't affect sol state
3316 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3320 HTML-pre: 1. embedded newlines
3354 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3356 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3360 <pre data-parsoid='{"stx":"html"}'>
3365 <pre data-parsoid='{"stx":"html"}'>
3373 HTML-pre: big spaces
3410 <pre data-parsoid='{"stx":"html"}'>
3429 HTML-pre: 2: indented text
3442 HTML-pre: 3: other wikitext
3461 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3470 ### Definition lists
3477 <dl><dt> name </dt>
3478 <dd> Definition</dd></dl>
3483 Definition list for indentation only
3487 <dl><dd> Indented text</dd></dl>
3492 Definition list with no space
3497 <dd>Definition</dd></dl>
3502 Definition list with URL link
3504 ; http://example.com/ : definition
3506 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3507 <dd> definition</dd></dl>
3512 Definition list with bracketed URL link
3514 ;[http://www.example.com/ Example]:Something about it
3516 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3517 <dd>Something about it</dd></dl>
3522 Definition list with wikilink containing colon
3524 ; [[Help:FAQ]]: The least-read page on Wikipedia
3526 <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>
3527 <dd> The least-read page on Wikipedia</dd></dl>
3531 # At Brion's and JeLuF's insistence... :)
3533 Definition list with news link containing colon
3535 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3537 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3538 <dd> This isn't even a real newsgroup!</dd></dl>
3541 <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>
3545 Malformed definition list with colon
3547 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3549 <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>
3554 Definition lists: colon in external link text
3556 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3558 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3559 <dd> OK, I made that up</dd></dl>
3564 Definition lists: colon in HTML attribute
3566 ;<b style="display: inline">bold</b>
3568 <dl><dt><b style="display: inline">bold</b></dt></dl>
3573 Definition lists: self-closed tag
3575 ;one<br/>two : two-line fun
3577 <dl><dt>one<br />two </dt>
3578 <dd> two-line fun</dd></dl>
3583 Bug 11748: Literal closing tags
3587 <dd>test test test test test</dd>
3589 <dd>test test test test test</dd>
3594 <dd>test test test test test</dd>
3596 <dd>test test test test test</dd>
3602 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3605 ; term : description
3610 <dl><dt> term </dt>
3611 <dd> description</dd></dl>
3612 <ul><li> unordered</li></ul>
3619 Definition list with empty definition and following paragraph
3631 Nested definition lists using html syntax
3640 Definition Lists: No nesting: Multiple dd's
3653 Definition Lists: Indentation: Regular
3661 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3666 Definition Lists: Indentation: Missing 1st level
3672 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3677 Definition Lists: Indentation: Multi-level indent
3681 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3686 Definition Lists: Hacky use to indent tables
3693 should be left alone
3695 <dl><dd><dl><dd><table>
3700 </td></tr></table></dd></dl></dd></dl>
3702 should be left alone
3707 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3715 should be left alone
3718 <dl><dd><dl><dd><table><tr>
3721 </tr></table><!-- bar --></dd></dl></dd></dl>
3723 should be left alone</p>
3727 Definition Lists: Hacky use to indent tables, with comment before table
3733 <dl><dd><dl><dd><!-- foo --><table><tr>
3735 </tr></table></dd></dl></dd></dl>
3738 # The trailing whitespace in this test is to catch a regression in
3739 # Parsoid after T54473.
3741 Definition Lists: Hacky use to indent tables (WS-insensitive)
3750 </td></tr></table></dd></dl>
3754 <tbody><tr><td>a</td></tr>
3755 </tbody></table> </dd></dl>
3758 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3759 ## as an empty dt item. It also ignores all but the last ";" when followed
3760 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3761 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3764 ## Ex: ";;t2 ::d2" is transformed into:
3776 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3777 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3788 ## All Parsoid only definition list tests have this difference.
3790 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3791 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3794 Table / list interaction: indented table with lists in table contents
3809 <ul><li> b</li></ul>
3813 <ul><li> d</li></ul>
3814 </td></tr></table></dd></dl>
3819 Table / list interaction: lists nested in tables nested in indented lists
3842 </td></tr></table></dd></dl>
3849 Definition Lists: Nesting: Multi-level (Parsoid only)
3879 Definition Lists: Nesting: Test 2 (Parsoid only)
3899 Definition Lists: Nesting: Test 3 (Parsoid only)
3927 Definition Lists: Nesting: Test 4
3932 <dl><dd><dl><dd><dl><dt>t3</dt>
3933 <dd>d3</dd></dl></dd></dl></dd></dl>
3938 ## The Parsoid team believes the following three test exposes a
3939 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3940 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3941 ## It also exposes a "misfeature" in tidy, which doesn't like
3942 ## <dl> tags with a single <dt> child; it converts the <dt> into
3943 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3945 Definition Lists: Mixed Lists: Test 1
3951 <dl><dd><dl><dt><ul><li> foo</li>
3952 <li> bar</li></ul></dt></dl>
3953 <dl><dt> baz</dt></dl></dd></dl>
3988 Definition Lists: Mixed Lists: Test 2
3993 <ul><li><dl><dd> d1</dd>
3994 <dd> d2</dd></dl></li></ul>
4000 Definition Lists: Mixed Lists: Test 3
4005 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4006 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4012 Definition Lists: Mixed Lists: Test 4
4017 <ul><li><dl><dt>d1 </dt>
4020 <dd>d4</dd></dl></li></ul>
4026 Definition Lists: Mixed Lists: Test 5
4032 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4038 Definition Lists: Mixed Lists: Test 6
4043 <ol><li><ul><li><dl><dd>d1
4044 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4050 Definition Lists: Mixed Lists: Test 7
4055 <dl><dd><ul><li> d1</li>
4056 <li> d2</li></ul></dd></dl>
4062 Definition Lists: Mixed Lists: Test 8
4067 <dl><dd><ul><li> d1</li></ul>
4068 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4074 Definition Lists: Mixed Lists: Test 9
4078 <ul><li><dl><dt>foo </dt>
4079 <dd>bar</dd></dl></li></ul>
4085 Definition Lists: Mixed Lists: Test 10
4089 <ul><li><ol><li><dl><dt>foo </dt>
4090 <dd>bar</dd></dl></li></ol></li></ul>
4094 # The Parsoid team disagrees with the PHP parser's seemingly-random
4095 # rules regarding dd/dt on the next two tests. Parsoid is more
4096 # consistent, and recognizes the shared nesting and keeps the
4097 # still-open tags around until the nesting is complete.
4098 # (And tidy again converts <dt> to <dd> before 'bar'.)
4101 Definition Lists: Mixed Lists: Test 11
4106 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4107 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4108 <dl><dt>boo </dt>
4109 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4164 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4165 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4169 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4170 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4179 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4181 # * The test is wrong, there are two colons where there should be :;
4182 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4184 Definition Lists: Weird Ones: Test 1
4186 *#;*::;; foo : bar (who uses this?)
4188 <ul><li><ol><li><dl><dt> foo </dt>
4189 <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>
4208 <dt>bar (who uses this?)</dt>
4240 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4241 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4253 Definition Lists: colons occurring in tags
4271 <dt><span>a:b</span></dt>
4298 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4300 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4301 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4302 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4303 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4305 <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>
4306 <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>
4307 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4311 Definition Lists: colons and tables 1
4323 </td></tr></table></dd></dl>
4327 </td></tr></table></dd></dl>
4331 # Parsoid's output (as documented below) differs from php's in this case.
4332 # This is probably a bug. If we fixup parsoid to match php's output, the
4333 # above test should pass and the below test case can be removed. It is
4334 # unclear which output is more desirable.
4337 Definition Lists: colons and tables 2
4349 </td></tr></table></dd>
4353 </td></tr></table></dd></dl>
4357 Definition Lists: template interaction
4359 ::{{definition_list}}
4362 ::{{definition_list}}
4367 <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">
4368 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4370 <dl><dd data-parsoid='{}'>one
4371 <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">
4372 </span><dd about="#mwt2">two
4374 <dd>three</dd></dl></dd>
4375 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4383 External links: non-bracketed
4385 Non-bracketed: http://example.com
4387 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4391 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4393 External links: numbered
4395 Numbered: [http://example.com]
4396 Numbered: [http://example.net]
4397 Numbered: [http://example.com]
4399 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4400 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4401 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4404 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4405 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4406 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4410 External links: specified text
4412 Specified text: [http://example.com link]
4414 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4419 External links: trail
4421 Linktrails should not work for external links: [http://example.com link]s
4423 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4428 External links: dollar sign in URL
4430 http://example.com/1$2345
4432 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4436 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4438 External links: dollar sign in URL (autonumber)
4440 [http://example.com/1$2345]
4442 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4445 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4449 External links: open square bracket forbidden in URL (bug 4377)
4451 parsoid=wt2html,wt2wt,html2html
4453 http://example.com/1[2345
4455 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4458 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4462 External links: open square bracket forbidden in URL (named) (bug 4377)
4464 parsoid=wt2html,html2html
4466 [http://example.com/1[2345]
4468 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4471 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4474 # parsoid adds a space before the link name
4476 External links: open square bracket forbidden in URL (named) (bug 4377)
4479 [http://example.com/1 [2345]
4481 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4486 External links: nowiki in URL link text (bug 6230)
4488 [http://example.com/ <nowiki>''example site''</nowiki>]
4490 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4495 External links: newline forbidden in text (bug 6230 regression check)
4497 [http://example.com/ first
4500 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4506 External links: Pipe char between url and text
4508 [http://example.com | link]
4510 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4515 External links: protocol-relative URL in brackets
4517 [//example.com/ Test]
4519 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4523 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4525 External links: protocol-relative URL in brackets without text
4529 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4532 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4536 External links: protocol-relative URL in free text is left alone
4540 <p>//example.com/Foo
4545 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4547 foo//example.com/Foo
4549 <p>foo//example.com/Foo
4554 External links: with no contents
4556 [http://en.wikipedia.org/wiki/Foo]
4558 [[wikipedia:Foo|Bar]]
4560 [[wikipedia:Foo|<span>Bar</span>]]
4562 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4563 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4564 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4567 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4568 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4569 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4573 External links: Free with trailing punctuation
4583 http://example.com/url_with_(brackets)
4584 (http://example.com/url_without_brackets)
4585 http://example.com/url_with_entity
4586 http://example.com/url_with_entity 
4587 http://example.com/url_with_entity 
4588 http://example.com/url_with_entity<
4589 http://example.com/url_with_entity<
4590 http://example.com/url_with_entity<
4592 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4593 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4594 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4595 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4596 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4597 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4598 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4599 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4600 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4601 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4602 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4603 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4604 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4605 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4606 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4607 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4610 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4611 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4612 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4613 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4614 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4615 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4616 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4617 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4618 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4619 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4620 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4621 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4622 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4623 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4624 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4625 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4629 External links: No preceding word characters allowed (bug 65278)
4631 NOPEhttp://example.com
4632 N0http://example.com
4633 ok:http://example.com
4634 ok-http://example.com
4636 <p>NOPEhttp://example.com
4637 N0http://example.com
4638 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4639 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4646 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4648 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4653 External image from https
4655 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4657 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4662 External image (when not allowed)
4664 wgAllowExternalImages=0
4666 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4668 <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>
4673 Link to non-http image, no img tag
4675 Link to non-http image, no img tag: ftp://example.com/test.jpg
4677 <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>
4682 External links: terminating separator
4684 Terminating separator: http://example.com/thing,
4686 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4691 External links: intervening separator
4693 Intervening separator: http://example.com/1,2,3
4695 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4700 External links: old bug with URL in query
4702 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4704 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4709 External links: old URL-in-URL bug, mixed protocols
4711 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4713 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4718 External links: URL in text
4720 URL in text: [http://example.com http://example.com]
4722 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4727 External links: Clickable images
4729 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4731 <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>
4734 <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>
4738 External links: raw ampersand
4740 Old & use: http://x&y
4742 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4747 External links: encoded ampersand
4749 Old & use: http://x&y
4751 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4754 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4758 External links: encoded equals (bug 6102)
4760 http://example.com/?foo=bar
4762 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4765 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4769 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4770 ## does it number them. As discussed in bug 53505, we can identify
4771 ## autonumbered links via CSS.
4775 External links: [raw ampersand]
4777 Old & use: [http://x&y]
4779 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4782 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4785 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4786 # mode will return the [raw ampersand] wikitext
4788 External links: [encoded ampersand]
4790 parsoid=wt2html,wt2wt,html2html
4792 Old & use: [http://x&y]
4794 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4797 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4801 External links: [raw equals]
4803 [http://example.com/?foo=bar]
4805 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4808 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4811 # note that parsoid html is identical to [raw equals] case; so html2wt
4812 # mode will return the [raw equals] wikitext
4814 External links: [encoded equals] (bug 6102)
4816 parsoid=wt2html,wt2wt,html2html
4818 [http://example.com/?foo=bar]
4820 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4823 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4826 # xxx parsoid strips the IDN character, so the round-trip tests will
4827 # obviously fail and are disabled. --cscott
4829 External links: [IDN ignored character reference in hostname; strip it right off]
4831 parsoid=wt2html,wt2wt,html2html
4833 [http://e‌xample.com/]
4835 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4838 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4841 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4842 # Where an external link could easily circumvent the sanitization of the text of
4843 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4844 # test demands a higher standard. That's a bit strange.
4848 # http://example.com -> [http://example.com|http://example.com]
4849 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4851 # The first example is sanitized, but the second is not. Any security benefits
4852 # from this production are trivial to circumvent. Either remove this test and
4853 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4854 # the test accordingly.
4858 # xxx parsoid strips the IDN character, so the round-trip tests will
4859 # obviously fail and are disabled. --cscott
4861 External links: IDN ignored character reference in hostname; strip it right off
4863 parsoid=wt2html,html2html
4865 http://e‌xample.com/
4867 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4870 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4874 External links: www.jpeg.org (bug 554)
4878 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4882 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4884 External links: URL within URL (original bug 2)
4886 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4888 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4891 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4895 BUG 361: URL inside bracketed URL
4897 [http://www.example.com/foo http://www.example.com/bar]
4899 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4904 BUG 361: URL within URL, not bracketed
4906 http://www.example.com/foo?=http://www.example.com/bar
4908 <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>
4913 BUG 289: ">"-token in URL-tail
4915 http://www.example.com/<hello>
4917 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4922 BUG 289: literal ">"-token in URL-tail
4924 http://www.example.com/<b>html</b>
4926 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4929 <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>
4933 BUG 289: ">"-token in bracketed URL
4935 [http://www.example.com/<hello> stuff]
4937 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4942 BUG 289: literal ">"-token in bracketed URL
4944 [http://www.example.com/<b>html</b> stuff]
4946 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4951 BUG 289: literal double quote at end of URL
4953 http://www.example.com/"hello"
4955 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4960 BUG 289: literal double quote in bracketed URL
4962 [http://www.example.com/"hello" stuff]
4964 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4969 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4971 [http://www.example.com test]
4973 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4978 External links: link text with spaces
4980 [http://www.example.com a b c]
4981 [http://www.example.com ''a'' ''b'']
4983 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4984 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4989 External links: wiki links within external link (Bug 3695)
4991 [http://example.com [[wikilink]] embedded in ext link]
4993 <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>
4996 <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>
5000 BUG 787: Links with one slash after the url protocol are invalid
5004 [http:/example.com title]
5006 <p>http:/example.com
5007 </p><p>[http:/example.com title]
5012 Bracketed external links with template-generated invalid target
5014 [{{echo|http:/example.com}} title]
5016 <p>[http:/example.com title]
5021 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5023 ''[http://example.com text'']
5024 [http://example.com '''text]'''
5025 ''Something [http://example.com in italic'']
5026 ''Something [http://example.com mixed''''', even bold]'''
5027 '''''Now [http://example.com both''''']
5029 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5030 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5031 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5032 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5033 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5039 Bug 4781: %26 in URL
5041 http://www.example.com/?title=AT%26T
5043 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5046 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5049 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5050 # % is actually legal in HTML5. Any change in output would need testing though.
5052 Bug 4781, 5267: %25 in URL
5054 http://www.example.com/?title=100%25_Bran
5056 <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>
5059 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5063 Bug 4781, 5267: %28, %29 in URL
5065 http://www.example.com/?title=Ben-Hur_%281959_film%29
5067 <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>
5070 <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>
5075 Bug 4781: %26 in autonumber URL
5077 [http://www.example.com/?title=AT%26T]
5079 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5082 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5086 Bug 4781, 5267: %26 in autonumber URL
5088 [http://www.example.com/?title=100%25_Bran]
5090 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5093 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5097 Bug 4781, 5267: %28, %29 in autonumber URL
5099 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5101 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5104 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5109 Bug 4781: %26 in bracketed URL
5111 [http://www.example.com/?title=AT%26T link]
5113 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5116 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5120 Bug 4781, 5267: %25 in bracketed URL
5122 [http://www.example.com/?title=100%25_Bran link]
5124 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5129 Bug 4781, 5267: %28, %29 in bracketed URL
5131 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5133 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5136 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5140 External link containing a period in the anchor. (bug 63947)
5142 [//foo.org/bar#baz. bang]
5144 [//foo.org/bar. bang]
5146 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5147 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5150 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5151 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5155 External link containing a single quote. (bug 63947)
5159 [//foo.org/bar'baz bang]
5161 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5162 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5165 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5166 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5171 External link containing a period in the anchor. (bug 63947)
5173 [//foo.org/bar#baz. bang]
5175 [//foo.org/bar. bang]
5177 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5178 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5181 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5182 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5186 External link containing a single quote. (bug 63947)
5190 [//foo.org/bar'baz bang]
5192 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5193 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5196 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5197 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5202 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5204 Some [http://example.com/ pretty ''italics'' and stuff]!
5206 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5211 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5213 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5215 <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>
5220 External link containing double-single-quotes with no space separating the url from text in italics
5222 [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]].]
5224 <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>
5227 <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>
5229 <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>
5233 External link with comments in link text
5235 [http://www.google.com Google <!-- comment -->]
5237 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5242 URL-encoding in URL functions (single parameter)
5244 {{localurl:Some page|amp=&}}
5246 <p>/index.php?title=Some_page&amp=&
5251 URL-encoding in URL functions (multiple parameters)
5253 {{localurl:Some page|q=?&=&}}
5255 <p>/index.php?title=Some_page&q=?&amp=&
5262 http://example.com/index.php?foozoid%5B%5D=bar
5264 http://example.com/index.php?foozoid[]=bar
5266 <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>
5267 </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>
5270 <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>
5272 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5276 IPv6 urls (bug 21261)
5280 http://[2404:130:0:1000::187:2]/index.php
5282 <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>
5287 Non-extlinks in brackets
5296 [{{echo|foo}} ''bar'']
5297 [{{echo|foo}}l's] errand
5298 [{{echo|foo}}l's errand]
5300 [url=http://example.com]
5313 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5318 Percent encoding in external links
5320 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5322 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5325 <p><a rel="mw:ExtLink"
5326 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5330 Use url link syntax for links where the content is equal the link target
5334 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5337 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5341 Parenthesis in external links, especially URL links
5345 http://example.com/test)
5347 http://example.com/(test)
5349 http://example.com/((test)
5351 (http://example.com/(test))
5353 (http://example.com/(test)))))
5355 http://example.com/a)b
5357 [http://example.com) foo]
5359 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5360 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5361 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5362 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5363 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5364 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5365 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5366 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5369 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5370 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5371 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5372 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5373 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5374 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5375 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5376 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5380 Parenthesis in external links, w/ transclusion or comment
5382 (http://example.com/{{echo|hi}})
5384 (http://example.com<!-- hi -->)
5386 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5387 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5390 <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>
5392 <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>
5396 Serialize <a> tags with invalid link targets as plain text
5400 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5401 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5402 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5403 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5406 <nowiki>*</nowiki>text
5407 <nowiki>[[foo]]</nowiki>
5408 <nowiki>*a [[foo]]</nowiki>
5412 mw:ExtLink -vs- mw:WikiLink (T94723)
5416 <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>
5417 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5418 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5419 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5421 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5422 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5427 [[wikipedia:Foo|Bar]]
5428 [[wikipedia:Foo|Bar]]
5430 [[wikipedia:European_Robin|European Robin]]
5431 [[wikipedia:European_Robin|European Robin]]
5435 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5439 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5441 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5452 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5454 Normal text. '''''Bold italic text.''''' Normal text.
5456 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5457 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5462 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5463 # parser strips. The wikitext contains just the first half of the bold
5466 Unclosed and unmatched quotes
5468 '''''Bold italic text '''with bold deactivated''' in between.'''''
5470 '''''Bold italic text ''with italic deactivated'' in between.'''''
5474 ..spanning two paragraphs (should not work).'''
5476 '''Bold tag left open
5478 ''Italic tag left open
5482 <!-- Unmatching number of opening, closing tags: -->
5483 '''This year''''s election ''should'' beat '''last year''''s.
5485 ''Tom'''s car is bigger than ''Susan'''s.
5487 Plain ''italic'''s plain
5489 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5490 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5491 </p><p><b>Bold text..</b>
5492 </p><p>..spanning two paragraphs (should not work).
5493 </p><p><b>Bold tag left open</b>
5494 </p><p><i>Italic tag left open</i>
5496 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5497 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5498 </p><p>Plain <i>italic'</i>s plain
5501 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5502 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5503 </p><p><b>Bold text..</b>
5504 </p><p>..spanning two paragraphs (should not work).<b></b>
5505 </p><p><b>Bold tag left open</b>
5506 </p><p><i>Italic tag left open</i>
5509 <!-- Unmatching number of opening, closing tags: -->
5510 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5511 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5512 </p><p>Plain <i>italic'</i>s plain
5519 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5522 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5523 # is the bare minimum required by the spec, see:
5524 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5525 # Parsoid team replies: empty table tags are legal in HTML5
5527 A table with no data.
5540 A table with stray table end tags on start tag line (wt2html)
5544 {|style="color: red;"|}
5546 {|style="color: red;" |}
5550 {|style="color: red;"|} id="foo"
5554 {|style="color: red;" |} id="foo"
5558 <table style="color: red;"></table>
5560 <table style="color: red;">
5566 <table style="color: red;" id="foo">
5572 <table style="color: red;" id="foo">
5581 A table with no data (take 2)
5589 # A table with nothing but a caption is invalid XHTML, we might want to render
5590 # this as <p>caption</p>
5591 # Parsoid team replies: table with only a caption is legal in HTML5
5593 A table with nothing but a caption
5601 </caption><tr><td></td></tr></table>
5604 <table><caption> caption</caption></table>
5608 A table with caption with default-spaced attributes and a table row
5611 |+ style="color: red;" | caption1
5617 <caption style="color: red;"> caption1
5626 A table with captions with non-default spaced attributes and a table row
5629 |+style="color: red;"|caption2
5630 |+ style="color: red;"| caption3
5636 <caption style="color: red;">caption2
5638 <caption style="color: red;"> caption3
5647 Table td-cell syntax variations
5651 | foo bar foo || baz
5652 | style='color:red;' | baz
5653 | style='color:red;' || baz
5660 <td> foo bar foo </td>
5663 <td style="color:red;"> baz
5665 <td> style='color:red;' </td>
5693 Simple table but with multiple dashes for row wikitext
5712 Multiplication table
5714 {| border="1" cellpadding="2"
5715 |+Multiplication table
5717 ! × !! 1 !! 2 !! 3
5735 <table border="1" cellpadding="2">
5736 <caption>Multiplication table
5783 Accept "||" in table headings
5798 Accept "!!" in table data
5812 <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>
5817 Accept "||" in indented table headings
5827 </th></tr></table></dd></dl>
5832 Accept "!!" in templates
5846 <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>
5850 Accept "!!" in table headings after newline
5867 <p>b!!c</p></th></tr>
5872 Accept "!!" in table data of mixed wikitext / html syntax
5876 <tr><td>b!!c</td></tr>
5889 <tbody><tr><th>a</th></tr>
5890 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
5895 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5912 Accept "| !" at start of line in tables (ignore !-attribute)
5916 | !style="color:red" | bar
5928 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 +/-
5932 |style='color:red;'|+1
5933 |style='color:blue;'|-1
5945 <td style="color:red;">+1
5947 <td style="color:blue;">-1
5971 |rowspan=2| Cell 2, row 1 (and 2)
5982 <td rowspan="2"> Cell 2, row 1 (and 2)
6000 {| bgcolor=#ABCDEF border=2
6005 |the original table again
6013 <table bgcolor="#ABCDEF" border="2">
6021 <td>the original table again
6027 Invalid attributes in table cell (bug 1830)
6041 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6045 | title="foo<nowiki>|</nowiki>" |bar
6046 | title="foo<nowiki>|</nowiki>" bar
6053 <td title="foo|">bar
6055 <td> title="foo|" bar
6060 # The "|}" to close the table is missing from the input, so parsoid's
6061 # *2wt modes will fail.
6063 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
6065 parsoid=wt2html,html2html
6068 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6072 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6073 <td>]" onmouseover="alert(document.cookie)">test
6081 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6084 # FIXME: The php output is broken.
6086 ! and || in td attributes should not be parsed as <th>/<td>
6089 | style="color: red !important;" data-contrived="put this here ||" | foo
6094 <td> style="color: red !important;" data-contrived="put this here </td>
6100 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
6105 Indented table markup mixed with indented pre content (proposed in bug 6200)
6110 Text that should be rendered preformatted
6118 <pre>Text that should be rendered preformatted
6127 1. Template-generated table cell attributes and cell content
6132 || {{table_attribs_5}}
6133 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6134 |align=center {{table_attribs}}
6135 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6140 <td style="color:red;">Foo
6142 <td style="color:red;">Foo
6144 <td> style="color:red;"</td>
6147 <td style="color:red;">Foo
6149 <td align="center" style="color:red;">Foo
6151 <td align="center" style="color:red;">Foo
6157 2. Template-generated table cell attributes and cell content
6160 |{{table_attribs_2}}
6165 <td style="color:red;">Foo
6173 <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>
6174 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6179 3. Template-generated table cell attributes and cell content
6182 !align=center {{table_header_cells}}
6184 |align=center {{table_cells}}
6189 <th align="center" style="color:red;">Foo</th>
6190 <th style="color:red;"><i>Bar</i></th>
6191 <th style="color:brown;"><i>Foo</i> and Baz
6194 <td align="center" style="color:red;">Foo</td>
6195 <td style="color:red;"><i>Bar</i></td>
6196 <td style="color:brown;"><i>Foo</i> and Baz
6201 <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>
6202 <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>
6207 4. Template-generated table cell attributes and cell content inside a templated table
6210 !align=center {{table_header_cells}}
6212 |align=center {{table_cells}}
6217 <th align="center" style="color:red;">Foo</th>
6218 <th style="color:red;"><i>Bar</i></th>
6219 <th style="color:brown;"><i>Foo</i> and Baz
6222 <td align="center" style="color:red;">Foo</td>
6223 <td style="color:red;"><i>Bar</i></td>
6224 <td style="color:brown;"><i>Foo</i> and Baz
6228 <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}}]}'>
6229 <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>
6231 <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>
6235 ## Edge case fix to prevent future regressions
6237 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6240 |{{table_attribs_7}}
6245 <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>
6247 <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>
6251 Table with row followed by newlines and table heading
6269 Table with empty line following the start tag
6286 # FIXME: Preserve the attribute properly (with an empty string as value) in
6287 # the PHP parser. Parsoid implements the behavior below.
6289 Table attributes with empty value
6299 </td></tr></tbody></table>
6304 Wikitext table with a lot of comments
6327 Wikitext table comments represented in parsoid dom
6329 {|<!--c1--><!--c2-->
6340 <table><!--c1--><!--c2-->
6341 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6342 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6347 Wikitext table with double-line table cell
6364 Table cell with a single comment
6381 Table-cell after a comment-only-empty-line
6398 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6400 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6406 Build table with {{!}}
6408 {{{!}} class="wikitable"
6411 {{!}}- style="color:red;"
6412 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6415 <table class="wikitable">
6421 <tr style="color:red;">
6423 <td style="color:red;"> second data
6429 Build table with pipe as data
6431 {| class="wikitable"
6434 |- style="color:red;"
6435 | data || style="color:red;" | second data
6437 | style="color:red;" | data with | || style="color:red;" | second data with |
6439 || data with | ||| second data with |
6442 <table class="wikitable">
6448 <tr style="color:red;">
6450 <td style="color:red;"> second data
6453 <td style="color:red;"> data with | </td>
6454 <td style="color:red;"> second data with |
6457 <td> data with | </td>
6458 <td> second data with |
6464 Build table with wikilink
6466 {| class="wikitable"
6467 ! header || second header
6468 |- style="color:red;"
6469 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6471 | data || second data [[Main Page|link|text with pipe]]
6474 <table class="wikitable">
6479 <tr style="color:red;">
6480 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6481 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6485 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6490 # The expected HTML structure in this test is debatable. The PHP parser does
6491 # not parse this kind of table at all. The main focus for Parsoid is on
6492 # round-tripping, so this output is ok for now. TODO: revisit!
6494 Wikitext table with html-syntax row
6504 <td>foo</td></tr></tbody></table>
6507 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6508 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6509 ## PHP parser, which tidy then compounds by fostering the content
6510 ## entirely out of the table. Parsoid recognizes the table context
6511 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6512 ## depends on PHP's treatment of broken table markup!
6514 Implicit <td> after a |-
6516 parsoid=wt2html,html2html
6536 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6538 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6540 parsoid=wt2html,html2html
6573 <tr><td><pre>a</pre></td></tr>
6574 <tr><td> b</td></tr>
6579 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6580 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6582 Lists should be recognized in an implicit <td> context
6584 parsoid=wt2html,html2html
6611 Table cells not properly parsed in an implicit-td context
6615 {{table_attribs_4}} || a || b
6620 <td style="background-color:#DC241f;" width="10px"></td>
6627 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6628 <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>
6633 Parsoid: Round-trip tables directly followed by content (bug 51219)
6635 parsoid=wt2html,wt2wt
6660 Parsoid: Default to a newline after tables in new content (bug 51219)
6665 <tr><td>foo</td></tr></tbody></table> bar
6667 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6672 <nowiki> </nowiki>bar
6680 Parsoid: newline inducing block nodes don't suppress <nowiki>
6692 Parsoid: Row-syntax table headings followed by comment & table cells
6694 parsoid=wt2html,wt2wt
6698 <!-- foo --> || baz || quux
6712 <tbody><tr><th> foo </th><th> bar
6713 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6718 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6721 Parsoid: Recover better from broken table attributes
6741 <p>foo</p></td></tr>
6746 Strip unsupported table tags
6794 Testing serialization after deletion of table cells
6797 "modes": ["wt2wt", "selser"],
6805 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6818 Plain link, capitalized
6822 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6827 Plain link, uncapitalized
6831 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6838 [[Main Page|The Main Page]]
6840 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6845 Piped link with comment in link text
6847 [[Main Page|The Main<!--front--> Page]]
6849 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6854 Piped link with multiple pipe characters in link text
6856 [[Main Page||The|Main|Page|]]
6858 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6861 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6869 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6874 Broken link with fragment
6876 [[Zigzagzogzagzig#zug]]
6878 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6883 Special page link with fragment
6885 [[Special:Version#anchor]]
6887 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6892 Nonexistent special page link with fragment
6894 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6896 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6903 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6905 <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>
6912 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6914 <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>!!!
6925 Bug 43661: Piped links with identical prefixes
6927 [[prefixed article|prefixed articles with spaces]]
6929 [[prefixed article|prefixed articlesaoeu]]
6931 [[Main Page|Main Page test]]
6933 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6934 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6935 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6941 Link with HTML entity in suffix / tail
6943 [[Main Page]]", [[Main Page]]a
6945 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6948 <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>
6952 Link with 3 brackets
6961 Link with 4 brackets
6965 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6970 Piped link with 3 brackets
6972 [[[main page|the main page]]]
6974 <p>[[[main page|the main page]]]
6979 Piped link with extlink-like text
6982 [[Main Page|This is a [bar]]]
6984 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6985 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6988 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6989 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6993 Link with multiple pipes
6995 [[Main Page|The|Main|Page]]
6997 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7001 # Note that parsoid does not munge anchor text; all non-space
7002 # characters are valid in HTML5 ids.
7004 Anchor containing a #. (bug 63430)
7006 [[Main Page#And#Link]]
7008 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7011 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7017 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7019 <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>
7024 Link with space in namespace
7026 [[User talk:Foo bar]]
7028 <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>
7033 MemoryAlpha:AlphaTest
7035 This is an article in the MemoryAlpha namespace
7036 (which shadows the memoryalpha interwiki link).
7040 Namespace takes precedence over interwiki link (bug 51680)
7042 [[MemoryAlpha:AlphaTest]]
7044 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7048 # The previous test doesn't work correctly in html2*, due to not recognizing the
7049 # link as an internal one. This one checks for the correct behavior.
7051 Link to namespace preferred over interwiki with correct rel attribute
7053 parsoid=html2wt,html2html
7055 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7057 [[MemoryAlpha:AlphaTest]]
7061 Piped link to namespace
7063 [[Meta:Disclaimers|The disclaimers]]
7065 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7072 [[Usually caused by a typo (oops}]]
7074 <p>[[Usually caused by a typo (oops}]]
7081 Just a test of an article title containing a percent.
7085 Link containing % (not as a hex sequence)
7089 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7092 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7095 # note that the parsoid HTML is identical to the previous test output,
7096 # so the previous test ensures that the html2wt mode will generate the
7097 # "not as a hex sequence" wikitext.
7099 Link containing % as a single hex sequence interpreted to char
7101 parsoid=wt2wt,wt2html,html2html
7105 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7108 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7112 Link containing % as a double hex sequence interpreted to hex sequence
7116 <p>[[7%2525 Solution]]
7120 # note that parsoid does not munge anchor text; all non-space
7121 # characters are valid in HTML5 anchors.
7123 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7124 Example for such a section: == < ==
7126 [[%23%3c]][[%23%3e]]
7128 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7131 <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>
7135 Link containing "<#" and ">#" as a hex sequences
7137 [[%3c%23]][[%3e%23]]
7139 <p>[[%3c%23]][[%3e%23]]
7144 Link containing an equals sign
7146 [[Special:BookSources/isbn=4-00-026157-6]]
7148 <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>
7151 <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>
7157 Just a test of an article title containing a tilde.
7160 # note that links containing signatures, like [[Foo~~~~]], are
7161 # massaged by the pre-save transform (PST) and so the tildes are never
7162 # seen by the parser.
7164 Link containing a tilde
7168 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7171 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7175 Link containing double-single-quotes '' (bug 4598)
7177 [[Lista d''e paise d''o munno]]
7179 <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>
7182 <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>
7186 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7188 Some [[Link|pretty ''italics'' and stuff]]!
7190 <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>!
7193 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7197 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7199 ''Some [[Link|pretty ''italics'' and stuff]]!''
7201 <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>
7206 Link with double quotes in title part (literal) and alternate part (interpreted)
7208 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7212 [[''Pentecoste''|Pentecoste]]
7214 [[''Pentecoste''|''Pentecoste'']]
7216 <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>
7217 </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>
7218 </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>
7219 </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>
7222 <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>
7223 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7224 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7225 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7229 Broken image links with HTML captions (bug 39700)
7231 [[File:Nonexistent|<script></script>]]
7232 [[File:Nonexistent|100x100px|<script></script>]]
7233 [[File:Nonexistent|<]]
7234 [[File:Nonexistent|a<i>b</i>c]]
7236 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7237 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7238 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7239 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7242 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7243 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
7244 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7245 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i>b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
7251 [[http://www.example.com]]
7253 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7256 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7260 Plain link to URL with link text
7262 [[http://www.example.com Link text]]
7264 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7269 Plain link to protocol-relative URL
7271 [[//www.example.com]]
7273 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7276 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7280 Plain link to protocol-relative URL with link text
7282 [[//www.example.com Link text]]
7284 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7289 Plain link to page with question mark in title
7295 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7296 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7301 # I'm fairly sure the expected result here is wrong.
7302 # We want these to be URL links, not pseudo-pages with URLs for titles....
7303 # However the current output is also pretty screwy.
7306 # I'm changing it to match the current output--it arguably makes more
7307 # sense in the light of the test above. Old expected result was:
7308 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7310 # But I think this test is bordering on "garbage in, garbage out" anyway.
7315 Piped link to URL: [[http://www.example.com|an example URL]]
7317 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7320 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7324 BUG 2: [[page|http://url/]] should link to page, not http://url/
7326 [[Main Page|http://url/]]
7328 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7331 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7334 # Parsoid does not mark self-links, by design.
7336 BUG 337: Escaped self-links should be bold
7340 [[Bug462]] [[Bug462]]
7342 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7345 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7347 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7351 Self-link to section should not be bold
7355 [[Main Page#section]]
7357 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7368 Self-link to numeric title
7374 <p><strong class="selflink">0</strong>
7379 Link to numeric-equivalent title
7385 <p><a href="/wiki/00" title="00">00</a>
7390 <nowiki> inside a link
7392 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7394 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7399 Non-breaking spaces in title
7401 [[ Main Page ]]
7403 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7408 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7414 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7419 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7425 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7430 Internal link with en linktrail: no apostrophes (bug 27473)
7436 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7441 Internal link with ca linktrail with apostrophes (bug 27473)
7447 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7452 Internal link with kaa linktrail with apostrophes (bug 27473)
7458 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7463 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7465 [[User:Foo/Test/63636:Bar|Test]]
7467 <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>
7470 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7474 Purely hash wikilink
7476 title=[[User:test/123]]
7480 <p><a href="#a">b</a>
7483 <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>
7487 1. Interaction of linktrail and template encapsulation
7493 <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>
7497 2. Interaction of linktrail and template encapsulation
7501 {{echo|Some [[Fool]]}}s
7503 <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>
7507 3. Interaction of linktrail and template encapsulation
7511 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7513 <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>
7523 Internal link with is link prefix
7527 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7529 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7540 Internal link with is link trail and link prefix
7544 [[mótmælendatrú|xxx]]ar
7546 mótmælenda[[söfnuður]]
7547 mótmælenda[[söfnuður|söfnuðir]]
7548 mótmælenda[[söfnuður|söfnuðir]]xxx
7550 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7551 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7552 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7553 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7554 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7559 Parsoid link trail escaping
7561 parsoid=html2wt,html2html
7563 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7569 Parsoid link prefix escaping
7572 parsoid=html2wt,html2html
7574 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7576 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7580 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7588 [http://wp.org ''foo'']
7590 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7591 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7592 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7593 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7598 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7602 [[Foo|{{echo|a}} b {{echo|c}}]]
7604 <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>
7608 Link with angle bracket after anchor
7612 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7615 <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>
7619 ### Interwiki links (see maintenance/interwiki.sql)
7623 Inline interwiki link
7625 parsoid=wt2html,wt2wt,html2html
7627 [[MeatBall:SoftSecurity]]
7629 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7632 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7636 Inline interwiki link with empty title (bug 2372)
7638 parsoid=wt2html,wt2wt,html2html
7642 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7645 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7649 Interwiki link encoding conversion (bug 1636)
7651 *[[Wikipedia:ro:Olteniţa]]
7652 *[[Wikipedia:ro:Olteniţa]]
7654 <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>
7655 <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>
7659 <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>
7660 <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>
7665 Interwiki link with fragment (bug 2130)
7667 [[MeatBall:SoftSecurity#foo]]
7669 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7673 # Ideally the wikipedia: prefix here should be proto-relative too
7674 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7675 # define the 'en' prefix, and originally the test used 'wikipedia',
7676 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7679 Different interwiki prefixes mapping to the same URL
7687 [[:wikipedia:Foo|Foo]]
7689 [[wikipedia:en:Foo]]
7691 [[:wikipedia:en:Foo]]
7695 <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>
7697 <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>
7699 <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>
7701 <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>
7703 <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>
7705 <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>
7707 <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>
7711 Interwiki links that cannot be represented in wiki syntax
7714 [[meatball:ok#foo|ok with fragment]]
7715 [[meatball:ok_as_well?|ok ending with ? mark]]
7716 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7717 [http://de.wikipedia.org/wiki/#foo is just fragment]
7720 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7721 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7722 <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>
7723 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7724 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7727 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7728 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7729 <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>
7730 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7731 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7735 Interwiki links: trail
7737 [[wikipedia:Foo|Ba]]r
7739 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7742 <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>
7746 Local interwiki link
7748 parsoid=wt2html,wt2wt,html2html
7750 [[local:Template:Foo]]
7752 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7755 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7758 # Parsoid does not mark self-links, by design.
7760 Local interwiki link: self-link to current page
7763 parsoid=wt2html,wt2wt,html2html
7767 <p><strong class="selflink">local:Main Page</strong>
7770 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7774 Local interwiki link: prefix only (bug 64167)
7776 parsoid=wt2html,wt2wt,html2html
7780 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7783 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7787 Local interwiki link: with additional interwiki prefix (bug 61357)
7789 parsoid=wt2html,wt2wt,html2html
7791 [[local:meatball:Hello]]
7793 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7796 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7800 Multiple local interwiki link prefixes
7802 [[local:local:local:local:mi:local:Foo]]
7804 parsoid=wt2html,wt2wt,html2html
7806 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7809 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7813 ### Interlanguage links
7814 ### Language links (so that searching for '### language' matches..)
7820 parsoid=wt2html,wt2wt,html2html
7828 <p>Blah blah blah</p>
7829 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7833 Interlanguage link with spacing
7835 parsoid=wt2html,wt2wt,html2html
7843 <p>Blah blah blah</p>
7844 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7848 Double interlanguage link
7850 parsoid=wt2html,wt2wt,html2html
7859 <p>Blah blah blah</p>
7860 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7861 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7865 Interlanguage link variations
7867 parsoid=wt2html,wt2wt,html2html
7877 <p>Blah blah blah</p>
7878 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7879 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7880 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7884 Space and question mark encoding in interlanguage links (T95473)
7886 parsoid=wt2html,wt2wt,html2html
7894 <p>Blah blah blah</p>
7895 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
7899 Interlanguage link, with prefix links
7909 <p>Blah blah blah</p>
7910 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7914 Double interlanguage link, with prefix links (bug 8897)
7925 <p>Blah blah blah</p>
7926 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7927 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7931 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7939 <p>Blah blah blah</p>
7940 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7944 Parsoid-specific test: Wikilinks with should RT properly
7950 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7955 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7959 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7960 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7962 He&nbsp;llo [[Foo|He&nbsp;llo]]
7964 He&nbsp;llo [[He&nbsp;llo]]
7968 Parsoid: handle constructor well
7974 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7975 </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>
7978 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7980 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7989 # Note that `ko` isn't a known interlanguage prefix
7991 Parsoid: recognize interlanguage links without a target page
8001 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8003 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8006 # Note that `ko` isn't a known interwiki prefix
8008 Parsoid: recognize interwiki links without a target page
8010 parsoid=wt2html,wt2wt,html2html
8016 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8017 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8020 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8021 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8025 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8029 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8032 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8036 Interlanguage link with preceding local interwiki link (bug 68085)
8038 parsoid=wt2html,wt2wt,html2html
8041 [[local:es:Spanish]]
8044 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8048 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8052 Looks like an interlanguage link, but is actually a local interwiki
8054 parsoid=wt2html,wt2wt,html2html
8060 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8064 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8068 ### Redirects, Parsoid-only
8072 1. Simple redirect to page
8074 #REDIRECT [[Main Page]]
8076 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8080 2. Other redirect variants
8082 #REDIRECT [[Main_Page]]
8084 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8087 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8088 # This tests the Parsoid bail-out code.
8090 3. Other redirect variants
8092 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8094 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8098 4. Redirect to a templated destination
8100 #REDIRECT [[{{echo|Foo}}bar]]
8102 <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"}]]}'/>
8108 parsoid=wt2html,wt2wt
8113 <li>REDIRECT [[]]</li></ol>
8117 Optional colon in #REDIRECT
8119 # the colon is archaic syntax. we support it for wt2html, but we
8120 # don't care that it roundtrips back to the modern syntax.
8121 parsoid=wt2html,html2html
8123 #REDIRECT:[[Main Page]]
8125 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8129 Whitespace in #REDIRECT with optional colon
8131 # the colon and gratuitous whitespace is archaic syntax. we support
8132 # it for wt2html, but we don't care that it roundtrips back to the
8133 # modern syntax (without extra whitespace)
8134 parsoid=wt2html,html2html
8141 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8145 Piped link in #REDIRECT
8147 # content after piped link is ignored. we support this syntax,
8148 # but don't care that the piped link is lost when we roundtrip this.
8151 #REDIRECT [[Main Page|bar]]
8153 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8157 Redirect to category (T104502)
8159 parsoid=wt2html,wt2wt
8161 #REDIRECT [[Category:Foo]]
8163 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8167 Redirect to category with URL encoding (T104502)
8171 #REDIRECT [[Category%3AFoo]]
8173 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8177 Redirect to category page
8179 #REDIRECT [[:Category:Foo]]
8181 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8185 Redirect to image page (1)
8187 #REDIRECT [[File:Wiki.png]]
8189 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8193 Redirect to image page (2)
8195 #REDIRECT [[Image:Wiki.png]]
8197 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8200 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8201 # Next test confirms this.
8203 Redirect to language (1) (T104918)
8205 parsoid=wt2html,wt2wt,html2html
8207 #REDIRECT [[en:File:Wiki.png]]
8209 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8213 Redirect to language (2) (T104918)
8215 #REDIRECT [[:en:File:Wiki.png]]
8217 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8221 Redirect to interwiki (T104918)
8223 #REDIRECT [[meatball:File:Wiki.png]]
8225 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8229 Non-English #REDIRECT
8233 #TILVÍSUN [[Main Page]]
8235 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8239 Redirect syntax under text isn't considered a redirect
8242 #redirect [[Main Page]]
8245 <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>
8248 # FIXME: Should hoist the redirect to the top of the page and ensure there
8255 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8275 Broken br tag sanitization
8283 # TODO: Fix html2html mode (bug 51055)!
8285 Parsoid: Broken br tag recognition
8298 Incorrecly removing closing slashes from correctly formed XHTML
8300 <br style="clear:both;" />
8302 <p><br style="clear:both;" />
8307 Failing to transform badly formed HTML into correct XHTML
8309 <br style="clear: left;">
8310 <br style="clear: right;">
8311 <br style="clear: both;">
8313 <p><br style="clear: left;" />
8314 <br style="clear: right;" />
8315 <br style="clear: both;" />
8319 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8320 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8322 Handling html with a div self-closing tag
8331 <p><div title />
8335 <p><div title=bar />
8336 <div title=bar/>
8338 <div title="bar/"></div>
8342 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8343 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8344 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8345 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8346 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8347 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8351 Handling html with a br self-closing tag
8378 Horizontal ruler (should it add that extra space?)
8393 Horizontal ruler -- 4+ dashes render hr
8402 Horizontal ruler -- eats additional dashes on the same line
8411 Horizontal ruler -- does not collapse dashes on consecutive lines
8422 Horizontal ruler -- <4 dashes render as plain text
8431 Horizontal ruler -- Supports content following dashes on same line
8443 ### Block-level elements
8452 <ul><li>Common list</li>
8454 <li>item 3</li></ul>
8465 <ol><li>Numbered list</li>
8467 <li> item 3</li></ol>
8481 ***#Number on level 4
8483 **#Number on level 3
8484 **#Number on level 3
8488 #** Level 3, but ordered
8491 <ol><li> with numbers</li></ol>
8492 <ul><li> and bullets</li></ul>
8493 <ol><li> and numbers</li></ol></li>
8495 <ul><li>bullet level 2
8496 <ul><li>bullet level 3
8497 <ol><li>Number on level 4</li></ol></li></ul></li>
8499 <ol><li>Number on level 3</li>
8500 <li>Number on level 3</li></ol></li></ul>
8501 <ol><li>number level 2</li></ol></li>
8503 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8504 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8515 <ul><li>bar</li></ul></li></ul>
8525 <ul><li><ul><li>foo</li></ul></li>
8531 Nested lists 3 (first element empty)
8537 <ul><li>bar</li></ul></li></ul>
8542 Nested lists 4 (first element empty)
8547 <ul><li><ul><li></li></ul></li>
8553 Nested lists 5 (both elements empty)
8558 <ul><li><ul><li></li></ul></li>
8564 Nested lists 6 (both elements empty)
8570 <ul><li></li></ul></li></ul>
8575 Nested lists 7 (skip initial nesting levels)
8579 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8584 Nested lists 8 (multiple nesting transitions)
8592 <ul><li><ul><li> bar</li></ul></li>
8593 <li> baz</li></ul></li>
8599 Nested lists 9 (extension interaction)
8605 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8609 1. Lists with start-of-line-transparent tokens before bullets: Comments
8622 2. Lists with start-of-line-transparent tokens before bullets: Template close
8627 <ul><li>foo bar</li>
8633 List items are not parsed correctly following a <pre> block (bug 785)
8639 <ul><li> <pre>foo</pre></li>
8640 <li> <pre>bar</pre></li>
8644 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8645 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8650 List items from template
8661 * notSOL{{inner list}}
8664 <ul><li> item 1</li>
8665 <li> item 2</li></ul>
8666 <ul><li> item 0</li>
8668 <li> item 2</li></ul>
8669 <ul><li> item 0</li>
8672 <li> item 2</li></ul>
8677 List interrupted by empty line or heading
8685 <ul><li> foo</li></ul>
8686 <ul><li><ul><li> bar</li></ul></li></ul>
8687 <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>
8688 <ul><li> Another list item</li></ul>
8693 Multiple list tags generated by templates
8714 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8717 <!--This line will NOT split the list-->
8719 <!--This line will NOT split the list either-->
8721 <!--foo--> <!----> <!--This line NOT split the list either-->
8732 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8735 <!--This line will NOT split the list-->
8737 <!--This line will NOT split the list either-->
8739 <!--foo--> <!----> <!--This line NOT split the list
8752 (The PHP parser relies on Tidy for the hack)
8754 parsoid=wt2html,wt2wt
8758 * {{echo|<li>templated li-hack}}
8759 * <!--foo--> <li> unsupported li-hack with preceding comments
8762 <li><li>not a li-hack
8769 <li>templated li-hack</li>
8770 <li>unsupported li-hack with preceding comments</li>
8773 <li>not a li-hack</li>
8778 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8805 Parsoid: Test of whitespace serialization with Templated bullets
8812 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8816 # ------------------------------------------------------------------------
8817 # The next set of tests are about Parsoid's ability to handle badly nested
8818 # tags (parse, minimize scope of fixup, and roundtrip back)
8819 # ------------------------------------------------------------------------
8822 Unbalanced closing block tags break a list
8823 (php parser relies on Tidy to fix up)
8841 # Parsoid fails this test, but it might be tricky to support properly.
8844 Unbalanced closing non-block tags don't break a list
8845 (php parser relies on Tidy to fix up)
8852 <li><span>a</span></li>
8853 <li><span>b</span></li>
8867 Unclosed formatting tags that straddle lists are closed and reopened
8868 (php parser relies on Tidy to fix up)
8870 parsoid=wt2html,wt2wt,html2html
8880 <ol><li> <s> a</s></li>
8881 <li><s> b </s></li></ol>
8886 1. List embedded in a formatting tag
8893 <li><small>foo</small></li>
8903 ## Ugly Parsoid output here
8904 ## Not sure what the right output is.
8906 2. List embedded in a formatting tag
8913 <li><small>a</small></li>
8914 <li><small>b</small></li>
8921 <li><small>b</small></li>
8925 # Ugly Parsoid and PHP parser output here
8926 # Not sure if we want to make this a test!
8929 ## 3. Unclosed formatting tags in list elements
8935 ## <li><small>a</small></li>
8936 ## <li><small><small>b</small></small></li>
8940 ## <li><small>a</small></li>
8942 ## <li><small>b</small></li>
8946 # This is a bug in the PHP parser + tidy combination.
8947 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8948 # and then fostered out of the table by tidy.)
8949 # We believe the Parsoid output to be correct.
8951 Table with missing opening <tr> tag
8953 parsoid=wt2html,wt2wt
8971 # Note that the current date is hard-coded as
8972 # 1970-01-01T00:02:03Z (a Thursday)
8973 # when running parser tests. The timezone is also fixed to GMT, so
8974 # local date will be identical to current date.
8977 Magic Word: {{CURRENTDAY}}
8986 Magic Word: {{CURRENTDAY2}}
8995 Magic Word: {{CURRENTDAYNAME}}
9004 Magic Word: {{CURRENTDOW}}
9013 Magic Word: {{CURRENTMONTH}}
9022 Magic Word: {{CURRENTMONTH1}}
9031 Magic Word: {{CURRENTMONTHABBREV}}
9033 {{CURRENTMONTHABBREV}}
9040 Magic Word: {{CURRENTMONTHNAME}}
9042 {{CURRENTMONTHNAME}}
9049 Magic Word: {{CURRENTMONTHNAMEGEN}}
9051 {{CURRENTMONTHNAMEGEN}}
9058 Magic Word: {{CURRENTTIME}}
9067 Magic Word: {{CURRENTHOUR}}
9076 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9085 Magic Word: {{CURRENTYEAR}}
9094 Magic Word: {{CURRENTTIMESTAMP}}
9096 {{CURRENTTIMESTAMP}}
9103 Magic Words LOCAL (UTC)
9107 * {{LOCALMONTHNAME}}
9108 * {{LOCALMONTHNAMEGEN}}
9109 * {{LOCALMONTHABBREV}}
9118 * {{LOCALTIMESTAMP}}
9133 <li> 19700101000203</li></ul>
9138 Magic Word: {{FULLPAGENAME}}
9140 title=[[User:Ævar Arnfjörð Bjarmason]]
9144 <p>User:Ævar Arnfjörð Bjarmason
9149 Magic Word: {{FULLPAGENAMEE}}
9151 title=[[User:Ævar Arnfjörð Bjarmason]]
9155 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9160 Magic Word: {{TALKSPACE}}
9162 title=[[User:Ævar Arnfjörð Bjarmason]]
9171 Magic Word: {{TALKSPACE}}, same namespace
9173 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9182 Magic Word: {{TALKSPACE}}, main namespace
9184 title=[[Parser Test]]
9193 Magic Word: {{TALKSPACEE}}
9195 title=[[User:Ævar Arnfjörð Bjarmason]]
9204 Magic Word: {{SUBJECTSPACE}}
9206 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9215 Magic Word: {{SUBJECTSPACE}}, same namespace
9217 title=[[User:Ævar Arnfjörð Bjarmason]]
9226 Magic Word: {{SUBJECTSPACE}}, main namespace
9228 title=[[Parser Test]]
9236 Magic Word: {{SUBJECTSPACEE}}
9238 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9247 Magic Word: {{NAMESPACE}}
9249 title=[[User:Ævar Arnfjörð Bjarmason]]
9258 Magic Word: {{NAMESPACEE}}
9260 title=[[User:Ævar Arnfjörð Bjarmason]]
9269 Magic Word: {{NAMESPACENUMBER}}
9271 title=[[User:Ævar Arnfjörð Bjarmason]]
9280 Magic Word: {{SUBPAGENAME}}
9282 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9291 Magic Word: {{SUBPAGENAMEE}}
9293 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9302 Magic Word: {{ROOTPAGENAME}}
9304 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9308 <p>Ævar Arnfjörð Bjarmason
9313 Magic Word: {{ROOTPAGENAMEE}}
9315 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9319 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9324 Magic Word: {{BASEPAGENAME}}
9326 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9330 <p>Ævar Arnfjörð Bjarmason
9335 Magic Word: {{BASEPAGENAMEE}}
9337 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9341 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9346 Magic Word: {{TALKPAGENAME}}
9348 title=[[User:Ævar Arnfjörð Bjarmason]]
9352 <p>User talk:Ævar Arnfjörð Bjarmason
9357 Magic Word: {{TALKPAGENAMEE}}
9359 title=[[User:Ævar Arnfjörð Bjarmason]]
9363 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9368 Magic Word: {{SUBJECTPAGENAME}}
9370 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9374 <p>User:Ævar Arnfjörð Bjarmason
9379 Magic Word: {{SUBJECTPAGENAMEE}}
9381 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9383 {{SUBJECTPAGENAMEE}}
9385 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9390 Magic Word: {{NUMBEROFFILES}}
9399 Magic Word: {{PAGENAME}}
9401 title=[[User:Ævar Arnfjörð Bjarmason]]
9405 <p>Ævar Arnfjörð Bjarmason
9410 Magic Word: {{PAGENAME}} with metacharacters
9412 title=[['foo & bar = baz']]
9416 <p><i>'foo & bar = baz'</i>
9419 <p><i>'foo & bar = baz'</i></p>
9423 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9425 title=[[*RFC 1234 http://example.com/]]
9429 <p>*RFC 1234 http://example.com/
9432 <p>*RFC 1234 http://example.com/</p>
9436 Magic Word: {{PAGENAMEE}}
9438 title=[[User:Ævar Arnfjörð Bjarmason]]
9442 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9447 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9449 title=[[*RFC 1234 http://example.com/]]
9453 <p>*RFC_1234_http://example.com/
9456 <p>*RFC_1234_http://example.com/</p>
9460 Magic Word: {{REVISIONID}}
9469 Magic Word: {{SCRIPTPATH}}
9478 Magic Word: {{STYLEPATH}}
9487 Magic Word: {{SERVER}}
9491 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9496 Magic Word: {{SERVERNAME}}
9505 Magic Word: {{SITENAME}}
9514 Case-sensitive magic words, when cased differently, should just be template transclusions
9521 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9522 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9523 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9524 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9529 Case-insensitive magic words should still work with weird casing.
9539 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9543 # From plwiki:PLOS_ONE
9545 Parsoid: Page property magic word with magic word contents
9547 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9549 <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>"}]]}'/>
9553 Parsoid: Template-generated DISPLAYTITLE
9555 {{{{echo|DISPLAYTITLE}}:Foo}}
9557 <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}}]}'/>
9561 Namespace 1 {{ns:1}}
9570 Namespace 1 {{ns:01}}
9579 Namespace 0 {{ns:0}} (bug 4783)
9587 Namespace 0 {{ns:00}} (bug 4783)
9595 Namespace -1 {{ns:-1}}
9604 Namespace User {{ns:User}}
9613 Namespace User talk {{ns:User_talk}}
9622 Namespace User talk {{ns:uSeR tAlK}}
9631 Namespace File {{ns:File}}
9640 Namespace File {{ns:Image}}
9649 Namespace (lang=de) Benutzer {{ns:User}}
9660 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9666 <p>Benutzer Diskussion
9674 {{urlencode:hi world?!}}
9675 {{urlencode:hi world?!|WIKI}}
9676 {{urlencode:hi world?!|PATH}}
9677 {{urlencode:hi world?!|QUERY}}
9687 Magic Word: prioritize type info over data-parsoid
9691 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9697 Magic Word: serialize on separate line (parsoid)
9699 parsoid=wt2wt,html2wt
9705 foo<meta property="mw:PageProp/notoc"/>bar
9709 Magic Word: rt non-english wikis
9716 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9720 __proto__ is treated as normal wikitext (T105997)
9732 Magic links: internal link to RFC (bug 479)
9736 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9741 Magic links: RFC (bug 479)
9745 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9750 Magic links: RFC (bug 65278)
9752 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9754 <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.
9759 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9761 RFC      822
9765 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9772 Magic links: ISBN (bug 1937)
9776 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9781 Magic links: ISBN (bug 65278)
9783 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9785 <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.
9788 <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>
9792 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9794 ISBN      978 0 316 09811 3
9800 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9809 Magic links: PMID incorrectly converts space to underscore
9813 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9818 Magic links: PMID (bug 65278)
9820 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9822 <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.
9827 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9829 PMID      1234
9833 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9844 Nonexistent template
9846 {{thistemplatedoesnotexist}}
9848 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9853 Template with invalid target containing tags
9855 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9857 <p>{{a<b>b</b>|foo|a=b|a = b}}
9862 Template with invalid target containing unclosed tag
9864 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9866 <p>{{a<b>|foo|a=b|a = b}}</b>
9871 Template with invalid target containing wikilink
9875 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9878 <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>
9882 Template with just whitespace in it, bug #68421
9886 <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>
9892 This is a test template
9900 <p>This is a test template
9905 Template with explicit namespace
9909 <p>This is a test template
9917 This is a test template with parameter {{{param}}}
9923 {{paramtest|param=foo}}
9925 <p>This is a test template with parameter foo
9930 Template:paramtestnum
9936 Template unnamed parameter
9938 {{paramtestnum|Main Page|the main page}}
9940 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9945 Template:templatesimple
9951 Template:templateredirect
9953 #redirect [[Template:templatesimple]]
9957 Template:templateasargtestnum
9963 Template:templateasargtest
9965 {{template{{{templ}}}}}
9969 Template:templateasargtest2
9975 Template with template name as unnamed argument
9977 {{templateasargtestnum|templatesimple}}
9984 Template with template name as argument
9986 {{templateasargtest|templ=simple}}
9993 Template with template name as argument (2)
9995 {{templateasargtest2|templ=templatesimple}}
10002 Template:templateasargtestdefault
10004 {{{{{templ|templatesimple}}}}}
10014 Template with default value
10016 {{templateasargtestdefault}}
10023 Template with default value (value set)
10025 {{templateasargtestdefault|templ=templa}}
10034 {{templateredirect}}
10039 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10043 Template with argument in separate line
10045 {{ templateasargtest |
10053 Template with complex template as argument
10056 param ={{ templateasargtest |
10057 templ = simple }}}}
10059 <p>This is a test template with parameter (test)
10064 Template with thumb image (with link in description)
10066 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10068 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>
10071 <p>This is a test template with parameter</p>
10072 <div class="thumb tright">
10073 <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>
10074 <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>
10078 <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>
10082 Template:complextemplate
10084 {{{1}}} {{paramtest|
10085 param ={{{param}}}}}
10089 Template with complex arguments
10092 param ={{ templateasargtest |
10093 templ = simple }}|[[Template:complextemplate|link]]}}
10095 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10100 BUG 553: link with two variables in a piped link
10103 |[[{{{1}}}|{{{2}}}]]
10108 <td>[[{{{1}}}|{{{2}}}]]
10114 Magic variable as template parameter
10116 {{paramtest|param={{SITENAME}}}}
10118 <p>This is a test template with parameter MediaWiki
10125 [[{{{param}}}|link]]
10129 Template parameter as link source
10131 {{linktest|param=Main Page}}
10133 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10138 Template:paramtest2
10140 including another template, {{paramtest|param={{{arg}}}}}
10144 Template passing argument to another template
10146 {{paramtest2|arg='hmm'}}
10148 <p>including another template, This is a test template with parameter 'hmm'
10159 Template as link source
10163 [[{{linktest2}}|Main Page]]
10165 [[{{linktest2}}]]Page
10167 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10168 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10169 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10187 Template infinite loop
10191 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10196 Template from main namespace
10215 BUG 529: Template with table, not included at beginning of line
10234 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10254 BUG 41: Template parameters shown as broken links
10263 Template with targets containing wikilinks
10267 {{[[{{echo|foo}}]]}}
10269 {{{{echo|[[foo}}]]}}
10271 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10272 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10284 Templates: Double quotes as template target
10291 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10296 Template:MSGNW test
10298 ''None'' of '''this''' should be
10300 but rather passed unmodified
10307 # hmm, fix this or just deprecate msgnw and document its behavior?
10311 {{msgnw:MSGNW test}}
10313 <p>''None'' of '''this''' should be
10315  but rather passed unmodified
10316 {{test}}
10326 {{int:youhavenewmessages|lots of money|not!}}
10328 <p>You have lots of money (not!).
10335 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10339 <includeonly> and <noinclude> being included
10350 <onlyinclude>Foo</onlyinclude>bar
10354 <onlyinclude> being included
10366 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10370 <onlyinclude> and <includeonly> being included
10379 <includeonly> and <noinclude> on a page
10381 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10388 Un-closed <noinclude>
10395 <onlyinclude> on a page
10397 <onlyinclude>Foo</onlyinclude>bar
10404 Un-closed <onlyinclude>
10411 Self-closed noinclude, includeonly, onlyinclude tags
10422 Unbalanced includeonly and noinclude tags
10426 |b</noinclude></noinclude>
10427 |c</noinclude></includeonly>
10428 |d</includeonly></includeonly>
10437 <td>c</includeonly>
10439 <td>d</includeonly></includeonly>
10445 Template:Includeonly section
10448 ==Includeonly section==
10454 Bug 6563: Edit link generation for section shown by <includeonly>
10456 {{includeonly section}}
10458 <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>
10459 <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>
10463 # Uses same input as the contents of [[Template:Includeonly section]]
10465 Bug 6563: Section extraction for section shown by <includeonly>
10470 ==Includeonly section==
10478 Bug 6563: Edit link generation for section suppressed by <includeonly>
10481 ==Includeonly section==
10485 <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>
10490 Bug 6563: Section extraction for section suppressed by <includeonly>
10495 ==Includeonly section==
10503 Un-closed <includeonly>
10510 Includes and comments at SOL
10512 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10516 </noinclude>* stuff
10519 <includeonly>can have stuff</includeonly>=== here ===
10522 <h2><span class="mw-headline" id="hu">hu</span></h2>
10525 <ul><li> stuff</li>
10526 <li> here</li></ul>
10527 <h3><span class="mw-headline" id="here">here</span></h3>
10530 <!-- 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>
10532 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10534 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10535 <li> here</li></ul>
10537 <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>
10541 # TODO: test with DOM fragment reuse!
10543 Parsoid: DOM fragment reuse
10545 parsoid=wt2wt,wt2html
10547 a{{echo|b<table></table>c}}d
10559 <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>
10561 <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">
10562 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10563 </span><p about="#mwt2">cd</p>
10565 <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">
10567 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10569 </span><p about="#mwt3">b</p>
10573 Parsoid: Merge double tds (bug 50603)
10578 |{{echo|{{!}} foo}}
10582 <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>
10587 Parsoid: Merge double tds in nested transclusion content (bug 50603)
10593 |{{echo|{{!}} foo}}
10597 <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}}]}'>
10599 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10605 ### <includeonly> and <noinclude> in attributes
10608 0. includeonly around the entire attribute
10610 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10612 <p><span id="v2">bar</span>
10617 1. includeonly in html attr key
10619 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10621 <p><span id="foo">bar</span>
10626 2. includeonly in html attr value
10628 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10629 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10631 <p><span id="v1">bar</span>
10632 <span id="v1">bar</span>
10637 3. includeonly in part of an attr value
10639 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10641 <p><span style="color:red;">bar</span>
10646 4. includeonly in table attributes
10670 ### Token Stream Patcher tests
10672 ### These tests won't always pass wt2wt and other modes because
10673 ### on serialization, the table will be output on a new line.
10674 ### For now, we are blacklisting them, and using this to test selser.
10678 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10680 parsoid=wt2html,wt2wt
10682 {{echo|}}{| width = '100%'
10686 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10687 <tbody><tr><td>foo</td></tr>
10692 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10694 parsoid=wt2html,wt2wt
10696 <includeonly>a</includeonly>{| {{{b}}}
10700 <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}}}":""}}'>
10701 <tbody><tr><td>c</td></tr>
10707 ### Testing parsing of templates where a template arg
10708 ### has the same name as the template itself.
10714 {{{quote|{{{1}}}}}}
10718 Templates: Template Name/Arg clash: 1. Use of positional param
10727 Templates: Template Name/Arg clash: 2. Use of named param
10729 {{quote|quote=foo}}
10736 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10745 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10749 Templates: 1. Simple use
10758 Templates: 2. Inside a block tag
10760 <div>{{echo|Foo}}</div>
10761 <blockquote>{{echo|Foo}}</blockquote>
10764 <blockquote>Foo</blockquote>
10774 Templates: P-wrapping: 1a. Templates on consecutive lines
10785 Templates: P-wrapping: 1b. Templates on consecutive lines
10799 Templates: P-wrapping: 1c. Templates on consecutive lines
10802 {{echo|bar}} <div>baz</div>
10815 Templates: P-wrapping: 1d. Template preceded by comment-only line
10824 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10828 Templates: Inline Text: 1. Multiple template uses
10830 {{echo|Foo}}bar{{echo|baz}}
10837 Templates: Inline Text: 2. Back-to-back template uses
10839 {{echo|Foo}}{{echo|bar}}
10846 Templates: Block Tags: 1. Multiple template uses
10848 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10850 <div>Foo</div><div>bar</div><div>baz</div>
10855 Templates: Block Tags: 2. Back-to-back template uses
10857 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10859 <div>Foo</div><div>bar</div>
10863 # This is an edge case relating to paragraph wrapping.
10865 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10870 <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
10875 Templates: Links: 1. Simple example
10877 {{echo|[[Foo|bar]]}}
10879 <p><a href="/wiki/Foo" title="Foo">bar</a>
10884 Templates: Links: 2. Generation of link href
10886 [[{{echo|Foo}}|bar]]
10888 <p><a href="/wiki/Foo" title="Foo">bar</a>
10893 Templates: Links: 3. Generation of part of a link href
10895 [[Fo{{echo|o}}|bar]]
10897 [[Foo{{echo|bar}}]]
10899 [[Foo{{echo|bar}}baz]]
10901 [[Foo{{echo|bar}}|bar]]
10903 [[:Foo{{echo|bar}}]]
10905 [[:Foo{{echo|bar}}|bar]]
10907 <p><a href="/wiki/Foo" title="Foo">bar</a>
10908 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10909 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10910 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10911 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10912 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10917 Templates: Links: 4. Multiple templates generating link href
10919 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10921 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10926 Templates: Links: 5. Generation of link text
10928 [[Foo|{{echo|bar}}]]
10930 <p><a href="/wiki/Foo" title="Foo">bar</a>
10935 Templates: Links: 5. Nested templates (only outermost template should be marked)
10937 {{echo|[[{{echo|Foo}}|bar]]}}
10939 <p><a href="/wiki/Foo" title="Foo">bar</a>
10944 Templates: HTML Tag: 1. Generation of HTML attr. key
10946 <div {{echo|style}}="color:red;">foo</div>
10948 <div style="color:red;">foo</div>
10953 Templates: HTML Tag: 2. Generation of HTML attr. value
10955 <div style={{echo|'color:red;'}}>foo</div>
10957 <div style="color:red;">foo</div>
10962 Templates: HTML Tag: 3. Generation of HTML attr key and value
10964 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10966 <div style="color:red;">foo</div>
10971 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10973 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10975 <div title="This is a long title with just one piece templated">foo</div>
10980 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10982 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10984 <div title="This is a long title with just one piece templated">foo</div>
10989 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10991 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10993 <div title="This is a long title with just one piece templated">foo</div>
10997 # SSS FIXME: While it is great we added support for all this,
10998 # do we want to make this part of the spec? Maybe we want to
10999 # deprecate this kind of usage in the future?
11001 Templates: HTML Tag: 7. Generation of partial attribute key string
11003 <div st{{echo|yle}}="color:red;">foo</div>
11005 <div style="color:red;">foo</div>
11010 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11012 <div {{echo|1=id="v1"}}>bar</div>
11014 <div id="v1">bar</div>
11019 Templates: HTML Tag: 9. Multiple template-generated attributes
11021 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11023 <div id="v1" title="foo">bar</div>
11028 Templates: Support for templates generating attributes and content
11030 {| {{mixed_attr_content_template}}
11035 <table style="color:red;" title="T48811">
11045 <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|}"]}'>
11054 1. Entities and nowikis inside templated attributes should be handled correctly
11056 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11058 <div style="background:#f9f9f9;">foo</div>
11061 <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>
11065 2. Entities and nowikis inside templated attributes should be handled correctly
11068 |{{table_attribs_3}}
11073 <td style="background:#f9f9f9;">Foo
11078 <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>
11083 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11086 |{{table_attribs_3}}
11091 <td style="background:#f9f9f9;">Foo
11095 <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}}]}'>
11096 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11102 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11105 | {{table_attribs_6}} hi
11110 <td style="background: red;"> hi
11115 <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>
11120 Templates: HTML Tables: 1. Generating start of a HTML table
11122 {{echo|<table><tr><td>foo</td>}}</tr></table>
11124 <table><tr><td>foo</td></tr></table>
11129 Templates: HTML Tables: 2a. Generating middle of a HTML table
11131 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11133 <table><tr><td>foo</td></tr></table>
11138 Templates: HTML Tables: 2b. Generating middle of a HTML table
11140 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11142 <table><tr><td>foo</td></tr></table>
11147 Templates: HTML Tables: 3. Generating end of a HTML table
11149 <table><tr>{{echo|<td>foo</td></tr></table>}}
11151 <table><tr><td>foo</td></tr></table>
11156 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11158 {{echo|<table>}}<tr><td>foo</td></tr></table>
11160 <table><tr><td>foo</td></tr></table>
11165 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11167 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11169 <table><tr><td>foo</td></tr></table>
11174 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11176 <table><tr>{{echo|<td>}}foo</td></tr></table>
11178 <table><tr><td>foo</td></tr></table>
11183 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11185 <table><tr><td>foo{{echo|</td>}}</tr></table>
11187 <table><tr><td>foo</td></tr></table>
11192 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11194 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11196 <table><tr><td>foo</td></tr></table>
11201 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11203 <table><tr><td>foo</td></tr>{{echo|</table>}}
11205 <table><tr><td>foo</td></tr></table>
11210 Templates: HTML Tables: 5. Proper fostering of categories from inside
11212 parsoid=wt2html,wt2wt
11214 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11215 <!--Two categories (Bug 50330)-->
11216 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11218 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11219 <!--Two categories (Bug 50330)-->
11220 <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>
11224 Templates: Wiki Tables: 1a. Fostering of entire template content
11232 <tr><td></td></tr></table>
11244 Templates: Wiki Tables: 1b. Fostering of entire template content
11257 <tr><td></td></tr></table>
11271 Templates: Wiki Tables: 2. Fostering of partial template content
11281 <tr><td></td></tr></table>
11294 Templates: Wiki Tables: 3. td-content via multiple templates
11297 {{echo|{{pipe}}a}}{{echo|b}}
11308 Templates: Wiki Tables: 4. Templated tags, no content
11314 <tr><td></td></tr></table>
11319 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11333 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11346 ## This test case is very specific to Parsoid's internals
11347 ## and is hence only tested for Parsoid's code. Parsoid uses
11348 ## a <meta> marker tag for <ref> tags and they are expanded
11349 ## much later. We are verifying that this <meta> tag usage
11350 ## doesn't prevent foster parenting.
11352 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11354 {{PartialTable}}<ref>foo</ref>
11359 <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">
11363 <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>
11367 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11377 <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{{!}}}"]}'>
11378 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11382 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11387 Templates: Lists: Multi-line list-items via templates
11389 *{{echo|a {{nonexistent|
11391 *{{echo|b {{nonexistent|
11394 <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>
11395 <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>
11400 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11402 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11404 <p><i>ab</i>c<i>d</i>e
11409 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11410 (PHP parser generates misnested html)
11412 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11414 <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>
11418 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11419 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11421 parsoid=wt2html,wt2wt
11423 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11425 <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>
11426 <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>
11427 <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>
11431 Templates: Ugly nesting: 4. Divs opened/closed across templates
11433 a<div>b{{echo|c</div>d}}e
11444 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11450 |{{echo|foo</table>}}
11454 <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|}"]}'>
11458 <td>foo</td></tr></tbody></table><span about="#mwt1">
11459 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11464 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11474 <td>1. {{echo|foo </table>}}</td>
11476 <td>2. {{echo|baz </table>}}</td>
11489 <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>"]}'>
11494 <td>1. foo </td></tr></tbody></table></td>
11496 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11497 </span><span about="#mwt2">
11498 </span><span about="#mwt2">
11499 </span><span about="#mwt2">abc</span><span about="#mwt2">
11500 </span><span about="#mwt2">
11501 </span><span about="#mwt2">
11502 </span><span about="#mwt2">
11503 </span><span about="#mwt2">
11504 </span><span about="#mwt2">
11505 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11506 </span><span about="#mwt2">
11511 Templates: Ugly templates: 3. newline-only template parameter
11520 # This looks like a bug: a single newline triggers p/br for some reason.
11522 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11531 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11532 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11534 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11540 <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
11541 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11545 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11546 # that are "identical" and generate nesting cycles in the algorithm
11548 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11550 {{echo|<table><tr><td><table>}}
11554 <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"}'>
11555 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11556 </table></td></tr></tbody></table>
11560 Parser Functions: 1. Simple example
11569 Parser Functions: 2. Nested use (only outermost should be marked up)
11578 ### Pre-save transform tests
11581 pre-save transform: subst:
11587 This is a test template
11591 pre-save transform: normal template
11601 pre-save transform: nonexistent template
11605 {{thistemplatedoesnotexist}}
11607 {{thistemplatedoesnotexist}}
11611 pre-save transform: subst magic variables
11620 # This is bug 89, which I fixed. -- wtm
11622 pre-save transform: subst: templates with parameters
11626 {{subst:paramtest|param="something else"}}
11628 This is a test template with parameter "something else"
11632 Template:nowikitest
11634 <nowiki>'''not wiki'''</nowiki>
11638 pre-save transform: nowiki in subst (bug 1188)
11642 {{subst:nowikitest}}
11644 <nowiki>'''not wiki'''</nowiki>
11648 Template:commenttest
11650 This template has <!-- a comment --> in it.
11654 pre-save transform: comment in subst (bug 1936)
11658 {{subst:commenttest}}
11660 This template has <!-- a comment --> in it.
11664 pre-save transform: unclosed tag
11668 <nowiki>'''not wiki'''
11670 <nowiki>'''not wiki'''
11674 pre-save transform: mixed tag case
11678 <NOwiki>'''not wiki'''</noWIKI>
11680 <NOwiki>'''not wiki'''</noWIKI>
11684 pre-save transform: unclosed comment in <nowiki>
11688 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11690 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11693 # Leading @ in this template definition works around a limitation
11694 # in parsoid's parserTests which otherwise strips the <span> from the
11695 # result (confusing it for a template wrapper)
11699 @<span onmouseover="alert('crap')">Oh no</span>
11703 (confirming safety of fix for subst bug 1936)
11705 {{Template:dangerous}}
11707 <p>@<span>Oh no</span>
11712 pre-save transform: comment containing gallery (bug 5024)
11716 <!-- <gallery>data</gallery> -->
11718 <!-- <gallery>data</gallery> -->
11722 pre-save transform: comment containing extension
11726 <!-- <tag>data</tag> -->
11728 <!-- <tag>data</tag> -->
11732 pre-save transform: comment containing nowiki
11736 <!-- <nowiki>data</nowiki> -->
11738 <!-- <nowiki>data</nowiki> -->
11742 pre-save transform: <noinclude> in subst (bug 3298)
11752 pre-save transform: <onlyinclude> in subst (bug 3298)
11756 {{subst:Includes2}}
11764 {{<includeonly>subst:</includeonly>Includes}}
11768 Template:SafeSubstTest
11770 {{<includeonly>safesubst:</includeonly>Includes}}
11774 bug 22297: safesubst: works during PST
11778 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11784 bug 22297: safesubst: works during normal parse
11793 subst: does not work during normal parse
11797 <p>{{subst:Includes}}
11802 pre-save transform: context links ("pipe trick")
11806 [[Article (context)|]]
11809 [[Bar:Article (context)|]]
11810 [[:Bar:Article (context)|]]
11812 [[|Article (context)]]
11816 [[Article (context)|Article]]
11817 [[Bar:Article|Article]]
11818 [[:Bar:Article|Article]]
11819 [[Bar:Article (context)|Article]]
11820 [[:Bar:Article (context)|Article]]
11822 [[Article (context)]]
11823 [[Bar:X (Y) Z|X (Y) Z]]
11824 [[:Bar:X (Y) Z|X (Y) Z]]
11828 pre-save transform: context links ("pipe trick") with interwiki prefix
11832 [[interwiki:Article|]]
11833 [[:interwiki:Article|]]
11834 [[interwiki:Bar:Article|]]
11835 [[:interwiki:Bar:Article|]]
11837 [[interwiki:Article|Article]]
11838 [[:interwiki:Article|Article]]
11839 [[interwiki:Bar:Article|Bar:Article]]
11840 [[:interwiki:Bar:Article|Bar:Article]]
11844 pre-save transform: context links ("pipe trick") with parens in title
11846 pst title=[[Somearticle (context)]]
11850 [[Article (context)|Article]]
11854 pre-save transform: context links ("pipe trick") with comma in title
11856 pst title=[[Someplace, Somewhere]]
11859 [[Otherplace, Elsewhere|]]
11860 [[Otherplace, Elsewhere, Anywhere|]]
11862 [[Otherplace, Somewhere|Otherplace]]
11863 [[Otherplace, Elsewhere|Otherplace]]
11864 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11868 pre-save transform: context links ("pipe trick") with parens and comma
11870 pst title=[[Someplace (IGNORED), Somewhere]]
11873 [[Otherplace (place), Elsewhere|]]
11875 [[Otherplace, Somewhere|Otherplace]]
11876 [[Otherplace (place), Elsewhere|Otherplace]]
11880 pre-save transform: context links ("pipe trick") with comma and parens
11882 pst title=[[Who, me? (context)]]
11885 [[Me, Myself, and I (1937 song)|]]
11887 [[Yes, you. (context)|Yes, you.]]
11888 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11892 pre-save transform: context links ("pipe trick") with namespace
11894 pst title=[[Ns:Somearticle]]
11898 [[Ns:Article|Article]]
11902 pre-save transform: context links ("pipe trick") with namespace and parens
11904 pst title=[[Ns:Somearticle (context)]]
11908 [[Ns:Article (context)|Article]]
11912 pre-save transform: context links ("pipe trick") with namespace and comma
11914 pst title=[[Ns:Somearticle, Context, Whatever]]
11918 [[Ns:Article, Context, Whatever|Article]]
11922 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11924 pst title=[[Ns:Somearticle, Context (context)]]
11928 [[Ns:Article (context)|Article]]
11932 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11934 pst title=[[Ns:Somearticle (IGNORED), Context]]
11938 [[Ns:Article, Context|Article]]
11942 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11946 [[Article(context)|]]
11947 [[Bar:Article(context)|]]
11948 [[:Bar:Article(context)|]]
11949 [[|Article(context)]]
11953 [[Article(context)|Article]]
11954 [[Bar:Article(context)|Article]]
11955 [[:Bar:Article(context)|Article]]
11956 [[Article(context)]]
11957 [[Bar:X(Y)Z|X(Y)Z]]
11958 [[:Bar:X(Y)Z|X(Y)Z]]
11962 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11966 [[Article (context)|]]
11967 [[Bar:Article (context)|]]
11968 [[:Bar:Article (context)|]]
11969 [[|Article (context)]]
11973 [[Article (context)|Article]]
11974 [[Bar:Article (context)|Article]]
11975 [[:Bar:Article (context)|Article]]
11976 [[Article (context)]]
11977 [[Bar:X (Y) Z|X (Y) Z]]
11978 [[:Bar:X (Y) Z|X (Y) Z]]
11982 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11986 [[Article(context)|]]
11987 [[Bar:Article(context)|]]
11988 [[:Bar:Article(context)|]]
11989 [[|Article(context)]]
11993 [[Article(context)|Article]]
11994 [[Bar:Article(context)|Article]]
11995 [[:Bar:Article(context)|Article]]
11996 [[Article(context)]]
11997 [[Bar:X(Y)Z|X(Y)Z]]
11998 [[:Bar:X(Y)Z|X(Y)Z]]
12002 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12006 [[Article (context), context|]]
12007 [[Article (context),context|]]
12008 [[Bar:Article (context), context|]]
12009 [[Bar:Article (context),context|]]
12010 [[:Bar:Article (context), context|]]
12011 [[:Bar:Article (context),context|]]
12013 [[Article (context), context|Article]]
12014 [[Article (context),context|Article]]
12015 [[Bar:Article (context), context|Article]]
12016 [[Bar:Article (context),context|Article]]
12017 [[:Bar:Article (context), context|Article]]
12018 [[:Bar:Article (context),context|Article]]
12022 pre-save transform: trim trailing empty lines
12026 Empty lines are trimmed
12032 Empty lines are trimmed
12036 pre-save transform: Signature expansion
12041 * <noinclude>~~~</noinclude>
12042 * <includeonly>~~~</includeonly>
12043 * <onlyinclude>~~~</onlyinclude>
12045 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12046 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12047 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12048 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12053 pre-save transform: Signature expansion in nowiki tags (bug 93)
12059 <nowiki>~~~~</nowiki>
12061 <includeonly><nowiki>~~~~</nowiki></includeonly>
12063 <noinclude><nowiki>~~~~</nowiki></noinclude>
12065 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12067 {{subst:Foo}} shall be converted to FOO
12069 As well as inside noinclude/onlyinclude
12070 <noinclude>{{subst:Foo}}</noinclude>
12071 <onlyinclude>{{subst:Foo}}</onlyinclude>
12073 But not inside includeonly
12074 <includeonly>{{subst:Foo}}</includeonly>
12078 <nowiki>~~~~</nowiki>
12080 <includeonly><nowiki>~~~~</nowiki></includeonly>
12082 <noinclude><nowiki>~~~~</nowiki></noinclude>
12084 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12086 FOO shall be converted to FOO
12088 As well as inside noinclude/onlyinclude
12089 <noinclude>FOO</noinclude>
12090 <onlyinclude>FOO</onlyinclude>
12092 But not inside includeonly
12093 <includeonly>{{subst:Foo}}</includeonly>
12097 Parsoid: Recognize nowiki with trailing space in tags
12101 <nowiki ><div>[[foo]]</nowiki >
12109 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12116 Parsoid: Recognize nowiki with odd capitalization
12120 <noWikI ><div>[[foo]]</Nowiki >
12122 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12127 Parsoid: Escape nowiki with trailing space in tags
12131 <p><nowiki > foo </nowiki ></p>
12132 <p>a<nowiki />b</p>
12133 <p>c<nowiki/ >d</p>
12135 <nowiki > foo </nowiki >
12143 Parsoid: Escape weird noWikI capitalizations
12147 <p><noWikI > foo </NoWikI ></p>
12149 <noWikI > foo </NoWikI >
12153 ### Message transform tests
12156 message transform: magic variables
12166 message transform: should not transform wiki markup
12176 message transform: <noinclude> in transcluded template (bug 4926)
12186 message transform: <onlyinclude> in transcluded template (bug 4926)
12196 {{#special:}} page name, known
12200 {{#special:Recentchanges}}
12202 Special:RecentChanges
12206 {{#special:}} page name with subpage, known
12210 {{#special:Recentchanges/param}}
12212 Special:RecentChanges/param
12216 {{#special:}} page name, unknown
12220 {{#special:foobar nonexistent}}
12222 Special:Foobar nonexistent
12226 {{#speciale:}} page name, known
12230 {{#speciale:Recentchanges}}
12232 Special:RecentChanges
12236 {{#speciale:}} page name with subpage, known
12240 {{#speciale:Recentchanges/param}}
12242 Special:RecentChanges/param
12246 {{#speciale:}} page name, unknown
12250 {{#speciale:foobar nonexistent}}
12252 Special:Foobar_nonexistent
12258 ### For Parsoid-specific tests, see
12259 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12264 parsoid=wt2html,wt2wt,html2html
12266 [[Image:foobar.jpg]]
12268 <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>
12271 <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>
12275 Simple image (using File: namespace, now canonical)
12277 [[File:Foobar.jpg]]
12279 <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>
12282 <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>
12286 Right-aligned image
12288 [[File:Foobar.jpg|right]]
12290 <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>
12293 <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>
12299 [[File:Foobar.jpg|right|Caption text]]
12301 <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>
12304 <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>
12308 Image with caption, bug 53312 #1
12310 [[File:Foobar.jpg|right|Caption page stuff]]
12312 <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>
12315 <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>
12319 Image with caption, bug 53312 #2
12321 [[File:Foobar.jpg|right|Caption page=]]
12323 <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>
12326 <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>
12330 Image with caption, bug 53312 #3
12332 [[File:Foobar.jpg|right|Caption page=stuff]]
12334 <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>
12337 <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>
12341 Allow empty links in image captions (Bug 60753)
12345 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12350 <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>
12353 <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>
12355 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12356 </figcaption></figure>
12360 Titles in unlinked images (T23454)
12362 [[File:Foobar.jpg|link=|stuff]]
12364 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12369 Link with empty target
12378 Image with link trail
12380 Linktrails should not work for images: [[File:Foobar.jpg]]s
12382 <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
12385 <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>
12389 Image with empty attribute
12391 parsoid=wt2html,wt2wt,html2html
12393 [[File:Foobar.jpg|right||Caption text]]
12395 <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>
12398 <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>
12402 1. Block image with individual attributes from templates
12404 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12406 <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>
12409 <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>
12413 2. Block Image with individual attributes from templates
12415 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12417 <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>
12420 <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>
12424 3. Inline image with individual attributes from templates
12426 [[File:Foobar.jpg|{{echo|50px}}]]
12428 <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>
12431 <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>
12434 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12435 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12437 Image with multiple attributes from the same template
12439 [[File:Foobar.jpg|{{image_attribs}}]]
12441 <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>
12444 <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>
12448 Image with link tails
12452 123[[File:Foobar.jpg]]456
12453 123[[File:Foobar.jpg|right]]456
12454 123[[File:Foobar.jpg|thumb]]456
12456 <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
12458 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
12459 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
12462 <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>
12464 <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>
12466 <div class="thumb tright">
12467 <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>
12468 <div class="thumbcaption">
12469 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12475 <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>
12476 <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>
12477 <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>
12481 Image with multiple captions -- only last one is accepted
12483 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12485 <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>
12488 <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>
12492 Image with multiple widths -- use last
12494 [[File:Foobar.jpg|200px|300px|caption]]
12496 <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>
12499 <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>
12503 Image with multiple alignments -- use first (bug 48664)
12507 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12509 [[File:Foobar.jpg|middle|text-top|caption]]
12511 <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>
12512 <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>
12515 <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>
12516 <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>
12520 Image with width attribute at different positions
12522 [[File:Foobar.jpg|200px|right|Caption]]
12523 [[File:Foobar.jpg|right|200px|Caption]]
12524 [[File:Foobar.jpg|right|Caption|200px]]
12526 <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>
12527 <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>
12528 <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>
12531 <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>
12532 <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>
12533 <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>
12536 # a sad bit of backward-compatibility
12538 Image with size specified with pxpx (bug 13500, 51628)
12540 parsoid=wt2html,wt2wt,html2html
12542 [[File:Foobar.jpg|20pxpx]]
12543 [[File:Foobar.jpg|200x20pxpx]]
12545 <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>
12546 <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>
12549 <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>
12553 Image with link parameter, wiki target
12555 [[File:Foobar.jpg|link=Main Page]]
12557 <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>
12560 <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>
12563 # parsoid bug 49293 (part 1)
12565 Image with link parameter, URL target
12567 [[File:Foobar.jpg|link=http://example.com/]]
12569 <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>
12572 <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>
12575 # parsoid bug 49293 (part 2)
12577 Image with link parameter, protocol-less URL target
12579 [[File:Foobar.jpg|link=//example.com/]]
12581 <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>
12584 <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>
12588 Image with link parameter, wgExternalLinkTarget
12590 [[Image:foobar.jpg|link=http://example.com/]]
12592 wgExternalLinkTarget='foobar'
12594 <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>
12599 Image with link parameter, wgNoFollowLinks set to false
12601 [[Image:foobar.jpg|link=http://example.com/]]
12603 wgNoFollowLinks=false
12605 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12610 Image with link parameter, wgNoFollowDomainExceptions
12612 [[Image:foobar.jpg|link=http://example.com/]]
12614 wgNoFollowDomainExceptions='example.com'
12616 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12621 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12623 [[Image:foobar.jpg|link=http://example.com/|Title]]
12625 wgExternalLinkTarget='foobar'
12627 <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>
12632 Image with empty link parameter
12634 [[File:Foobar.jpg|link=]]
12636 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12639 <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>
12643 Image with link parameter (wiki target) and unnamed parameter
12645 [[File:Foobar.jpg|link=Main_Page|Title]]
12647 <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>
12650 <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>
12654 Image with link parameter (URL target) and unnamed parameter
12656 [[File:Foobar.jpg|link=http://example.com/|Title]]
12658 <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>
12661 <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>
12665 Thumbnail image with link parameter
12668 parsoid=wt2html,wt2wt,html2html
12670 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12672 <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>
12675 <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>
12679 Manually-specified thumbnail image
12683 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12685 <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>
12688 <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>
12692 Manually-specified thumbnail image with explicit link to wiki page
12695 parsoid=wt2html,wt2wt,html2html
12697 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12699 <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>
12702 <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>
12706 Manually-specified thumbnail image with explicit link to url
12709 parsoid=wt2html,wt2wt,html2html
12711 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12713 <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>
12716 <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>
12720 Manually-specified thumbnail image with explicit no link
12723 parsoid=wt2html,wt2wt,html2html
12725 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12727 <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>
12730 <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>
12734 Manually-specified thumbnail image with explicit link and alt text
12737 parsoid=wt2html,wt2wt,html2html
12739 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12741 <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>
12744 <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>
12748 Image with frame and link
12750 parsoid=wt2html,wt2wt,html2html
12752 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12754 <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>
12757 <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>
12761 Image with frame and link and explicit alt
12763 parsoid=wt2html,wt2wt,html2html
12765 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12767 <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>
12770 <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>
12774 Image with wiki markup in implicit alt
12776 parsoid=wt2html,wt2wt,html2html
12778 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12780 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12782 <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>
12783 </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>
12786 <p><span class="mw-default-size" typeof="mw:Image" data-mw="{"caption":"testing '''bold''' in alt"}"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
12787 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
12791 Alt image option should handle most kinds of wikitext without barfing
12793 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12795 <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>
12798 <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>
12801 ###################
12802 # Conflicting image format options.
12803 # First option specified should 'win'.
12804 # All three cases in each test should be identical.
12807 Image with 'frameless' first.
12809 parsoid=wt2html,wt2wt,html2html
12811 [[File:Foobar.jpg|frameless|caption]]
12813 [[File:Foobar.jpg|frameless|frame|caption]]
12815 [[File:Foobar.jpg|frameless|thumb|caption]]
12817 <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>
12818 </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>
12819 </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>
12822 <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>
12823 <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>
12824 <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>
12828 Image with 'frame' first.
12830 parsoid=wt2html,wt2wt,html2html
12832 [[File:Foobar.jpg|frame|caption]]
12833 [[File:Foobar.jpg|frame|frameless|caption]]
12834 [[File:Foobar.jpg|frame|thumb|caption]]
12836 <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>
12837 <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>
12838 <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>
12841 <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>
12842 <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>
12843 <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>
12847 Image with 'thumb' first.
12849 parsoid=wt2html,wt2wt,html2html
12851 [[File:Foobar.jpg|thumb|caption]]
12852 [[File:Foobar.jpg|thumb|frameless|caption]]
12853 [[File:Foobar.jpg|thumb|frame|caption]]
12855 <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>
12856 <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>
12857 <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>
12860 <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>
12861 <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>
12862 <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>
12865 ###################
12867 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12868 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12869 # Foobar has actual size of 1941x220
12870 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12871 # a scalable format.
12872 # 2. Framed images always ignore size options; always render at default size.
12873 # 3. "Unspecified format" and border are the only types which can be
12877 Image: "unspecified format" and border enlarge
12879 parsoid=wt2html,wt2wt,html2html
12881 [[File:Foobar.jpg|2000px]]
12883 [[File:Foobar.jpg|border|2000px]]
12885 <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>
12886 </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>
12889 <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>
12890 <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>
12894 Image: "unspecified format" and border reduce
12896 parsoid=wt2html,wt2wt,html2html
12898 [[File:Foobar.jpg|1000px]]
12900 [[File:Foobar.jpg|border|1000px]]
12902 <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>
12903 </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>
12906 <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>
12907 <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>
12911 Image: thumbs reduce
12913 parsoid=wt2html,wt2wt,html2html
12915 [[File:Foobar.jpg|thumb|50px]]
12917 <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>
12920 <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>
12924 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12926 parsoid=wt2html,wt2wt,html2html
12928 [[File:Foobar.jpg|thumb|2000px]]
12930 [[File:Foobar.svg|thumb|2000px]]
12932 <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>
12933 <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>
12936 <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>
12937 <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>
12941 Image: frameless can reduce in size
12943 parsoid=wt2html,wt2wt,html2html
12945 [[File:Foobar.jpg|frameless|50px]]
12947 <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>
12950 <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>
12954 Image: bitmap frameless can't be enlarged past original size, but vector can
12956 parsoid=wt2html,wt2wt,html2html
12958 [[File:Foobar.jpg|frameless|2000px]]
12960 [[File:Foobar.svg|frameless|2000px]]
12962 <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>
12963 </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>
12966 <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>
12967 <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>
12971 Image: framed images are always unscaled.
12973 parsoid=wt2html,wt2wt,html2html
12975 [[File:Foobar.jpg|frame]]
12977 [[File:Foobar.jpg|frame|50px]]
12979 [[File:Foobar.jpg|frame|50x50px]]
12981 [[File:Foobar.jpg|frame|2000px]]
12983 <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>
12984 <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>
12985 <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>
12986 <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>
12989 <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>
12990 <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>
12991 <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>
12992 <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>
12995 ###################
12998 Link to image page- image page normally doesn't exists, hence edit link
12999 Add test with existing image page
13000 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13004 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13009 bug 18784 Link to non-existent image page with caption should use caption as link text
13011 [[:Image:test|caption]]
13013 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13018 Frameless image caption with a free URL
13020 [[File:Foobar.jpg|http://example.com]]
13022 <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>
13025 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"http://example.com"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13029 Thumbnail image caption with a free URL
13033 [[File:Foobar.jpg|thumb|http://example.com]]
13035 <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>
13038 <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>
13042 Thumbnail image caption with a free URL and explicit alt
13045 parsoid=wt2html,wt2wt,html2html
13047 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13049 <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>
13052 <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>
13056 SVG thumbnails with no language set
13059 [[File:Foobar.svg|thumb|caption]]
13061 <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>
13064 <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>
13068 SVG thumbnails with language de
13070 parsoid=wt2html,wt2wt,html2html
13072 [[File:Foobar.svg|thumb|caption|lang=de]]
13074 <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>
13077 <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>
13081 SVG thumbnails with invalid language code
13083 parsoid=wt2html,wt2wt,html2html
13085 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13087 <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>
13090 <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>
13094 BUG 1887: A ISBN with a thumbnail
13096 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13098 <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>
13101 <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>
13105 BUG 1887: A RFC with a thumbnail
13107 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13109 <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>
13112 <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>
13116 BUG 1887: A mailto link with a thumbnail
13118 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13120 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
13123 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
13126 # Pending resolution to bug 368
13128 BUG 648: Frameless image caption with a link
13130 [[File:Foobar.jpg|text with a [[link]] in it]]
13132 <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>
13135 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]] in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13139 BUG 648: Frameless image caption with a link (suffix)
13141 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13143 <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>
13146 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]]foo in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13150 BUG 648: Frameless image caption with an interwiki link
13152 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13154 <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>
13157 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link]] in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13161 BUG 648: Frameless image caption with a piped interwiki link
13163 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13165 <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>
13168 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link|link]] in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13172 Escape HTML special chars in image alt text
13174 [[File:Foobar.jpg|& < > "]]
13176 <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>
13179 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"& < > \""}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13183 BUG 499: Alt text should have Ӓ, not &1234;
13185 [[File:Foobar.jpg|♀]]
13187 <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>
13190 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&#9792;"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13194 Broken image caption with link
13196 parsoid=wt2html,wt2wt,html2html
13198 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13200 <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.
13203 <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>
13207 Image caption containing another image
13209 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13211 <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>
13214 <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>
13218 Image: caption containing a newline
13220 [[File:Foobar.jpg|This
13223 <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>
13226 <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>
13230 Image: caption containing leading space
13231 (The leading space should not trigger nowiki escaping in wt2wt mode)
13233 [[File:Foobar.jpg|thumb| bar]]
13235 <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>
13238 <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>
13242 Image: caption containing a table
13244 parsoid=wt2html,wt2wt,html2html
13246 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13252 and some more text.]]
13254 <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>
13257 <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
13260 <tr><th>Foo </th><th>Bar</th></tr>
13263 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13267 Bug 3090: External links other than http: in image captions
13269 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13271 <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>
13274 <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>
13280 parsoid=wt2html,wt2wt,html2html
13282 [[Image:foobar.jpg|a|class=b]]
13284 <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>
13287 <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>
13291 Localized image handling (1).
13293 parsoid=wt2html,wt2wt,html2html
13296 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13298 <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>
13301 <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>
13305 Localized image handling (2).
13308 parsoid=wt2html,wt2wt,html2html
13311 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13313 <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>
13316 <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>
13320 "border", "frameless" and "class" attributes on an image.
13323 parsoid=wt2html,wt2wt,html2html
13325 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13327 <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>
13330 <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>
13333 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13335 Invalid image attributes (bug 62500)
13338 parsoid=wt2html,wt2wt,html2html
13340 [[File:Foobar.jpg|thumb|float|left|caption]]
13342 [[File:Foobar.jpg|thumb|righ|caption]]
13344 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13346 <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>
13347 <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>
13348 <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>
13351 <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>
13352 <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>
13353 <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>
13359 #REDIRECT [[File:Barfoo.jpg]]
13362 # FIXME: Parsoid should run this test -- but we'd need to teach the
13363 # mockAPI about the redirected Barfoo.jpg image.
13367 [[Image:Barfoo.jpg]]
13369 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13374 Missing image with uploads disabled
13378 [[File:Foobaz.jpg]]
13380 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13383 <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>
13386 # Parsoid-specific testing for images
13387 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13388 # Currently imperfect due to a flaw in the Parsoid testrunner
13390 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13394 Parsoid-specific image handling - simple image with size and middle alignment
13396 [[File:Foobar.jpg|middle|50px]]
13398 <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>
13402 Parsoid-specific image handling - simple image with size, middle alignment,
13403 non-standard namespace alias
13405 parsoid=wt2wt,wt2html,html2html
13407 [[Image:Foobar.jpg|middle|50px]]
13409 <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>
13413 Parsoid-specific image handling - simple image with size and middle alignment
13416 [[File:Foobar.jpg|50px|middle]]
13418 <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>
13422 Parsoid-specific image handling - simple image with size and middle alignment
13423 and non-standard namespace name
13425 parsoid=wt2html,wt2wt,html2html
13427 [[Image:Foobar.jpg|50px|middle]]
13429 <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>
13433 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13435 [[File:Foobar.jpg|500x10px|baseline|caption]]
13437 <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>
13441 Parsoid-specific image handling - simple image with border and size spec
13443 [[File:Foobar.jpg|50px|border|caption]]
13445 <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>
13449 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13451 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13453 <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>
13457 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13460 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13462 <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>
13466 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13468 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13470 <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>
13474 Parsoid-specific image handling - thumbnail with specific size, halign,
13475 valign, and caption (existing content)
13477 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13479 <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>
13483 Parsoid-specific image handling - framed image with specific size and caption
13486 parsoid=wt2html,wt2wt,html2html
13488 [[File:Foobar.jpg|frame|500x50px|caption]]
13490 <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>
13494 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13497 parsoid=wt2html,wt2wt,html2html
13499 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13501 <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>
13505 Parsoid-specific image handling - frameless image with specific size, border, and caption
13507 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13509 <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>
13513 Parsoid-specific image handling - simple image with a formatted caption
13515 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13517 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13521 Parsoid-specific image handling - caption with a template in it
13523 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13525 <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>
13529 Parsoid-specific image handling - caption with unbalanced tags in it
13531 parsoid=wt2html,wt2wt,html2html
13534 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13538 <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>
13543 Parsoid-specific image handling - empty caption (1)
13545 parsoid=wt2html,wt2wt
13547 [[File:Foobar.jpg|thumb|]]
13549 <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>
13552 # empty captions don't get serialized unless we're in the "round trip" case
13554 Parsoid-specific image handling - empty caption (2)
13558 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13559 <a href="./File:Foobar.jpg">
13560 <img resource="./File:Foobar.jpg"
13561 src="//example.com/images/3/3a/Foobar.jpg"
13562 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13563 height="25" width="220"/>
13565 <figcaption></figcaption>
13568 [[File:Foobar.jpg|thumb]]
13572 Parsoid-specific image handling - whitespace caption
13574 [[File:Foobar.jpg|thumb| ]]
13576 <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>
13580 Parsoid-specific image handling - lang option
13583 [[File:Foobar.svg|lang=de|caption]]
13587 <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>
13596 Subpage test/subpage
13604 subpage title=[[Subpage test]]
13608 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13613 Subpage noslash link
13615 subpage title=[[Subpage test]]
13619 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13624 Subpage test/1/2/subpage
13630 Relative subpage noslash link
13632 parsoid=wt2wt,wt2html,html2html
13633 subpage title=[[Subpage test/1/2/3/4]]
13639 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13640 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13643 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13644 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13648 Parsoid: dot-slash prefixed wikilinks
13658 </p><p>[[././baz/]]
13663 </p><p>[[././baz/]]
13668 Render invalid page names as plain text (bug 51090)
13681 [[{{echo|./../foo}}|bar]]
13682 [[{{echo|foo/.}}|bar]]
13683 [[{{echo|foo/..}}|bar]]
13684 [[{{echo|foo~~~~bar}}]]
13685 [[{{echo|foo>bar}}]]
13686 [[{{echo|foo././bar}}]]
13687 [[{{echo|foo{bar}}]]
13688 [[{{echo|foo}bar}}]]
13689 [[{{echo|foo[bar}}]]
13690 [[{{echo|foo]bar}}]]
13691 [[{{echo|foo<bar}}]]
13693 <p>[[./../foo|bar]]
13703 </p><p>[[./../foo|bar]]
13716 <p>[[./../foo|bar]]
13727 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13728 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13729 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13730 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13731 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13732 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13733 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13734 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13735 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
13736 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
13737 [[<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>
13745 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13750 BUG 561: {{/Subpage}}
13752 subpage title=[[Page]]
13756 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13764 Category:MediaWiki User's Guide
13772 [[:Category:MediaWiki User's Guide]]
13774 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13783 [[Category:MediaWiki User's Guide]]
13785 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13789 PAGESINCATEGORY invalid title fatal (r33546 fix)
13791 {{PAGESINCATEGORY:<bogus>}}
13798 Category with different sort key
13802 [[Category:MediaWiki User's Guide|Foo]]
13804 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13808 Category with identical sort key
13812 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13814 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13818 Category with empty sort key
13823 [[Category:MediaWiki User's Guide|]]
13825 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13829 Category with empty sort key and parentheses
13834 [[Category:Foo (bar)|]]
13836 [[Category:Foo (bar)|Foo]]
13840 Category with link tail
13845 123[[Category:Foo]]456
13847 123[[Category:Foo]]456
13851 Category with template
13856 [[Category:{{echo|Foo}}]]
13858 [[Category:{{echo|Foo}}]]
13862 Category with template in sort key
13867 [[Category:Foo|{{echo|Bar}}]]
13869 [[Category:Foo|{{echo|Bar}}]]
13873 Category with template in sort key and title
13878 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13880 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13884 Category / paragraph interactions
13886 Foo [[Category:Baz]] Bar
13888 Foo [[Category:Baz]]
13896 [[Category:Baz]] Bar
13909 {{echo|[[Category:Baz]]}}
13923 ## The whitespace on the empty line is part of the test. Please do not delete
13925 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13927 parsoid=wt2html,wt2wt
13931 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
13933 {{echo|[[Category:Foo]] and so should this!}}
13935 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
13940 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
13942 <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>
13945 ## Parsoid will not try to wt2wt this while preserving newlines because
13946 ## it suppresses excess newlines within list items -- and we don't want to
13947 ## introduce a special case just for categories, which is, in reality somewhat
13948 ## odd behavior -- categories are unlikely to be used in list items like this
13949 ## in top-level pages and are only likely to show up in template-generated
13950 ## list items where this RT-ing is a non-issue.
13952 ## The whitespace on the empty line is part of the test. Please do not delete
13954 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13960 [[Category:Foo]] and this should be part of the same list item
13963 {{echo|[[Category:Foo]] and this should be part of the same list item}}
13965 <ul><li>This and this should be part of the same list item</li>
13966 <li>So should this and this should be part of the same list item</li></ul>
13969 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
13970 <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>
13974 ## Newlines and categories that follow the last item of a list
13975 ## are treated differently because this (list followed by categories)
13976 ## is an extremely common pattern on wikis.
13978 3. Categories and newlines: newline suppression for last list item should RT properly
13991 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
13993 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
13994 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
13998 4. Categories and newlines: newline suppression for last list item should RT properly
14006 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14008 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14011 ## only wt2html for this to make sure the algo only applies to the rightmost path
14013 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14026 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14028 <ul><li> d</li></ul></li></ul>
14029 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14033 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14035 * a [[Category:Foo]]
14037 <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>
14040 # This test also demonstrates because of newline+category tunneling
14041 # through the list hander, template wrapping doesn't expand to the
14042 # containing list when the list item swallows the category.
14044 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14049 <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">
14050 </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>
14054 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14058 {{echo|[[Category:Foo]]
14062 <ul><li> a</li></ul>
14064 <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">
14065 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14066 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14070 Parsoid: Serialize link to category page with colon escape
14076 [[:Category:Foo|Bar]]
14079 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
14080 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
14084 # html2wt localizes the "Category" namespace.
14085 # XXX the <link> element needs an empty data-parsoid attribute, or
14086 # else the html2html test fails because spaces are inserted.
14088 Link prefix/suffixes aren't applied to category links
14090 parsoid=wt2html,wt2wt,html2html
14098 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14102 Parsoid: Serialize link to file page with colon escape
14108 [[:File:Foo.png|Bar]]
14111 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14112 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14117 Parsoid: Serialize a genuine category link without colon escape
14122 [[Category:Foo|Bar]]
14124 <link rel="mw:PageProp/Category" href="Category:Foo">
14125 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
14129 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14133 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14135 [[Category:Toxine bactérienne]]
14139 Parsoid: Defaultsort
14141 {{DEFAULTSORT:Foo}}
14143 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14147 Parsoid: Defaultsort (template-generated)
14149 {{{{echo|DEFAULTSORT}}:Foo}}
14151 <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}}]}'/>
14155 ### Inter-language links
14158 Interlanguage links
14166 es:Alimento fr:Nourriture zh:食品
14168 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14169 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14170 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14174 Duplicate interlanguage links (bug 24502)
14185 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14186 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14187 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14188 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14195 Basic section headings
14202 ===Smaller headline===
14205 <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>
14208 <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>
14211 <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>
14217 Section headings with TOC
14220 === Subheadline 1 ===
14221 ===== Skipping a level =====
14222 ====== Skipping a level ======
14226 ===Another headline===
14228 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14230 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14232 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14234 <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>
14236 <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>
14243 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14245 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14251 <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>
14252 <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>
14253 <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>
14254 <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>
14255 <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>
14258 <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>
14263 TOC anchors don't collide
14271 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14273 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14274 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14275 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14276 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14280 <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>
14281 <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>
14282 <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>
14283 <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>
14287 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14289 Handling of sections up to level 6 and beyond
14292 == Level 2 Heading==
14293 === Level 3 Heading===
14294 ==== Level 4 Heading====
14295 ===== Level 5 Heading=====
14296 ====== Level 6 Heading======
14297 ======= Level 7 Heading=======
14298 ======== Level 8 Heading========
14299 ========= Level 9 Heading=========
14300 ========== Level 10 Heading==========
14302 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14304 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14306 <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>
14308 <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>
14310 <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>
14312 <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>
14314 <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>
14315 <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>
14316 <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>
14317 <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>
14318 <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>
14332 <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>
14333 <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>
14334 <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>
14335 <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>
14336 <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>
14337 <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>
14338 <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>
14339 <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>
14340 <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>
14341 <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>
14346 TOC regression (T11764)
14350 ==== title 1.1.1 ====
14355 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14357 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14359 <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>
14361 <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>
14364 <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>
14367 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14369 <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>
14375 <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>
14376 <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>
14377 <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>
14378 <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>
14379 <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>
14380 <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>
14385 TOC for heading containing <span id="..."></span> (T96153)
14388 ==<span id="old-anchor"></span>New title==
14390 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14392 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14396 <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>
14401 TOC with wgMaxTocLevel=3 (bug 6204)
14407 ==== title 1.1.1 ====
14412 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14414 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14416 <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>
14417 <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>
14420 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14422 <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>
14428 <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>
14429 <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>
14430 <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>
14431 <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>
14432 <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>
14433 <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>
14438 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14444 ====Section 1.1.1====
14445 ====Section 1.1.1.1====
14448 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14450 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14452 <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>
14455 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14459 <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>
14460 <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>
14461 <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>
14462 <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>
14463 <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>
14469 Resolving duplicate section names
14474 <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>
14475 <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>
14480 Resolving duplicate section names with differing case (bug 10721)
14485 <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>
14486 <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>
14498 Template with sections, __NOTOC__
14505 <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>
14506 <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>
14507 <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>
14508 <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>
14513 __NOEDITSECTION__ keyword
14519 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14520 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14525 Link inside a section heading
14527 ==Section with a [[Main Page|link]] in it==
14529 <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>
14534 TOC regression (T14077)
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></li>
14548 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14552 <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>
14553 <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>
14554 <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>
14559 BUG 1219 URL next to image (good)
14561 http://example.com [[File:Foobar.jpg]]
14563 <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>
14566 <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>
14570 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14573 The line above must have a trailing space!
14576 But just in case it doesn't...
14578 <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>
14579 <p>The line above must have a trailing space!
14581 <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>
14582 <p>But just in case it doesn't...
14587 Header with special characters (bug 25462)
14589 The tooltips shall not show entities to the user (ie. be double escaped)
14606 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14608 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14610 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14611 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14612 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14613 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14614 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14618 <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>
14621 <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>
14624 <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>
14627 <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>
14630 <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>
14636 Header with space, plus and underscore as entity
14638 Id should not contain + for spaces
14640 == Space between Text ==
14643 == Space-Entity between Text ==
14646 == Plus+between+Text ==
14649 == Plus-Entity+between+Text ==
14652 == Underscore_between_Text ==
14655 == Underscore-Entity_between_Text ==
14658 [[#Space between Text]]
14659 [[#Space-Entity between Text]]
14660 [[#Plus+between+Text]]
14661 [[#Plus-Entity+between+Text]]
14662 [[#Underscore_between_Text]]
14663 [[#Underscore-Entity_between_Text]]
14665 <p>Id should not contain + for spaces
14667 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14669 <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>
14670 <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>
14671 <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>
14672 <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>
14673 <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>
14674 <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>
14678 <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>
14681 <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>
14684 <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>
14687 <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>
14690 <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>
14693 <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>
14695 </p><p><a href="#Space_between_Text">#Space between Text</a>
14696 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14697 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14698 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14699 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14700 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14705 Headers with excess '=' characters
14706 (Are similar tests necessary beyond the 1st level?)
14710 =''italic'' heading==
14711 ==''italic'' heading=
14713 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14715 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14716 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14717 <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>
14718 <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>
14722 <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>
14723 <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>
14724 <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>
14725 <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>
14730 HTML headers vs TOC (bug 23393)
14731 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14743 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14745 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14747 <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>
14748 <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>
14751 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14753 <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>
14754 <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>
14760 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14761 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14762 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14763 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14764 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14765 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14770 Single-line or multiline-comments can follow headings
14772 parsoid=wt2html,wt2wt
14780 <h2><span class="mw-headline" id="foo">foo</span></h2>
14781 <h2><span class="mw-headline" id="bar">bar</span></h2>
14782 <h2><span class="mw-headline" id="baz">baz</span></h2>
14787 BUG 1219 URL next to image (broken)
14789 http://example.com[[File:Foobar.jpg]]
14791 <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>
14794 <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>
14798 Bug 1186 news: in the middle of text
14800 http://en.wikinews.org/wiki/Wikinews:Workplace
14802 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14808 Namespaced link must have a title
14817 Namespaced link must have a title (bad fragment version)
14819 [[Project:#fragment]]
14821 <p>[[Project:#fragment]]
14827 ### HTML tags and HTML attributes
14831 div with no attributes
14833 <div>HTML rocks</div>
14835 <div>HTML rocks</div>
14840 div with double-quoted attribute
14842 <div id="rock">HTML rocks</div>
14844 <div id="rock">HTML rocks</div>
14849 div with single-quoted attribute
14851 <div id='rock'>HTML rocks</div>
14853 <div id="rock">HTML rocks</div>
14858 div with unquoted attribute
14860 <div id=rock>HTML rocks</div>
14862 <div id="rock">HTML rocks</div>
14867 div with illegal double attributes
14869 <div id="a" id="b">HTML rocks</div>
14871 <div id="b">HTML rocks</div>
14875 # FIXME: produce empty string instead of "class" in the PHP parser, following
14878 div with empty attribute value, space before equals
14882 <div class =>HTML rocks</div>
14884 <div class="">HTML rocks</div>
14889 div with multiple empty attribute values
14893 <div id= title=>HTML rocks</div>
14895 <div id="" title="">HTML rocks</div>
14900 table with multiple empty attribute values
14908 <table title="" id="">
14909 <tbody><tr><td> hi</td></tr>
14914 div with braces in attribute value
14916 <div title="{}">Foo</div>
14918 <div title="{}">Foo</div>
14921 <div title="{}">Foo</div>
14924 # This it very inconsistent in the PHP parser: it returns
14925 # class="class" if there is a space between the name and the equal sign (see
14926 # 'div with empty attribute value, space before equals'), but strips the
14927 # attribute completely if the space is missing. We hope that not much content
14928 # depends on this, so are implementing the behavior below in Parsoid for
14929 # consistencies' sake.
14930 # FIXME: fix this behavior in the PHP parser?
14932 div with empty attribute value, no space before equals
14934 parsoid=wt2html,html2html
14936 <div class=>HTML rocks</div>
14938 <div>HTML rocks</div>
14941 <div class="">HTML rocks</div>
14945 HTML multiple attributes correction
14947 <p class="error" class="awesome">Awesome!</p>
14949 <p class="awesome">Awesome!</p>
14954 Table multiple attributes correction
14957 !+ class="error" class="awesome"| status
14962 <th class="awesome"> status
14970 <DIV ID="x">HTML ROCKS</DIV>
14972 <div id="x">HTML ROCKS</div>
14977 Non-ASCII pseudo-tags are rendered as text
14986 Pseudo-tag with URL 'name' renders as url link
14988 <http://example.com/>
14990 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14995 text with amp in the middle of nowhere
14999 <p>Remember AT&T?
15004 text with character entity: eacute
15006 I always thought é was a cute letter.
15008 <p>I always thought é was a cute letter.
15011 <p>I always thought é was a cute letter.</p>
15015 text with entity-escaped character entity-like string: eacute
15017 I always thought &eacute; was a cute letter.
15019 <p>I always thought &eacute; was a cute letter.
15024 text with undefined character entity: xacute
15026 I always thought &xacute; was a cute letter.
15028 <p>I always thought &xacute; was a cute letter.
15032 # TODO: generalize to PHP parser?
15038 <data value="5">five</data>
15039 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15040 <mark>This highlighted text</mark>
15042 <p><data value="5">five</data>
15043 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15044 <mark>This highlighted text</mark></p>
15048 HTML tag with leading space is parsed as text
15052 <p>< div>foo< /div>
15057 ### Nesting tests (see bug 41545, 50604, 51081)
15060 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15061 # Note that html2wt is considerably more difficult if we use <b> in
15062 # the test case, instead of <big>
15064 Ensure that HTML adoption agency algorithm is properly implemented.
15066 <big>X<big>Y</big>Z</big>
15068 <p><big>X<big>Y</big>Z</big>
15072 # This was bug 41545 in the PHP parser.
15073 # Note that tidy doesn't handle this correctly.
15077 <kbd>X<kbd>Y</kbd>Z</kbd>
15079 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15083 # The following cases were bug 51081 in the PHP parser.
15084 # Note that there are some other nestable tags (b, i, etc) which are
15085 # not covered; see bug 51081 for discussion.
15087 # Note that tidy doesn't handle this correctly.
15091 <em>X<em>Y</em>Z</em>
15093 <p><em>X<em>Y</em>Z</em>
15097 # Note that tidy doesn't handle this correctly.
15099 Nesting of <strong>
15101 <strong>X<strong>Y</strong>Z</strong>
15103 <p><strong>X<strong>Y</strong>Z</strong>
15112 <p><q>X<q>Y</q>Z</q></p>
15115 # Note that tidy doesn't handle this correctly.
15119 <ruby>X<ruby>Y</ruby>Z</ruby>
15121 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15125 # Note that tidy doesn't handle this correctly.
15129 <bdo>X<bdo>Y</bdo>Z</bdo>
15131 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15143 [[Media:Foobar.jpg]]
15145 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15150 Media link with text
15152 [[Media:Foobar.jpg|A neat file to look at]]
15154 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15158 # FIXME: this is still bad HTML tag nesting
15159 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15161 Media link with nasty text
15163 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15165 <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>
15168 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15169 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15173 Media link to nonexistent file (bug 1702)
15175 [[Media:No such.jpg]]
15177 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15182 Image link to nonexistent file (bug 1850 - good)
15184 [[File:No_such.jpg]]
15186 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15189 <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>
15193 :Image link to nonexistent file (bug 1850 - bad)
15195 [[:Image:No such.jpg]]
15197 <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>
15200 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15206 Character reference normalization in link text (bug 1938)
15208 [[Main Page|this&that]]
15210 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15217 Test for unicode normalization
15219 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15223 (bug 19451) Links should refer to the normalized form.
15231 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15232 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15233 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15234 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15235 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15240 Empty attribute crash test (bug 2067)
15242 <font color="">foo</font>
15244 <p><font color="">foo</font>
15249 Empty attribute crash test single-quotes (bug 2067)
15251 <font color=''>foo</font>
15253 <p><font color="">foo</font>
15258 Attribute test: equals, then nothing
15260 <font color=>foo</font>
15262 <p><font>foo</font>
15267 Attribute test: unquoted value
15269 <font color=x>foo</font>
15271 <p><font color="x">foo</font>
15276 Attribute test: unquoted but illegal value (hash)
15278 <font color=#x>foo</font>
15280 <p><font color="#x">foo</font>
15284 # Parsoid does not serialize to empty attribute syntax,
15285 # so wt2wt and html2wt cases are skipped
15287 Attribute test: no value (T54330)
15289 parsoid=wt2html,html2html
15291 <font color>foo</font>
15293 <p><font color="">foo</font>
15296 <p><font color="">foo</font></p>
15300 Bug 2095: link with three closing brackets
15304 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15307 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15311 Bug 2095: link with pipe and three closing brackets
15313 [[Main Page|link]]]
15315 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15318 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15322 Bug 2095: link with pipe and three closing brackets, version 2
15324 [[Main Page|[http://example.com/]]]
15326 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15329 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15338 Template:Dangerous attribute
15340 " onmouseover="alert(document.cookie)
15344 Template:Dangerous style attribute
15346 border-size: expression(alert(document.cookie))
15352 <div style="float: right; {{{1}}}">Magic div</div>
15356 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15358 <div title="{{test}}"></div>
15360 <div title="This is a test template"></div>
15364 # Parsoid has enough context to handle this case
15366 Bug 2304: HTML attribute safety (dangerous template; 2309)
15368 <div title="{{dangerous attribute}}"></div>
15370 <div title=""></div>
15373 <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>
15377 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15379 <div style="{{dangerous style attribute}}"></div>
15381 <div style="/* insecure input */"></div>
15386 Bug 2304: HTML attribute safety (safe parameter; 2309)
15388 {{div style|width: 200px}}
15390 <div style="float: right; width: 200px">Magic div</div>
15395 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15397 {{div style|width: expression(alert(document.cookie))}}
15399 <div style="/* insecure input */">Magic div</div>
15404 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15406 {{div style|"><script>alert(document.cookie)</script>}}
15408 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15413 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15415 {{div style|" ><script>alert(document.cookie)</script>}}
15417 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15422 Bug 2304: HTML attribute safety (link)
15424 <div title="[[Main Page]]"></div>
15426 <div title="[[Main Page]]"></div>
15431 Bug 2304: HTML attribute safety (italics)
15433 <div title="''foobar''"></div>
15435 <div title="''foobar''"></div>
15440 Bug 2304: HTML attribute safety (bold)
15442 <div title="'''foobar'''"></div>
15444 <div title="'''foobar'''"></div>
15450 Bug 2304: HTML attribute safety (ISBN)
15452 <div title="ISBN 1234567890"></div>
15454 <div title="ISBN 1234567890"></div>
15459 Bug 2304: HTML attribute safety (RFC)
15461 <div title="RFC 1234"></div>
15463 <div title="RFC 1234"></div>
15468 Bug 2304: HTML attribute safety (PMID)
15470 <div title="PMID 1234567890"></div>
15472 <div title="PMID 1234567890"></div>
15477 Bug 2304: HTML attribute safety (web link)
15479 <div title="http://example.com/"></div>
15481 <div title="http://example.com/"></div>
15486 Bug 2304: HTML attribute safety (named web link)
15488 <div title="[http://example.com/ link]"></div>
15490 <div title="[http://example.com/ link]"></div>
15495 Bug 3244: HTML attribute safety (extension; safe)
15497 <div style="<nowiki>background:blue</nowiki>"></div>
15499 <div style="background:blue"></div>
15504 Bug 3244: HTML attribute safety (extension; unsafe)
15506 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15508 <div style="/* insecure input */"></div>
15512 # More MSIE fun discovered by Tom Gilder
15515 MSIE CSS safety test: spurious slash
15517 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15519 <div style="/* insecure input */">evil</div>
15524 MSIE CSS safety test: hex code
15526 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15528 <div style="/* insecure input */">evil</div>
15533 MSIE CSS safety test: comment in url
15535 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15537 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15542 MSIE CSS safety test: comment in expression
15544 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15546 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15551 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15553 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15555 <p style="/* invalid control char */">A</p>
15560 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15562 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15563 <div style="top:EXPRESSION(alert())">B</div>
15565 <p style="/* insecure input */">A</p>
15566 <div style="/* insecure input */">B</div>
15571 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15573 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15574 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15576 <div style="/* insecure input */">A</div>
15577 <p style="/* insecure input */">B</p>
15582 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15584 <div style="background-image:url⁽javascript:alert())">A</div>
15585 <div style="background-image:url₍javascript:alert())">B</div>
15586 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15588 <div style="/* insecure input */">A</div>
15589 <div style="/* insecure input */">B</div>
15590 <p style="/* insecure input */">C</p>
15598 title="data:text/html,<img src=1 onerror=alert(1)>"
15599 style="-o-link:attr(title);-o-link-source:current">X</div>
15601 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15606 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15608 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15609 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15610 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15611 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15612 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15613 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15614 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15616 <p style="/* insecure input */">A</p>
15617 <p style="/* insecure input */">B</p>
15618 <p style="/* insecure input */">C</p>
15619 <p style="/* insecure input */">D</p>
15620 <p style="/* insecure input */">E</p>
15621 <p style="/* insecure input */">F</p>
15622 <p style="/* insecure input */">G</p>
15627 Table attribute legitimate extension
15630 !+ style="<nowiki>color:blue</nowiki>"| status
15635 <th style="color:blue"> status
15641 Table attribute safety
15644 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15649 <th style="/* insecure input */"> status
15655 CSS line continuation 1
15657 <div style="background-image: u\ rl(test.jpg);"></div>
15659 <div style="/* insecure input */"></div>
15664 CSS line continuation 2
15666 <div style="background-image: u\ rl(test.jpg); "></div>
15668 <div style="/* insecure input */"></div>
15679 Expansion of multi-line templates in attribute values (bug 6255)
15681 <div style="background: {{identity|#00FF00}}">-</div>
15683 <div style="background: #00FF00">-</div>
15689 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15691 <div style="background:
15694 <div style="background: #00FF00">-</div>
15697 <div style="background:
15702 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15704 <div style="background: #00FF00">-</div>
15706 <div style="background: #00FF00">-</div>
15711 evil <math>-wiki-tags without Extension:Math enabled
15713 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15715 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15719 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15722 Parser hook: empty input
15735 Parser hook: empty input using terminated empty elements
15748 Parser hook: empty input using terminated empty elements (space before)
15761 Parser hook: basic input
15775 Parser hook: case insensitive
15789 Parser hook: case insensitive, redux
15802 Parser hook: nested tags
15806 <tag><tag></tag></tag>
15817 Parser hook: basic arguments
15819 <tag width=200 height = "100" depth = '50' square></tag>
15834 Parser hook: argument containing a forward slash (bug 5344)
15836 <tag filename='/tmp/bla'></tag>
15841 'filename' => '/tmp/bla',
15848 Parser hook: empty input using terminated empty elements (bug 2374)
15861 # </tag> should be output literally since there is no matching tag that begins it
15863 Parser hook: basic arguments using terminated empty elements (bug 2374)
15865 <tag width=200 height = "100" depth = '50' square/>
15884 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
15888 Parser hook: static parser hook not inside a comment
15890 <statictag>hello, world</statictag>
15891 <statictag action=flush/>
15899 Parser hook: static parser hook inside a comment
15901 <!-- <statictag>hello, world</statictag> -->
15902 <statictag action=flush/>
15908 # Nested template calls; this case was broken by Parser.php rev 1.506,
15912 Template:One-parameter
15914 (My parameter is: {{{1}}})
15918 Template:Map-one-parameter
15920 {{{{{1}}}|{{{2}}}}}
15924 Nested template calls
15926 {{Map-one-parameter|One-parameter|param}}
15928 <p>(My parameter is: param)
15937 # HTML+Tidy effectively strips out the empty tags completely
15938 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
15939 # which Tidy would have done for the PHP parser had there been content inside it.
15941 Sanitizer: Closing of open tags
15943 <s></s><table></table>
15945 <s></s><table></table>
15948 <p><s></s></p><table></table>
15952 Sanitizer: Closing of open but not closed tags
15961 Sanitizer: Closing of closed but not open tags
15971 Sanitizer: Closing of closed but not open table tags
15975 Table not started</td></tr></table>
15977 <p>Table not started</p>
15979 <p>Table not started</p>
15983 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
15985 <span id="æ: v">byte</span>[[#æ: v|backlink]]
15987 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15991 # In HTML5, the restrictions are that id must contain at least one character,
15992 # and must not contain any space characters.
15994 Sanitizer: Validating the contents of the id attribute (bug 4515)
15998 <br id="" /><br id="a space" />
16003 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16005 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16009 <br id="foo" /><br id="foo" />
16011 Something need to be done. foo-2 ?
16015 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16018 <meta itemprop="hello" content="world">
16019 <meta http-equiv="refresh" content="5">
16020 <meta itemprop="hello" http-equiv="refresh" content="5">
16021 <link itemprop="hello" href="{{SERVER}}">
16022 <link rel="stylesheet" href="{{SERVER}}">
16023 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16027 <p> <meta itemprop="hello" content="world" />
16028 <meta http-equiv="refresh" content="5">
16029 <meta itemprop="hello" content="5" />
16031 <link itemprop="hello" href="http://example.org" />
16032 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16033 <link itemprop="hello" href="http://example.org" />
16039 Language converter: output gets cut off unexpectedly (bug 5757)
16043 this bit is safe: }-
16045 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16047 then we get cut off here: }-
16049 all additional text is vanished
16051 <p>this bit is safe: }-
16052 </p><p>but if we add a conversion instance: xxx
16053 </p><p>then we get cut off here: }-
16054 </p><p>all additional text is vanished
16059 Self closed html pairs (bug 5487)
16062 <center><font id="bug" />Centered text</center>
16063 <div><font id="bug2" />In div text</div>
16065 <center><font id="bug" />Centered text</center>
16066 <div><font id="bug2" />In div text</div>
16075 Punctuation: nbsp before exclamation
16079 <p>C'est grave !
16084 Punctuation: CSS !important (bug 11874)
16086 <div style="width:50% !important">important</div>
16088 <div style="width:50% !important">important</div>
16093 Punctuation: CSS ! important (bug 11874; with space after)
16095 <div style="width:50% ! important">important</div>
16097 <div style="width:50% ! important">important</div>
16102 HTML bullet list, closed tags (bug 5497)
16115 <ul data-parsoid='{"stx":"html"}'>
16116 <li data-parsoid='{"stx":"html"}'>One</li>
16117 <li data-parsoid='{"stx":"html"}'>Two</li>
16123 HTML bullet list, unclosed tags (bug 5497)
16135 <ul data-parsoid='{"stx":"html"}'>
16136 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16137 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16143 HTML ordered list, closed tags (bug 5497)
16156 <ol data-parsoid='{"stx":"html"}'>
16157 <li data-parsoid='{"stx":"html"}'>One</li>
16158 <li data-parsoid='{"stx":"html"}'>Two</li>
16164 HTML ordered list, unclosed tags (bug 5497)
16177 <ol data-parsoid='{"stx":"html"}'>
16178 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16179 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16185 HTML nested bullet list, closed tags (bug 5497)
16210 HTML nested bullet list, open tags (bug 5497)
16247 HTML nested ordered list, closed tags (bug 5497)
16272 HTML nested ordered list, open tags (bug 5497)
16309 HTML ordered list item with parameters oddity
16311 <ol><li id="fragment">One</li>
16314 <ol><li id="fragment">One</li>
16319 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16321 bug 5918: autonumbering
16323 [http://first/] [http://second] [ftp://ftp]
16327 [mailto:enclosed@mail.tld With target]
16329 [mailto:enclosed@mail.tld]
16331 mailto:inline@mail.tld
16333 <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>
16334 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16335 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16336 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16337 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16340 <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>
16341 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16342 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16343 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16344 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16349 # Security and HTML correctness
16350 # From Nick Jenkins' fuzz testing
16354 Fuzz testing: Parser13
16369 Fuzz testing: Parser14
16374 <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>
16375 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16377 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16383 <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>
16385 <div id="toc" class="toc">
16386 <div id="toctitle">
16390 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16397 Fuzz testing: Parser14-table
16402 <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>
16403 <table style="__TOC__">
16408 <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>
16409 <table style="__TOC__">
16416 # Known to produce bogus xml (extra </td>)
16418 Fuzz testing: Parser16
16447 Fuzz testing: Parser21
16450 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16455 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16465 Fuzz testing: Parser22
16467 http://===r:::https://b
16471 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16479 # Known to produce bad XML for now
16481 Fuzz testing: Parser24
16488 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16489 <br style="onmouseover='alert(document.cookie);' " />
16491 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16496 <u class="|">}}}} >
16497 <br style="onmouseover='alert(document.cookie);'" />
16499 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16508 # Note: the current result listed for this is not what the original one was,
16509 # but the original bug was JavaScript injection, which is fixed in any case.
16510 # It's not clear that the original result listed was any more correct than the
16511 # current one. Original result:
16514 # <li class="||">
16515 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16517 Fuzz testing: Parser25 (bug 6055)
16523 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16525 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16530 Fuzz testing: URL adjacent extension (with space, clean)
16532 http://example.com <nowiki>junk</nowiki>
16534 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16537 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16541 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16543 http://example.com<nowiki>junk</nowiki>
16545 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16548 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16552 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16554 http://example.com<pre>junk</pre>
16556 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16559 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16564 <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>
16568 Fuzz testing: image with bogus manual thumbnail
16570 [[Image:foobar.jpg|thumbnail= ]]
16572 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16575 <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>
16579 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16581 <pre dir=" "></pre>
16583 <pre dir=" "></pre>
16588 Parsing optional HTML elements (Bug 6171)
16593 <td> Some tabular data</td>
16594 <td> More tabular data ...
16595 <td> And yet som tabular data</td>
16601 <td> Some tabular data</td>
16602 <td> More tabular data ...
16603 </td><td> And yet som tabular data</td>
16610 Correct handling of <td>, <tr> (Bug 6171)
16615 <td> Some tabular data</td>
16616 <td> More tabular data ...</td>
16617 <td> And yet som tabular data</td>
16623 <td> Some tabular data</td>
16624 <td> More tabular data ...</td>
16625 <td> And yet som tabular data</td>
16633 Parsing crashing regression (fr:JavaScript)
16637 <p></body></x>
16642 Inline wiki vs wiki block nesting
16648 <p><b>Bold paragraph</b>
16649 </p><p>New wiki paragraph
16653 # FIXME: The current php output is documented
16654 # and desired output is the parsoid target.
16656 Inline HTML vs wiki block nesting
16662 <p><b>Bold paragraph
16663 </p><p>New wiki paragraph</b>
16666 <p><b>Bold paragraph</b>
16667 </p><p>New wiki paragraph
16671 # Original result was this:
16672 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16674 # While that might be marginally more intuitive, maybe, the six-apostrophe
16675 # construct is clearly pathological and the result stated here (which is what
16676 # the parser actually does) is about as reasonable as anything.
16678 Mixing markup for italics and bold
16681 '''bold''''''bold''bolditalics'''''
16683 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16691 Article for special page transclusion test
16695 Special page transclusion
16698 {{Special:Prefixindex/Xyzzyx}}
16700 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16705 Special page transclusion twice (bug 5021)
16708 {{Special:Prefixindex/Xyzzyx}}
16709 {{Special:Prefixindex/Xyzzyx}}
16711 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16712 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16717 Transclusion of default MediaWiki message
16719 {{MediaWiki:Mainpage}}
16726 Transclusion of nonexistent MediaWiki message
16728 {{MediaWiki:Mainpagexxx}}
16730 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16735 Transclusion of MediaWiki message with underscore
16737 {{MediaWiki:history_short}}
16744 Transclusion of MediaWiki message with space
16746 {{MediaWiki:history short}}
16753 Invalid header with following text
16763 Section extraction test (section 0)
16783 Section extraction test (section 1)
16805 Section extraction test (section 2)
16826 Section extraction test (section 3)
16846 Section extraction test (section 4)
16870 Section extraction test (section 5)
16890 Section extraction test (section 6)
16911 Section extraction test (section 7)
16931 Section extraction test (section 8)
16951 Section extraction test (section 9)
16972 Section extraction test (section 10)
16992 Section extraction test (nonexistent section 11)
17011 Section extraction test with bogus heading (section 1)
17016 ==bogus== not a legal section
17020 ==bogus== not a legal section
17024 Section extraction test with bogus heading (section 2)
17029 ==bogus== not a legal section
17036 Section extraction test with comment after heading (section 1)
17048 Section extraction test with comment after heading (section 2)
17060 Section extraction test with bogus <nowiki> heading (section 1)
17065 ==bogus== <nowiki>not a legal section</nowiki>
17069 ==bogus== <nowiki>not a legal section</nowiki>
17073 Section extraction test with bogus <nowiki> heading (section 2)
17078 ==bogus== <nowiki>not a legal section</nowiki>
17084 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17085 # instead of respecting commented sections
17087 Section extraction prefixed by comment (section 1)
17098 Section extraction prefixed by comment (section 2)
17108 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17109 # instead of respecting HTML-style headings
17111 Section extraction, mixed wiki and html (section 1)
17127 Section extraction, mixed wiki and html (section 2)
17143 # Formerly testing for bug 3342
17145 Section extraction, heading surrounded by <noinclude>
17149 <noinclude>==unmarked==</noinclude>
17155 # Test behavior of bug 19910
17157 Sectiion with all-equals
17162 The line above must have a trailing space
17165 But just in case it doesn't...
17169 But just in case it doesn't...
17173 Section replacement test (section 0)
17204 Section replacement test (section 1)
17233 Section replacement test (section 2)
17263 Section replacement test (section 3)
17294 Section replacement test (section 4)
17321 Section replacement test (section 5)
17352 Section replacement test (section 6)
17382 Section replacement test (section 7)
17413 Section replacement test (section 8)
17444 Section replacement test (section 9)
17473 Section replacement test (section 10)
17503 Section replacement test with initial whitespace (bug 13728)
17507 Preformatted initial line
17511 Preformatted initial line
17518 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17530 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17543 Section extraction, <pre> around bogus header (bug 10309)
17560 Section replacement, <pre> around bogus header (bug 10309)
17562 noxml replace=2,"xxx"
17582 Handling of 
 in URLs
17586 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17589 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17591 a</a></li></ul></li></ul>
17595 Handling of %0A in URLs
17599 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17602 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17606 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17608 5 quotes, code coverage +1 line
17615 <p><b><i></i></b></p>
17618 # same html as previous, but wikitext adjusted to match parsoid html2wt
17619 # note that wt2html and html2html will put the <i> before the <b>
17621 5 quotes, code coverage +1 line w/ nowiki (1)
17623 parsoid=wt2wt,html2wt
17625 '''''<nowiki/>'''''
17630 <p><b><i></i></b></p>
17633 # same as previous, just swapping the <i> and <b>
17635 5 quotes, code coverage +1 line w/ nowiki (2)
17637 '''''<nowiki/>'''''
17642 <p><i><b></b></i></p>
17646 Special:Search page linking.
17650 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17655 {{!}} is a magic word
17657 {{!}} is a magic word there and {{!}} is still a magic word here
17659 <p>| is a magic word there and | is still a magic word here
17662 <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>
17668 title=[[Parser test]]
17673 * {{FULLPAGENAMEE}}
17675 * {{BASEPAGENAMEE}}
17679 * {{ROOTPAGENAMEE}}
17681 * {{TALKPAGENAMEE}}
17682 * {{SUBJECTPAGENAME}}
17683 * {{SUBJECTPAGENAMEE}}
17686 * {{NAMESPACENUMBER}}
17690 * {{SUBJECTSPACEE}}
17691 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17693 <ul><li> Parser test</li>
17694 <li> Parser_test</li>
17695 <li> Parser test</li>
17696 <li> Parser_test</li>
17697 <li> Parser test</li>
17698 <li> Parser_test</li>
17699 <li> Parser test</li>
17700 <li> Parser_test</li>
17701 <li> Parser test</li>
17702 <li> Parser_test</li>
17703 <li> Talk:Parser test</li>
17704 <li> Talk:Parser_test</li>
17705 <li> Parser test</li>
17706 <li> Parser_test</li>
17714 <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>
17717 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17727 image4 |300px| centre
17728 image5.svg| http://///////
17733 <ul class="gallery mw-gallery-traditional">
17734 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17735 <div class="thumb" style="height: 150px;">Image1.png</div>
17736 <div class="gallerytext">
17739 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17740 <div class="thumb" style="height: 150px;">Image2.gif</div>
17741 <div class="gallerytext">
17746 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17747 <div class="thumb" style="height: 150px;">Image3</div>
17748 <div class="gallerytext">
17751 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17752 <div class="thumb" style="height: 150px;">Image4</div>
17753 <div class="gallerytext">
17758 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17759 <div class="thumb" style="height: 150px;">Image5.svg</div>
17760 <div class="gallerytext">
17761 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17765 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17766 <div class="thumb" style="height: 150px;">* image6</div>
17767 <div class="gallerytext">
17775 Gallery (with options)
17777 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17778 File:Nonexistent.jpg|caption
17779 File:Nonexistent.jpg
17780 image:foobar.jpg|some '''caption''' [[Main Page]]
17782 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17785 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17786 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17787 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17788 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17789 <div class="gallerytext">
17794 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17795 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17796 <div class="gallerytext">
17799 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17800 <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>
17801 <div class="gallerytext">
17802 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17806 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17807 <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>
17808 <div class="gallerytext">
17811 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17812 <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>
17813 <div class="gallerytext">
17823 Gallery with link that has fragment
17826 image:foobar.jpg|link=Main_Page
17827 image:foobar.jpg|link=Main_Page#section
17828 image:foobar.jpg|link=Main Page#section|caption
17831 <ul class="gallery mw-gallery-traditional">
17832 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17833 <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>
17834 <div class="gallerytext">
17837 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17838 <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>
17839 <div class="gallerytext">
17842 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17843 <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>
17844 <div class="gallerytext">
17854 Gallery with wikitext inside caption
17857 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
17858 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
17861 <ul class="gallery mw-gallery-traditional">
17862 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17863 <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>
17864 <div class="gallerytext">
17865 <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>
17869 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17870 <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>
17871 <div class="gallerytext">
17872 <p>This is a test template
17881 gallery (with showfilename option)
17883 <gallery showfilename>
17884 File:Nonexistent.jpg|caption
17885 File:Nonexistent.jpg
17886 image:foobar.jpg|some '''caption''' [[Main Page]]
17890 <ul class="gallery mw-gallery-traditional">
17891 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17892 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17893 <div class="gallerytext">
17894 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17899 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17900 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17901 <div class="gallerytext">
17902 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17906 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17907 <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>
17908 <div class="gallerytext">
17909 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17910 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17914 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17915 <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>
17916 <div class="gallerytext">
17917 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17926 Gallery (with namespace-less filenames)
17929 File:Nonexistent.jpg
17935 <ul class="gallery mw-gallery-traditional">
17936 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17937 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17938 <div class="gallerytext">
17941 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17942 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17943 <div class="gallerytext">
17946 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17947 <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>
17948 <div class="gallerytext">
17951 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17952 <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>
17953 <div class="gallerytext">
17961 HTML Hex character encoding (spells the word "JavaScript")
17963 parsoid=wt2html,wt2wt,html2html
17965 JavaScript
17967 <p>JavaScript
17972 <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>
17976 HTML Hex character encoding bogus encoding (bug 26437 regression check)
17980 <p>&#xsee;&#XSEE;
17983 <p>&#xsee;&#XSEE;</p>
17987 HTML Hex character encoding mixed case
17989 parsoid=wt2html,wt2wt,html2html
17998 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18002 __FORCETOC__ override
18014 ISBN 978-0-1234-56 789
18016 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18019 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18021 <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>
18025 ISBN followed by 5 spaces
18036 ISBN ISBN 1234567890
18038 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18041 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18051 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18052 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18053 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18056 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18057 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18058 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
18062 ISBN with empty prefix (parsoid test)
18066 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18069 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
18073 Bug 22905: <abbr> followed by ISBN followed by </a>
18075 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18077 <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>
18080 <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>
18088 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18093 Double RFC with a wiki link
18097 <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>
18106 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18109 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18113 Centre-aligned image
18115 [[Image:foobar.jpg|centre]]
18117 <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>
18124 [[Image:foobar.jpg|none]]
18126 <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>
18131 Width + Height sized image (using px) (height is ignored)
18133 [[Image:foobar.jpg|640x480px]]
18135 <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>
18140 Width-sized image (using px, no following whitespace)
18142 [[Image:foobar.jpg|640px]]
18144 <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>
18149 Width-sized image (using px, with following whitespace - test regression from r39467)
18151 [[Image:foobar.jpg|640px ]]
18153 <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>
18158 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18160 [[Image:foobar.jpg| 640px]]
18162 <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>
18167 Image with page parameter
18171 [[File:LoremIpsum.djvu|page=2]]
18173 <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>
18176 <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>
18180 Another italics / bold test
18188 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18194 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18197 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18202 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18204 Images with the "|" character in the comment
18206 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18208 <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>
18211 <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>
18215 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18217 <html><script>alert(1);</script></html>
18219 <p><html><script>alert(1);</script></html>
18224 HTML with raw HTML ($wgRawHtml==true)
18228 <html><script>alert(1);</script></html>
18230 <p><script>alert(1);</script>
18235 Parents of subpages, one level up
18237 subpage title=[[Subpage test/L1/L2/L3]]
18241 <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>
18247 Parents of subpages, one level up, not named
18249 subpage title=[[Subpage test/L1/L2/L3]]
18253 <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>
18260 Parents of subpages, two levels up
18262 subpage title=[[Subpage test/L1/L2/L3]]
18268 <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
18269 </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>
18274 Parents of subpages, two levels up, without trailing slash or name.
18276 subpage title=[[Subpage test/L1/L2/L3]]
18285 Parents of subpages, two levels up, with lots of extra trailing slashes.
18287 subpage title=[[Subpage test/L1/L2/L3]]
18291 <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>
18296 Subpage test/L1/L2/L3Sibling
18302 Transclusion of a sibling page (one level up)
18304 subpage title=[[Subpage test/L1/L2/L3]]
18313 Transclusion of a child page
18315 subpage title=[[Subpage test/L1/L2]]
18324 Non-transclusion because of too many up levels
18326 subpage title=[[Subpage test/L1/L2/L3]]
18328 {{../../../../More than parent}}
18330 <p>{{../../../../More than parent}}
18335 Definition list code coverage
18341 <dl><dt> title  </dt>
18343 <dt> title </dt>
18349 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18350 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18351 <dt>title</dt><dd> def</dd></dl>
18355 Don't fall for the self-closing div
18357 <div>hello world</div/>
18359 <div>hello world</div>
18368 <p>[[:Template:Msg]]
18377 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18381 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18383 Always escape literal '>' in output, not just after '<'
18397 <p>This is a test template
18398 This is a test template
18410 Inclusion of !userCanEdit() content
18414 <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>
18420 Out-of-order TOC heading levels
18429 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18431 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18433 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18434 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18437 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18439 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18440 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18446 <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>
18447 <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>
18448 <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>
18449 <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>
18450 <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>
18451 <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>
18457 ISBN with a dummy number
18467 ISBN with space-delimited number
18471 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18477 ISBN with multiple spaces, no number
18496 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18497 </p><p>ISBN 12345678901
18503 ISBN with trailing year (bug 8110)
18505 ISBN 1-234-56789-0 - 2006
18507 ISBN 1 234 56789 0 - 2006
18509 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18510 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18518 {{anchorencode:foo bar©#%n}}
18520 <p>foo_bar.C2.A9.23.25n
18525 anchorencode trims spaces
18527 {{anchorencode: __pretty__please__}}
18534 anchorencode deals with links
18536 {{anchorencode: [[hello|world]] [[hi]]}}
18543 anchorencode deals with templates
18545 {{anchorencode: {{Foo}} }}
18552 anchorencode encodes like the TOC generator: (bug 18431)
18554 === _ +:.3A%3A&&]] ===
18555 {{anchorencode: _ +:.3A%3A&&]] }}
18558 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18559 <p>.2B:.3A.253A.26.26.5D.5D
18564 Bug 6200: blockquotes and paragraph formatting
18585 Bug 8293: Use of center tag ruins paragraph formatting
18606 Parsing of overlapping (improperly nested) inline html tags
18608 <span><s>x</span></s>
18610 <p><span><s>x</span></s></span>
18613 <p><span><s>x</s></span>
18618 ### Language variants related tests
18621 Self-link in language variants
18623 title=[[Dunav]] language=sr
18625 Both [[Dunav]] and [[Дунав]] are names for this river.
18627 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18638 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
18640 title=[[Duna]] language=sr
18642 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
18644 <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.
18649 Link to a section of a variant of this title shouldn't be parsed as self-link
18651 title=[[Duna]] language=sr
18653 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
18655 <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.
18660 Link to pages in language variants
18664 Main Page can be written as [[Маин Паге]]
18666 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18672 Multiple links to pages in language variants
18676 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18678 <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>.
18684 Simple template in language variants
18690 <p>This is a test template
18696 Template with explicit namespace in language variants
18702 <p>This is a test template
18708 Basic test for template parameter in language variants
18712 {{парамтест|param=foo}}
18714 <p>This is a test template with parameter foo
18720 Simple category in language variants
18724 [[Category:МедиаWики Усер'с Гуиде]]
18726 <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>
18743 Don't convert blue categorylinks to another variant (bug 33210)
18747 [[A]][[Category:分类]]
18749 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18754 Stripping -{}- tags (language variants)
18758 Latin proverb: -{Ne nuntium necare}-
18760 <p>Latin proverb: Ne nuntium necare
18766 Prevent conversion with -{}- tags (language variants)
18768 language=sr variant=sr-ec
18770 Latinski: -{Ne nuntium necare}-
18772 <p>Латински: Ne nuntium necare
18778 Prevent conversion of text with -{}- tags (language variants)
18780 language=sr variant=sr-ec
18782 Latinski: -{Ne nuntium necare}-
18784 <p>Латински: Ne nuntium necare
18790 Prevent conversion of links with -{}- tags (language variants)
18792 language=sr variant=sr-ec
18796 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18802 -{}- tags within headlines (within html for parserConvert())
18804 language=sr variant=sr-ec
18808 <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>
18814 Explicit definition of language variant alternatives
18816 language=zh variant=zh-tw
18818 -{zh:China;zh-tw:Taiwan}-, not China
18820 <p>Taiwan, not China
18826 Conversion around HTML tags
18828 language=sr variant=sr-ec
18830 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
18831 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
18834 <span title="ЛаCтин">ски</span>
18840 Explicit session-wise language variant mapping (A flag and - flag)
18842 language=zh variant=zh-tw
18844 Taiwan is not China.
18845 But -{A|zh:China;zh-tw:Taiwan}- is China,
18846 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
18847 and -{China}- is China.
18849 <p>Taiwan is not China.
18850 But Taiwan is Taiwan,
18851 (This should be stripped!)
18852 and China is China.
18857 Explicit session-wise language variant mapping (H flag for hide)
18859 language=zh variant=zh-tw
18861 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
18864 <p>(This should be stripped!)
18870 Adding explicit conversion rule for title (T flag)
18872 language=zh variant=zh-tw showtitle
18874 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18877 <p>Should be stripped!
18882 Testing that changing the language variant here in the tests actually works
18884 language=zh variant=zh showtitle
18886 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18889 <p>Should be stripped!
18894 Recursive conversion of alt and title attrs shouldn't clear converter state
18896 language=zh variant=zh-cn showtitle
18898 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
18899 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
18903 Should be stripped<span title="Exclamation">!</span>
18908 Bug 24072: more test on conversion rule for title
18910 language=zh variant=zh-tw showtitle
18912 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18913 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
18916 <p>This should be stripped!
18917 This won't take interferes with the title rule.
18922 Partly disable title conversion if variant == main language code
18924 language=zh variant=zh title=[[ZH]] showtitle
18926 -{T|zh-cn:CN;zh-tw:TW}-
18934 Partly disable title conversion if variant == main language code, more
18936 language=zh variant=zh title=[[ZH]] showtitle
18946 Raw output of variant escape tags (R flag)
18948 language=zh variant=zh-tw
18950 Raw: -{R|zh:China;zh-tw:Taiwan}-
18952 <p>Raw: zh:China;zh-tw:Taiwan
18957 Strings evaluating false shouldn't be ignored by Language converter (T51072)
18959 language=zh variant=zh-cn
18961 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
18968 Conversion rules from [numeric-only string] to [something else] (T48634)
18970 language=zh variant=zh-cn
18972 -{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
18979 Bidirectional converter rule entries with an empty value should be ignored (T53551)
18981 language=zh variant=zh-cn
18983 -{H|zh-cn:foo;zh-tw:;}-foobar
18990 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
18992 language=zh variant=zh-cn
18994 -{H|=>zh-cn:foo;}-foobar
19001 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19003 language=zh variant=zh-cn
19012 Nested using of manual convert syntax
19014 language=zh variant=zh-hk
19016 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19018 <p>Nested: Hello Hong Kong!
19023 Proper conversion of text in external links
19025 language=sr variant=sr-ec
19027 http://www.google.com
19028 gopher://www.google.com
19029 [http://www.google.com http://www.google.com]
19030 [gopher://www.google.com gopher://www.google.com]
19031 [https://www.google.com irc://www.google.com]
19032 [ftp://www.google.com www.google.com/ftp://dir]
19033 [//www.google.com www.google.com]
19035 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19036 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19037 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19038 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19039 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19040 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19041 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19046 Do not convert roman numbers to language variants
19048 language=sr variant=sr-ec
19052 <p>Фридрих IV је цар.
19057 Unclosed language converter markup "-{"
19068 Don't convert raw rule "-{R|=>}-" to "=>"
19079 Don't break link parsing if language converter markup is in the caption.
19081 language=sr variant=sr-ec
19083 [[Main Page|-{R|main page}-]]
19085 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19089 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19091 Don't break image parsing if language converter markup is in the caption.
19095 [[File:Foobar.jpg|-{R|caption}-]]
19097 <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>
19101 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19103 Don't break list handling if language converter markup is in the item.
19105 language=zh variant=zh-cn
19107 ;-{zh-cn:AAA;zh-tw:BBB}-
19109 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19116 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19118 Don't break table handling if language converter markup is in the cell.
19120 language=sr variant=sr-ec
19143 Bug 529: Uncovered bullet
19152 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19153 # Templates in Wikipedia rely on this behavior, as tidy has always been
19154 # enabled there. These tests are normally run *without* tidy, so specify the
19155 # full output here.
19156 # To test realistic parsing behavior, apply a tidy-like transformation to both
19157 # the expected output and your parser's output.
19159 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19161 ******* Foo {{bullet}}
19163 <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>
19169 Bug 529: Uncovered table already at line-start
19192 Bug 529: Uncovered bullet in parser function result
19194 * Foo {{lc:{{bullet}} }}
19202 Bug 5678: Double-parsed template argument
19204 {{lc:{{{1}}}|hello}}
19211 Bug 5678: Double-parsed template invocation
19213 {{lc:{{paramtest {{!}} param = hello }} }}
19215 <p>{{paramtest | param = hello }}
19220 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19223 title=[[Main Page]]
19225 {{PRVNÍVELKÉ:ěščř}}
19226 {{prvnívelké:ěščř}}
19246 Morwen/13: Unclosed link followed by heading
19253 <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>
19258 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19265 <h1><span class="mw-headline" id="heading">heading</span></h1>
19270 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19277 <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>
19292 Paragraphs inside divs (no extra line breaks)
19304 Paragraphs inside divs (extra line break on open)
19319 Paragraphs inside divs (extra line break on close)
19334 Paragraphs inside divs (extra line break on open and close)
19351 Nesting tags, paragraphs on lines which begin with <div>
19353 <div></div><strong>A
19356 <p><strong>A</strong></p>
19357 <p><strong>B</strong></p>
19365 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19367 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19369 <blockquote>Line one
19371 Line two</blockquote>
19373 <blockquote>Line one
19374 Line two</blockquote>
19378 <p>Line one Line two</p>
19383 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19388 Line two</blockquote>
19393 Line two</blockquote>
19398 Line two</blockquote>
19402 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19404 <blockquote>Line one
19409 <blockquote>Line one
19422 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19444 Paragraphs inside blockquotes/divs (no extra line breaks)
19446 <blockquote><div>Line one
19448 Line two</div></blockquote>
19450 <blockquote><div>Line one
19451 Line two</div></blockquote>
19456 Paragraphs inside blockquotes/divs (extra line break on open)
19461 Line two</div></blockquote>
19466 Line two</div></blockquote>
19471 Paragraphs inside blockquotes/divs (extra line break on close)
19473 <blockquote><div>Line one
19476 </div></blockquote>
19478 <blockquote><div>Line one
19481 </div></blockquote>
19486 Paragraphs inside blockquotes/divs (extra line break on open and close)
19492 </div></blockquote>
19498 </div></blockquote>
19503 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19505 wgLinkHolderBatchSize=0
19511 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19512 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19513 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19518 Free external link invading image caption
19520 [[Image:Foobar.jpg|thumb|http://x|hello]]
19522 <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>
19527 Bug 15196: localised external link numbers
19531 [http://en.wikipedia.org/]
19533 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19536 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19540 Multibyte character in padleft
19542 {{padleft:-Hello|7|Æ}}
19549 Multibyte character in padright
19551 {{padright:Hello-|7|Æ}}
19558 formatdate parser function
19560 {{#formatdate:2009-03-24}}
19562 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19567 formatdate parser function, with default format
19569 {{#formatdate:2009-03-24|mdy}}
19571 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19576 Spacing of numbers in formatted dates
19578 {{#formatdate:January 15}}
19580 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19585 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
19587 language=nl title=[[MediaWiki:Common.css]]
19589 {{#formatdate:2009-03-24|dmy}}
19591 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19604 Edit comment with link
19608 I like the [[Main Page]] a lot
19610 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19614 Edit comment with link and link text
19618 I like the [[Main Page|best pages]] a lot
19620 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19624 Edit comment with link and link text with suffix
19628 I like the [[Main Page|best page]]s a lot
19630 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19634 Edit comment with section link (non-local, eg in history list)
19636 comment title=[[Main Page]]
19638 /* External links */ removed bogus entries
19640 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19644 Edit comment with section link and text before it (non-local, eg in history list)
19646 comment title=[[Main Page]]
19648 pre-comment text /* External links */ removed bogus entries
19650 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>
19654 Edit comment with section link (local, eg in diff view)
19656 comment local title=[[Main Page]]
19658 /* External links */ removed bogus entries
19660 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19664 Edit comment with subpage link (bug 14080)
19668 title=[[Subpage test]]
19670 Poked at a [[/subpage]] here...
19672 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
19676 Edit comment with subpage link and link text (bug 14080)
19680 title=[[Subpage test]]
19682 Poked at a [[/subpage|neat little page]] here...
19684 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
19688 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
19691 title=[[Subpage test]]
19693 Poked at a [[/subpage]] here...
19695 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
19699 Edit comment with bare anchor link (local, as on diff)
19703 title=[[Main Page]]
19707 <a href="#section">#section</a>
19711 Edit comment with bare anchor link (non-local, as on history)
19714 title=[[Main Page]]
19718 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19722 Anchor starting with underscore
19726 <p><a href="#_ref">One</a>
19731 Id starting with underscore
19733 <div id="_ref"></div>
19735 <div id="_ref"></div>
19740 Space normalisation on autocomment (bug 22784)
19743 title=[[Main Page]]
19745 /* __hello__world__ */
19747 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19751 percent-encoding and + signs in comments (Bug 26410)
19755 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19757 <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>
19760 # Parsoid doesn't support this yet: see bug 73581
19761 # but it *should* omit the 'src' attribute if the image is bad.
19762 # PHP side of tests was disabled in
19763 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19764 # because of issues in the PHP parserTests infrastructure
19765 # (but the output below is indeed what the PHP side emits)
19767 Bad images - basic functionality
19770 !! DISABLED/html/php
19772 <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>
19776 Bad images - bug 16039: text after bad image disappears
19781 !! DISABLED/html/php
19787 <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>
19792 Verify that displaytitle works (bug #22501) no displaytitle
19796 wgAllowDisplayTitle=true
19797 wgRestrictDisplayTitle=false
19799 this is not the the title
19802 <p>this is not the the title
19807 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
19812 wgAllowDisplayTitle=true
19813 wgRestrictDisplayTitle=false
19815 this is not the the title
19816 {{DISPLAYTITLE:whatever}}
19819 <p>this is not the the title
19824 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
19829 wgAllowDisplayTitle=true
19830 wgRestrictDisplayTitle=true
19832 this is not the the title
19833 {{DISPLAYTITLE:whatever}}
19836 <p>this is not the the title
19841 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
19846 wgAllowDisplayTitle=true
19847 wgRestrictDisplayTitle=true
19849 this is not the the title
19850 {{DISPLAYTITLE:screen}}
19853 <p>this is not the the title
19858 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
19863 wgAllowDisplayTitle=false
19865 this is not the the title
19866 {{DISPLAYTITLE:screen}}
19869 <p>this is not the the title
19870 <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>
19875 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
19880 wgAllowDisplayTitle=false
19882 this is not the the title
19885 <p>this is not the the title
19890 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
19895 wgAllowDisplayTitle=true
19896 wgRestrictDisplayTitle=true
19898 this is not the the title
19899 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
19901 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
19902 <p>this is not the the title
19907 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
19912 wgAllowDisplayTitle=true
19913 wgRestrictDisplayTitle=true
19915 this is not the the title
19916 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
19918 <span style="color: red;">s</span>creen
19919 <p>this is not the the title
19924 Page status indicators: Empty name is invalid
19928 <indicator name=" "></indicator>
19929 <indicator></indicator>
19931 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19932 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19937 Page status indicators: Weird syntaxes that are okay
19941 <indicator name="empty" />
19942 <indicator name="name"></indicator>
19951 Page status indicators: Torture test
19955 <indicator name="01">hello world</indicator>
19956 <indicator name="02">[[Main Page]]</indicator>
19957 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
19958 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
19959 <indicator name="05">* foo
19961 <indicator name="06"><nowiki>foo</nowiki></indicator>
19962 <indicator name="07"> Preformatted</indicator>
19963 <indicator name="08"><div>Broken tag</indicator>
19964 <indicator name="09">{| class=wikitable
19967 <indicator name="10">Two
19969 paragraphs</indicator>
19972 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19973 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" />
19974 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>
19975 05=<ul><li> foo</li>
19979 07=<pre>Preformatted
19981 08=<div>Broken tag</div>
19983 09=<table class="wikitable">
20000 preload: check <noinclude> and <includeonly>
20004 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20010 preload: check <onlyinclude>
20014 Goodbye <onlyinclude>Hello world</onlyinclude>
20020 preload: can pass tags through if we want to
20024 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20026 <includeonly>Hello world</includeonly>
20030 preload: check that it doesn't try to do tricks
20034 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20036 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20040 Play a bit with r67090 and bug 3158
20042 <div style="width:50% !important"> </div>
20043 <div style="width:50% !important"> </div>
20044 <div style="width:50% !important"> </div>
20045 <div style="border : solid;"> </div>
20047 <div style="width:50% !important"> </div>
20048 <div style="width:50% !important"> </div>
20049 <div style="width:50% !important"> </div>
20050 <div style="border : solid;"> </div>
20053 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20054 <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>
20055 <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>
20056 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20061 HTML5 data attributes
20063 <span data-foo="bar">Baz</span>
20064 <p data-abc-def_hij="">Quuz</p>
20066 <p><span data-foo="bar">Baz</span>
20068 <p data-abc-def_hij="">Quuz</p>
20073 percent-encoding and + signs in internal links (Bug 26410)
20075 [[User:+%]] [[Page+title%]]
20076 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20077 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20078 [[%33%45]] [[%33%45+]]
20080 <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>
20081 <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>
20082 <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>
20083 <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>
20086 <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>
20087 <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>
20088 <a rel="mw:WikiLink" href="%25" title="%">%</a> <a rel="mw:WikiLink" href="+" title="+">+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"[[bar]]"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
20089 <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>
20093 Special characters in embedded file links (bug 27679)
20095 [[File:Contains & ampersand.jpg]]
20096 [[File:Does not exist.jpg|Title with & ampersand]]
20098 <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>
20099 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20102 <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>
20103 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"Title with & ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
20107 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20109 Text's been normalized?
20111 <p>Text's been normalized?
20116 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20118 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20120 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20125 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20127 [http://www.example.org/ ideograms]
20129 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20134 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20136 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20138 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20162 Bug 31098 Template which includes system messages which includes the template
20166 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20167 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20172 Bug31490 Turkish: ucfirst 'blah'
20183 Bug31490 Turkish: ucfirst 'ix'
20194 Bug31490 Turkish: lcfirst 'BLAH'
20205 Bug31490 Turkish: ucfırst (with a dotless i)
20211 <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>
20216 Bug31490 ucfırst (with a dotless i) with English language
20222 <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>
20227 Bug 26375: TOC with italics
20229 title=[[Main Page]]
20232 == ''Lost'' episodes ==
20234 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20236 <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>
20240 <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>
20245 Bug 26375: TOC with bold
20247 title=[[Main Page]]
20250 == '''should be bold''' then normal text ==
20252 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20254 <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>
20258 <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>
20263 Bug 33845: Headings become cursive in TOC when they contain an image
20265 title=[[Main Page]]
20268 == Image [[Image:foobar.jpg]] ==
20270 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20272 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20276 <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>
20281 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20283 title=[[Main Page]]
20286 == <blockquote>Quote</blockquote> ==
20288 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20290 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20294 <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>
20298 <div id="toc" class="toc">
20299 <div id="toctitle">
20303 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20307 <h2><span class="mw-headline" id="Quote"></span></h2>
20309 <p><span class="mw-headline" id="Quote">Quote</span></p>
20311 <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>
20315 Unclosed tags in TOC
20317 title=[[Main Page]]
20321 <small>Hanc marginis exiguitas non caperet.</small>
20324 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20326 <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>
20330 <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>
20331 <p><small>Hanc marginis exiguitas non caperet.</small>
20337 Multiple tags in TOC
20340 == <i>Foo</i> <b>Bar</b> ==
20342 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20344 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20346 <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>
20347 <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>
20351 <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>
20352 <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>
20356 <div id="toc" class="toc">
20357 <div id="toctitle">
20361 <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>
20362 <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>
20366 <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>
20367 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20369 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20371 <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>
20375 Tags with parameters in TOC
20378 == <sup class="in-h2">Hello</sup> ==
20380 == <sup class="a > b">Evilbye</sup> ==
20382 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20384 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20385 <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>
20389 <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>
20390 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
20395 span tags with directionality in TOC
20398 == <span dir="ltr">C++</span> ==
20400 == <span dir="rtl">זבנג!</span> ==
20402 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20404 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20406 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20408 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20410 <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>
20411 <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>
20412 <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>
20413 <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>
20414 <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>
20418 <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>
20419 <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>
20420 <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>
20421 <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>
20422 <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>
20427 Bug 72884: bdi element in ToC
20430 == <bdi>test</bdi> ==
20432 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20434 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20438 <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>
20442 # Note that the html output does not have the <p></p>, but the
20443 # html+tidy output *does*. This is because the empty <p></p> is
20444 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20446 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20451 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20453 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20457 <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>
20461 <div id="toc" class="toc">
20462 <div id="toctitle">
20466 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20470 <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>
20476 == {{int:headline_sample}} ==
20480 Bug 32057: Title needed when expanding <h> nodes.
20482 title=[[Main Page]]
20486 <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>
20491 Strip marker in urlencode
20493 {{urlencode:x<nowiki/>y}}
20494 {{urlencode:x<nowiki/>y|wiki}}
20495 {{urlencode:x<nowiki/>y|path}}
20496 {{urlencode:x<pre id="one">two</pre>y}}
20524 Strip marker in formatNum
20526 {{formatnum:1<nowiki/>2}}
20527 {{formatnum:1<nowiki/>2|R}}
20535 Check noCommafy in formatNum
20539 {{formatnum:123456.78}}
20540 {{formatnum:123456.78|NOSEP}}
20548 Wrong option for formatNum (bug 56199)
20550 {{formatnum:1,234.56|Random}}
20551 {{formatnum:1,234.56|EVERYTHING}}
20552 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20561 Strip marker in grammar
20565 {{grammar:elative|foo<nowiki/>bar}}
20572 Strip marker in padleft
20574 {{padleft:|2|x<nowiki/>y}}
20581 Strip marker in padright
20583 {{padright:|2|x<nowiki/>y}}
20590 Strip marker in anchorencode
20592 {{anchorencode:x<nowiki/>y}}
20599 nowiki inside link inside heading (bug 18295)
20601 ==[[foo|x<nowiki>y</nowiki>z]]==
20603 <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>
20608 new support for bdi element (bug 31817)
20610 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20612 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20617 Ignore pipe between table row attributes
20621 |- id=foo | style='color: red'
20629 <tr id="foo" style="color: red">
20636 Gallery override link with WikiLink (bug 34852)
20639 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
20642 <ul class="gallery mw-gallery-traditional">
20643 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20644 <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>
20645 <div class="gallerytext">
20655 Gallery override link with absolute external link (bug 34852)
20658 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20661 <ul class="gallery mw-gallery-traditional">
20662 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20663 <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>
20664 <div class="gallerytext">
20674 Gallery override link with malicious javascript (bug 34852)
20677 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20680 <ul class="gallery mw-gallery-traditional">
20681 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20682 <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>
20683 <div class="gallerytext">
20693 Gallery with invalid title as link (bug 43964)
20696 File:foobar.jpg|link=<
20699 <ul class="gallery mw-gallery-traditional">
20700 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20701 <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>
20702 <div class="gallerytext">
20710 Language parser function
20719 Padleft and padright as substr
20721 {{padleft:|3|abcde}}
20722 {{padright:|3|abcde}}
20730 Special parser function
20732 {{#special:RandomPage}}
20733 {{#special:BaDtItLe}}
20734 {{#special:Foobar}}
20743 Bug 34939 - Case insensitive link parsing ([HttP://])
20745 [HttP://MediaWiki.Org/]
20747 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20750 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20754 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20756 [HttP://MediaWiki.Org/ MediaWiki]
20758 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20763 Bug 34939 - Case insensitive link parsing (HttP://)
20765 HttP://MediaWiki.Org/
20767 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20770 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
20788 <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>
20789 <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>
20790 <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>
20791 <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>
20792 <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>
20798 ### Parsoid-specific tests
20799 ### Parsoid-PHP parser incompatibilities
20802 1. SOL-sensitive wikitext tokens as template-args
20804 parsoid=wt2html,wt2wt
20810 <span about="#mwt1" typeof="mw:Transclusion">
20811 </span><ul about="#mwt1"><li>a</li>
20813 <span about="#mwt2" typeof="mw:Transclusion">
20814 </span><ol about="#mwt2"><li>a</li>
20816 <span about="#mwt3" typeof="mw:Transclusion">
20817 </span><dl about="#mwt3"><dd>a</dd>
20821 #### -----------------------------------------------------------------
20822 #### Parsoid-specific functionality tests
20823 #### -----------------------------------------------------------------
20825 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
20826 # We know wt2wt will fail, but we expect selser to pass.
20827 # Due to the nature of our testing, wt2wt and selser tests will enter the
20828 # blacklist and we'll catch selser regressions based on changes to the
20829 # blacklist entries for selser tests.
20831 1. Bad treebuilder fixup of formatting elt is cleaned up
20833 parsoid=wt2html,wt2wt
20838 [[Image:Foobar.jpg|right|Test]]
20845 <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>
20852 2. Bad treebuilder fixup of formatting elt is cleaned up
20854 parsoid=wt2html,wt2wt
20856 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
20858 <small>[[Image:Foobar.jpg|right|300px]]</small>
20862 <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>
20864 <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>
20868 3. Bad treebuilder fixup of formatting elt is cleaned up
20870 parsoid=wt2html,wt2wt
20872 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
20874 <p><small><b>foo</b></small></p>
20875 <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>
20876 <p><small><b>bar</b></small></p>
20880 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
20882 parsoid=wt2html,wt2wt
20884 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
20886 <p><b><small></small></b></p>
20887 <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>
20891 #### ----------------------------------------------------------------
20892 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
20893 #### tags. Parsoid's output for these tags differs from that of the
20895 #### ----------------------------------------------------------------
20898 Ref: 1. ref-location should be replaced with an index span
20903 B <ref name="x">foo</ref>
20907 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
20908 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>
20909 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>
20910 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20911 <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>
20912 <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>
20913 <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>
20918 Ref: 2. ref-tags with identical names should all get the same index
20922 A <ref name="x">foo</ref>
20926 <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>
20927 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>
20928 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20929 <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>
20934 Ref: 3. spaces in ref-names should be ignored
20938 A <ref name="x">foo</ref>
20939 B <ref name=" x " />
20943 <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>
20944 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>
20945 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>
20946 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20947 <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>
20951 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
20953 Ref: 4. 'constructor' should be accepted as a valid ref-name
20957 A <ref name="constructor">foo</ref>
20960 <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>
20961 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20962 <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>
20967 Ref: 5. body should accept generic wikitext
20972 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
20977 <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>
20979 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20980 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">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>
20986 Ref: 6. indent-pres should not be output in ref-body
20998 <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>
21000 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21001 <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
21009 Ref: 7. No p-wrapping in ref-body
21028 <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>
21030 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21031 <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
21046 Ref: 8. transclusion wikitext has lower precedence
21050 A <ref> foo {{echo|</ref> B C}}
21054 <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>
21055 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21056 <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>
21061 Ref: 9. unclosed comments should not leak out of ref-body
21065 A <ref> foo <!--</ref> B C
21068 <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>
21069 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21070 <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>
21075 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21079 A <ref> <b> foo </ref> B C
21083 <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>
21086 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21087 <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>
21092 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21100 <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
21101 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>
21102 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21103 <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>
21104 <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>
21109 Ref: 12. ref-tags act as trailing newline migration barrier
21111 <!--the newline at the end of this line moves out of the p tag-->a
21113 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21119 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21122 <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>
21123 <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>
21126 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21127 <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>
21128 <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>
21132 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21141 <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
21142 <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>
21143 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21144 <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>
21145 <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
21151 Ref: 14. A nested ref-tag should be emitted as plain text
21155 <ref>foo <ref>bar</ref> baz</ref>
21159 <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>
21161 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21162 <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>
21167 Ref: 15. ref-tags with identical names should get identical indexes
21171 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21172 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21176 <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>
21177 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>
21179 <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>
21183 ## We don't bother wt2wt-ing non-standard whitespace
21185 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21193 <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>
21194 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21195 <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>
21199 Ref: 17. Generate valid HTML5 id/about attributes
21203 <ref name="a b">foo</ref>
21207 <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>
21210 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21211 <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>
21216 Ref: 18. T58916: Extension attributes should be parsed as plain text
21220 <ref name="{{echo|a}}">foo</ref>
21224 <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>
21227 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21228 <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>
21233 Ref: 19. ref-tags with identical name encodings should get identical indexes
21237 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21241 <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>
21243 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21244 <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>
21249 Ref: 20. ref-tags with identical names but different content should keep it
21253 A <ref name="foo">Foo one</ref>
21254 B <ref name="foo">Foo two</ref>
21255 C <ref name="foo" />
21259 <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>
21260 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>
21261 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>
21263 <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>
21268 References: 1. references tag without any refs should be handled properly
21272 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21276 References: 2. references tag with group only outputs references from that group
21278 A <ref group="a">foo</ref>
21279 B <ref group="b">bar</ref>
21282 <references group="a" />
21284 <references group="b" />
21286 <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>
21287 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>
21288 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>
21290 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21291 <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>
21293 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21294 <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>
21296 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21297 <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>
21302 References: 3. ref list should be cleared after processing references
21312 <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>
21314 <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>
21317 <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>
21319 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21320 <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>
21325 References: 4. only referenced group should be cleared after processing references
21327 A <ref group="a">afoo</ref>
21330 <references group="a" />
21336 <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>
21337 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>
21339 <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>
21342 <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>
21344 <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>
21349 References: 5. ref tags in references should be processed while ignoring all other content
21352 B <ref name="b">bar</ref>
21355 <ref name="a">foo</ref>
21356 This should just get lost.
21359 <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>
21360 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>
21363 <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>
21368 References: 6. <references /> from a transclusion
21370 <ref>Foo</ref> {{echo|<references />}}
21372 <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>
21377 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21379 A <ref>foo bar for a</ref>
21380 B <ref group="X" name="b" />
21384 <references group="X">
21385 <ref name="b">foo</ref>
21388 <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>
21389 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>
21392 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21393 <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>
21396 <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"}}'>
21397 <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>
21402 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21404 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21407 <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>
21408 <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>
21412 # This test only works in wt2html now as the <references /> are always generated
21413 # unless selser is active. Once T72722 is fixed, we should add a changes test
21414 # here to ensure that unrelated changes don't add the new <references /> in
21417 References: 9. Generate missing references list at the end
21420 B <ref group="inexistent">bar</ref>
21422 <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>
21423 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21424 <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>
21426 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21427 <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>
21432 References: 10. New <references/> shouldn't be added for unrelated edits.
21435 "modes": ["selser"],
21436 "changes": [["#x", "remove"]],
21440 Unrelated text<span id="x"> that's going to disappear</span>.
21448 Entities in ref name
21450 <ref name="test & me">hi</ref>
21453 <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>
21454 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21455 <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>
21459 # This test is wt2html only because we're permitting the serializer to produce
21460 # dirty diffs, normalizing the unclosed references to the self-closed version.
21462 Generate references for unclosed references tag
21470 <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>
21471 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21472 <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>
21476 New reference serializes on its own line
21478 parsoid=wt2wt,html2wt
21483 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21486 #### ----------------------------------------------------------------
21487 #### Parsoid-only testing of Parsoid's impl of LST
21488 #### Not implemented yet, see
21489 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21490 #### ----------------------------------------------------------------
21493 LST Sections: 1. Simple section start and end
21495 <section begin="2011-05-16" />
21496 <section end="2014-04-10 (MW 1.23wmf22)" />
21498 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21499 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21502 #--------- Test stripping of empty nodes in template content ----------
21504 Empty LI and TR nodes should be stripped from template content
21509 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21513 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21526 Empty LI and TR nodes should not be stripped from top-level content
21553 Empty TR nodes should not be stripped if they have any attributes set
21555 {{EmptyTRWithHTMLAttrTest}}
21557 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21558 <tr align="center"></tr>
21559 <tr><td>foo</td></tr>
21560 <tr align="center"></tr>
21561 <tr><td>bar</td></tr>
21565 #### ----------------------------------------------------------------
21566 #### The following section of tests are primarily to test
21567 #### wikitext escaping capabilities of Parsoid. Given that
21568 #### escaping can be done any number of ways, the wikitext (input)
21569 #### is always adjusted to reflect how Parsoid adds nowiki
21572 #### We are marking several tests as parsoid-only since the
21573 #### HTML in the result section is different from what the
21574 #### PHP parser generates for it.
21575 #### ----------------------------------------------------------------
21578 #### --------------- Headings ---------------
21580 #### 1. Nested inside html <h1>=foo=</h1>
21581 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21582 #### 3. Nested inside html with wikitext split by html tags
21583 #### 4. No escape needed
21584 #### 5. Empty headings <h1></h1>
21585 #### 6. Heading chars in SOL context
21586 #### ----------------------------------------
21588 Headings: 0. Unnested
21592 <nowiki>=foo=</nowiki>
21594 <nowiki> =foo= </nowiki>
21596 <nowiki>=foo=</nowiki>
21598 =foo''a''<nowiki>=</nowiki>
21600 <p><span typeof="mw:Nowiki">=foo=</span></p>
21602 <p><span typeof="mw:Nowiki"> =foo= </span>
21604 <span typeof="mw:Nowiki">=foo=</span></p>
21606 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
21609 # New headings and existing headings are handled differently
21611 Headings: 1. Nested inside html
21619 <h1 data-parsoid=''>=foo=</h1>
21620 <h2 data-parsoid=''>=foo=</h2>
21621 <h3 data-parsoid=''>=foo=</h3>
21622 <h4 data-parsoid=''>=foo=</h4>
21623 <h5 data-parsoid=''>=foo=</h5>
21624 <h6 data-parsoid=''>=foo=</h6>
21632 =<nowiki>=foo=</nowiki>=
21633 ==<nowiki>=foo=</nowiki>==
21634 ===<nowiki>=foo=</nowiki>===
21635 ====<nowiki>=foo=</nowiki>====
21636 =====<nowiki>=foo=</nowiki>=====
21637 ======<nowiki>=foo=</nowiki>======
21642 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
21651 <nowiki>*</nowiki>bar
21657 <nowiki>=bar=</nowiki>
21661 Headings: 3. Nested inside html with wikitext split by html tags
21663 parsoid=html2wt,wt2wt
21665 = ='''bold'''<nowiki>foo=</nowiki> =
21667 <h1>=<b>bold</b>foo=</h1>
21671 Headings: 4a. No escaping needed (testing just h1 and h2)
21696 <h1><i>=</i>foo=</h1>
21700 Headings: 4b. No escaping needed (inside p-tags)
21715 Headings: 5. Empty headings
21725 =====<nowiki/>=====
21727 ======<nowiki/>======
21729 <h1 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h1>
21731 <h2 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h2>
21733 <h3 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h3>
21735 <h4 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h4>
21737 <h5 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h5>
21739 <h6 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h6>
21743 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21745 <nowiki>=a=</nowiki>
21747 <nowiki>=a=</nowiki>
21749 <nowiki>=a=</nowiki>
21751 <nowiki>=a=</nowiki>
21759 <p><span typeof="mw:Nowiki">=a=</span></p>
21761 <p><span typeof="mw:Nowiki">=a=</span></p>
21763 <p><span typeof="mw:Nowiki">=a=</span></p>
21765 <p><span typeof="mw:Nowiki">=a=</span></p>
21769 Headings: 6b. Heading chars in SOL context (with trailing newlines)
21793 <p><span typeof="mw:Nowiki">=a=
21796 <p><span typeof="mw:Nowiki">=a=
21799 <p><span typeof="mw:Nowiki">=a=
21802 <p><span typeof="mw:Nowiki">=a=
21807 Headings: 6c. Heading chars in SOL context (leading newline break)
21810 <nowiki>=b=</nowiki>
21817 <span typeof="mw:Nowiki">=b=</span>
21821 Headings: 6d. Heading chars in SOL context (with interspersed comments)
21823 <!--c0--><nowiki>=a=</nowiki>
21825 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
21831 <!--c0--><p><span typeof="mw:Nowiki">=a=</span></p>
21833 <!--c1--><p><span typeof="mw:Nowiki">=a=</span></p> <!--c2--> <!--c3-->
21837 Headings: 6d. Heading chars in SOL context (No escaping needed)
21847 Headings: 7. Insert a newline between new content and headings
21853 <h2 data-parsoid='{}'>A</h2>
21854 <p data-parsoid='{}'>a</p>
21864 #### --------------- Lists ---------------
21865 #### 0. Outside nests (*foo, etc.)
21866 #### 1. Nested inside html <ul><li>*foo</li></ul>
21867 #### 2. Inside definition lists
21868 #### 3. Only bullets at start should be escaped
21869 #### 4. No escapes needed
21870 #### 5. No unnecessary escapes
21871 #### 6. Escape bullets in SOL position
21872 #### 7. Escape bullets in a multi-line context
21873 #### ----------------------------------------
21876 Lists: 0. Outside nests
21878 <nowiki>*</nowiki>foo
21880 <nowiki>#</nowiki>foo
21882 <nowiki>;Foo:</nowiki>bar
21889 <p><span typeof="mw:Nowiki">*</span>foo</p>
21891 <p><span typeof="mw:Nowiki">#</span>foo</p>
21893 <p><span typeof="mw:Nowiki">;Foo:</span>bar</p>
21897 Lists: 1. Nested inside html
21899 *<nowiki>*foo</nowiki>
21901 *<nowiki>#foo</nowiki>
21903 *<nowiki>:foo</nowiki>
21905 *<nowiki>;foo</nowiki>
21907 #<nowiki>*foo</nowiki>
21909 #<nowiki>#foo</nowiki>
21911 #<nowiki>:foo</nowiki>
21913 #<nowiki>;foo</nowiki>
21915 <ul><li>*foo</li></ul>
21916 <ul><li>#foo</li></ul>
21917 <ul><li>:foo</li></ul>
21918 <ul><li>;foo</li></ul>
21919 <ol><li>*foo</li></ol>
21920 <ol><li>#foo</li></ol>
21921 <ol><li>:foo</li></ol>
21922 <ol><li>;foo</li></ol>
21927 Lists: 2. Inside definition lists
21929 ;<nowiki>;foo</nowiki>
21931 ;<nowiki>:foo</nowiki>
21933 ;<nowiki>:foo</nowiki>
21936 :<nowiki>:foo</nowiki>
21938 <dl><dt>;foo</dt></dl>
21939 <dl><dt>:foo</dt></dl>
21942 <dl><dd>:foo</dd></dl>
21947 Lists: 3. Only bullets at start of text should be escaped
21949 *<nowiki>*foo*bar</nowiki>
21951 *<nowiki>*foo</nowiki>''it''*bar
21953 <ul><li>*foo*bar</li></ul>
21954 <ul><li>*foo<i>it</i>*bar</li></ul>
21959 Lists: 4. No escapes needed
21980 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
21984 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
21990 Lists: 5. No unnecessary escapes
21992 * bar <span><nowiki>[[foo]]</nowiki></span>
21994 * =bar <span><nowiki>[[foo]]</nowiki></span>
21996 * [[bar <span><nowiki>[[foo]]</nowiki></span>
21998 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22000 * =bar <span>foo]]</span>=
22006 <ul><li> bar <span>[[foo]]</span></li></ul>
22007 <ul><li> =bar <span>[[foo]]</span></li></ul>
22008 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22009 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22010 <ul><li> =bar <span>foo]]</span>=</li></ul>
22011 <ul><li> <s></s>: a</li></ul>
22012 <ul><li> <i>* foo</i></li></ul>
22017 Lists: 6. Escape bullets in SOL position
22021 <p><!--cmt-->*foo</p>
22023 <!--cmt--><nowiki>*</nowiki>foo
22027 Lists: 7. Escape bullets in a multi-line context
22030 <nowiki>*</nowiki>b
22038 Lists: 8. Escape colons only if not present in tags
22042 <dl><dt>a:b<i>c:d</i></dt></dl>
22044 ; <nowiki>a:b</nowiki>''c:d''
22047 #### --------------- HRs ---------------
22048 #### 1. Single line
22049 #### -----------------------------------
22052 HRs: 1. Single line
22054 ----<nowiki>----</nowiki>
22066 #### --------------- Tables ---------------
22067 #### 1a. Simple example
22068 #### 1b. No escaping needed (!foo)
22069 #### 1c. No escaping needed (|foo)
22070 #### 1d. No escaping needed (|}foo)
22072 #### 2a. Nested in td (<td>foo|bar</td>)
22073 #### 2b. Nested in td (<td>foo||bar</td>)
22074 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22076 #### 3a. Nested in th (<th>foo!bar</th>)
22077 #### 3b. Nested in th (<th>foo!!bar</th>)
22078 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22082 #### 4c. No escaping needed
22083 #### --------------------------------------
22086 Tables: 1a. Simple example
22097 Tables: 1b. No escaping needed
22106 Tables: 1c. No escaping needed
22115 Tables: 1d. No escaping needed
22124 Tables: 2a. Nested in td
22129 <td>foo|bar</td></tr>
22130 <tr><td>x<div>a|b</div></td>
22134 |<nowiki>foo|bar</nowiki>
22136 |x<div><nowiki>a|b</nowiki></div>
22152 Tables: 2b. Nested in td
22158 <td>a<i>b||c</i></td>
22159 <td>a<i><div>b||c</div></i></td>
22160 </tr></tbody></table>
22163 |<nowiki>foo||bar</nowiki>
22164 |a''<nowiki>b||c</nowiki>''
22165 |a''<div><nowiki>b||c</nowiki></div>''
22174 <td>a<i><div>b||c</div></i>
22180 Tables: 2c. Nested in td -- no escaping needed
22196 Tables: 3a. Nested in th
22212 Tables: 3b. Nested in th
22217 <tr><th>foo!!bar</th>
22218 <th><i>foo|bar</i></th>
22219 <th><i>foo!!bar</i></th>
22220 <th><i><span>foo!!bar</span></i></th>
22221 </tr></tbody></table>
22224 !<nowiki>foo!!bar</nowiki>
22225 !''<nowiki>foo|bar</nowiki>''
22226 !''<nowiki>foo!!bar</nowiki>''
22227 !''<span><nowiki>foo!!bar</nowiki></span>''
22236 <th><i>foo!!bar</i>
22238 <th><i><span>foo!!bar</span></i>
22244 Tables: 3c. Nested in th
22249 <tr><th>foo||bar</th>
22250 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22251 </tr></tbody></table>
22254 !<nowiki>foo||bar</nowiki>
22255 !<nowiki>foo||bar</nowiki>
22268 Tables: 4a. Escape -
22287 |<nowiki>-bar</nowiki>
22292 Tables: 4b. Escape +
22311 |<nowiki>+bar</nowiki>
22316 Tables: 4c. No escaping needed
22359 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22360 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22366 <div>a|b</div></td>
22371 Tables: 4d. No escaping needed
22381 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22390 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22391 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22392 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22397 Tables: Digest broken attributes on table and tr tag
22414 T97430: Don't emit empty nowiki pairs around marker meta tags
22418 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22419 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22421 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22422 <nowiki>|</nowiki>** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22426 Unclosed xmlish element in table line shouldn't eat end delimiters
22442 <tbody><tr><td> <foo</td>
22443 <td> bar></td></tr>
22447 #### --------------- Links ----------------
22448 #### 1. Quote marks in link text
22449 #### 2. Wikilinks: Escapes needed
22450 #### 3. Wikilinks: No escapes needed
22451 #### 4. Extlinks: Escapes needed
22452 #### 5. Extlinks: No escapes needed
22453 #### --------------------------------------
22455 Links 1. WikiLinks: No escapes needed
22459 [[Foo|x [Foobar] x]]
22461 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22462 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22463 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22466 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22467 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22468 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22472 Links 2. WikiLinks: Escapes needed
22476 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22477 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22478 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22479 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22480 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22481 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22482 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22483 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22484 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22485 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22487 [[Foo|<nowiki>Foobar]</nowiki>]]
22488 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22489 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22490 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22491 [[Foo|<nowiki>|Bar</nowiki>]]
22492 [[Foo|<nowiki>]]bar</nowiki>]]
22493 [[Foo|<nowiki>[[bar</nowiki>]]
22494 [[Foo|<nowiki>x [[ y</nowiki>]]
22495 [[Foo|<nowiki>x ]] y</nowiki>]]
22496 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22498 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22499 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22500 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22501 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22502 <a href="/wiki/Foo" title="Foo">|Bar</a>
22503 <a href="/wiki/Foo" title="Foo">]]bar</a>
22504 <a href="/wiki/Foo" title="Foo">[[bar</a>
22505 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22506 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22507 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22512 Links 3. WikiLinks: No escapes needed
22517 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22518 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22521 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22522 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22526 Links 4. ExtLinks: Escapes needed
22530 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22531 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22532 <p>[http://google.com]</p>
22533 <p>[http://google.com google]</p>
22535 [http://google.com <nowiki>[google]</nowiki>]
22536 [http://google.com <nowiki>google]</nowiki>]
22538 <nowiki>[http://google.com]</nowiki>
22540 <nowiki>[http://google.com google]</nowiki>
22543 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22544 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22545 </p><p>[http://google.com]
22546 </p><p>[http://google.com google]
22551 Links 5. ExtLinks: No escapes needed
22553 [http://google.com [google]
22555 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22558 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22562 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22564 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22565 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22566 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22567 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22568 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22569 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22570 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22571 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
22572 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22573 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
22574 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
22575 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
22576 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22579 x<nowiki/>http://example.com<nowiki/>y
22580 http://example.com<nowiki/>?x
22581 http://example.com<nowiki/>&x
22582 http://example.com<nowiki/>'x
22583 http://example.com<nowiki/>,x
22584 http://example.com<nowiki/>.x
22585 http://example.com<nowiki/>;x
22586 http://example.com<nowiki/>:x
22587 http://example.com<nowiki/>;x
22588 http://example.com<nowiki/>!x
22589 http://example.com<nowiki/>=x
22590 http://example.com<nowiki/>(x)
22591 http://example.com(x<nowiki/>)
22595 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22598 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22600 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22601 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22602 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22603 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22604 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22610 "http://example.com"
22611 (http://example.com)
22612 (http://example.com) foo
22613 http://example.com,
22614 http://example.com, foo
22617 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22619 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22620 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22621 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22622 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22623 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22628 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22630 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22631 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
22633 http://example.com.,;:!?\
22634 -http://example.com:
22636 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
22637 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
22642 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
22644 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
22645 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
22646 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
22650 X<nowiki/>RFC 123<nowiki/>y
22654 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
22656 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
22657 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
22658 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
22665 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
22666 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
22667 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
22672 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
22674 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
22675 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22676 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22680 X<nowiki/>PMID 123<nowiki/>y
22684 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
22686 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
22687 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
22688 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
22695 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
22696 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
22697 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
22702 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
22704 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
22705 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
22706 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
22709 ISBN 1234567890<nowiki/>1
22710 ISBN 1234567890<nowiki/>x
22711 a<nowiki/>ISBN 1234567890<nowiki/>b
22715 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
22717 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
22721 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
22726 Links 14. Protect link-like plain text. (Parsoid bug T78425)
22730 <p>this is not a link: http://example.com
22733 this is not a link: <nowiki>http://example.com</nowiki>
22737 Links 15. Link trails can't become link prefixes.
22741 [[Söfnuður]]-[[00]]
22743 <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>
22746 <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>
22749 #### --------------- Quotes ---------------
22750 #### 1. Quotes inside <b> and <i>
22751 #### 2. Link fragments separated by <i> and <b> tags
22752 #### 3. Link fragments inside <i> and <b>
22753 #### 4. No escaping needed
22754 #### --------------------------------------
22756 1a. Quotes inside <b> and <i>
22758 parsoid=html2wt,wt2wt
22761 ''<nowiki>''foo''</nowiki>''
22762 ''<nowiki>'''foo'''</nowiki>''
22764 '''<nowiki/>'foo''''
22765 '''<nowiki>''foo''</nowiki>'''
22766 '''<nowiki>'''foo'''</nowiki>'''
22767 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
22768 '''foo'''<nowiki/>'s
22774 '''foo'''<nowiki/>'
22775 ''''foo'''<nowiki/>'
22776 ''fools'<span> errand</span>''
22777 ''<span>fool</span>'s errand''
22778 '<nowiki/>''foo'' bar '''baz''
22779 a|!*#-:;+-~[]{}b'''x''
22788 <b>foo'<i>bar'</i>baz</b>
22797 <i>fools'<span> errand</span></i>
22798 <i><span>fool</span>'s errand</i>
22799 '<i>foo</i> bar '<i>baz</i>
22800 a|!*#-:;+-~[]{}b'<i>x</i>
22805 1b. Quotes inside <b> and <i> with other tags on same line
22807 parsoid=html2wt,wt2wt
22809 '''a'' foo ''[[bar]]''
22810 ''a''' foo ''[[bar]]''
22811 ''a''' foo '''{{echo|[[bar]]}}'''
22812 [[foo]] x'''[[bar]]''
22813 '''foo'' <ref>test</ref>
22814 '''foo'' <div title="name">test</div>
22815 '''foo'' and <br> bar
22818 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22819 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22820 <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>
22821 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
22822 '<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>
22823 '<i>foo</i> <div title="name">test</div>
22824 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
22825 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22826 <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>
22831 2. Link fragments separated by <i> and <b> tags
22833 [[''foo''<nowiki>hello]]</nowiki>
22835 [['''foo'''<nowiki>hello]]</nowiki>
22837 <p>[[<i>foo</i>hello]]
22838 </p><p>[[<b>foo</b>hello]]
22842 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
22843 # this is one of the shortcomings of this format
22845 3. Link fragments inside <i> and <b>
22847 ''[[foo''<nowiki>]]</nowiki>
22849 '''[[foo'''<nowiki>]]</nowiki>
22852 </p><p><b>[[foo</b>]]
22857 4. No escaping needed
22859 '<span>''bar''</span>'
22860 '<span>'''bar'''</span>'
22863 <p>'<span><i>bar</i></span>'
22864 '<span><b>bar</b></span>'
22869 #### ----------- Paragraphs ---------------
22870 #### 1. No unnecessary escapes
22871 #### --------------------------------------
22874 1. No unnecessary escapes
22876 bar <span><nowiki>[[foo]]</nowiki></span>
22878 =bar <span><nowiki>[[foo]]</nowiki></span>
22880 [[bar <span><nowiki>[[foo]]</nowiki></span>
22882 ]]bar <span><nowiki>[[foo]]</nowiki></span>
22884 =bar <span>foo]]</span><nowiki>=</nowiki>
22886 <p>bar <span>[[foo]]</span>
22887 </p><p>=bar <span>[[foo]]</span>
22888 </p><p>[[bar <span>[[foo]]</span>
22889 </p><p>]]bar <span>[[foo]]</span>
22890 </p><p>=bar <span>foo]]</span>=
22894 #### ----------------------- PRE --------------------------
22895 #### 1. Leading whitespace in SOL context should be escaped
22896 #### ------------------------------------------------------
22898 1. Leading whitespace in SOL context should be escaped
22902 <nowiki> </nowiki>a
22904 <nowiki> </nowiki> a
22906 <nowiki> </nowiki>a(tab)
22908 <nowiki> </nowiki> a
22910 <nowiki> </nowiki> a
22913 <nowiki> </nowiki>b
22916 <nowiki> </nowiki>b
22919 <nowiki> </nowiki> b
22925 <p><!--cmt--> a</p>
22935 2. Leading whitespace in non-indent-pre contexts should not be escaped
22943 <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>
22944 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22945 <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>
22951 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
22970 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
22974 [[File:Foobar.jpg|thumb|caption]]
22976 <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>
22980 5. Nowiki escaping should account for indent-pres
22990 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23003 #### --------------- Behavior Switches --------------------
23006 1. Valid behavior switches should be escaped
23013 <nowiki>__TOC__</nowiki>
23014 ''<nowiki>__TOC__</nowiki>''
23018 2. Invalid behavior switches should not be escaped
23029 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23031 Behavior switches should be SOL-transparent
23035 <!-- this one's bogus -->
23042 <meta property="mw:PageProp/toc" />
23044 <!-- this one's bogus -->
23047 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23049 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23052 #### --------------- HTML tags ---------------
23055 #### 3. multi-line html tag
23056 #### 4. extension tags
23057 #### -----------------------------------------
23063 <a href="http://google.com">google</a>
23065 <a href="http://google.com">google</a>
23071 * <nowiki><div>foo</div></nowiki>
23072 * <nowiki><div style="color:red">foo</div></nowiki>
23073 * <nowiki><td></nowiki>
23075 <ul><li> <div>foo</div></li>
23076 <li> <div style="color:red">foo</div></li>
23077 <li> <td></li></ul>
23082 3. multi-line html tag
23097 <nowiki><ref>foo</ref></nowiki>
23099 <nowiki><ref>bar</nowiki>
23101 baz<nowiki></ref></nowiki>
23103 <p><ref>foo</ref>
23104 </p><p><ref>bar
23105 </p><p>baz</ref>
23109 #### --------------- Others ---------------
23113 <nowiki>foo</nowiki>
23115 <p><nowiki>foo</nowiki>
23119 ## The quote-char in the input is necessary for triggering the bug
23121 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23123 parsoid=wt2wt,html2wt
23132 Tag-like HTML structures are passed through as text
23154 </p><p>1<d e>f
23159 HTML tag with necessary entities in attributes
23161 <span title="&amp;">foo</span>
23163 <p><span title="&amp;">foo</span>
23168 HTML tag with 'unnecessary' entity encoding in attributes
23170 <span title="&">foo</span>
23172 <p><span title="&">foo</span>
23177 HTML tag with broken attribute value quoting
23179 <span title="Hello world>Foo</span>
23181 <p><span>Foo</span>
23184 <p><span title="Hello world">Foo</span>
23189 Parsoid-only: HTML tag with broken attribute value quoting
23193 <span title="Hello world>Foo</span>
23195 <p><span title="Hello world">Foo</span>
23200 Table with broken attribute value quoting
23203 | title="Hello world|Foo
23214 <td title="Hello world">Foo
23220 Table with broken attribute value quoting on consecutive lines
23223 | title="Hello world|Foo
23224 | style="color:red|Bar
23237 <td title="Hello world">Foo
23238 </td><td style="color: red">Bar
23239 </td></tr></tbody></table>
23244 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23254 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23264 Accept empty td cell attribute
23267 | align="center" | foo || |
23272 <td align="center"> foo </td>
23279 Non-empty attributes in th-cells
23282 ! Foo !! style="color: red" | Bar
23288 <th style="color: red"> Bar
23294 Accept empty attributes in th-cells
23309 Empty table rows go away
23330 ### Parsoid-centric tests for testing RTing of inter-element separators
23331 ### Edge cases not tested by existing parser tests and specific to
23332 ### Parsoid-specific serialization strategies.
23336 RT-ed inter-element separators should be valid separators
23348 # Parsoid-only since PHP parser relies on Tidy for correct output
23350 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23364 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23365 <p>bar</p></small></td></tr>
23369 <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>
23373 # Note that the "style" attribute is really a template parameter here.
23374 # The = would have to be {{=}} if you wanted the literal.
23376 Empty TD followed by TD with tpl-generated attribute
23381 |{{echo|style='color:red'}}|foo
23395 Indented table with an empty td
23413 ## We have some newline diffs RT-ing this edge case
23414 ## and it is not important enough -- we seem to be emitting
23415 ## at most 2 newlines after a </tr> and this is unrelated to
23416 ## the issue from T85627 that this is testing.
23418 Indented table with blank lines in between (T85627)
23437 Indented block & table
23451 <div data-parsoid='{"stx":"html"}'>foo</div>
23453 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23458 Indent and comment before table row
23473 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23474 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23478 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23480 Empty TR followed by a template-generated TR
23486 {{echo|<tr><td>foo</td></tr>}}
23492 <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}}]}'>
23497 ## PHP and parsoid output differ for this, and since this is primarily
23498 ## for testing Parsoid's serializer, marking this Parsoid only
23500 Empty TR followed by mixed-ws-comment line should RT correctly
23516 <!--c--> </tr><!--d-->
23522 Multi-line image caption generated by templates with/without trailing newlines
23524 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23525 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23527 <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>
23528 <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>
23532 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23536 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23538 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23540 <includeonly>foo</includeonly>
23548 ## PHP emits broken html for this, and since this is primarily
23549 ## a Parsoid serializer test, marking this Parsoid only
23551 Improperly nested inline or quotes tags with whitespace in between
23553 <span> <s>x</span> </s>
23556 <p><span> <s>x</s></span><s> </s>
23557 <b> <i>x</i></b><i> </i>
23562 Encapsulate protected attributes from wt
23564 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23566 <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>
23570 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23571 ## Having nested or stray pre tags results in the attempt to add duplicates,
23572 ## causing an assertion fail. This test tries to prevent that situation.
23574 Ensure ParagraphWrapper can deal with stray closing pre tags
23584 1. Ensure fostered text content is wrapped in element nodes
23588 <table>hi</table><table>ho</table>
23597 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
23599 parsoid=wt2html,wt2wt
23608 <tbody><tr><td> a</td></tr>
23613 Encapsulation properly handles null DSR information from foster box
23615 parsoid=wt2html,wt2wt
23617 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
23619 <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>
23623 1. Encapsulate foster-parented transclusion content
23625 parsoid=wt2wt,wt2html
23627 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
23629 <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>
23639 2. Encapsulate foster-parented transclusion content
23641 parsoid=wt2wt,wt2html
23643 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
23645 <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>
23656 3. Encapsulate foster-parented transclusion content
23658 parsoid=wt2wt,wt2html
23660 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23662 <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>"]}">
23675 4. Encapsulate foster-parented transclusion content
23677 parsoid=wt2wt,wt2html
23679 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23681 <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>"]}">
23694 5. Encapsulate foster-parented transclusion content
23696 parsoid=wt2wt,wt2html
23698 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
23700 <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>
23715 6. Encapsulate foster-parented transclusion content
23717 parsoid=wt2wt,wt2html
23719 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
23721 <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>
23737 7. Encapsulate foster-parented transclusion content
23739 parsoid=wt2wt,wt2html
23741 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
23743 <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>
23753 # Note that the wt is broken on purpose: the = should be {{=}} if you
23754 # don't want it to be a template parameter key.
23756 8. Encapsulate foster-parented transclusion content
23758 parsoid=wt2wt,wt2html
23761 }}{|{{echo|style='color:red'}}
23766 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
23768 <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>
23779 9. Encapsulate foster-parented transclusion content
23781 parsoid=wt2wt,wt2html
23783 <table>{{echo|hi</table>hello}}
23785 <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>
23789 Table in fosterable position
23791 parsoid=wt2html,wt2wt
23800 <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">
23802 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
23808 # Parsoid only for bug 64747
23810 Properly encapsulate empty-content transclusions in fosterable positions
23818 <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":["","","",""]}]]}'>
23824 Support <object> element with .data attribute
23828 <object data="test.swf"></object>
23830 <object data="test.swf"></object>
23834 Don't block XML namespace declaration
23836 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
23838 <p><span>MediaWiki</span>
23841 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
23844 # -----------------------------------------------------------------
23845 # The following section of tests are primarily to spec requirements
23846 # around serialization of new/edited content.
23848 # All these tests are marked Parsoid html2wt and html2html only
23849 # ----------------------------------------------------------------
23851 # 'mi' is a localinterwiki prefix as well as a language
23853 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
23857 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
23864 New wikilinks should be serialized properly
23868 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
23869 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
23876 New wiki links (href variations)
23880 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23881 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
23882 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
23883 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
23888 [[Toxine bactérienne]]
23892 New wiki links (content string variations)
23896 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23897 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
23898 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
23902 [[Foo_bar|./Foo_bar]]
23906 New category links (href variations)
23910 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
23911 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
23912 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
23914 [[Category:Toxine bactérienne]]
23915 [[Category:Toxine bactérienne]]
23916 [[Category:Toxine bactérienne]]
23920 New sol transparent links don't need indent-pre nowiki protection
23925 <link rel="mw:PageProp/redirect" href="./Main_Page">
23926 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
23927 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
23929 #WEITERLEITUNG [[Main Page]]
23930 <!-- this is good --> [[Category:Good]]
23931 <!-- this is great --> [[Kategorie:Great]]
23935 New interlanguage links (href variations)
23939 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
23940 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
23941 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
23943 [[es:Toxine bactérienne]]
23944 [[es:Toxine_bactérienne]]
23945 [[es:Toxine_bactérienne]]
23949 Image: Modifying size of an image (1)
23952 "modes": ["wt2wt"],
23954 ["img[height]", "attr", "height", "22"],
23955 ["img[width]", "attr", "width", "200"]
23959 [[Image:Foobar.jpg|230x230px]]
23961 [[Image:Foobar.jpg|200x200px]]
23965 Image: Modifying size of an image (2)
23968 "modes": ["wt2wt"],
23970 ["img[height]", "attr", "height", "100"],
23971 ["img[width]", "attr", "width", "500"]
23975 [[Image:Foobar.jpg|230x230px]]
23977 [[Image:Foobar.jpg|500x500px]]
23980 # Change in size is ignored so long as class='mw-default-size'
23982 Image: Modifying size of an image (3)
23985 "modes": ["wt2wt"],
23987 ["figure[class]", "removeClass", "mw-default-size"],
23988 ["figure img", "attr", "height", "19"],
23989 ["figure img", "attr", "width", "170"]
23993 [[Image:Foobar.jpg|thumb]]
23995 [[Image:Foobar.jpg|thumb|170x170px]]
23999 Image: Modifying alignment of an image (bug 48665)
24002 "modes": ["wt2wt"],
24004 ["figure[class]", "removeClass", "mw-halign-right"],
24005 ["figure[class]", "addClass", "mw-halign-left"]
24009 [[Image:Foobar.jpg|thumb|caption|right]]
24011 [[Image:Foobar.jpg|thumb|caption|left]]
24015 Image: Modifying mw-default-size of an frameless image (bug 62805)
24018 "modes": ["wt2wt"],
24020 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24024 [[Image:Foobar.jpg|frameless|right]]
24026 [[Image:Foobar.jpg|frameless|right|220x220px]]
24030 Image: Modifying valign of an image (bug 49221)
24033 "modes": ["wt2wt"],
24035 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24036 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24040 [[File:Foobar.jpg|20px|middle]]
24042 [[File:Foobar.jpg|20px|text-top]]
24046 Image: Modifying alt attribute of an image (bug 56400)
24049 "modes": ["wt2wt"],
24051 ["img[alt]", "attr", "alt", "some alternate edited text"]
24055 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24057 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24061 Image: Modifying caption of an image
24064 "modes": ["wt2wt"],
24066 ["figcaption", "text", "new caption"]
24070 [[Image:Foobar.jpg|thumb|original caption]]
24072 [[Image:Foobar.jpg|thumb|new caption]]
24076 Image: empty alt attribute (bug 48924)
24080 [[File:Foobar.jpg|thumb|alt=|bar]]
24082 <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>
24086 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24091 #<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>
24093 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24097 Image: Block level image should have \n before and after
24100 [[File:Foobar.jpg|right|thumb|150x150px]]
24104 <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>
24109 Image: New block level image should have \n before and after (existing content)
24112 [[File:Foobar.jpg|right|thumb|150x150px]]
24116 <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>
24121 Image: upright option (parsoid)
24123 [[File:Foobar.jpg|thumb|upright|caption]]
24124 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24125 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24127 <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>
24128 <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>
24129 <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>
24133 Image: upright option is ignored on inline and frame images (parsoid)
24135 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24137 <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>
24141 Image: from basic HTML (1)
24145 <span typeof="mw:Image">
24146 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24149 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24153 Image: from basic HTML (2)
24157 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24159 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24163 Image: from basic HTML (3)
24167 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24169 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24173 Image: from basic HTML (4)
24177 <img src="./File:Foobar.jpg">
24179 [[File:Foobar.jpg|link=]]
24183 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24188 <li><p>foo</p></li>
24195 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24199 <ul> <li>foo</li></ul>
24205 Don't strip leading whitespace when handling indent-pre suppressing tags
24210 <tr><td> indented row</td></tr>
24213 <b>This is very bold of you!</b>
24216 indented cell (no pre-wrapping!)
24226 '''This is very bold of you!'''
24230 indented cell (no pre-wrapping!)
24238 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24243 <nowiki> </nowiki><span>bar</span>
24246 <nowiki> </nowiki></span>bar2
24249 <nowiki> </nowiki><span>bar</span>
24252 <nowiki> </nowiki><span>foo</span>
24270 Lists: Dont insert newlines in a serialized list item.
24274 <ul><li>a<br>b</li><li>c</li></ul>
24281 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24284 "modes": ["html2wt"],
24285 "scrubWikitext": false
24288 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
24289 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24291 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24292 <h2>it goes well <link href="Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24294 <h2 data-parsoid='{}'>howdy<link href="Category:A5" rel="mw:PageProp/Category" /></h2>
24296 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24298 == hello there [[Category:A1]] ==
24300 == [[Category:A2]] hi pal ==
24302 == <!--foo--> [[Category:A3]] how goes it ==
24304 == it goes well [[Category:A4]] <!--bar--> ==
24306 ==howdy [[Category:A5]] ==
24312 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24315 "modes": ["html2wt"],
24316 "scrubWikitext": true
24319 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
24320 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24322 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24323 <h2>it goes well <link href="Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24325 <h2 data-parsoid='{}'>howdy<link href="Category:A5" rel="mw:PageProp/Category" /></h2>
24327 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24335 <!--foo--> [[Category:A3]]
24340 [[Category:A4]] <!--bar-->
24342 ==howdy [[Category:A5]] ==
24350 Headings: Don't hoist metas that come from templates
24353 "modes": ["html2wt"],
24354 "scrubWikitext": true
24357 <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>
24359 == {{echo|foo [[Category:Foo]]}} ==
24363 Headings: Category in ref isn't hoisted
24366 "modes": ["html2wt"],
24367 "scrubWikitext": true
24370 <h2> foo <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> </h2>
24372 <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>
24375 [[Category:Baz]] </ref> ==
24381 Parsoid: Serialize positional parameters with = in them as named parameter
24385 <p about="#mwt1" typeof="mw:Transclusion"
24386 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24388 <p about="#mwt1" typeof="mw:Transclusion"
24389 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24391 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24392 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24393 <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>
24397 {{echo|1 = f=oo|2 = bar}}
24399 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24400 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24401 {{echo|<nowiki>f=oo</nowiki>|bar}}
24405 Parsoid: Serialize positional parameters with = in extlink as named parameter
24409 <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>
24411 {{echo|1 = http://stuff?is=ok}}
24415 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24419 <div>a<p>b</p></div>
24440 Substrings resembling wikitext in hrefs should not get nowiki escapes
24444 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24450 Enforce single-line context in the serializer
24457 <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">
24458 </span><span about="#mwt1">you</span> </h2>
24460 <h2> foo <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> </h2>
24462 <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
24463 there</span></li></ol>
24475 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
24482 </tbody></table></dd></dl>
24486 == hi {{bogus|there
24497 * foo '''bar''' baz
24509 Serialize new placeholder space without spans
24513 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24515 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24517 <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>
24523 <ref>foo : bar</ref>ok
24527 #-----------------------
24528 # Tag minimization tests
24529 #-----------------------
24532 1. I/B quote minimization: wikitext-only tags should be combined
24536 <p><i>A</i><i>B</i></p>
24537 <p><b>A</b><b>B</b></p>
24538 <p><i>A</i><b><i>B</i></b></p>
24539 <p><b>A</b><i><b>B</b></i></p>
24540 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24541 <p><i><b>A</b></i><i><b>B</b></i></p>
24542 <p><i><b>A</b></i><b><i>B</i></b></p>
24543 <p><b><i>A</i></b><i><b>B</b></i></p>
24563 2. I/B quote minimization: wikitext and html tags should not be combined
24567 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24568 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24572 ''A''<nowiki/>'''<i>B</i>'''
24576 3. I/B quote minimization: templated content stops minimization
24580 <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>
24581 <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>
24583 ''A''{{echo|''B''}}
24585 ''A''{{echo|'''''B'''''}}
24589 4. I/B quote minimization: new content should be mimimized with adjacent old content
24593 <p><i>A</i><i>B</i></p>
24594 <p><b>A</b><b>B</b></p>
24595 <p><i>A</i><b><i>B</i></b></p>
24605 5a. Merge adjacent quote nodes if they've been edited
24608 "modes": ["wt2wt", "selser"],
24610 ["p", "contents", "remove", ":contains('b')"]
24620 5b. Merge adjacent quote nodes if they've been edited
24623 "modes": ["wt2wt", "selser"],
24629 ''a''<span id="x">b</span>''c''
24635 1. Merge adjacent link nodes as long as at least one element is new
24638 "modes": ["html2wt"],
24639 "scrubWikitext": true
24642 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24643 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24644 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
24648 [[Football|Foot]][[Football|ball]]
24652 2. Merge adjacent link nodes and enable additional normalizations
24655 "modes": ["html2wt"],
24656 "scrubWikitext": true
24659 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
24661 [[Football|''Football'']]
24665 3. Don't merge adjacent link nodes if scrubWikitext is false
24668 "modes": ["html2wt"],
24669 "scrubWikitext": false
24672 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24674 [[Football|Foot]][[Football|ball]]
24677 #------------------------------
24678 # End of tag minimization tests
24679 #------------------------------
24682 Bug 54262: New entities
24688 <span typeof="mw:Entity"> </span>
24691 ## Note that there is no wikitext output for 'unknownproperty' ##
24692 ## Unknown magic words are silently dropped ##
24699 <meta property='mw:PageProp/toc' />
24700 <meta property='mw:PageProp/notoc' />
24701 <meta property='mw:PageProp/forcetoc' />
24702 <meta property='mw:PageProp/index' />
24703 <meta property='mw:PageProp/noindex' />
24704 <meta property='mw:PageProp/nogallery' />
24705 <meta property='mw:PageProp/noeditsection' />
24706 <meta property='mw:PageProp/notitleconvert' />
24707 <meta property='mw:PageProp/nocontentconvert' />
24708 <meta property='mw:PageProp/unknownproperty' />
24718 __NOCONTENTCONVERT__
24722 Consecutive <pre>s should not get merged
24724 parsoid=html2wt,html2html
24726 <pre>a</pre><pre>b</pre>
24754 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
24758 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
24760 [[Special:BookSources/1234567890|ISBN 1234567895]]
24764 Edited RFC links not serializable as RFC links should serialize as extlinks
24768 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
24770 [//tools.ietf.org/html/rfc123 New RFC]
24774 Edited PMID links not serializable as PMID links should serialize as extlinks
24778 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
24780 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
24784 WTS of autolinks with trailing/surrounding context
24788 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
24789 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
24790 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
24791 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
24792 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
24793 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
24795 http://cscott.net<nowiki/>'''foo'''
24797 http://cscott.net<b>foo</b>
24799 '''http://cscott.net<nowiki/>'''
24801 '''http://cscott.net '''
24803 '''http://cscott.net<nowiki/>x'''
24805 http://cscott.net<nowiki/>x
24809 WTS of autolinks with nowikis (round-trip)
24811 x<nowiki/>http://cscott.net<nowiki/>x
24813 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
24816 # this is the "easy" test because it leaves in place all the
24817 # data-parsoid information indicating this is an autolink
24819 WTS of autolinks with escapes (editing)
24822 "modes": ["wt2wt"],
24824 [ "meta", "remove" ]
24828 x<nowiki/>http://cscott.net<nowiki/>x
24830 x<nowiki/>http://cscott.net<nowiki/>x
24834 WTS of edited autolink-like text (T103364)
24837 "modes": ["wt2wt"],
24839 [ "span[typeof]", "removeAttr", "typeof" ]
24843 Not a link: <nowiki>http://example.com</nowiki>.
24845 Not a link: <span><nowiki>http://example.com</nowiki></span>.
24849 WTS of newly-authored autolink-like text (T103364)
24853 <p>http://example.com is not a link.</p>
24855 <nowiki>http://example.com is not a link.</nowiki>
24859 Edited Redirect link should emit a non-piped wikitext link
24863 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
24869 T75121: Infer extension name from typeOf if data-mw is not present
24873 <div typeOf="mw:Extension/foo"></div>
24878 # Note that the <p> wrapping isn't present in PHP parser output
24879 # The important thing for this test is that P-wrapping doesn't
24880 # interfere with the <nowiki> protection for leading - in <td>
24881 # (which isn't necessary for <th>).
24883 T88318: p-wrapped dash in table.
24885 parsoid=html2wt,wt2wt
24888 <tr><th><p>-</p></th><th><p>- </p></th></tr>
24889 <tr><td><p>-</p></td><td><p>- </p></td></tr>
24890 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
24897 |<nowiki>-</nowiki>
24898 |<nowiki>- </nowiki>
24917 <td><small>-</small></td>
24929 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
24934 <td id='mwAc'>foo</td>
24935 <td id='serialize-this'>bar</td>
24940 | id="serialize-this" |bar
24945 Parsoid-like element ids should not be serialized to wikitext unless shadowed
24949 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
24951 <div id="hello">ok</div>
24958 "modes": ["wt2wt"],
24960 [ "#xyz", "before", "<b>before</b> stuff " ],
24961 [ "#xyz", "after", " stuff <i>after</i>" ],
24962 [ "#xyz", "html", "x <b>y</b> z" ]
24966 <span id="xyz">hello</span>
24968 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
24972 Never serialize a-tag as html, regardless of what data-parsoid has to say
24976 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
24981 ## SSS FIXME: This is broken output nevertheless.
24982 ## What might be a reasonable non-broken output for this?
24983 ## This is an edge case unlikely to be seen in production
24984 ## that I am not wasting more time on this right now.
24986 Never serialize a-tag as html, no matter what attributes it has
24990 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
24992 [http://boo.org http://boohoo.org]
24995 # --------------------------------------------
24996 # Tests spec'ing wikitext serialization norms |
24997 # --------------------------------------------
25000 Lists: Add space after bullets
25007 <li><span> baz</span></li>
25012 * <span> baz</span>
25016 1. Headings: Add space before/after == (T53744)
25023 <h2><span> baz</span></h2>
25031 == <span> baz</span> ==
25035 2. Headings: Add space before/after == even after hoisted content
25038 "modes": ["html2wt"],
25039 "scrubWikitext": true
25042 <h2> <link href="Category:A2" rel="mw:PageProp/Category" />ok</h2>
25050 1. Headings: suppress newly created empty headings
25053 "modes": ["html2wt"],
25054 "scrubWikitext": true
25062 2. Headings: don't suppress empty headings if scrubWikitext is false
25072 3. Headings: don't suppress empty headings for existing headings even if scrubWikitext is true
25075 "modes": ["html2wt"],
25076 "scrubWikitext": true
25079 <h2 data-parsoid='{}'></h2>
25085 1. WT Quote Tags: suppress newly created empty style tags
25088 "modes": ["html2wt"],
25089 "scrubWikitext": true
25097 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
25103 ''<nowiki/>'''''<nowiki/>'''
25107 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
25110 "modes": ["html2wt"],
25111 "scrubWikitext": true
25123 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
25130 <nowiki> </nowiki>hi
25132 <nowiki> </nowiki> hello
25136 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
25139 "modes": ["html2wt"],
25140 "scrubWikitext": true
25149 baz bang</td></tr></table>
25155 bar<span>boo</span></p>
25171 bar<span>boo</span>
25175 1. New links that end in spaces
25178 "modes": ["html2wt"],
25179 "scrubWikitext": false
25182 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25183 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25185 [[Berlin ]]<nowiki/>is the capital of Germany.
25191 2. New links that end in spaces
25194 "modes": ["html2wt"],
25195 "scrubWikitext": true
25198 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25199 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25201 [[Berlin]] is the capital of Germany.
25207 3. Existing links that end in spaces
25210 "modes": ["html2wt"],
25211 "scrubWikitext": true
25214 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin" data-parsoid='{"stx":"simple","a":{"href":"./Berlin"},"sa":{"href":"Berlin "}}'>Berlin </a>is the capital of Germany.</p>
25216 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"Foo "}}'>Foo </a><b>bar</b></p>
25218 [[Berlin ]]<nowiki/>is the capital of Germany.
25223 # ---------------------------------------------------
25224 # End of tests spec'ing wikitext serialization norms |
25225 # ---------------------------------------------------
25227 # -----------------------------------------------------------------
25228 # End of section for Parsoid-only html2wt tests for serialization
25230 # -----------------------------------------------------------------
25232 # -----------------------------------------------------------------
25233 # The following section of tests are primarily to spec behavior of
25234 # the selective serializer. All these tests have manual selser
25235 # changes. The automated selser changes for all tests handle the
25236 # wide variation of changes, but these tests here capture specs
25237 # deterministically.
25238 # ----------------------------------------------------------------
25242 Selser: New comments should not be lost
25245 "modes": ["selser"],
25247 [ "#a", "after", "<!--c1-->" ],
25248 [ "#b", "before", "<!--c2-->" ]
25252 <span id="a">a</span>
25254 <span id="b">b</span>
25256 <span id="a">a</span><!--c1-->
25258 <!--c2--><span id="b">b</span>
25263 Selser: Check for validity of DSR before using it
25266 "modes": ["selser"],
25268 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
25272 <span id="a">a</span>
25274 {{DISPLAYTITLE:foo}}
25275 <span id="a">a</span>
25279 1. DOMDiff: Changes to <ref> content should be looked up using id
25282 "modes": ["selser"],
25284 ["#X", "after", "bar"],
25285 ["#Y", "after", "baz"]
25289 X <ref><span id="X">foo</span></ref>
25292 <ref name="a"><span id="Y">foo</span></ref>
25295 X <ref><span id="X">foo</span>bar</ref>
25298 <ref name="a"><span id="Y">foo</span>baz</ref>
25303 2. DOMDiff: Changes to <ref> content should be looked up using id
25306 "modes": ["selser"],
25308 ["#Z", "after", "bar"]
25312 A <ref>foo bar for a</ref>
25313 B <ref group="X" name="b" />
25317 <references group="X">
25318 <ref name="b"><span id="Z">foo</span></ref>
25321 A <ref>foo bar for a</ref>
25322 B <ref group="X" name="b" />
25326 <references group="X">
25327 <ref name="b"><span id="Z">foo</span>bar</ref>