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: Lone protocols are never linked (T105697)
4648 External links: No preceding word characters allowed (bug 65278)
4650 NOPEhttp://example.com
4651 N0http://example.com
4652 ok:http://example.com
4653 ok-http://example.com
4655 <p>NOPEhttp://example.com
4656 N0http://example.com
4657 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4658 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4665 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4667 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4672 External image from https
4674 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4676 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4681 External image (when not allowed)
4683 wgAllowExternalImages=0
4685 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4687 <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>
4692 Link to non-http image, no img tag
4694 Link to non-http image, no img tag: ftp://example.com/test.jpg
4696 <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>
4701 External links: terminating separator
4703 Terminating separator: http://example.com/thing,
4705 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4710 External links: intervening separator
4712 Intervening separator: http://example.com/1,2,3
4714 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4719 External links: old bug with URL in query
4721 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4723 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4728 External links: old URL-in-URL bug, mixed protocols
4730 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4732 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4737 External links: URL in text
4739 URL in text: [http://example.com http://example.com]
4741 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4746 External links: Clickable images
4748 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4750 <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>
4753 <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>
4757 External links: raw ampersand
4759 Old & use: http://x&y
4761 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4766 External links: encoded ampersand
4768 Old & use: http://x&y
4770 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4773 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4777 External links: encoded equals (bug 6102)
4779 http://example.com/?foo=bar
4781 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4784 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4788 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4789 ## does it number them. As discussed in bug 53505, we can identify
4790 ## autonumbered links via CSS.
4794 External links: [raw ampersand]
4796 Old & use: [http://x&y]
4798 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4801 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4804 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4805 # mode will return the [raw ampersand] wikitext
4807 External links: [encoded ampersand]
4809 parsoid=wt2html,wt2wt,html2html
4811 Old & use: [http://x&y]
4813 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4816 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4820 External links: [raw equals]
4822 [http://example.com/?foo=bar]
4824 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4827 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4830 # note that parsoid html is identical to [raw equals] case; so html2wt
4831 # mode will return the [raw equals] wikitext
4833 External links: [encoded equals] (bug 6102)
4835 parsoid=wt2html,wt2wt,html2html
4837 [http://example.com/?foo=bar]
4839 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4842 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4845 # xxx parsoid strips the IDN character, so the round-trip tests will
4846 # obviously fail and are disabled. --cscott
4848 External links: [IDN ignored character reference in hostname; strip it right off]
4850 parsoid=wt2html,wt2wt,html2html
4852 [http://e‌xample.com/]
4854 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4857 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4860 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4861 # Where an external link could easily circumvent the sanitization of the text of
4862 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4863 # test demands a higher standard. That's a bit strange.
4867 # http://example.com -> [http://example.com|http://example.com]
4868 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4870 # The first example is sanitized, but the second is not. Any security benefits
4871 # from this production are trivial to circumvent. Either remove this test and
4872 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4873 # the test accordingly.
4877 # xxx parsoid strips the IDN character, so the round-trip tests will
4878 # obviously fail and are disabled. --cscott
4880 External links: IDN ignored character reference in hostname; strip it right off
4882 parsoid=wt2html,html2html
4884 http://e‌xample.com/
4886 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4889 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4893 External links: www.jpeg.org (bug 554)
4897 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4901 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4903 External links: URL within URL (original bug 2)
4905 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4907 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4910 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4914 BUG 361: URL inside bracketed URL
4916 [http://www.example.com/foo http://www.example.com/bar]
4918 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4923 BUG 361: URL within URL, not bracketed
4925 http://www.example.com/foo?=http://www.example.com/bar
4927 <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>
4932 BUG 289: ">"-token in URL-tail
4934 http://www.example.com/<hello>
4936 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4941 BUG 289: literal ">"-token in URL-tail
4943 http://www.example.com/<b>html</b>
4945 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4948 <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>
4952 BUG 289: ">"-token in bracketed URL
4954 [http://www.example.com/<hello> stuff]
4956 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4961 BUG 289: literal ">"-token in bracketed URL
4963 [http://www.example.com/<b>html</b> stuff]
4965 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4970 BUG 289: literal double quote at end of URL
4972 http://www.example.com/"hello"
4974 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4979 BUG 289: literal double quote in bracketed URL
4981 [http://www.example.com/"hello" stuff]
4983 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4988 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4990 [http://www.example.com test]
4992 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4997 External links: link text with spaces
4999 [http://www.example.com a b c]
5000 [http://www.example.com ''a'' ''b'']
5002 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5003 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5008 External links: wiki links within external link (Bug 3695)
5010 [http://example.com [[wikilink]] embedded in ext link]
5012 <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>
5015 <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>
5019 BUG 787: Links with one slash after the url protocol are invalid
5023 [http:/example.com title]
5025 <p>http:/example.com
5026 </p><p>[http:/example.com title]
5031 Bracketed external links with template-generated invalid target
5033 [{{echo|http:/example.com}} title]
5035 <p>[http:/example.com title]
5040 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5042 ''[http://example.com text'']
5043 [http://example.com '''text]'''
5044 ''Something [http://example.com in italic'']
5045 ''Something [http://example.com mixed''''', even bold]'''
5046 '''''Now [http://example.com both''''']
5048 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5049 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5050 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5051 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5052 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5058 Bug 4781: %26 in URL
5060 http://www.example.com/?title=AT%26T
5062 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5065 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5068 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5069 # % is actually legal in HTML5. Any change in output would need testing though.
5071 Bug 4781, 5267: %25 in URL
5073 http://www.example.com/?title=100%25_Bran
5075 <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>
5078 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5082 Bug 4781, 5267: %28, %29 in URL
5084 http://www.example.com/?title=Ben-Hur_%281959_film%29
5086 <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>
5089 <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>
5094 Bug 4781: %26 in autonumber URL
5096 [http://www.example.com/?title=AT%26T]
5098 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5101 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5105 Bug 4781, 5267: %26 in autonumber URL
5107 [http://www.example.com/?title=100%25_Bran]
5109 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5112 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5116 Bug 4781, 5267: %28, %29 in autonumber URL
5118 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5120 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5123 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5128 Bug 4781: %26 in bracketed URL
5130 [http://www.example.com/?title=AT%26T link]
5132 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5135 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5139 Bug 4781, 5267: %25 in bracketed URL
5141 [http://www.example.com/?title=100%25_Bran link]
5143 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5148 Bug 4781, 5267: %28, %29 in bracketed URL
5150 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5152 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5155 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5159 External link containing a period in the anchor. (bug 63947)
5161 [//foo.org/bar#baz. bang]
5163 [//foo.org/bar. bang]
5165 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5166 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5169 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5170 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5174 External link containing a single quote. (bug 63947)
5178 [//foo.org/bar'baz bang]
5180 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5181 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5184 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5185 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5190 External link containing a period in the anchor. (bug 63947)
5192 [//foo.org/bar#baz. bang]
5194 [//foo.org/bar. bang]
5196 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5197 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5200 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5201 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5205 External link containing a single quote. (bug 63947)
5209 [//foo.org/bar'baz bang]
5211 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5212 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5215 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5216 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5221 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5223 Some [http://example.com/ pretty ''italics'' and stuff]!
5225 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5230 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5232 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5234 <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>
5239 External link containing double-single-quotes with no space separating the url from text in italics
5241 [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]].]
5243 <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>
5246 <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>
5248 <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>
5252 External link with comments in link text
5254 [http://www.google.com Google <!-- comment -->]
5256 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5261 URL-encoding in URL functions (single parameter)
5263 {{localurl:Some page|amp=&}}
5265 <p>/index.php?title=Some_page&amp=&
5270 URL-encoding in URL functions (multiple parameters)
5272 {{localurl:Some page|q=?&=&}}
5274 <p>/index.php?title=Some_page&q=?&amp=&
5281 http://example.com/index.php?foozoid%5B%5D=bar
5283 http://example.com/index.php?foozoid[]=bar
5285 <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>
5286 </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>
5289 <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>
5291 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5295 IPv6 urls (bug 21261)
5299 http://[2404:130:0:1000::187:2]/index.php
5301 <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>
5306 Non-extlinks in brackets
5315 [{{echo|foo}} ''bar'']
5316 [{{echo|foo}}l's] errand
5317 [{{echo|foo}}l's errand]
5319 [url=http://example.com]
5332 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5337 Percent encoding in external links
5339 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5341 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5344 <p><a rel="mw:ExtLink"
5345 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5349 Use url link syntax for links where the content is equal the link target
5353 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5356 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5360 Parenthesis in external links, especially URL links
5364 http://example.com/test)
5366 http://example.com/(test)
5368 http://example.com/((test)
5370 (http://example.com/(test))
5372 (http://example.com/(test)))))
5374 http://example.com/a)b
5376 [http://example.com) foo]
5378 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5379 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5380 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5381 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5382 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5383 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5384 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5385 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5388 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5389 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5390 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5391 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5392 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5393 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5394 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5395 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5399 Parenthesis in external links, w/ transclusion or comment
5401 (http://example.com/{{echo|hi}})
5403 (http://example.com<!-- hi -->)
5405 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5406 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5409 <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>
5411 <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>
5415 Serialize <a> tags with invalid link targets as plain text
5419 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5420 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5421 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5422 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5425 <nowiki>*</nowiki>text
5426 <nowiki>[[foo]]</nowiki>
5427 <nowiki>*a [[foo]]</nowiki>
5431 mw:ExtLink -vs- mw:WikiLink (T94723)
5435 <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>
5436 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5437 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5438 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5440 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5441 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5446 [[wikipedia:Foo|Bar]]
5447 [[wikipedia:Foo|Bar]]
5449 [[wikipedia:European_Robin|European Robin]]
5450 [[wikipedia:European_Robin|European Robin]]
5454 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5458 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5460 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5471 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5473 Normal text. '''''Bold italic text.''''' Normal text.
5475 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5476 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5481 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5482 # parser strips. The wikitext contains just the first half of the bold
5485 Unclosed and unmatched quotes
5487 '''''Bold italic text '''with bold deactivated''' in between.'''''
5489 '''''Bold italic text ''with italic deactivated'' in between.'''''
5493 ..spanning two paragraphs (should not work).'''
5495 '''Bold tag left open
5497 ''Italic tag left open
5501 <!-- Unmatching number of opening, closing tags: -->
5502 '''This year''''s election ''should'' beat '''last year''''s.
5504 ''Tom'''s car is bigger than ''Susan'''s.
5506 Plain ''italic'''s plain
5508 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5509 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5510 </p><p><b>Bold text..</b>
5511 </p><p>..spanning two paragraphs (should not work).
5512 </p><p><b>Bold tag left open</b>
5513 </p><p><i>Italic tag left open</i>
5515 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5516 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5517 </p><p>Plain <i>italic'</i>s plain
5520 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5521 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5522 </p><p><b>Bold text..</b>
5523 </p><p>..spanning two paragraphs (should not work).<b></b>
5524 </p><p><b>Bold tag left open</b>
5525 </p><p><i>Italic tag left open</i>
5528 <!-- Unmatching number of opening, closing tags: -->
5529 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5530 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5531 </p><p>Plain <i>italic'</i>s plain
5538 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5541 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5542 # is the bare minimum required by the spec, see:
5543 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5544 # Parsoid team replies: empty table tags are legal in HTML5
5546 A table with no data.
5559 A table with stray table end tags on start tag line (wt2html)
5563 {|style="color: red;"|}
5565 {|style="color: red;" |}
5569 {|style="color: red;"|} id="foo"
5573 {|style="color: red;" |} id="foo"
5577 <table style="color: red;"></table>
5579 <table style="color: red;">
5585 <table style="color: red;" id="foo">
5591 <table style="color: red;" id="foo">
5600 A table with no data (take 2)
5608 # A table with nothing but a caption is invalid XHTML, we might want to render
5609 # this as <p>caption</p>
5610 # Parsoid team replies: table with only a caption is legal in HTML5
5612 A table with nothing but a caption
5620 </caption><tr><td></td></tr></table>
5623 <table><caption> caption</caption></table>
5627 A table with caption with default-spaced attributes and a table row
5630 |+ style="color: red;" | caption1
5636 <caption style="color: red;"> caption1
5645 A table with captions with non-default spaced attributes and a table row
5648 |+style="color: red;"|caption2
5649 |+ style="color: red;"| caption3
5655 <caption style="color: red;">caption2
5657 <caption style="color: red;"> caption3
5666 Table td-cell syntax variations
5670 | foo bar foo || baz
5671 | style='color:red;' | baz
5672 | style='color:red;' || baz
5679 <td> foo bar foo </td>
5682 <td style="color:red;"> baz
5684 <td> style='color:red;' </td>
5712 Simple table but with multiple dashes for row wikitext
5731 Multiplication table
5733 {| border="1" cellpadding="2"
5734 |+Multiplication table
5736 ! × !! 1 !! 2 !! 3
5754 <table border="1" cellpadding="2">
5755 <caption>Multiplication table
5802 Accept "||" in table headings
5817 Accept "!!" in table data
5831 <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>
5836 Accept "||" in indented table headings
5846 </th></tr></table></dd></dl>
5851 Accept "!!" in templates
5865 <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>
5869 Accept "!!" in table headings after newline
5886 <p>b!!c</p></th></tr>
5891 Accept "!!" in table data of mixed wikitext / html syntax
5895 <tr><td>b!!c</td></tr>
5908 <tbody><tr><th>a</th></tr>
5909 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
5914 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5931 Accept "| !" at start of line in tables (ignore !-attribute)
5935 | !style="color:red" | bar
5947 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 +/-
5951 |style='color:red;'|+1
5952 |style='color:blue;'|-1
5964 <td style="color:red;">+1
5966 <td style="color:blue;">-1
5990 |rowspan=2| Cell 2, row 1 (and 2)
6001 <td rowspan="2"> Cell 2, row 1 (and 2)
6019 {| bgcolor=#ABCDEF border=2
6024 |the original table again
6032 <table bgcolor="#ABCDEF" border="2">
6040 <td>the original table again
6046 Invalid attributes in table cell (bug 1830)
6060 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6064 | title="foo<nowiki>|</nowiki>" |bar
6065 | title="foo<nowiki>|</nowiki>" bar
6072 <td title="foo|">bar
6074 <td> title="foo|" bar
6079 # The "|}" to close the table is missing from the input, so parsoid's
6080 # *2wt modes will fail.
6082 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
6084 parsoid=wt2html,html2html
6087 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6091 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6092 <td>]" onmouseover="alert(document.cookie)">test
6100 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6103 # FIXME: The php output is broken.
6105 ! and || in td attributes should not be parsed as <th>/<td>
6108 | style="color: red !important;" data-contrived="put this here ||" | foo
6113 <td> style="color: red !important;" data-contrived="put this here </td>
6119 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
6124 Indented table markup mixed with indented pre content (proposed in bug 6200)
6129 Text that should be rendered preformatted
6137 <pre>Text that should be rendered preformatted
6146 1. Template-generated table cell attributes and cell content
6151 || {{table_attribs_5}}
6152 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6153 |align=center {{table_attribs}}
6154 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6159 <td style="color:red;">Foo
6161 <td style="color:red;">Foo
6163 <td> style="color:red;"</td>
6166 <td style="color:red;">Foo
6168 <td align="center" style="color:red;">Foo
6170 <td align="center" style="color:red;">Foo
6176 2. Template-generated table cell attributes and cell content
6179 |{{table_attribs_2}}
6184 <td style="color:red;">Foo
6192 <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>
6193 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6198 3. Template-generated table cell attributes and cell content
6201 !align=center {{table_header_cells}}
6203 |align=center {{table_cells}}
6208 <th align="center" style="color:red;">Foo</th>
6209 <th style="color:red;"><i>Bar</i></th>
6210 <th style="color:brown;"><i>Foo</i> and Baz
6213 <td align="center" style="color:red;">Foo</td>
6214 <td style="color:red;"><i>Bar</i></td>
6215 <td style="color:brown;"><i>Foo</i> and Baz
6220 <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>
6221 <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>
6226 4. Template-generated table cell attributes and cell content inside a templated table
6229 !align=center {{table_header_cells}}
6231 |align=center {{table_cells}}
6236 <th align="center" style="color:red;">Foo</th>
6237 <th style="color:red;"><i>Bar</i></th>
6238 <th style="color:brown;"><i>Foo</i> and Baz
6241 <td align="center" style="color:red;">Foo</td>
6242 <td style="color:red;"><i>Bar</i></td>
6243 <td style="color:brown;"><i>Foo</i> and Baz
6247 <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}}]}'>
6248 <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>
6250 <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>
6254 ## Edge case fix to prevent future regressions
6256 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6259 |{{table_attribs_7}}
6264 <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>
6266 <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>
6270 Table with row followed by newlines and table heading
6288 Table with empty line following the start tag
6305 # FIXME: Preserve the attribute properly (with an empty string as value) in
6306 # the PHP parser. Parsoid implements the behavior below.
6308 Table attributes with empty value
6318 </td></tr></tbody></table>
6323 Wikitext table with a lot of comments
6346 Wikitext table comments represented in parsoid dom
6348 {|<!--c1--><!--c2-->
6359 <table><!--c1--><!--c2-->
6360 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6361 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6366 Wikitext table with double-line table cell
6383 Table cell with a single comment
6400 Table-cell after a comment-only-empty-line
6417 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6419 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6425 Build table with {{!}}
6427 {{{!}} class="wikitable"
6430 {{!}}- style="color:red;"
6431 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6434 <table class="wikitable">
6440 <tr style="color:red;">
6442 <td style="color:red;"> second data
6448 Build table with pipe as data
6450 {| class="wikitable"
6453 |- style="color:red;"
6454 | data || style="color:red;" | second data
6456 | style="color:red;" | data with | || style="color:red;" | second data with |
6458 || data with | ||| second data with |
6461 <table class="wikitable">
6467 <tr style="color:red;">
6469 <td style="color:red;"> second data
6472 <td style="color:red;"> data with | </td>
6473 <td style="color:red;"> second data with |
6476 <td> data with | </td>
6477 <td> second data with |
6483 Build table with wikilink
6485 {| class="wikitable"
6486 ! header || second header
6487 |- style="color:red;"
6488 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6490 | data || second data [[Main Page|link|text with pipe]]
6493 <table class="wikitable">
6498 <tr style="color:red;">
6499 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6500 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6504 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6509 # The expected HTML structure in this test is debatable. The PHP parser does
6510 # not parse this kind of table at all. The main focus for Parsoid is on
6511 # round-tripping, so this output is ok for now. TODO: revisit!
6513 Wikitext table with html-syntax row
6523 <td>foo</td></tr></tbody></table>
6526 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6527 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6528 ## PHP parser, which tidy then compounds by fostering the content
6529 ## entirely out of the table. Parsoid recognizes the table context
6530 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6531 ## depends on PHP's treatment of broken table markup!
6533 Implicit <td> after a |-
6535 parsoid=wt2html,html2html
6555 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6557 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6559 parsoid=wt2html,html2html
6592 <tr><td><pre>a</pre></td></tr>
6593 <tr><td> b</td></tr>
6598 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6599 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6601 Lists should be recognized in an implicit <td> context
6603 parsoid=wt2html,html2html
6630 Table cells not properly parsed in an implicit-td context
6634 {{table_attribs_4}} || a || b
6639 <td style="background-color:#DC241f;" width="10px"></td>
6646 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6647 <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>
6652 Parsoid: Round-trip tables directly followed by content (bug 51219)
6654 parsoid=wt2html,wt2wt
6679 Parsoid: Default to a newline after tables in new content (bug 51219)
6684 <tr><td>foo</td></tr></tbody></table> bar
6686 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6691 <nowiki> </nowiki>bar
6699 Parsoid: newline inducing block nodes don't suppress <nowiki>
6711 Parsoid: Row-syntax table headings followed by comment & table cells
6713 parsoid=wt2html,wt2wt
6717 <!-- foo --> || baz || quux
6731 <tbody><tr><th> foo </th><th> bar
6732 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6737 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6740 Parsoid: Recover better from broken table attributes
6760 <p>foo</p></td></tr>
6765 Strip unsupported table tags
6813 Testing serialization after deletion of table cells
6816 "modes": ["wt2wt", "selser"],
6824 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6837 Plain link, capitalized
6841 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6846 Plain link, uncapitalized
6850 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6857 [[Main Page|The Main Page]]
6859 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6864 Piped link with comment in link text
6866 [[Main Page|The Main<!--front--> Page]]
6868 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6873 Piped link with multiple pipe characters in link text
6875 [[Main Page||The|Main|Page|]]
6877 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6880 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6888 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6893 Broken link with fragment
6895 [[Zigzagzogzagzig#zug]]
6897 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6902 Special page link with fragment
6904 [[Special:Version#anchor]]
6906 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6911 Nonexistent special page link with fragment
6913 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6915 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6922 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6924 <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>
6931 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6933 <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>!!!
6944 Bug 43661: Piped links with identical prefixes
6946 [[prefixed article|prefixed articles with spaces]]
6948 [[prefixed article|prefixed articlesaoeu]]
6950 [[Main Page|Main Page test]]
6952 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6953 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6954 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6960 Link with HTML entity in suffix / tail
6962 [[Main Page]]", [[Main Page]]a
6964 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6967 <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>
6971 Link with 3 brackets
6980 Link with 4 brackets
6984 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6989 Piped link with 3 brackets
6991 [[[main page|the main page]]]
6993 <p>[[[main page|the main page]]]
6998 Piped link with extlink-like text
7001 [[Main Page|This is a [bar]]]
7003 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7004 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7007 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7008 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7012 Link with multiple pipes
7014 [[Main Page|The|Main|Page]]
7016 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7020 # Note that parsoid does not munge anchor text; all non-space
7021 # characters are valid in HTML5 ids.
7023 Anchor containing a #. (bug 63430)
7025 [[Main Page#And#Link]]
7027 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7030 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7036 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7038 <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>
7043 Link with space in namespace
7045 [[User talk:Foo bar]]
7047 <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>
7052 MemoryAlpha:AlphaTest
7054 This is an article in the MemoryAlpha namespace
7055 (which shadows the memoryalpha interwiki link).
7059 Namespace takes precedence over interwiki link (bug 51680)
7061 [[MemoryAlpha:AlphaTest]]
7063 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7067 # The previous test doesn't work correctly in html2*, due to not recognizing the
7068 # link as an internal one. This one checks for the correct behavior.
7070 Link to namespace preferred over interwiki with correct rel attribute
7072 parsoid=html2wt,html2html
7074 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7076 [[MemoryAlpha:AlphaTest]]
7080 Piped link to namespace
7082 [[Meta:Disclaimers|The disclaimers]]
7084 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7091 [[Usually caused by a typo (oops}]]
7093 <p>[[Usually caused by a typo (oops}]]
7100 Just a test of an article title containing a percent.
7104 Link containing % (not as a hex sequence)
7108 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7111 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7114 # note that the parsoid HTML is identical to the previous test output,
7115 # so the previous test ensures that the html2wt mode will generate the
7116 # "not as a hex sequence" wikitext.
7118 Link containing % as a single hex sequence interpreted to char
7120 parsoid=wt2wt,wt2html,html2html
7124 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7127 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7131 Link containing % as a double hex sequence interpreted to hex sequence
7135 <p>[[7%2525 Solution]]
7139 # note that parsoid does not munge anchor text; all non-space
7140 # characters are valid in HTML5 anchors.
7142 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7143 Example for such a section: == < ==
7145 [[%23%3c]][[%23%3e]]
7147 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7150 <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>
7154 Link containing "<#" and ">#" as a hex sequences
7156 [[%3c%23]][[%3e%23]]
7158 <p>[[%3c%23]][[%3e%23]]
7163 Link containing an equals sign
7165 [[Special:BookSources/isbn=4-00-026157-6]]
7167 <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>
7170 <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>
7176 Just a test of an article title containing a tilde.
7179 # note that links containing signatures, like [[Foo~~~~]], are
7180 # massaged by the pre-save transform (PST) and so the tildes are never
7181 # seen by the parser.
7183 Link containing a tilde
7187 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7190 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7194 Link containing double-single-quotes '' (bug 4598)
7196 [[Lista d''e paise d''o munno]]
7198 <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>
7201 <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>
7205 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7207 Some [[Link|pretty ''italics'' and stuff]]!
7209 <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>!
7212 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7216 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7218 ''Some [[Link|pretty ''italics'' and stuff]]!''
7220 <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>
7225 Link with double quotes in title part (literal) and alternate part (interpreted)
7227 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7231 [[''Pentecoste''|Pentecoste]]
7233 [[''Pentecoste''|''Pentecoste'']]
7235 <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>
7236 </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>
7237 </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>
7238 </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>
7241 <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>
7242 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7243 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7244 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7248 Broken image links with HTML captions (bug 39700)
7250 [[File:Nonexistent|<script></script>]]
7251 [[File:Nonexistent|100x100px|<script></script>]]
7252 [[File:Nonexistent|<]]
7253 [[File:Nonexistent|a<i>b</i>c]]
7255 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7256 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7257 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7258 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7261 <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>
7262 <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>
7263 <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>
7264 <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>
7270 [[http://www.example.com]]
7272 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7275 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7279 Plain link to URL with link text
7281 [[http://www.example.com Link text]]
7283 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7288 Plain link to protocol-relative URL
7290 [[//www.example.com]]
7292 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7295 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7299 Plain link to protocol-relative URL with link text
7301 [[//www.example.com Link text]]
7303 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7308 Plain link to page with question mark in title
7314 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7315 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7320 # I'm fairly sure the expected result here is wrong.
7321 # We want these to be URL links, not pseudo-pages with URLs for titles....
7322 # However the current output is also pretty screwy.
7325 # I'm changing it to match the current output--it arguably makes more
7326 # sense in the light of the test above. Old expected result was:
7327 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7329 # But I think this test is bordering on "garbage in, garbage out" anyway.
7334 Piped link to URL: [[http://www.example.com|an example URL]]
7336 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7339 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7343 BUG 2: [[page|http://url/]] should link to page, not http://url/
7345 [[Main Page|http://url/]]
7347 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7350 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7353 # Parsoid does not mark self-links, by design.
7355 BUG 337: Escaped self-links should be bold
7359 [[Bug462]] [[Bug462]]
7361 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7364 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7366 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7370 Self-link to section should not be bold
7374 [[Main Page#section]]
7376 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7387 Self-link to numeric title
7393 <p><strong class="selflink">0</strong>
7398 Link to numeric-equivalent title
7404 <p><a href="/wiki/00" title="00">00</a>
7409 <nowiki> inside a link
7411 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7413 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7418 Non-breaking spaces in title
7420 [[ Main Page ]]
7422 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7427 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7433 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7438 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7444 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7449 Internal link with en linktrail: no apostrophes (bug 27473)
7455 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7460 Internal link with ca linktrail with apostrophes (bug 27473)
7466 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7471 Internal link with kaa linktrail with apostrophes (bug 27473)
7477 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7482 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7484 [[User:Foo/Test/63636:Bar|Test]]
7486 <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>
7489 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7493 Purely hash wikilink
7495 title=[[User:test/123]]
7499 <p><a href="#a">b</a>
7502 <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>
7506 1. Interaction of linktrail and template encapsulation
7512 <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>
7516 2. Interaction of linktrail and template encapsulation
7520 {{echo|Some [[Fool]]}}s
7522 <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>
7526 3. Interaction of linktrail and template encapsulation
7530 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7532 <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>
7542 Internal link with is link prefix
7546 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7548 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7559 Internal link with is link trail and link prefix
7563 [[mótmælendatrú|xxx]]ar
7565 mótmælenda[[söfnuður]]
7566 mótmælenda[[söfnuður|söfnuðir]]
7567 mótmælenda[[söfnuður|söfnuðir]]xxx
7569 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7570 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7571 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7572 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7573 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7578 Parsoid link trail escaping
7580 parsoid=html2wt,html2html
7582 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7588 Parsoid link prefix escaping
7591 parsoid=html2wt,html2html
7593 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7595 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7599 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7607 [http://wp.org ''foo'']
7609 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7610 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7611 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7612 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7617 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7621 [[Foo|{{echo|a}} b {{echo|c}}]]
7623 <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>
7627 Link with angle bracket after anchor
7631 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7634 <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>
7638 ### Interwiki links (see maintenance/interwiki.sql)
7642 Inline interwiki link
7644 parsoid=wt2html,wt2wt,html2html
7646 [[MeatBall:SoftSecurity]]
7648 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7651 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7655 Inline interwiki link with empty title (bug 2372)
7657 parsoid=wt2html,wt2wt,html2html
7661 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7664 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7668 Interwiki link encoding conversion (bug 1636)
7670 *[[Wikipedia:ro:Olteniţa]]
7671 *[[Wikipedia:ro:Olteniţa]]
7673 <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>
7674 <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>
7678 <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>
7679 <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>
7684 Interwiki link with fragment (bug 2130)
7686 [[MeatBall:SoftSecurity#foo]]
7688 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7692 # Ideally the wikipedia: prefix here should be proto-relative too
7693 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7694 # define the 'en' prefix, and originally the test used 'wikipedia',
7695 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7698 Different interwiki prefixes mapping to the same URL
7706 [[:wikipedia:Foo|Foo]]
7708 [[wikipedia:en:Foo]]
7710 [[:wikipedia:en:Foo]]
7714 <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>
7716 <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>
7718 <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>
7720 <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>
7722 <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>
7724 <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>
7726 <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>
7730 Interwiki links that cannot be represented in wiki syntax
7733 [[meatball:ok#foo|ok with fragment]]
7734 [[meatball:ok_as_well?|ok ending with ? mark]]
7735 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7736 [http://de.wikipedia.org/wiki/#foo is just fragment]
7739 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7740 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7741 <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>
7742 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7743 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7746 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7747 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7748 <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>
7749 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7750 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7754 Interwiki links: trail
7756 [[wikipedia:Foo|Ba]]r
7758 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7761 <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>
7765 Local interwiki link
7767 parsoid=wt2html,wt2wt,html2html
7769 [[local:Template:Foo]]
7771 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7774 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7777 # Parsoid does not mark self-links, by design.
7779 Local interwiki link: self-link to current page
7782 parsoid=wt2html,wt2wt,html2html
7786 <p><strong class="selflink">local:Main Page</strong>
7789 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7793 Local interwiki link: prefix only (bug 64167)
7795 parsoid=wt2html,wt2wt,html2html
7799 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7802 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7806 Local interwiki link: with additional interwiki prefix (bug 61357)
7808 parsoid=wt2html,wt2wt,html2html
7810 [[local:meatball:Hello]]
7812 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7815 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7819 Multiple local interwiki link prefixes
7821 [[local:local:local:local:mi:local:Foo]]
7823 parsoid=wt2html,wt2wt,html2html
7825 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7828 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7832 ### Interlanguage links
7833 ### Language links (so that searching for '### language' matches..)
7839 parsoid=wt2html,wt2wt,html2html
7847 <p>Blah blah blah</p>
7848 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7852 Interlanguage link with spacing
7854 parsoid=wt2html,wt2wt,html2html
7862 <p>Blah blah blah</p>
7863 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7867 Double interlanguage link
7869 parsoid=wt2html,wt2wt,html2html
7878 <p>Blah blah blah</p>
7879 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7880 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7884 Interlanguage link variations
7886 parsoid=wt2html,wt2wt,html2html
7896 <p>Blah blah blah</p>
7897 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7898 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7899 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7903 Space and question mark encoding in interlanguage links (T95473)
7905 parsoid=wt2html,wt2wt,html2html
7913 <p>Blah blah blah</p>
7914 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
7918 Interlanguage link, with prefix links
7928 <p>Blah blah blah</p>
7929 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7933 Double interlanguage link, with prefix links (bug 8897)
7944 <p>Blah blah blah</p>
7945 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7946 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7950 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7958 <p>Blah blah blah</p>
7959 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7963 Parsoid-specific test: Wikilinks with should RT properly
7969 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7974 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7978 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7979 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7981 He&nbsp;llo [[Foo|He&nbsp;llo]]
7983 He&nbsp;llo [[He&nbsp;llo]]
7987 Parsoid: handle constructor well
7993 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7994 </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>
7997 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7999 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8008 # Note that `ko` isn't a known interlanguage prefix
8010 Parsoid: recognize interlanguage links without a target page
8020 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8022 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8025 # Note that `ko` isn't a known interwiki prefix
8027 Parsoid: recognize interwiki links without a target page
8029 parsoid=wt2html,wt2wt,html2html
8035 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8036 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8039 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8040 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8044 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8048 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8051 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8055 Interlanguage link with preceding local interwiki link (bug 68085)
8057 parsoid=wt2html,wt2wt,html2html
8060 [[local:es:Spanish]]
8063 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8067 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8071 Looks like an interlanguage link, but is actually a local interwiki
8073 parsoid=wt2html,wt2wt,html2html
8079 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8083 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8087 ### Redirects, Parsoid-only
8091 1. Simple redirect to page
8093 #REDIRECT [[Main Page]]
8095 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8099 2. Other redirect variants
8101 #REDIRECT [[Main_Page]]
8103 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8106 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8107 # This tests the Parsoid bail-out code.
8109 3. Other redirect variants
8111 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8113 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8117 4. Redirect to a templated destination
8119 #REDIRECT [[{{echo|Foo}}bar]]
8121 <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"}]]}'/>
8127 parsoid=wt2html,wt2wt
8132 <li>REDIRECT [[]]</li></ol>
8136 Optional colon in #REDIRECT
8138 # the colon is archaic syntax. we support it for wt2html, but we
8139 # don't care that it roundtrips back to the modern syntax.
8140 parsoid=wt2html,html2html
8142 #REDIRECT:[[Main Page]]
8144 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8148 Whitespace in #REDIRECT with optional colon
8150 # the colon and gratuitous whitespace is archaic syntax. we support
8151 # it for wt2html, but we don't care that it roundtrips back to the
8152 # modern syntax (without extra whitespace)
8153 parsoid=wt2html,html2html
8160 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8164 Piped link in #REDIRECT
8166 # content after piped link is ignored. we support this syntax,
8167 # but don't care that the piped link is lost when we roundtrip this.
8170 #REDIRECT [[Main Page|bar]]
8172 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8176 Redirect to category (T104502)
8178 parsoid=wt2html,wt2wt
8180 #REDIRECT [[Category:Foo]]
8182 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8186 Redirect to category with URL encoding (T104502)
8190 #REDIRECT [[Category%3AFoo]]
8192 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8196 Redirect to category page
8198 #REDIRECT [[:Category:Foo]]
8200 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8204 Redirect to image page (1)
8206 #REDIRECT [[File:Wiki.png]]
8208 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8212 Redirect to image page (2)
8214 #REDIRECT [[Image:Wiki.png]]
8216 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8219 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8220 # Next test confirms this.
8222 Redirect to language (1) (T104918)
8224 parsoid=wt2html,wt2wt,html2html
8226 #REDIRECT [[en:File:Wiki.png]]
8228 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8232 Redirect to language (2) (T104918)
8234 #REDIRECT [[:en:File:Wiki.png]]
8236 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8240 Redirect to interwiki (T104918)
8242 #REDIRECT [[meatball:File:Wiki.png]]
8244 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8248 Non-English #REDIRECT
8252 #TILVÍSUN [[Main Page]]
8254 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8258 Redirect syntax under text isn't considered a redirect
8261 #redirect [[Main Page]]
8264 <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>
8267 # FIXME: Should hoist the redirect to the top of the page and ensure there
8274 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8294 Broken br tag sanitization
8302 # TODO: Fix html2html mode (bug 51055)!
8304 Parsoid: Broken br tag recognition
8317 Incorrecly removing closing slashes from correctly formed XHTML
8319 <br style="clear:both;" />
8321 <p><br style="clear:both;" />
8326 Failing to transform badly formed HTML into correct XHTML
8328 <br style="clear: left;">
8329 <br style="clear: right;">
8330 <br style="clear: both;">
8332 <p><br style="clear: left;" />
8333 <br style="clear: right;" />
8334 <br style="clear: both;" />
8338 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8339 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8341 Handling html with a div self-closing tag
8350 <p><div title />
8354 <p><div title=bar />
8355 <div title=bar/>
8357 <div title="bar/"></div>
8361 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8362 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8363 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8364 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8365 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8366 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8370 Handling html with a br self-closing tag
8397 Horizontal ruler (should it add that extra space?)
8412 Horizontal ruler -- 4+ dashes render hr
8421 Horizontal ruler -- eats additional dashes on the same line
8430 Horizontal ruler -- does not collapse dashes on consecutive lines
8441 Horizontal ruler -- <4 dashes render as plain text
8450 Horizontal ruler -- Supports content following dashes on same line
8462 ### Block-level elements
8471 <ul><li>Common list</li>
8473 <li>item 3</li></ul>
8484 <ol><li>Numbered list</li>
8486 <li> item 3</li></ol>
8500 ***#Number on level 4
8502 **#Number on level 3
8503 **#Number on level 3
8507 #** Level 3, but ordered
8510 <ol><li> with numbers</li></ol>
8511 <ul><li> and bullets</li></ul>
8512 <ol><li> and numbers</li></ol></li>
8514 <ul><li>bullet level 2
8515 <ul><li>bullet level 3
8516 <ol><li>Number on level 4</li></ol></li></ul></li>
8518 <ol><li>Number on level 3</li>
8519 <li>Number on level 3</li></ol></li></ul>
8520 <ol><li>number level 2</li></ol></li>
8522 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8523 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8534 <ul><li>bar</li></ul></li></ul>
8544 <ul><li><ul><li>foo</li></ul></li>
8550 Nested lists 3 (first element empty)
8556 <ul><li>bar</li></ul></li></ul>
8561 Nested lists 4 (first element empty)
8566 <ul><li><ul><li></li></ul></li>
8572 Nested lists 5 (both elements empty)
8577 <ul><li><ul><li></li></ul></li>
8583 Nested lists 6 (both elements empty)
8589 <ul><li></li></ul></li></ul>
8594 Nested lists 7 (skip initial nesting levels)
8598 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8603 Nested lists 8 (multiple nesting transitions)
8611 <ul><li><ul><li> bar</li></ul></li>
8612 <li> baz</li></ul></li>
8618 Nested lists 9 (extension interaction)
8624 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8628 1. Lists with start-of-line-transparent tokens before bullets: Comments
8641 2. Lists with start-of-line-transparent tokens before bullets: Template close
8646 <ul><li>foo bar</li>
8652 List items are not parsed correctly following a <pre> block (bug 785)
8658 <ul><li> <pre>foo</pre></li>
8659 <li> <pre>bar</pre></li>
8663 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8664 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8669 List items from template
8680 * notSOL{{inner list}}
8683 <ul><li> item 1</li>
8684 <li> item 2</li></ul>
8685 <ul><li> item 0</li>
8687 <li> item 2</li></ul>
8688 <ul><li> item 0</li>
8691 <li> item 2</li></ul>
8696 List interrupted by empty line or heading
8704 <ul><li> foo</li></ul>
8705 <ul><li><ul><li> bar</li></ul></li></ul>
8706 <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>
8707 <ul><li> Another list item</li></ul>
8712 Multiple list tags generated by templates
8733 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8736 <!--This line will NOT split the list-->
8738 <!--This line will NOT split the list either-->
8740 <!--foo--> <!----> <!--This line NOT split the list either-->
8751 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8754 <!--This line will NOT split the list-->
8756 <!--This line will NOT split the list either-->
8758 <!--foo--> <!----> <!--This line NOT split the list
8771 (The PHP parser relies on Tidy for the hack)
8773 parsoid=wt2html,wt2wt
8777 * {{echo|<li>templated li-hack}}
8778 * <!--foo--> <li> unsupported li-hack with preceding comments
8781 <li><li>not a li-hack
8788 <li>templated li-hack</li>
8789 <li>unsupported li-hack with preceding comments</li>
8792 <li>not a li-hack</li>
8797 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8824 Parsoid: Test of whitespace serialization with Templated bullets
8831 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8835 # ------------------------------------------------------------------------
8836 # The next set of tests are about Parsoid's ability to handle badly nested
8837 # tags (parse, minimize scope of fixup, and roundtrip back)
8838 # ------------------------------------------------------------------------
8841 Unbalanced closing block tags break a list
8842 (php parser relies on Tidy to fix up)
8860 # Parsoid fails this test, but it might be tricky to support properly.
8863 Unbalanced closing non-block tags don't break a list
8864 (php parser relies on Tidy to fix up)
8871 <li><span>a</span></li>
8872 <li><span>b</span></li>
8886 Unclosed formatting tags that straddle lists are closed and reopened
8887 (php parser relies on Tidy to fix up)
8889 parsoid=wt2html,wt2wt,html2html
8899 <ol><li> <s> a</s></li>
8900 <li><s> b </s></li></ol>
8905 1. List embedded in a formatting tag
8912 <li><small>foo</small></li>
8922 ## Ugly Parsoid output here
8923 ## Not sure what the right output is.
8925 2. List embedded in a formatting tag
8932 <li><small>a</small></li>
8933 <li><small>b</small></li>
8940 <li><small>b</small></li>
8944 # Ugly Parsoid and PHP parser output here
8945 # Not sure if we want to make this a test!
8948 ## 3. Unclosed formatting tags in list elements
8954 ## <li><small>a</small></li>
8955 ## <li><small><small>b</small></small></li>
8959 ## <li><small>a</small></li>
8961 ## <li><small>b</small></li>
8965 # This is a bug in the PHP parser + tidy combination.
8966 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8967 # and then fostered out of the table by tidy.)
8968 # We believe the Parsoid output to be correct.
8970 Table with missing opening <tr> tag
8972 parsoid=wt2html,wt2wt
8990 # Note that the current date is hard-coded as
8991 # 1970-01-01T00:02:03Z (a Thursday)
8992 # when running parser tests. The timezone is also fixed to GMT, so
8993 # local date will be identical to current date.
8996 Magic Word: {{CURRENTDAY}}
9005 Magic Word: {{CURRENTDAY2}}
9014 Magic Word: {{CURRENTDAYNAME}}
9023 Magic Word: {{CURRENTDOW}}
9032 Magic Word: {{CURRENTMONTH}}
9041 Magic Word: {{CURRENTMONTH1}}
9050 Magic Word: {{CURRENTMONTHABBREV}}
9052 {{CURRENTMONTHABBREV}}
9059 Magic Word: {{CURRENTMONTHNAME}}
9061 {{CURRENTMONTHNAME}}
9068 Magic Word: {{CURRENTMONTHNAMEGEN}}
9070 {{CURRENTMONTHNAMEGEN}}
9077 Magic Word: {{CURRENTTIME}}
9086 Magic Word: {{CURRENTHOUR}}
9095 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9104 Magic Word: {{CURRENTYEAR}}
9113 Magic Word: {{CURRENTTIMESTAMP}}
9115 {{CURRENTTIMESTAMP}}
9122 Magic Words LOCAL (UTC)
9126 * {{LOCALMONTHNAME}}
9127 * {{LOCALMONTHNAMEGEN}}
9128 * {{LOCALMONTHABBREV}}
9137 * {{LOCALTIMESTAMP}}
9152 <li> 19700101000203</li></ul>
9157 Magic Word: {{FULLPAGENAME}}
9159 title=[[User:Ævar Arnfjörð Bjarmason]]
9163 <p>User:Ævar Arnfjörð Bjarmason
9168 Magic Word: {{FULLPAGENAMEE}}
9170 title=[[User:Ævar Arnfjörð Bjarmason]]
9174 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9179 Magic Word: {{TALKSPACE}}
9181 title=[[User:Ævar Arnfjörð Bjarmason]]
9190 Magic Word: {{TALKSPACE}}, same namespace
9192 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9201 Magic Word: {{TALKSPACE}}, main namespace
9203 title=[[Parser Test]]
9212 Magic Word: {{TALKSPACEE}}
9214 title=[[User:Ævar Arnfjörð Bjarmason]]
9223 Magic Word: {{SUBJECTSPACE}}
9225 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9234 Magic Word: {{SUBJECTSPACE}}, same namespace
9236 title=[[User:Ævar Arnfjörð Bjarmason]]
9245 Magic Word: {{SUBJECTSPACE}}, main namespace
9247 title=[[Parser Test]]
9255 Magic Word: {{SUBJECTSPACEE}}
9257 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9266 Magic Word: {{NAMESPACE}}
9268 title=[[User:Ævar Arnfjörð Bjarmason]]
9277 Magic Word: {{NAMESPACEE}}
9279 title=[[User:Ævar Arnfjörð Bjarmason]]
9288 Magic Word: {{NAMESPACENUMBER}}
9290 title=[[User:Ævar Arnfjörð Bjarmason]]
9299 Magic Word: {{SUBPAGENAME}}
9301 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9310 Magic Word: {{SUBPAGENAMEE}}
9312 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9321 Magic Word: {{ROOTPAGENAME}}
9323 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9327 <p>Ævar Arnfjörð Bjarmason
9332 Magic Word: {{ROOTPAGENAMEE}}
9334 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9338 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9343 Magic Word: {{BASEPAGENAME}}
9345 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9349 <p>Ævar Arnfjörð Bjarmason
9354 Magic Word: {{BASEPAGENAMEE}}
9356 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9360 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9365 Magic Word: {{TALKPAGENAME}}
9367 title=[[User:Ævar Arnfjörð Bjarmason]]
9371 <p>User talk:Ævar Arnfjörð Bjarmason
9376 Magic Word: {{TALKPAGENAMEE}}
9378 title=[[User:Ævar Arnfjörð Bjarmason]]
9382 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9387 Magic Word: {{SUBJECTPAGENAME}}
9389 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9393 <p>User:Ævar Arnfjörð Bjarmason
9398 Magic Word: {{SUBJECTPAGENAMEE}}
9400 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9402 {{SUBJECTPAGENAMEE}}
9404 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9409 Magic Word: {{NUMBEROFFILES}}
9418 Magic Word: {{PAGENAME}}
9420 title=[[User:Ævar Arnfjörð Bjarmason]]
9424 <p>Ævar Arnfjörð Bjarmason
9429 Magic Word: {{PAGENAME}} with metacharacters
9431 title=[['foo & bar = baz']]
9435 <p><i>'foo & bar = baz'</i>
9438 <p><i>'foo & bar = baz'</i></p>
9442 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9444 title=[[*RFC 1234 http://example.com/]]
9448 <p>*RFC 1234 http://example.com/
9451 <p>*RFC 1234 http://example.com/</p>
9455 Magic Word: {{PAGENAMEE}}
9457 title=[[User:Ævar Arnfjörð Bjarmason]]
9461 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9466 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9468 title=[[*RFC 1234 http://example.com/]]
9472 <p>*RFC_1234_http://example.com/
9475 <p>*RFC_1234_http://example.com/</p>
9479 Magic Word: {{REVISIONID}}
9488 Magic Word: {{SCRIPTPATH}}
9497 Magic Word: {{STYLEPATH}}
9506 Magic Word: {{SERVER}}
9510 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9515 Magic Word: {{SERVERNAME}}
9524 Magic Word: {{SITENAME}}
9533 Case-sensitive magic words, when cased differently, should just be template transclusions
9540 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9541 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9542 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9543 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9548 Case-insensitive magic words should still work with weird casing.
9558 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9562 # From plwiki:PLOS_ONE
9564 Parsoid: Page property magic word with magic word contents
9566 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9568 <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>"}]]}'/>
9572 Parsoid: Template-generated DISPLAYTITLE
9574 {{{{echo|DISPLAYTITLE}}:Foo}}
9576 <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}}]}'/>
9580 Namespace 1 {{ns:1}}
9589 Namespace 1 {{ns:01}}
9598 Namespace 0 {{ns:0}} (bug 4783)
9606 Namespace 0 {{ns:00}} (bug 4783)
9614 Namespace -1 {{ns:-1}}
9623 Namespace User {{ns:User}}
9632 Namespace User talk {{ns:User_talk}}
9641 Namespace User talk {{ns:uSeR tAlK}}
9650 Namespace File {{ns:File}}
9659 Namespace File {{ns:Image}}
9668 Namespace (lang=de) Benutzer {{ns:User}}
9679 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9685 <p>Benutzer Diskussion
9693 {{urlencode:hi world?!}}
9694 {{urlencode:hi world?!|WIKI}}
9695 {{urlencode:hi world?!|PATH}}
9696 {{urlencode:hi world?!|QUERY}}
9706 Magic Word: prioritize type info over data-parsoid
9710 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9716 Magic Word: serialize on separate line (parsoid)
9718 parsoid=wt2wt,html2wt
9724 foo<meta property="mw:PageProp/notoc"/>bar
9728 Magic Word: rt non-english wikis
9735 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9739 __proto__ is treated as normal wikitext (T105997)
9751 Magic links: internal link to RFC (bug 479)
9755 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9760 Magic links: RFC (bug 479)
9764 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9769 Magic links: RFC (bug 65278)
9771 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9773 <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.
9778 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9780 RFC      822
9784 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9791 Magic links: ISBN (bug 1937)
9795 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9800 Magic links: ISBN (bug 65278)
9802 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9804 <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.
9807 <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>
9811 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9813 ISBN      978 0 316 09811 3
9819 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9828 Magic links: PMID incorrectly converts space to underscore
9832 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9837 Magic links: PMID (bug 65278)
9839 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9841 <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.
9846 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9848 PMID      1234
9852 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9863 Nonexistent template
9865 {{thistemplatedoesnotexist}}
9867 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9872 Template with invalid target containing tags
9874 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9876 <p>{{a<b>b</b>|foo|a=b|a = b}}
9881 Template with invalid target containing unclosed tag
9883 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9885 <p>{{a<b>|foo|a=b|a = b}}</b>
9890 Template with invalid target containing wikilink
9894 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9897 <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>
9901 Template with just whitespace in it, bug #68421
9905 <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>
9911 This is a test template
9919 <p>This is a test template
9924 Template with explicit namespace
9928 <p>This is a test template
9936 This is a test template with parameter {{{param}}}
9942 {{paramtest|param=foo}}
9944 <p>This is a test template with parameter foo
9949 Template:paramtestnum
9955 Template unnamed parameter
9957 {{paramtestnum|Main Page|the main page}}
9959 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9964 Template:templatesimple
9970 Template:templateredirect
9972 #redirect [[Template:templatesimple]]
9976 Template:templateasargtestnum
9982 Template:templateasargtest
9984 {{template{{{templ}}}}}
9988 Template:templateasargtest2
9994 Template with template name as unnamed argument
9996 {{templateasargtestnum|templatesimple}}
10003 Template with template name as argument
10005 {{templateasargtest|templ=simple}}
10012 Template with template name as argument (2)
10014 {{templateasargtest2|templ=templatesimple}}
10021 Template:templateasargtestdefault
10023 {{{{{templ|templatesimple}}}}}
10033 Template with default value
10035 {{templateasargtestdefault}}
10042 Template with default value (value set)
10044 {{templateasargtestdefault|templ=templa}}
10053 {{templateredirect}}
10058 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10062 Template with argument in separate line
10064 {{ templateasargtest |
10072 Template with complex template as argument
10075 param ={{ templateasargtest |
10076 templ = simple }}}}
10078 <p>This is a test template with parameter (test)
10083 Template with thumb image (with link in description)
10085 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10087 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>
10090 <p>This is a test template with parameter</p>
10091 <div class="thumb tright">
10092 <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>
10093 <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>
10097 <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>
10101 Template:complextemplate
10103 {{{1}}} {{paramtest|
10104 param ={{{param}}}}}
10108 Template with complex arguments
10111 param ={{ templateasargtest |
10112 templ = simple }}|[[Template:complextemplate|link]]}}
10114 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10119 BUG 553: link with two variables in a piped link
10122 |[[{{{1}}}|{{{2}}}]]
10127 <td>[[{{{1}}}|{{{2}}}]]
10133 Magic variable as template parameter
10135 {{paramtest|param={{SITENAME}}}}
10137 <p>This is a test template with parameter MediaWiki
10144 [[{{{param}}}|link]]
10148 Template parameter as link source
10150 {{linktest|param=Main Page}}
10152 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10157 Template:paramtest2
10159 including another template, {{paramtest|param={{{arg}}}}}
10163 Template passing argument to another template
10165 {{paramtest2|arg='hmm'}}
10167 <p>including another template, This is a test template with parameter 'hmm'
10178 Template as link source
10182 [[{{linktest2}}|Main Page]]
10184 [[{{linktest2}}]]Page
10186 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10187 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10188 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10206 Template infinite loop
10210 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10215 Template from main namespace
10234 BUG 529: Template with table, not included at beginning of line
10253 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10273 BUG 41: Template parameters shown as broken links
10282 Template with targets containing wikilinks
10286 {{[[{{echo|foo}}]]}}
10288 {{{{echo|[[foo}}]]}}
10290 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10291 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10303 Templates: Double quotes as template target
10310 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10315 Template:MSGNW test
10317 ''None'' of '''this''' should be
10319 but rather passed unmodified
10327 # hmm, fix this or just deprecate msgnw and document its behavior?
10331 {{msgnw:MSGNW test}}
10333 <p>''None'' of '''this''' should be
10335  but rather passed unmodified
10336 {{test}}
10340 <!-- comment -->
10347 {{int:youhavenewmessages|lots of money|not!}}
10349 <p>You have lots of money (not!).
10356 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10360 <includeonly> and <noinclude> being included
10371 <onlyinclude>Foo</onlyinclude>bar
10375 <onlyinclude> being included
10387 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10391 <onlyinclude> and <includeonly> being included
10400 <includeonly> and <noinclude> on a page
10402 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10409 Un-closed <noinclude>
10416 <onlyinclude> on a page
10418 <onlyinclude>Foo</onlyinclude>bar
10425 Un-closed <onlyinclude>
10432 Self-closed noinclude, includeonly, onlyinclude tags
10443 Unbalanced includeonly and noinclude tags
10447 |b</noinclude></noinclude>
10448 |c</noinclude></includeonly>
10449 |d</includeonly></includeonly>
10458 <td>c</includeonly>
10460 <td>d</includeonly></includeonly>
10466 Template:Includeonly section
10469 ==Includeonly section==
10475 Bug 6563: Edit link generation for section shown by <includeonly>
10477 {{includeonly section}}
10479 <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>
10480 <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>
10484 # Uses same input as the contents of [[Template:Includeonly section]]
10486 Bug 6563: Section extraction for section shown by <includeonly>
10491 ==Includeonly section==
10499 Bug 6563: Edit link generation for section suppressed by <includeonly>
10502 ==Includeonly section==
10506 <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>
10511 Bug 6563: Section extraction for section suppressed by <includeonly>
10516 ==Includeonly section==
10524 Un-closed <includeonly>
10531 Includes and comments at SOL
10533 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10537 </noinclude>* stuff
10540 <includeonly>can have stuff</includeonly>=== here ===
10543 <h2><span class="mw-headline" id="hu">hu</span></h2>
10546 <ul><li> stuff</li>
10547 <li> here</li></ul>
10548 <h3><span class="mw-headline" id="here">here</span></h3>
10551 <!-- 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>
10553 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10555 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10556 <li> here</li></ul>
10558 <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>
10562 # TODO: test with DOM fragment reuse!
10564 Parsoid: DOM fragment reuse
10566 parsoid=wt2wt,wt2html
10568 a{{echo|b<table></table>c}}d
10580 <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>
10582 <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">
10583 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10584 </span><p about="#mwt2">cd</p>
10586 <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">
10588 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10590 </span><p about="#mwt3">b</p>
10594 Parsoid: Merge double tds (bug 50603)
10599 |{{echo|{{!}} foo}}
10603 <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>
10608 Parsoid: Merge double tds in nested transclusion content (bug 50603)
10614 |{{echo|{{!}} foo}}
10618 <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}}]}'>
10620 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10626 ### <includeonly> and <noinclude> in attributes
10629 0. includeonly around the entire attribute
10631 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10633 <p><span id="v2">bar</span>
10638 1. includeonly in html attr key
10640 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10642 <p><span id="foo">bar</span>
10647 2. includeonly in html attr value
10649 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10650 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10652 <p><span id="v1">bar</span>
10653 <span id="v1">bar</span>
10658 3. includeonly in part of an attr value
10660 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10662 <p><span style="color:red;">bar</span>
10667 4. includeonly in table attributes
10691 ### Token Stream Patcher tests
10693 ### These tests won't always pass wt2wt and other modes because
10694 ### on serialization, the table will be output on a new line.
10695 ### For now, we are blacklisting them, and using this to test selser.
10699 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10701 parsoid=wt2html,wt2wt
10703 {{echo|}}{| width = '100%'
10707 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10708 <tbody><tr><td>foo</td></tr>
10713 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10715 parsoid=wt2html,wt2wt
10717 <includeonly>a</includeonly>{| {{{b}}}
10721 <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}}}":""}}'>
10722 <tbody><tr><td>c</td></tr>
10728 ### Testing parsing of templates where a template arg
10729 ### has the same name as the template itself.
10735 {{{quote|{{{1}}}}}}
10739 Templates: Template Name/Arg clash: 1. Use of positional param
10748 Templates: Template Name/Arg clash: 2. Use of named param
10750 {{quote|quote=foo}}
10757 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10766 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10770 Templates: 1. Simple use
10779 Templates: 2. Inside a block tag
10781 <div>{{echo|Foo}}</div>
10782 <blockquote>{{echo|Foo}}</blockquote>
10785 <blockquote>Foo</blockquote>
10795 Templates: P-wrapping: 1a. Templates on consecutive lines
10806 Templates: P-wrapping: 1b. Templates on consecutive lines
10820 Templates: P-wrapping: 1c. Templates on consecutive lines
10823 {{echo|bar}} <div>baz</div>
10836 Templates: P-wrapping: 1d. Template preceded by comment-only line
10845 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10849 Templates: Inline Text: 1. Multiple template uses
10851 {{echo|Foo}}bar{{echo|baz}}
10858 Templates: Inline Text: 2. Back-to-back template uses
10860 {{echo|Foo}}{{echo|bar}}
10867 Templates: Block Tags: 1. Multiple template uses
10869 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10871 <div>Foo</div><div>bar</div><div>baz</div>
10876 Templates: Block Tags: 2. Back-to-back template uses
10878 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10880 <div>Foo</div><div>bar</div>
10884 # This is an edge case relating to paragraph wrapping.
10886 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10891 <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
10896 Templates: Links: 1. Simple example
10898 {{echo|[[Foo|bar]]}}
10900 <p><a href="/wiki/Foo" title="Foo">bar</a>
10905 Templates: Links: 2. Generation of link href
10907 [[{{echo|Foo}}|bar]]
10909 <p><a href="/wiki/Foo" title="Foo">bar</a>
10914 Templates: Links: 3. Generation of part of a link href
10916 [[Fo{{echo|o}}|bar]]
10918 [[Foo{{echo|bar}}]]
10920 [[Foo{{echo|bar}}baz]]
10922 [[Foo{{echo|bar}}|bar]]
10924 [[:Foo{{echo|bar}}]]
10926 [[:Foo{{echo|bar}}|bar]]
10928 <p><a href="/wiki/Foo" title="Foo">bar</a>
10929 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10930 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10931 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10932 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10933 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10938 Templates: Links: 4. Multiple templates generating link href
10940 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10942 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10947 Templates: Links: 5. Generation of link text
10949 [[Foo|{{echo|bar}}]]
10951 <p><a href="/wiki/Foo" title="Foo">bar</a>
10956 Templates: Links: 5. Nested templates (only outermost template should be marked)
10958 {{echo|[[{{echo|Foo}}|bar]]}}
10960 <p><a href="/wiki/Foo" title="Foo">bar</a>
10965 Templates: HTML Tag: 1. Generation of HTML attr. key
10967 <div {{echo|style}}="color:red;">foo</div>
10969 <div style="color:red;">foo</div>
10974 Templates: HTML Tag: 2. Generation of HTML attr. value
10976 <div style={{echo|'color:red;'}}>foo</div>
10978 <div style="color:red;">foo</div>
10983 Templates: HTML Tag: 3. Generation of HTML attr key and value
10985 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10987 <div style="color:red;">foo</div>
10992 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10994 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10996 <div title="This is a long title with just one piece templated">foo</div>
11001 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11003 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11005 <div title="This is a long title with just one piece templated">foo</div>
11010 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11012 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11014 <div title="This is a long title with just one piece templated">foo</div>
11018 # SSS FIXME: While it is great we added support for all this,
11019 # do we want to make this part of the spec? Maybe we want to
11020 # deprecate this kind of usage in the future?
11022 Templates: HTML Tag: 7. Generation of partial attribute key string
11024 <div st{{echo|yle}}="color:red;">foo</div>
11026 <div style="color:red;">foo</div>
11031 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11033 <div {{echo|1=id="v1"}}>bar</div>
11035 <div id="v1">bar</div>
11040 Templates: HTML Tag: 9. Multiple template-generated attributes
11042 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11044 <div id="v1" title="foo">bar</div>
11049 Templates: Support for templates generating attributes and content
11051 {| {{mixed_attr_content_template}}
11056 <table style="color:red;" title="T48811">
11066 <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|}"]}'>
11075 1. Entities and nowikis inside templated attributes should be handled correctly
11077 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11079 <div style="background:#f9f9f9;">foo</div>
11082 <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>
11086 2. Entities and nowikis inside templated attributes should be handled correctly
11089 |{{table_attribs_3}}
11094 <td style="background:#f9f9f9;">Foo
11099 <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>
11104 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11107 |{{table_attribs_3}}
11112 <td style="background:#f9f9f9;">Foo
11116 <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}}]}'>
11117 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11123 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11126 | {{table_attribs_6}} hi
11131 <td style="background: red;"> hi
11136 <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>
11141 Templates: HTML Tables: 1. Generating start of a HTML table
11143 {{echo|<table><tr><td>foo</td>}}</tr></table>
11145 <table><tr><td>foo</td></tr></table>
11150 Templates: HTML Tables: 2a. Generating middle of a HTML table
11152 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11154 <table><tr><td>foo</td></tr></table>
11159 Templates: HTML Tables: 2b. Generating middle of a HTML table
11161 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11163 <table><tr><td>foo</td></tr></table>
11168 Templates: HTML Tables: 3. Generating end of a HTML table
11170 <table><tr>{{echo|<td>foo</td></tr></table>}}
11172 <table><tr><td>foo</td></tr></table>
11177 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11179 {{echo|<table>}}<tr><td>foo</td></tr></table>
11181 <table><tr><td>foo</td></tr></table>
11186 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11188 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11190 <table><tr><td>foo</td></tr></table>
11195 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11197 <table><tr>{{echo|<td>}}foo</td></tr></table>
11199 <table><tr><td>foo</td></tr></table>
11204 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11206 <table><tr><td>foo{{echo|</td>}}</tr></table>
11208 <table><tr><td>foo</td></tr></table>
11213 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11215 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11217 <table><tr><td>foo</td></tr></table>
11222 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11224 <table><tr><td>foo</td></tr>{{echo|</table>}}
11226 <table><tr><td>foo</td></tr></table>
11231 Templates: HTML Tables: 5. Proper fostering of categories from inside
11233 parsoid=wt2html,wt2wt
11235 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11236 <!--Two categories (Bug 50330)-->
11237 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11239 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11240 <!--Two categories (Bug 50330)-->
11241 <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>
11245 Templates: Wiki Tables: 1a. Fostering of entire template content
11253 <tr><td></td></tr></table>
11265 Templates: Wiki Tables: 1b. Fostering of entire template content
11278 <tr><td></td></tr></table>
11292 Templates: Wiki Tables: 2. Fostering of partial template content
11302 <tr><td></td></tr></table>
11315 Templates: Wiki Tables: 3. td-content via multiple templates
11318 {{echo|{{pipe}}a}}{{echo|b}}
11329 Templates: Wiki Tables: 4. Templated tags, no content
11335 <tr><td></td></tr></table>
11340 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11354 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11367 ## This test case is very specific to Parsoid's internals
11368 ## and is hence only tested for Parsoid's code. Parsoid uses
11369 ## a <meta> marker tag for <ref> tags and they are expanded
11370 ## much later. We are verifying that this <meta> tag usage
11371 ## doesn't prevent foster parenting.
11373 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11375 {{PartialTable}}<ref>foo</ref>
11380 <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">
11384 <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>
11388 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11398 <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{{!}}}"]}'>
11399 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11403 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11408 Templates: Lists: Multi-line list-items via templates
11410 *{{echo|a {{nonexistent|
11412 *{{echo|b {{nonexistent|
11415 <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>
11416 <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>
11421 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11423 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11425 <p><i>ab</i>c<i>d</i>e
11430 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11431 (PHP parser generates misnested html)
11433 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11435 <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>
11439 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11440 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11442 parsoid=wt2html,wt2wt
11444 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11446 <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>
11447 <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>
11448 <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>
11452 Templates: Ugly nesting: 4. Divs opened/closed across templates
11454 a<div>b{{echo|c</div>d}}e
11465 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11471 |{{echo|foo</table>}}
11475 <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|}"]}'>
11479 <td>foo</td></tr></tbody></table><span about="#mwt1">
11480 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11485 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11495 <td>1. {{echo|foo </table>}}</td>
11497 <td>2. {{echo|baz </table>}}</td>
11510 <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>"]}'>
11515 <td>1. foo </td></tr></tbody></table></td>
11517 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11518 </span><span about="#mwt2">
11519 </span><span about="#mwt2">
11520 </span><span about="#mwt2">abc</span><span about="#mwt2">
11521 </span><span about="#mwt2">
11522 </span><span about="#mwt2">
11523 </span><span about="#mwt2">
11524 </span><span about="#mwt2">
11525 </span><span about="#mwt2">
11526 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11527 </span><span about="#mwt2">
11532 Templates: Ugly templates: 3. newline-only template parameter
11541 # This looks like a bug: a single newline triggers p/br for some reason.
11543 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11552 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11553 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11555 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11561 <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
11562 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11566 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11567 # that are "identical" and generate nesting cycles in the algorithm
11569 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11571 {{echo|<table><tr><td><table>}}
11575 <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"}'>
11576 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11577 </table></td></tr></tbody></table>
11581 Parser Functions: 1. Simple example
11590 Parser Functions: 2. Nested use (only outermost should be marked up)
11599 ### Pre-save transform tests
11602 pre-save transform: subst:
11608 This is a test template
11612 pre-save transform: normal template
11622 pre-save transform: nonexistent template
11626 {{thistemplatedoesnotexist}}
11628 {{thistemplatedoesnotexist}}
11632 pre-save transform: subst magic variables
11641 # This is bug 89, which I fixed. -- wtm
11643 pre-save transform: subst: templates with parameters
11647 {{subst:paramtest|param="something else"}}
11649 This is a test template with parameter "something else"
11653 Template:nowikitest
11655 <nowiki>'''not wiki'''</nowiki>
11659 pre-save transform: nowiki in subst (bug 1188)
11663 {{subst:nowikitest}}
11665 <nowiki>'''not wiki'''</nowiki>
11669 Template:commenttest
11671 This template has <!-- a comment --> in it.
11675 pre-save transform: comment in subst (bug 1936)
11679 {{subst:commenttest}}
11681 This template has <!-- a comment --> in it.
11685 pre-save transform: unclosed tag
11689 <nowiki>'''not wiki'''
11691 <nowiki>'''not wiki'''
11695 pre-save transform: mixed tag case
11699 <NOwiki>'''not wiki'''</noWIKI>
11701 <NOwiki>'''not wiki'''</noWIKI>
11705 pre-save transform: unclosed comment in <nowiki>
11709 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11711 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11714 # Leading @ in this template definition works around a limitation
11715 # in parsoid's parserTests which otherwise strips the <span> from the
11716 # result (confusing it for a template wrapper)
11720 @<span onmouseover="alert('crap')">Oh no</span>
11724 (confirming safety of fix for subst bug 1936)
11726 {{Template:dangerous}}
11728 <p>@<span>Oh no</span>
11733 pre-save transform: comment containing gallery (bug 5024)
11737 <!-- <gallery>data</gallery> -->
11739 <!-- <gallery>data</gallery> -->
11743 pre-save transform: comment containing extension
11747 <!-- <tag>data</tag> -->
11749 <!-- <tag>data</tag> -->
11753 pre-save transform: comment containing nowiki
11757 <!-- <nowiki>data</nowiki> -->
11759 <!-- <nowiki>data</nowiki> -->
11763 pre-save transform: <noinclude> in subst (bug 3298)
11773 pre-save transform: <onlyinclude> in subst (bug 3298)
11777 {{subst:Includes2}}
11785 {{<includeonly>subst:</includeonly>Includes}}
11789 Template:SafeSubstTest
11791 {{<includeonly>safesubst:</includeonly>Includes}}
11795 bug 22297: safesubst: works during PST
11799 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11805 bug 22297: safesubst: works during normal parse
11814 subst: does not work during normal parse
11818 <p>{{subst:Includes}}
11823 pre-save transform: context links ("pipe trick")
11827 [[Article (context)|]]
11830 [[Bar:Article (context)|]]
11831 [[:Bar:Article (context)|]]
11833 [[|Article (context)]]
11837 [[Article (context)|Article]]
11838 [[Bar:Article|Article]]
11839 [[:Bar:Article|Article]]
11840 [[Bar:Article (context)|Article]]
11841 [[:Bar:Article (context)|Article]]
11843 [[Article (context)]]
11844 [[Bar:X (Y) Z|X (Y) Z]]
11845 [[:Bar:X (Y) Z|X (Y) Z]]
11849 pre-save transform: context links ("pipe trick") with interwiki prefix
11853 [[interwiki:Article|]]
11854 [[:interwiki:Article|]]
11855 [[interwiki:Bar:Article|]]
11856 [[:interwiki:Bar:Article|]]
11858 [[interwiki:Article|Article]]
11859 [[:interwiki:Article|Article]]
11860 [[interwiki:Bar:Article|Bar:Article]]
11861 [[:interwiki:Bar:Article|Bar:Article]]
11865 pre-save transform: context links ("pipe trick") with parens in title
11867 pst title=[[Somearticle (context)]]
11871 [[Article (context)|Article]]
11875 pre-save transform: context links ("pipe trick") with comma in title
11877 pst title=[[Someplace, Somewhere]]
11880 [[Otherplace, Elsewhere|]]
11881 [[Otherplace, Elsewhere, Anywhere|]]
11883 [[Otherplace, Somewhere|Otherplace]]
11884 [[Otherplace, Elsewhere|Otherplace]]
11885 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11889 pre-save transform: context links ("pipe trick") with parens and comma
11891 pst title=[[Someplace (IGNORED), Somewhere]]
11894 [[Otherplace (place), Elsewhere|]]
11896 [[Otherplace, Somewhere|Otherplace]]
11897 [[Otherplace (place), Elsewhere|Otherplace]]
11901 pre-save transform: context links ("pipe trick") with comma and parens
11903 pst title=[[Who, me? (context)]]
11906 [[Me, Myself, and I (1937 song)|]]
11908 [[Yes, you. (context)|Yes, you.]]
11909 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11913 pre-save transform: context links ("pipe trick") with namespace
11915 pst title=[[Ns:Somearticle]]
11919 [[Ns:Article|Article]]
11923 pre-save transform: context links ("pipe trick") with namespace and parens
11925 pst title=[[Ns:Somearticle (context)]]
11929 [[Ns:Article (context)|Article]]
11933 pre-save transform: context links ("pipe trick") with namespace and comma
11935 pst title=[[Ns:Somearticle, Context, Whatever]]
11939 [[Ns:Article, Context, Whatever|Article]]
11943 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11945 pst title=[[Ns:Somearticle, Context (context)]]
11949 [[Ns:Article (context)|Article]]
11953 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11955 pst title=[[Ns:Somearticle (IGNORED), Context]]
11959 [[Ns:Article, Context|Article]]
11963 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11967 [[Article(context)|]]
11968 [[Bar:Article(context)|]]
11969 [[:Bar:Article(context)|]]
11970 [[|Article(context)]]
11974 [[Article(context)|Article]]
11975 [[Bar:Article(context)|Article]]
11976 [[:Bar:Article(context)|Article]]
11977 [[Article(context)]]
11978 [[Bar:X(Y)Z|X(Y)Z]]
11979 [[:Bar:X(Y)Z|X(Y)Z]]
11983 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11987 [[Article (context)|]]
11988 [[Bar:Article (context)|]]
11989 [[:Bar:Article (context)|]]
11990 [[|Article (context)]]
11994 [[Article (context)|Article]]
11995 [[Bar:Article (context)|Article]]
11996 [[:Bar:Article (context)|Article]]
11997 [[Article (context)]]
11998 [[Bar:X (Y) Z|X (Y) Z]]
11999 [[:Bar:X (Y) Z|X (Y) Z]]
12003 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12007 [[Article(context)|]]
12008 [[Bar:Article(context)|]]
12009 [[:Bar:Article(context)|]]
12010 [[|Article(context)]]
12014 [[Article(context)|Article]]
12015 [[Bar:Article(context)|Article]]
12016 [[:Bar:Article(context)|Article]]
12017 [[Article(context)]]
12018 [[Bar:X(Y)Z|X(Y)Z]]
12019 [[:Bar:X(Y)Z|X(Y)Z]]
12023 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12027 [[Article (context), context|]]
12028 [[Article (context),context|]]
12029 [[Bar:Article (context), context|]]
12030 [[Bar:Article (context),context|]]
12031 [[:Bar:Article (context), context|]]
12032 [[:Bar:Article (context),context|]]
12034 [[Article (context), context|Article]]
12035 [[Article (context),context|Article]]
12036 [[Bar:Article (context), context|Article]]
12037 [[Bar:Article (context),context|Article]]
12038 [[:Bar:Article (context), context|Article]]
12039 [[:Bar:Article (context),context|Article]]
12043 pre-save transform: trim trailing empty lines
12047 Empty lines are trimmed
12053 Empty lines are trimmed
12057 pre-save transform: Signature expansion
12062 * <noinclude>~~~</noinclude>
12063 * <includeonly>~~~</includeonly>
12064 * <onlyinclude>~~~</onlyinclude>
12066 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12067 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12068 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12069 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12074 pre-save transform: Signature expansion in nowiki tags (bug 93)
12080 <nowiki>~~~~</nowiki>
12082 <includeonly><nowiki>~~~~</nowiki></includeonly>
12084 <noinclude><nowiki>~~~~</nowiki></noinclude>
12086 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12088 {{subst:Foo}} shall be converted to FOO
12090 As well as inside noinclude/onlyinclude
12091 <noinclude>{{subst:Foo}}</noinclude>
12092 <onlyinclude>{{subst:Foo}}</onlyinclude>
12094 But not inside includeonly
12095 <includeonly>{{subst:Foo}}</includeonly>
12099 <nowiki>~~~~</nowiki>
12101 <includeonly><nowiki>~~~~</nowiki></includeonly>
12103 <noinclude><nowiki>~~~~</nowiki></noinclude>
12105 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12107 FOO shall be converted to FOO
12109 As well as inside noinclude/onlyinclude
12110 <noinclude>FOO</noinclude>
12111 <onlyinclude>FOO</onlyinclude>
12113 But not inside includeonly
12114 <includeonly>{{subst:Foo}}</includeonly>
12118 Parsoid: Recognize nowiki with trailing space in tags
12122 <nowiki ><div>[[foo]]</nowiki >
12130 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12137 Parsoid: Recognize nowiki with odd capitalization
12141 <noWikI ><div>[[foo]]</Nowiki >
12143 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12148 Parsoid: Escape nowiki with trailing space in tags
12152 <p><nowiki > foo </nowiki ></p>
12153 <p>a<nowiki />b</p>
12154 <p>c<nowiki/ >d</p>
12156 <nowiki > foo </nowiki >
12164 Parsoid: Escape weird noWikI capitalizations
12168 <p><noWikI > foo </NoWikI ></p>
12170 <noWikI > foo </NoWikI >
12174 ### Message transform tests
12177 message transform: magic variables
12187 message transform: should not transform wiki markup
12197 message transform: <noinclude> in transcluded template (bug 4926)
12207 message transform: <onlyinclude> in transcluded template (bug 4926)
12217 {{#special:}} page name, known
12221 {{#special:Recentchanges}}
12223 Special:RecentChanges
12227 {{#special:}} page name with subpage, known
12231 {{#special:Recentchanges/param}}
12233 Special:RecentChanges/param
12237 {{#special:}} page name, unknown
12241 {{#special:foobar nonexistent}}
12243 Special:Foobar nonexistent
12247 {{#speciale:}} page name, known
12251 {{#speciale:Recentchanges}}
12253 Special:RecentChanges
12257 {{#speciale:}} page name with subpage, known
12261 {{#speciale:Recentchanges/param}}
12263 Special:RecentChanges/param
12267 {{#speciale:}} page name, unknown
12271 {{#speciale:foobar nonexistent}}
12273 Special:Foobar_nonexistent
12279 ### For Parsoid-specific tests, see
12280 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12285 parsoid=wt2html,wt2wt,html2html
12287 [[Image:foobar.jpg]]
12289 <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>
12292 <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>
12296 Simple image (using File: namespace, now canonical)
12298 [[File:Foobar.jpg]]
12300 <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>
12303 <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>
12307 Right-aligned image
12309 [[File:Foobar.jpg|right]]
12311 <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>
12314 <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>
12320 [[File:Foobar.jpg|right|Caption text]]
12322 <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>
12325 <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>
12329 Image with caption, bug 53312 #1
12331 [[File:Foobar.jpg|right|Caption page stuff]]
12333 <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>
12336 <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>
12340 Image with caption, bug 53312 #2
12342 [[File:Foobar.jpg|right|Caption page=]]
12344 <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>
12347 <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>
12351 Image with caption, bug 53312 #3
12353 [[File:Foobar.jpg|right|Caption page=stuff]]
12355 <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>
12358 <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>
12362 Allow empty links in image captions (Bug 60753)
12366 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12371 <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>
12374 <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>
12376 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12377 </figcaption></figure>
12381 Titles in unlinked images (T23454)
12383 [[File:Foobar.jpg|link=|stuff]]
12385 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12390 Link with empty target
12399 Image with link trail
12401 Linktrails should not work for images: [[File:Foobar.jpg]]s
12403 <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
12406 <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>
12410 Image with empty attribute
12412 parsoid=wt2html,wt2wt,html2html
12414 [[File:Foobar.jpg|right||Caption text]]
12416 <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>
12419 <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>
12423 1. Block image with individual attributes from templates
12425 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12427 <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>
12430 <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>
12434 2. Block Image with individual attributes from templates
12436 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12438 <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>
12441 <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>
12445 3. Inline image with individual attributes from templates
12447 [[File:Foobar.jpg|{{echo|50px}}]]
12449 <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>
12452 <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>
12455 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12456 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12458 Image with multiple attributes from the same template
12460 [[File:Foobar.jpg|{{image_attribs}}]]
12462 <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>
12465 <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>
12469 Image with link tails
12473 123[[File:Foobar.jpg]]456
12474 123[[File:Foobar.jpg|right]]456
12475 123[[File:Foobar.jpg|thumb]]456
12477 <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
12479 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
12480 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
12483 <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>
12485 <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>
12487 <div class="thumb tright">
12488 <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>
12489 <div class="thumbcaption">
12490 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12496 <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>
12497 <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>
12498 <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>
12502 Image with multiple captions -- only last one is accepted
12504 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12506 <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>
12509 <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>
12513 Image with multiple widths -- use last
12515 [[File:Foobar.jpg|200px|300px|caption]]
12517 <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>
12520 <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>
12524 Image with multiple alignments -- use first (bug 48664)
12528 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12530 [[File:Foobar.jpg|middle|text-top|caption]]
12532 <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>
12533 <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>
12536 <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>
12537 <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>
12541 Image with width attribute at different positions
12543 [[File:Foobar.jpg|200px|right|Caption]]
12544 [[File:Foobar.jpg|right|200px|Caption]]
12545 [[File:Foobar.jpg|right|Caption|200px]]
12547 <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>
12548 <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>
12549 <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>
12552 <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>
12553 <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>
12554 <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>
12557 # a sad bit of backward-compatibility
12559 Image with size specified with pxpx (bug 13500, 51628)
12561 parsoid=wt2html,wt2wt,html2html
12563 [[File:Foobar.jpg|20pxpx]]
12564 [[File:Foobar.jpg|200x20pxpx]]
12566 <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>
12567 <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>
12570 <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>
12574 Image with link parameter, wiki target
12576 [[File:Foobar.jpg|link=Main Page]]
12578 <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>
12581 <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>
12584 # parsoid bug 49293 (part 1)
12586 Image with link parameter, URL target
12588 [[File:Foobar.jpg|link=http://example.com/]]
12590 <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>
12593 <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>
12596 # parsoid bug 49293 (part 2)
12598 Image with link parameter, protocol-less URL target
12600 [[File:Foobar.jpg|link=//example.com/]]
12602 <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>
12605 <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>
12609 Image with link parameter, wgExternalLinkTarget
12611 [[Image:foobar.jpg|link=http://example.com/]]
12613 wgExternalLinkTarget='foobar'
12615 <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>
12620 Image with link parameter, wgNoFollowLinks set to false
12622 [[Image:foobar.jpg|link=http://example.com/]]
12624 wgNoFollowLinks=false
12626 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12631 Image with link parameter, wgNoFollowDomainExceptions
12633 [[Image:foobar.jpg|link=http://example.com/]]
12635 wgNoFollowDomainExceptions='example.com'
12637 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12642 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12644 [[Image:foobar.jpg|link=http://example.com/|Title]]
12646 wgExternalLinkTarget='foobar'
12648 <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>
12653 Image with empty link parameter
12655 [[File:Foobar.jpg|link=]]
12657 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12660 <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>
12664 Image with link parameter (wiki target) and unnamed parameter
12666 [[File:Foobar.jpg|link=Main_Page|Title]]
12668 <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>
12671 <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>
12675 Image with link parameter (URL target) and unnamed parameter
12677 [[File:Foobar.jpg|link=http://example.com/|Title]]
12679 <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>
12682 <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>
12686 Thumbnail image with link parameter
12689 parsoid=wt2html,wt2wt,html2html
12691 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12693 <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>
12696 <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>
12700 Manually-specified thumbnail image
12704 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12706 <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>
12709 <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>
12713 Manually-specified thumbnail image with explicit link to wiki page
12716 parsoid=wt2html,wt2wt,html2html
12718 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12720 <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>
12723 <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>
12727 Manually-specified thumbnail image with explicit link to url
12730 parsoid=wt2html,wt2wt,html2html
12732 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12734 <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>
12737 <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>
12741 Manually-specified thumbnail image with explicit no link
12744 parsoid=wt2html,wt2wt,html2html
12746 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12748 <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>
12751 <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>
12755 Manually-specified thumbnail image with explicit link and alt text
12758 parsoid=wt2html,wt2wt,html2html
12760 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12762 <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>
12765 <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>
12769 Image with frame and link
12771 parsoid=wt2html,wt2wt,html2html
12773 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12775 <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>
12778 <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>
12782 Image with frame and link and explicit alt
12784 parsoid=wt2html,wt2wt,html2html
12786 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12788 <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>
12791 <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>
12795 Image with wiki markup in implicit alt
12797 parsoid=wt2html,wt2wt,html2html
12799 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12801 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12803 <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>
12804 </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>
12807 <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>
12808 <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>
12812 Alt image option should handle most kinds of wikitext without barfing
12814 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12816 <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>
12819 <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>
12822 ###################
12823 # Conflicting image format options.
12824 # First option specified should 'win'.
12825 # All three cases in each test should be identical.
12828 Image with 'frameless' first.
12830 parsoid=wt2html,wt2wt,html2html
12832 [[File:Foobar.jpg|frameless|caption]]
12834 [[File:Foobar.jpg|frameless|frame|caption]]
12836 [[File:Foobar.jpg|frameless|thumb|caption]]
12838 <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>
12839 </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>
12840 </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>
12843 <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>
12844 <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>
12845 <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>
12849 Image with 'frame' first.
12851 parsoid=wt2html,wt2wt,html2html
12853 [[File:Foobar.jpg|frame|caption]]
12854 [[File:Foobar.jpg|frame|frameless|caption]]
12855 [[File:Foobar.jpg|frame|thumb|caption]]
12857 <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>
12858 <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>
12859 <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>
12862 <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>
12863 <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>
12864 <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>
12868 Image with 'thumb' first.
12870 parsoid=wt2html,wt2wt,html2html
12872 [[File:Foobar.jpg|thumb|caption]]
12873 [[File:Foobar.jpg|thumb|frameless|caption]]
12874 [[File:Foobar.jpg|thumb|frame|caption]]
12876 <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>
12877 <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>
12878 <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>
12881 <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>
12882 <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>
12883 <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>
12886 ###################
12888 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12889 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12890 # Foobar has actual size of 1941x220
12891 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12892 # a scalable format.
12893 # 2. Framed images always ignore size options; always render at default size.
12894 # 3. "Unspecified format" and border are the only types which can be
12898 Image: "unspecified format" and border enlarge
12900 parsoid=wt2html,wt2wt,html2html
12902 [[File:Foobar.jpg|2000px]]
12904 [[File:Foobar.jpg|border|2000px]]
12906 <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>
12907 </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>
12910 <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>
12911 <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>
12915 Image: "unspecified format" and border reduce
12917 parsoid=wt2html,wt2wt,html2html
12919 [[File:Foobar.jpg|1000px]]
12921 [[File:Foobar.jpg|border|1000px]]
12923 <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>
12924 </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>
12927 <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>
12928 <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>
12932 Image: thumbs reduce
12934 parsoid=wt2html,wt2wt,html2html
12936 [[File:Foobar.jpg|thumb|50px]]
12938 <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>
12941 <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>
12945 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12947 parsoid=wt2html,wt2wt,html2html
12949 [[File:Foobar.jpg|thumb|2000px]]
12951 [[File:Foobar.svg|thumb|2000px]]
12953 <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>
12954 <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>
12957 <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>
12958 <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>
12962 Image: frameless can reduce in size
12964 parsoid=wt2html,wt2wt,html2html
12966 [[File:Foobar.jpg|frameless|50px]]
12968 <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>
12971 <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>
12975 Image: bitmap frameless can't be enlarged past original size, but vector can
12977 parsoid=wt2html,wt2wt,html2html
12979 [[File:Foobar.jpg|frameless|2000px]]
12981 [[File:Foobar.svg|frameless|2000px]]
12983 <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>
12984 </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>
12987 <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>
12988 <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>
12992 Image: framed images are always unscaled.
12994 parsoid=wt2html,wt2wt,html2html
12996 [[File:Foobar.jpg|frame]]
12998 [[File:Foobar.jpg|frame|50px]]
13000 [[File:Foobar.jpg|frame|50x50px]]
13002 [[File:Foobar.jpg|frame|2000px]]
13004 <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>
13005 <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>
13006 <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>
13007 <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>
13010 <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>
13011 <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>
13012 <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>
13013 <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>
13016 ###################
13019 Link to image page- image page normally doesn't exists, hence edit link
13020 Add test with existing image page
13021 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13025 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13030 bug 18784 Link to non-existent image page with caption should use caption as link text
13032 [[:Image:test|caption]]
13034 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13039 Frameless image caption with a free URL
13041 [[File:Foobar.jpg|http://example.com]]
13043 <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>
13046 <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>
13050 Thumbnail image caption with a free URL
13054 [[File:Foobar.jpg|thumb|http://example.com]]
13056 <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>
13059 <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>
13063 Thumbnail image caption with a free URL and explicit alt
13066 parsoid=wt2html,wt2wt,html2html
13068 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13070 <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>
13073 <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>
13077 SVG thumbnails with no language set
13080 [[File:Foobar.svg|thumb|caption]]
13082 <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>
13085 <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>
13089 SVG thumbnails with language de
13091 parsoid=wt2html,wt2wt,html2html
13093 [[File:Foobar.svg|thumb|caption|lang=de]]
13095 <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>
13098 <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>
13102 SVG thumbnails with invalid language code
13104 parsoid=wt2html,wt2wt,html2html
13106 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13108 <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>
13111 <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>
13115 BUG 1887: A ISBN with a thumbnail
13117 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13119 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
13122 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="Special:BookSources/1235467890" rel="mw:ExtLink">ISBN 1235467890</a></figcaption></figure>
13126 BUG 1887: A RFC with a thumbnail
13128 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13130 <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>
13133 <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>
13137 BUG 1887: A mailto link with a thumbnail
13139 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13141 <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>
13144 <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>
13147 # Pending resolution to bug 368
13149 BUG 648: Frameless image caption with a link
13151 [[File:Foobar.jpg|text with a [[link]] in it]]
13153 <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>
13156 <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>
13160 BUG 648: Frameless image caption with a link (suffix)
13162 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13164 <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>
13167 <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>
13171 BUG 648: Frameless image caption with an interwiki link
13173 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13175 <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>
13178 <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>
13182 BUG 648: Frameless image caption with a piped interwiki link
13184 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13186 <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>
13189 <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>
13193 Escape HTML special chars in image alt text
13195 [[File:Foobar.jpg|& < > "]]
13197 <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>
13200 <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>
13204 BUG 499: Alt text should have Ӓ, not &1234;
13206 [[File:Foobar.jpg|♀]]
13208 <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>
13211 <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>
13215 Broken image caption with link
13217 parsoid=wt2html,wt2wt,html2html
13219 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13221 <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.
13224 <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>
13228 Image caption containing another image
13230 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13232 <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>
13235 <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>
13239 Image: caption containing a newline
13241 [[File:Foobar.jpg|This
13244 <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>
13247 <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>
13251 Image: caption containing leading space
13252 (The leading space should not trigger nowiki escaping in wt2wt mode)
13254 [[File:Foobar.jpg|thumb| bar]]
13256 <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>
13259 <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>
13263 Image: caption containing a table
13265 parsoid=wt2html,wt2wt,html2html
13267 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13273 and some more text.]]
13275 <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>
13278 <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
13281 <tr><th>Foo </th><th>Bar</th></tr>
13284 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13288 Bug 3090: External links other than http: in image captions
13290 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13292 <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>
13295 <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>
13301 parsoid=wt2html,wt2wt,html2html
13303 [[Image:foobar.jpg|a|class=b]]
13305 <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>
13308 <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>
13312 Localized image handling (1).
13314 parsoid=wt2html,wt2wt,html2html
13317 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13319 <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>
13322 <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>
13326 Localized image handling (2).
13329 parsoid=wt2html,wt2wt,html2html
13332 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13334 <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>
13337 <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>
13341 "border", "frameless" and "class" attributes on an image.
13344 parsoid=wt2html,wt2wt,html2html
13346 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13348 <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>
13351 <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>
13354 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13356 Invalid image attributes (bug 62500)
13359 parsoid=wt2html,wt2wt,html2html
13361 [[File:Foobar.jpg|thumb|float|left|caption]]
13363 [[File:Foobar.jpg|thumb|righ|caption]]
13365 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13367 <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>
13368 <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>
13369 <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>
13372 <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>
13373 <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>
13374 <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>
13380 #REDIRECT [[File:Barfoo.jpg]]
13383 # FIXME: Parsoid should run this test -- but we'd need to teach the
13384 # mockAPI about the redirected Barfoo.jpg image.
13388 [[Image:Barfoo.jpg]]
13390 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13395 Missing image with uploads disabled
13399 [[File:Foobaz.jpg]]
13401 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13404 <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>
13407 # Parsoid-specific testing for images
13408 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13409 # Currently imperfect due to a flaw in the Parsoid testrunner
13411 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13415 Parsoid-specific image handling - simple image with size and middle alignment
13417 [[File:Foobar.jpg|middle|50px]]
13419 <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>
13423 Parsoid-specific image handling - simple image with size, middle alignment,
13424 non-standard namespace alias
13426 parsoid=wt2wt,wt2html,html2html
13428 [[Image:Foobar.jpg|middle|50px]]
13430 <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>
13434 Parsoid-specific image handling - simple image with size and middle alignment
13437 [[File:Foobar.jpg|50px|middle]]
13439 <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>
13443 Parsoid-specific image handling - simple image with size and middle alignment
13444 and non-standard namespace name
13446 parsoid=wt2html,wt2wt,html2html
13448 [[Image:Foobar.jpg|50px|middle]]
13450 <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>
13454 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13456 [[File:Foobar.jpg|500x10px|baseline|caption]]
13458 <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>
13462 Parsoid-specific image handling - simple image with border and size spec
13464 [[File:Foobar.jpg|50px|border|caption]]
13466 <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>
13470 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13472 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13474 <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>
13478 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13481 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13483 <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>
13487 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13489 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13491 <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>
13495 Parsoid-specific image handling - thumbnail with specific size, halign,
13496 valign, and caption (existing content)
13498 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13500 <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>
13504 Parsoid-specific image handling - framed image with specific size and caption
13507 parsoid=wt2html,wt2wt,html2html
13509 [[File:Foobar.jpg|frame|500x50px|caption]]
13511 <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>
13515 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13518 parsoid=wt2html,wt2wt,html2html
13520 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13522 <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>
13526 Parsoid-specific image handling - frameless image with specific size, border, and caption
13528 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13530 <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>
13534 Parsoid-specific image handling - simple image with a formatted caption
13536 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13538 <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>
13542 Parsoid-specific image handling - caption with a template in it
13544 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13546 <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>
13550 Parsoid-specific image handling - caption with unbalanced tags in it
13552 parsoid=wt2html,wt2wt,html2html
13555 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13559 <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>
13564 Parsoid-specific image handling - empty caption (1)
13566 parsoid=wt2html,wt2wt
13568 [[File:Foobar.jpg|thumb|]]
13570 <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>
13573 # empty captions don't get serialized unless we're in the "round trip" case
13575 Parsoid-specific image handling - empty caption (2)
13579 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13580 <a href="./File:Foobar.jpg">
13581 <img resource="./File:Foobar.jpg"
13582 src="//example.com/images/3/3a/Foobar.jpg"
13583 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13584 height="25" width="220"/>
13586 <figcaption></figcaption>
13589 [[File:Foobar.jpg|thumb]]
13593 Parsoid-specific image handling - whitespace caption
13595 [[File:Foobar.jpg|thumb| ]]
13597 <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>
13601 Parsoid-specific image handling - lang option
13604 [[File:Foobar.svg|lang=de|caption]]
13608 <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>
13617 Subpage test/subpage
13625 subpage title=[[Subpage test]]
13629 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13634 Subpage noslash link
13636 subpage title=[[Subpage test]]
13640 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13645 Subpage test/1/2/subpage
13651 Relative subpage noslash link
13653 parsoid=wt2wt,wt2html,html2html
13654 subpage title=[[Subpage test/1/2/3/4]]
13660 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13661 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13664 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13665 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13669 Parsoid: dot-slash prefixed wikilinks
13679 </p><p>[[././baz/]]
13684 </p><p>[[././baz/]]
13689 Render invalid page names as plain text (bug 51090)
13702 [[{{echo|./../foo}}|bar]]
13703 [[{{echo|foo/.}}|bar]]
13704 [[{{echo|foo/..}}|bar]]
13705 [[{{echo|foo~~~~bar}}]]
13706 [[{{echo|foo>bar}}]]
13707 [[{{echo|foo././bar}}]]
13708 [[{{echo|foo{bar}}]]
13709 [[{{echo|foo}bar}}]]
13710 [[{{echo|foo[bar}}]]
13711 [[{{echo|foo]bar}}]]
13712 [[{{echo|foo<bar}}]]
13714 <p>[[./../foo|bar]]
13724 </p><p>[[./../foo|bar]]
13737 <p>[[./../foo|bar]]
13748 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13749 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13750 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13751 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13752 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13753 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13754 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13755 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13756 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
13757 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
13758 [[<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>
13766 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13771 BUG 561: {{/Subpage}}
13773 subpage title=[[Page]]
13777 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13785 Category:MediaWiki User's Guide
13793 [[:Category:MediaWiki User's Guide]]
13795 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13804 [[Category:MediaWiki User's Guide]]
13806 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13810 PAGESINCATEGORY invalid title fatal (r33546 fix)
13812 {{PAGESINCATEGORY:<bogus>}}
13819 Category with different sort key
13823 [[Category:MediaWiki User's Guide|Foo]]
13825 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13829 Category with identical sort key
13833 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13835 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13839 Category with empty sort key
13844 [[Category:MediaWiki User's Guide|]]
13846 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13850 Category with empty sort key and parentheses
13855 [[Category:Foo (bar)|]]
13857 [[Category:Foo (bar)|Foo]]
13861 Category with link tail
13866 123[[Category:Foo]]456
13868 123[[Category:Foo]]456
13872 Category with template
13877 [[Category:{{echo|Foo}}]]
13879 [[Category:{{echo|Foo}}]]
13883 Category with template in sort key
13888 [[Category:Foo|{{echo|Bar}}]]
13890 [[Category:Foo|{{echo|Bar}}]]
13894 Category with template in sort key and title
13899 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13901 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13905 Category / paragraph interactions
13907 Foo [[Category:Baz]] Bar
13909 Foo [[Category:Baz]]
13917 [[Category:Baz]] Bar
13930 {{echo|[[Category:Baz]]}}
13944 ## The whitespace on the empty line is part of the test. Please do not delete
13946 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13948 parsoid=wt2html,wt2wt
13952 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
13954 {{echo|[[Category:Foo]] and so should this!}}
13956 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
13961 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
13963 <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>
13966 ## Parsoid will not try to wt2wt this while preserving newlines because
13967 ## it suppresses excess newlines within list items -- and we don't want to
13968 ## introduce a special case just for categories, which is, in reality somewhat
13969 ## odd behavior -- categories are unlikely to be used in list items like this
13970 ## in top-level pages and are only likely to show up in template-generated
13971 ## list items where this RT-ing is a non-issue.
13973 ## The whitespace on the empty line is part of the test. Please do not delete
13975 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
13981 [[Category:Foo]] and this should be part of the same list item
13984 {{echo|[[Category:Foo]] and this should be part of the same list item}}
13986 <ul><li>This and this should be part of the same list item</li>
13987 <li>So should this and this should be part of the same list item</li></ul>
13990 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
13991 <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>
13995 ## Newlines and categories that follow the last item of a list
13996 ## are treated differently because this (list followed by categories)
13997 ## is an extremely common pattern on wikis.
13999 3. Categories and newlines: newline suppression for last list item should RT properly
14012 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14014 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14015 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14019 4. Categories and newlines: newline suppression for last list item should RT properly
14027 <ul><li><ul><li><ul><li> b</li></ul></li></ul></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"}}'/>
14032 ## only wt2html for this to make sure the algo only applies to the rightmost path
14034 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14047 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14049 <ul><li> d</li></ul></li></ul>
14050 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14054 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14056 * a [[Category:Foo]]
14058 <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>
14061 # This test also demonstrates because of newline+category tunneling
14062 # through the list hander, template wrapping doesn't expand to the
14063 # containing list when the list item swallows the category.
14065 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14070 <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">
14071 </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>
14075 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14079 {{echo|[[Category:Foo]]
14083 <ul><li> a</li></ul>
14085 <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">
14086 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14087 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14091 Parsoid: Serialize link to category page with colon escape
14097 [[:Category:Foo|Bar]]
14100 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
14101 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
14105 # html2wt localizes the "Category" namespace.
14106 # XXX the <link> element needs an empty data-parsoid attribute, or
14107 # else the html2html test fails because spaces are inserted.
14109 Link prefix/suffixes aren't applied to category links
14111 parsoid=wt2html,wt2wt,html2html
14119 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14123 Parsoid: Serialize link to file page with colon escape
14129 [[:File:Foo.png|Bar]]
14132 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14133 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14138 Parsoid: Serialize a genuine category link without colon escape
14143 [[Category:Foo|Bar]]
14145 <link rel="mw:PageProp/Category" href="Category:Foo">
14146 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
14150 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14154 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14156 [[Category:Toxine bactérienne]]
14160 Parsoid: Defaultsort
14162 {{DEFAULTSORT:Foo}}
14164 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14168 Parsoid: Defaultsort (template-generated)
14170 {{{{echo|DEFAULTSORT}}:Foo}}
14172 <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}}]}'/>
14176 ### Inter-language links
14179 Interlanguage links
14187 es:Alimento fr:Nourriture zh:食品
14189 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14190 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14191 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14195 Duplicate interlanguage links (bug 24502)
14206 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14207 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14208 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14209 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14216 Basic section headings
14223 ===Smaller headline===
14226 <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>
14229 <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>
14232 <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>
14238 Section headings with TOC
14241 === Subheadline 1 ===
14242 ===== Skipping a level =====
14243 ====== Skipping a level ======
14247 ===Another headline===
14249 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14251 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14253 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14255 <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>
14257 <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>
14264 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14266 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14272 <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>
14273 <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>
14274 <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>
14275 <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>
14276 <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>
14279 <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>
14284 TOC anchors don't collide
14292 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14294 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14295 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14296 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14297 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14301 <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>
14302 <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>
14303 <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>
14304 <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>
14308 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14310 Handling of sections up to level 6 and beyond
14313 == Level 2 Heading==
14314 === Level 3 Heading===
14315 ==== Level 4 Heading====
14316 ===== Level 5 Heading=====
14317 ====== Level 6 Heading======
14318 ======= Level 7 Heading=======
14319 ======== Level 8 Heading========
14320 ========= Level 9 Heading=========
14321 ========== Level 10 Heading==========
14323 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14325 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14327 <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>
14329 <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>
14331 <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>
14333 <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>
14335 <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>
14336 <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>
14337 <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>
14338 <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>
14339 <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>
14353 <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>
14354 <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>
14355 <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>
14356 <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>
14357 <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>
14358 <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>
14359 <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>
14360 <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>
14361 <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>
14362 <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>
14367 TOC regression (T11764)
14371 ==== title 1.1.1 ====
14376 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14378 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14380 <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>
14382 <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>
14385 <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>
14388 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14390 <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>
14396 <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>
14397 <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>
14398 <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>
14399 <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>
14400 <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>
14401 <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>
14406 TOC for heading containing <span id="..."></span> (T96153)
14409 ==<span id="old-anchor"></span>New title==
14411 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14413 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14417 <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>
14422 TOC with wgMaxTocLevel=3 (bug 6204)
14428 ==== title 1.1.1 ====
14433 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14435 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14437 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
14438 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
14441 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14443 <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>
14449 <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>
14450 <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>
14451 <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>
14452 <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>
14453 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
14454 <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>
14459 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14465 ====Section 1.1.1====
14466 ====Section 1.1.1.1====
14469 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14471 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14473 <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>
14476 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14480 <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>
14481 <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>
14482 <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>
14483 <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>
14484 <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>
14490 Resolving duplicate section names
14495 <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>
14496 <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>
14501 Resolving duplicate section names with differing case (bug 10721)
14506 <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>
14507 <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>
14519 Template with sections, __NOTOC__
14526 <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>
14527 <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>
14528 <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>
14529 <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>
14534 __NOEDITSECTION__ keyword
14540 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14541 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14546 Link inside a section heading
14548 ==Section with a [[Main Page|link]] in it==
14550 <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>
14555 TOC regression (T14077)
14562 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14564 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14566 <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>
14569 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14573 <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>
14574 <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>
14575 <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>
14580 BUG 1219 URL next to image (good)
14582 http://example.com [[File:Foobar.jpg]]
14584 <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>
14587 <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>
14591 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14594 The line above must have a trailing space!
14597 But just in case it doesn't...
14599 <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>
14600 <p>The line above must have a trailing space!
14602 <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>
14603 <p>But just in case it doesn't...
14608 Header with special characters (bug 25462)
14610 The tooltips shall not show entities to the user (ie. be double escaped)
14627 <p>The tooltips shall not show entities to the user (ie. be double escaped)
14629 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14631 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
14632 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
14633 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
14634 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
14635 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
14639 <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>
14642 <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>
14645 <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>
14648 <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>
14651 <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>
14657 Header with space, plus and underscore as entity
14659 Id should not contain + for spaces
14661 == Space between Text ==
14664 == Space-Entity between Text ==
14667 == Plus+between+Text ==
14670 == Plus-Entity+between+Text ==
14673 == Underscore_between_Text ==
14676 == Underscore-Entity_between_Text ==
14679 [[#Space between Text]]
14680 [[#Space-Entity between Text]]
14681 [[#Plus+between+Text]]
14682 [[#Plus-Entity+between+Text]]
14683 [[#Underscore_between_Text]]
14684 [[#Underscore-Entity_between_Text]]
14686 <p>Id should not contain + for spaces
14688 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14690 <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>
14691 <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>
14692 <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>
14693 <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>
14694 <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>
14695 <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>
14699 <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>
14702 <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>
14705 <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>
14708 <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>
14711 <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>
14714 <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>
14716 </p><p><a href="#Space_between_Text">#Space between Text</a>
14717 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14718 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14719 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14720 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14721 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14726 Headers with excess '=' characters
14727 (Are similar tests necessary beyond the 1st level?)
14731 =''italic'' heading==
14732 ==''italic'' heading=
14734 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14736 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14737 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14738 <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>
14739 <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>
14743 <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>
14744 <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>
14745 <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>
14746 <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>
14751 HTML headers vs TOC (bug 23393)
14752 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14764 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14766 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14768 <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>
14769 <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>
14772 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14774 <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>
14775 <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>
14781 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14782 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14783 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14784 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14785 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14786 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14791 Single-line or multiline-comments can follow headings
14793 parsoid=wt2html,wt2wt
14801 <h2><span class="mw-headline" id="foo">foo</span></h2>
14802 <h2><span class="mw-headline" id="bar">bar</span></h2>
14803 <h2><span class="mw-headline" id="baz">baz</span></h2>
14808 BUG 1219 URL next to image (broken)
14810 http://example.com[[File:Foobar.jpg]]
14812 <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>
14815 <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>
14819 Bug 1186 news: in the middle of text
14821 http://en.wikinews.org/wiki/Wikinews:Workplace
14823 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14829 Namespaced link must have a title
14838 Namespaced link must have a title (bad fragment version)
14840 [[Project:#fragment]]
14842 <p>[[Project:#fragment]]
14848 ### HTML tags and HTML attributes
14852 div with no attributes
14854 <div>HTML rocks</div>
14856 <div>HTML rocks</div>
14861 div with double-quoted attribute
14863 <div id="rock">HTML rocks</div>
14865 <div id="rock">HTML rocks</div>
14870 div with single-quoted attribute
14872 <div id='rock'>HTML rocks</div>
14874 <div id="rock">HTML rocks</div>
14879 div with unquoted attribute
14881 <div id=rock>HTML rocks</div>
14883 <div id="rock">HTML rocks</div>
14888 div with illegal double attributes
14890 <div id="a" id="b">HTML rocks</div>
14892 <div id="b">HTML rocks</div>
14896 # FIXME: produce empty string instead of "class" in the PHP parser, following
14899 div with empty attribute value, space before equals
14903 <div class =>HTML rocks</div>
14905 <div class="">HTML rocks</div>
14910 div with multiple empty attribute values
14914 <div id= title=>HTML rocks</div>
14916 <div id="" title="">HTML rocks</div>
14921 table with multiple empty attribute values
14929 <table title="" id="">
14930 <tbody><tr><td> hi</td></tr>
14935 div with braces in attribute value
14937 <div title="{}">Foo</div>
14939 <div title="{}">Foo</div>
14942 <div title="{}">Foo</div>
14945 # This it very inconsistent in the PHP parser: it returns
14946 # class="class" if there is a space between the name and the equal sign (see
14947 # 'div with empty attribute value, space before equals'), but strips the
14948 # attribute completely if the space is missing. We hope that not much content
14949 # depends on this, so are implementing the behavior below in Parsoid for
14950 # consistencies' sake.
14951 # FIXME: fix this behavior in the PHP parser?
14953 div with empty attribute value, no space before equals
14955 parsoid=wt2html,html2html
14957 <div class=>HTML rocks</div>
14959 <div>HTML rocks</div>
14962 <div class="">HTML rocks</div>
14966 HTML multiple attributes correction
14968 <p class="error" class="awesome">Awesome!</p>
14970 <p class="awesome">Awesome!</p>
14975 Table multiple attributes correction
14978 !+ class="error" class="awesome"| status
14983 <th class="awesome"> status
14991 <DIV ID="x">HTML ROCKS</DIV>
14993 <div id="x">HTML ROCKS</div>
14998 Non-ASCII pseudo-tags are rendered as text
15007 Pseudo-tag with URL 'name' renders as url link
15009 <http://example.com/>
15011 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15016 text with amp in the middle of nowhere
15020 <p>Remember AT&T?
15025 text with character entity: eacute
15027 I always thought é was a cute letter.
15029 <p>I always thought é was a cute letter.
15032 <p>I always thought é was a cute letter.</p>
15036 text with entity-escaped character entity-like string: eacute
15038 I always thought &eacute; was a cute letter.
15040 <p>I always thought &eacute; was a cute letter.
15045 text with undefined character entity: xacute
15047 I always thought &xacute; was a cute letter.
15049 <p>I always thought &xacute; was a cute letter.
15053 # TODO: generalize to PHP parser?
15059 <data value="5">five</data>
15060 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15061 <mark>This highlighted text</mark>
15063 <p><data value="5">five</data>
15064 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15065 <mark>This highlighted text</mark></p>
15069 HTML tag with leading space is parsed as text
15073 <p>< div>foo< /div>
15078 ### Nesting tests (see bug 41545, 50604, 51081)
15081 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15082 # Note that html2wt is considerably more difficult if we use <b> in
15083 # the test case, instead of <big>
15085 Ensure that HTML adoption agency algorithm is properly implemented.
15087 <big>X<big>Y</big>Z</big>
15089 <p><big>X<big>Y</big>Z</big>
15093 # This was bug 41545 in the PHP parser.
15094 # Note that tidy doesn't handle this correctly.
15098 <kbd>X<kbd>Y</kbd>Z</kbd>
15100 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15104 # The following cases were bug 51081 in the PHP parser.
15105 # Note that there are some other nestable tags (b, i, etc) which are
15106 # not covered; see bug 51081 for discussion.
15108 # Note that tidy doesn't handle this correctly.
15112 <em>X<em>Y</em>Z</em>
15114 <p><em>X<em>Y</em>Z</em>
15118 # Note that tidy doesn't handle this correctly.
15120 Nesting of <strong>
15122 <strong>X<strong>Y</strong>Z</strong>
15124 <p><strong>X<strong>Y</strong>Z</strong>
15133 <p><q>X<q>Y</q>Z</q></p>
15136 # Note that tidy doesn't handle this correctly.
15140 <ruby>X<ruby>Y</ruby>Z</ruby>
15142 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15146 # Note that tidy doesn't handle this correctly.
15150 <bdo>X<bdo>Y</bdo>Z</bdo>
15152 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15164 [[Media:Foobar.jpg]]
15166 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15171 Media link with text
15173 [[Media:Foobar.jpg|A neat file to look at]]
15175 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15179 # FIXME: this is still bad HTML tag nesting
15180 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15182 Media link with nasty text
15184 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15186 <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>
15189 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15190 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15194 Media link to nonexistent file (bug 1702)
15196 [[Media:No such.jpg]]
15198 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15203 Image link to nonexistent file (bug 1850 - good)
15205 [[File:No_such.jpg]]
15207 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15210 <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>
15214 :Image link to nonexistent file (bug 1850 - bad)
15216 [[:Image:No such.jpg]]
15218 <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>
15221 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15227 Character reference normalization in link text (bug 1938)
15229 [[Main Page|this&that]]
15231 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15238 Test for unicode normalization
15240 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15244 (bug 19451) Links should refer to the normalized form.
15252 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15253 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15254 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15255 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15256 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15261 Empty attribute crash test (bug 2067)
15263 <font color="">foo</font>
15265 <p><font color="">foo</font>
15270 Empty attribute crash test single-quotes (bug 2067)
15272 <font color=''>foo</font>
15274 <p><font color="">foo</font>
15279 Attribute test: equals, then nothing
15281 <font color=>foo</font>
15283 <p><font>foo</font>
15288 Attribute test: unquoted value
15290 <font color=x>foo</font>
15292 <p><font color="x">foo</font>
15297 Attribute test: unquoted but illegal value (hash)
15299 <font color=#x>foo</font>
15301 <p><font color="#x">foo</font>
15305 # Parsoid does not serialize to empty attribute syntax,
15306 # so wt2wt and html2wt cases are skipped
15308 Attribute test: no value (T54330)
15310 parsoid=wt2html,html2html
15312 <font color>foo</font>
15314 <p><font color="">foo</font>
15317 <p><font color="">foo</font></p>
15321 Bug 2095: link with three closing brackets
15325 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15328 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15332 Bug 2095: link with pipe and three closing brackets
15334 [[Main Page|link]]]
15336 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15339 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15343 Bug 2095: link with pipe and three closing brackets, version 2
15345 [[Main Page|[http://example.com/]]]
15347 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15350 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15359 Template:Dangerous attribute
15361 " onmouseover="alert(document.cookie)
15365 Template:Dangerous style attribute
15367 border-size: expression(alert(document.cookie))
15373 <div style="float: right; {{{1}}}">Magic div</div>
15377 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15379 <div title="{{test}}"></div>
15381 <div title="This is a test template"></div>
15385 # Parsoid has enough context to handle this case
15387 Bug 2304: HTML attribute safety (dangerous template; 2309)
15389 <div title="{{dangerous attribute}}"></div>
15391 <div title=""></div>
15394 <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>
15398 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15400 <div style="{{dangerous style attribute}}"></div>
15402 <div style="/* insecure input */"></div>
15407 Bug 2304: HTML attribute safety (safe parameter; 2309)
15409 {{div style|width: 200px}}
15411 <div style="float: right; width: 200px">Magic div</div>
15416 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15418 {{div style|width: expression(alert(document.cookie))}}
15420 <div style="/* insecure input */">Magic div</div>
15425 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15427 {{div style|"><script>alert(document.cookie)</script>}}
15429 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15434 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15436 {{div style|" ><script>alert(document.cookie)</script>}}
15438 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15443 Bug 2304: HTML attribute safety (link)
15445 <div title="[[Main Page]]"></div>
15447 <div title="[[Main Page]]"></div>
15452 Bug 2304: HTML attribute safety (italics)
15454 <div title="''foobar''"></div>
15456 <div title="''foobar''"></div>
15461 Bug 2304: HTML attribute safety (bold)
15463 <div title="'''foobar'''"></div>
15465 <div title="'''foobar'''"></div>
15471 Bug 2304: HTML attribute safety (ISBN)
15473 <div title="ISBN 1234567890"></div>
15475 <div title="ISBN 1234567890"></div>
15480 Bug 2304: HTML attribute safety (RFC)
15482 <div title="RFC 1234"></div>
15484 <div title="RFC 1234"></div>
15489 Bug 2304: HTML attribute safety (PMID)
15491 <div title="PMID 1234567890"></div>
15493 <div title="PMID 1234567890"></div>
15498 Bug 2304: HTML attribute safety (web link)
15500 <div title="http://example.com/"></div>
15502 <div title="http://example.com/"></div>
15507 Bug 2304: HTML attribute safety (named web link)
15509 <div title="[http://example.com/ link]"></div>
15511 <div title="[http://example.com/ link]"></div>
15516 Bug 3244: HTML attribute safety (extension; safe)
15518 <div style="<nowiki>background:blue</nowiki>"></div>
15520 <div style="background:blue"></div>
15525 Bug 3244: HTML attribute safety (extension; unsafe)
15527 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15529 <div style="/* insecure input */"></div>
15533 # More MSIE fun discovered by Tom Gilder
15536 MSIE CSS safety test: spurious slash
15538 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15540 <div style="/* insecure input */">evil</div>
15545 MSIE CSS safety test: hex code
15547 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15549 <div style="/* insecure input */">evil</div>
15554 MSIE CSS safety test: comment in url
15556 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15558 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15563 MSIE CSS safety test: comment in expression
15565 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15567 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15572 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15574 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15576 <p style="/* invalid control char */">A</p>
15581 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15583 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15584 <div style="top:EXPRESSION(alert())">B</div>
15586 <p style="/* insecure input */">A</p>
15587 <div style="/* insecure input */">B</div>
15592 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15594 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15595 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15597 <div style="/* insecure input */">A</div>
15598 <p style="/* insecure input */">B</p>
15603 MSIE 6 CSS safety test: sup/sub script (bug 55332)
15605 <div style="background-image:url⁽javascript:alert())">A</div>
15606 <div style="background-image:url₍javascript:alert())">B</div>
15607 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
15609 <div style="/* insecure input */">A</div>
15610 <div style="/* insecure input */">B</div>
15611 <p style="/* insecure input */">C</p>
15619 title="data:text/html,<img src=1 onerror=alert(1)>"
15620 style="-o-link:attr(title);-o-link-source:current">X</div>
15622 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
15627 MSIE 6 CSS safety test: Repetition markers (bug 55332)
15629 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
15630 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
15631 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
15632 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
15633 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
15634 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
15635 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
15637 <p style="/* insecure input */">A</p>
15638 <p style="/* insecure input */">B</p>
15639 <p style="/* insecure input */">C</p>
15640 <p style="/* insecure input */">D</p>
15641 <p style="/* insecure input */">E</p>
15642 <p style="/* insecure input */">F</p>
15643 <p style="/* insecure input */">G</p>
15648 Table attribute legitimate extension
15651 !+ style="<nowiki>color:blue</nowiki>"| status
15656 <th style="color:blue"> status
15662 Table attribute safety
15665 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
15670 <th style="/* insecure input */"> status
15676 CSS line continuation 1
15678 <div style="background-image: u\ rl(test.jpg);"></div>
15680 <div style="/* insecure input */"></div>
15685 CSS line continuation 2
15687 <div style="background-image: u\ rl(test.jpg); "></div>
15689 <div style="/* insecure input */"></div>
15700 Expansion of multi-line templates in attribute values (bug 6255)
15702 <div style="background: {{identity|#00FF00}}">-</div>
15704 <div style="background: #00FF00">-</div>
15710 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15712 <div style="background:
15715 <div style="background: #00FF00">-</div>
15718 <div style="background:
15723 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15725 <div style="background: #00FF00">-</div>
15727 <div style="background: #00FF00">-</div>
15732 evil <math>-wiki-tags without Extension:Math enabled
15734 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15736 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15740 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15743 Parser hook: empty input
15756 Parser hook: empty input using terminated empty elements
15769 Parser hook: empty input using terminated empty elements (space before)
15782 Parser hook: basic input
15796 Parser hook: case insensitive
15810 Parser hook: case insensitive, redux
15823 Parser hook: nested tags
15827 <tag><tag></tag></tag>
15838 Parser hook: basic arguments
15840 <tag width=200 height = "100" depth = '50' square></tag>
15855 Parser hook: argument containing a forward slash (bug 5344)
15857 <tag filename='/tmp/bla'></tag>
15862 'filename' => '/tmp/bla',
15869 Parser hook: empty input using terminated empty elements (bug 2374)
15882 # </tag> should be output literally since there is no matching tag that begins it
15884 Parser hook: basic arguments using terminated empty elements (bug 2374)
15886 <tag width=200 height = "100" depth = '50' square/>
15905 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
15909 Parser hook: static parser hook not inside a comment
15911 <statictag>hello, world</statictag>
15912 <statictag action=flush/>
15920 Parser hook: static parser hook inside a comment
15922 <!-- <statictag>hello, world</statictag> -->
15923 <statictag action=flush/>
15929 # Nested template calls; this case was broken by Parser.php rev 1.506,
15933 Template:One-parameter
15935 (My parameter is: {{{1}}})
15939 Template:Map-one-parameter
15941 {{{{{1}}}|{{{2}}}}}
15945 Nested template calls
15947 {{Map-one-parameter|One-parameter|param}}
15949 <p>(My parameter is: param)
15958 # HTML+Tidy effectively strips out the empty tags completely
15959 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
15960 # which Tidy would have done for the PHP parser had there been content inside it.
15962 Sanitizer: Closing of open tags
15964 <s></s><table></table>
15966 <s></s><table></table>
15969 <p><s></s></p><table></table>
15973 Sanitizer: Closing of open but not closed tags
15982 Sanitizer: Closing of closed but not open tags
15992 Sanitizer: Closing of closed but not open table tags
15996 Table not started</td></tr></table>
15998 <p>Table not started</p>
16000 <p>Table not started</p>
16004 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16006 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16008 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16012 # In HTML5, the restrictions are that id must contain at least one character,
16013 # and must not contain any space characters.
16015 Sanitizer: Validating the contents of the id attribute (bug 4515)
16019 <br id="" /><br id="a space" />
16024 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16026 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16030 <br id="foo" /><br id="foo" />
16032 Something need to be done. foo-2 ?
16036 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16039 <meta itemprop="hello" content="world">
16040 <meta http-equiv="refresh" content="5">
16041 <meta itemprop="hello" http-equiv="refresh" content="5">
16042 <link itemprop="hello" href="{{SERVER}}">
16043 <link rel="stylesheet" href="{{SERVER}}">
16044 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16048 <p> <meta itemprop="hello" content="world" />
16049 <meta http-equiv="refresh" content="5">
16050 <meta itemprop="hello" content="5" />
16052 <link itemprop="hello" href="http://example.org" />
16053 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16054 <link itemprop="hello" href="http://example.org" />
16060 Language converter: output gets cut off unexpectedly (bug 5757)
16064 this bit is safe: }-
16066 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16068 then we get cut off here: }-
16070 all additional text is vanished
16072 <p>this bit is safe: }-
16073 </p><p>but if we add a conversion instance: xxx
16074 </p><p>then we get cut off here: }-
16075 </p><p>all additional text is vanished
16080 Self closed html pairs (bug 5487)
16083 <center><font id="bug" />Centered text</center>
16084 <div><font id="bug2" />In div text</div>
16086 <center><font id="bug" />Centered text</center>
16087 <div><font id="bug2" />In div text</div>
16096 Punctuation: nbsp before exclamation
16100 <p>C'est grave !
16105 Punctuation: CSS !important (bug 11874)
16107 <div style="width:50% !important">important</div>
16109 <div style="width:50% !important">important</div>
16114 Punctuation: CSS ! important (bug 11874; with space after)
16116 <div style="width:50% ! important">important</div>
16118 <div style="width:50% ! important">important</div>
16123 HTML bullet list, closed tags (bug 5497)
16136 <ul data-parsoid='{"stx":"html"}'>
16137 <li data-parsoid='{"stx":"html"}'>One</li>
16138 <li data-parsoid='{"stx":"html"}'>Two</li>
16144 HTML bullet list, unclosed tags (bug 5497)
16156 <ul data-parsoid='{"stx":"html"}'>
16157 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16158 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16164 HTML ordered list, closed tags (bug 5497)
16177 <ol data-parsoid='{"stx":"html"}'>
16178 <li data-parsoid='{"stx":"html"}'>One</li>
16179 <li data-parsoid='{"stx":"html"}'>Two</li>
16185 HTML ordered list, unclosed tags (bug 5497)
16198 <ol data-parsoid='{"stx":"html"}'>
16199 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16200 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16206 HTML nested bullet list, closed tags (bug 5497)
16231 HTML nested bullet list, open tags (bug 5497)
16268 HTML nested ordered list, closed tags (bug 5497)
16293 HTML nested ordered list, open tags (bug 5497)
16330 HTML ordered list item with parameters oddity
16332 <ol><li id="fragment">One</li>
16335 <ol><li id="fragment">One</li>
16340 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16342 bug 5918: autonumbering
16344 [http://first/] [http://second] [ftp://ftp]
16348 [mailto:enclosed@mail.tld With target]
16350 [mailto:enclosed@mail.tld]
16352 mailto:inline@mail.tld
16354 <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>
16355 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16356 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16357 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16358 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16361 <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>
16362 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16363 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16364 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16365 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16370 # Security and HTML correctness
16371 # From Nick Jenkins' fuzz testing
16375 Fuzz testing: Parser13
16390 Fuzz testing: Parser14
16395 <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>
16396 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16398 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16404 <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>
16406 <div id="toc" class="toc">
16407 <div id="toctitle">
16411 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16418 Fuzz testing: Parser14-table
16423 <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>
16424 <table style="__TOC__">
16429 <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>
16430 <table style="__TOC__">
16437 # Known to produce bogus xml (extra </td>)
16439 Fuzz testing: Parser16
16468 Fuzz testing: Parser21
16471 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16476 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16486 Fuzz testing: Parser22
16488 http://===r:::https://b
16492 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16500 # Known to produce bad XML for now
16502 Fuzz testing: Parser24
16509 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16510 <br style="onmouseover='alert(document.cookie);' " />
16512 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16517 <u class="|">}}}} >
16518 <br style="onmouseover='alert(document.cookie);'" />
16520 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16529 # Note: the current result listed for this is not what the original one was,
16530 # but the original bug was JavaScript injection, which is fixed in any case.
16531 # It's not clear that the original result listed was any more correct than the
16532 # current one. Original result:
16535 # <li class="||">
16536 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16538 Fuzz testing: Parser25 (bug 6055)
16544 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16546 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16551 Fuzz testing: URL adjacent extension (with space, clean)
16553 http://example.com <nowiki>junk</nowiki>
16555 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16558 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16562 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16564 http://example.com<nowiki>junk</nowiki>
16566 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16569 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16573 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16575 http://example.com<pre>junk</pre>
16577 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16580 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16585 <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>
16589 Fuzz testing: image with bogus manual thumbnail
16591 [[Image:foobar.jpg|thumbnail= ]]
16593 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16596 <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>
16600 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
16602 <pre dir=" "></pre>
16604 <pre dir=" "></pre>
16609 Parsing optional HTML elements (Bug 6171)
16614 <td> Some tabular data</td>
16615 <td> More tabular data ...
16616 <td> And yet som tabular data</td>
16622 <td> Some tabular data</td>
16623 <td> More tabular data ...
16624 </td><td> And yet som tabular data</td>
16631 Correct handling of <td>, <tr> (Bug 6171)
16636 <td> Some tabular data</td>
16637 <td> More tabular data ...</td>
16638 <td> And yet som tabular data</td>
16644 <td> Some tabular data</td>
16645 <td> More tabular data ...</td>
16646 <td> And yet som tabular data</td>
16654 Parsing crashing regression (fr:JavaScript)
16658 <p></body></x>
16663 Inline wiki vs wiki block nesting
16669 <p><b>Bold paragraph</b>
16670 </p><p>New wiki paragraph
16674 # FIXME: The current php output is documented
16675 # and desired output is the parsoid target.
16677 Inline HTML vs wiki block nesting
16683 <p><b>Bold paragraph
16684 </p><p>New wiki paragraph</b>
16687 <p><b>Bold paragraph</b>
16688 </p><p>New wiki paragraph
16692 # Original result was this:
16693 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16695 # While that might be marginally more intuitive, maybe, the six-apostrophe
16696 # construct is clearly pathological and the result stated here (which is what
16697 # the parser actually does) is about as reasonable as anything.
16699 Mixing markup for italics and bold
16702 '''bold''''''bold''bolditalics'''''
16704 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16712 Article for special page transclusion test
16716 Special page transclusion
16719 {{Special:Prefixindex/Xyzzyx}}
16721 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16726 Special page transclusion twice (bug 5021)
16729 {{Special:Prefixindex/Xyzzyx}}
16730 {{Special:Prefixindex/Xyzzyx}}
16732 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16733 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16738 Transclusion of default MediaWiki message
16740 {{MediaWiki:Mainpage}}
16747 Transclusion of nonexistent MediaWiki message
16749 {{MediaWiki:Mainpagexxx}}
16751 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16756 Transclusion of MediaWiki message with underscore
16758 {{MediaWiki:history_short}}
16765 Transclusion of MediaWiki message with space
16767 {{MediaWiki:history short}}
16774 Invalid header with following text
16784 Section extraction test (section 0)
16804 Section extraction test (section 1)
16826 Section extraction test (section 2)
16847 Section extraction test (section 3)
16867 Section extraction test (section 4)
16891 Section extraction test (section 5)
16911 Section extraction test (section 6)
16932 Section extraction test (section 7)
16952 Section extraction test (section 8)
16972 Section extraction test (section 9)
16993 Section extraction test (section 10)
17013 Section extraction test (nonexistent section 11)
17032 Section extraction test with bogus heading (section 1)
17037 ==bogus== not a legal section
17041 ==bogus== not a legal section
17045 Section extraction test with bogus heading (section 2)
17050 ==bogus== not a legal section
17057 Section extraction test with comment after heading (section 1)
17069 Section extraction test with comment after heading (section 2)
17081 Section extraction test with bogus <nowiki> heading (section 1)
17086 ==bogus== <nowiki>not a legal section</nowiki>
17090 ==bogus== <nowiki>not a legal section</nowiki>
17094 Section extraction test with bogus <nowiki> heading (section 2)
17099 ==bogus== <nowiki>not a legal section</nowiki>
17105 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17106 # instead of respecting commented sections
17108 Section extraction prefixed by comment (section 1)
17119 Section extraction prefixed by comment (section 2)
17129 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17130 # instead of respecting HTML-style headings
17132 Section extraction, mixed wiki and html (section 1)
17148 Section extraction, mixed wiki and html (section 2)
17164 # Formerly testing for bug 3342
17166 Section extraction, heading surrounded by <noinclude>
17170 <noinclude>==unmarked==</noinclude>
17176 # Test behavior of bug 19910
17178 Sectiion with all-equals
17183 The line above must have a trailing space
17186 But just in case it doesn't...
17190 But just in case it doesn't...
17194 Section replacement test (section 0)
17225 Section replacement test (section 1)
17254 Section replacement test (section 2)
17284 Section replacement test (section 3)
17315 Section replacement test (section 4)
17342 Section replacement test (section 5)
17373 Section replacement test (section 6)
17403 Section replacement test (section 7)
17434 Section replacement test (section 8)
17465 Section replacement test (section 9)
17494 Section replacement test (section 10)
17524 Section replacement test with initial whitespace (bug 13728)
17528 Preformatted initial line
17532 Preformatted initial line
17539 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17551 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17564 Section extraction, <pre> around bogus header (bug 10309)
17581 Section replacement, <pre> around bogus header (bug 10309)
17583 noxml replace=2,"xxx"
17603 Handling of 
 in URLs
17607 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17610 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
17612 a</a></li></ul></li></ul>
17616 Handling of %0A in URLs
17620 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17623 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
17627 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
17629 5 quotes, code coverage +1 line
17636 <p><b><i></i></b></p>
17639 # same html as previous, but wikitext adjusted to match parsoid html2wt
17640 # note that wt2html and html2html will put the <i> before the <b>
17642 5 quotes, code coverage +1 line w/ nowiki (1)
17644 parsoid=wt2wt,html2wt
17646 '''''<nowiki/>'''''
17651 <p><b><i></i></b></p>
17654 # same as previous, just swapping the <i> and <b>
17656 5 quotes, code coverage +1 line w/ nowiki (2)
17658 '''''<nowiki/>'''''
17663 <p><i><b></b></i></p>
17667 Special:Search page linking.
17671 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
17676 {{!}} is a magic word
17678 {{!}} is a magic word there and {{!}} is still a magic word here
17680 <p>| is a magic word there and | is still a magic word here
17683 <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>
17689 title=[[Parser test]]
17694 * {{FULLPAGENAMEE}}
17696 * {{BASEPAGENAMEE}}
17700 * {{ROOTPAGENAMEE}}
17702 * {{TALKPAGENAMEE}}
17703 * {{SUBJECTPAGENAME}}
17704 * {{SUBJECTPAGENAMEE}}
17707 * {{NAMESPACENUMBER}}
17711 * {{SUBJECTSPACEE}}
17712 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17714 <ul><li> Parser test</li>
17715 <li> Parser_test</li>
17716 <li> Parser test</li>
17717 <li> Parser_test</li>
17718 <li> Parser test</li>
17719 <li> Parser_test</li>
17720 <li> Parser test</li>
17721 <li> Parser_test</li>
17722 <li> Parser test</li>
17723 <li> Parser_test</li>
17724 <li> Talk:Parser test</li>
17725 <li> Talk:Parser_test</li>
17726 <li> Parser test</li>
17727 <li> Parser_test</li>
17735 <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>
17738 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17748 image4 |300px| centre
17749 image5.svg| http://///////
17754 <ul class="gallery mw-gallery-traditional">
17755 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17756 <div class="thumb" style="height: 150px;">Image1.png</div>
17757 <div class="gallerytext">
17760 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17761 <div class="thumb" style="height: 150px;">Image2.gif</div>
17762 <div class="gallerytext">
17767 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17768 <div class="thumb" style="height: 150px;">Image3</div>
17769 <div class="gallerytext">
17772 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17773 <div class="thumb" style="height: 150px;">Image4</div>
17774 <div class="gallerytext">
17779 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17780 <div class="thumb" style="height: 150px;">Image5.svg</div>
17781 <div class="gallerytext">
17782 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17786 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17787 <div class="thumb" style="height: 150px;">* image6</div>
17788 <div class="gallerytext">
17796 Gallery (with options)
17798 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17799 File:Nonexistent.jpg|caption
17800 File:Nonexistent.jpg
17801 image:foobar.jpg|some '''caption''' [[Main Page]]
17803 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17806 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17807 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17808 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17809 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17810 <div class="gallerytext">
17815 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17816 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17817 <div class="gallerytext">
17820 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17821 <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>
17822 <div class="gallerytext">
17823 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17827 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17828 <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>
17829 <div class="gallerytext">
17832 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17833 <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>
17834 <div class="gallerytext">
17844 Gallery with link that has fragment
17847 image:foobar.jpg|link=Main_Page
17848 image:foobar.jpg|link=Main_Page#section
17849 image:foobar.jpg|link=Main Page#section|caption
17852 <ul class="gallery mw-gallery-traditional">
17853 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17854 <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>
17855 <div class="gallerytext">
17858 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17859 <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>
17860 <div class="gallerytext">
17863 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17864 <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>
17865 <div class="gallerytext">
17875 Gallery with wikitext inside caption
17878 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
17879 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
17882 <ul class="gallery mw-gallery-traditional">
17883 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17884 <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>
17885 <div class="gallerytext">
17886 <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>
17890 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17891 <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>
17892 <div class="gallerytext">
17893 <p>This is a test template
17902 gallery (with showfilename option)
17904 <gallery showfilename>
17905 File:Nonexistent.jpg|caption
17906 File:Nonexistent.jpg
17907 image:foobar.jpg|some '''caption''' [[Main Page]]
17911 <ul class="gallery mw-gallery-traditional">
17912 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17913 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17914 <div class="gallerytext">
17915 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17920 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17921 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17922 <div class="gallerytext">
17923 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17927 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17928 <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>
17929 <div class="gallerytext">
17930 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17931 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17935 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17936 <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>
17937 <div class="gallerytext">
17938 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17947 Gallery (with namespace-less filenames)
17950 File:Nonexistent.jpg
17956 <ul class="gallery mw-gallery-traditional">
17957 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17958 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17959 <div class="gallerytext">
17962 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17963 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17964 <div class="gallerytext">
17967 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17968 <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>
17969 <div class="gallerytext">
17972 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17973 <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>
17974 <div class="gallerytext">
17982 HTML Hex character encoding (spells the word "JavaScript")
17984 parsoid=wt2html,wt2wt,html2html
17986 JavaScript
17988 <p>JavaScript
17993 <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>
17997 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18001 <p>&#xsee;&#XSEE;
18004 <p>&#xsee;&#XSEE;</p>
18008 HTML Hex character encoding mixed case
18010 parsoid=wt2html,wt2wt,html2html
18019 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18023 __FORCETOC__ override
18035 ISBN 978-0-1234-56 789
18037 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18040 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18042 <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>
18046 ISBN followed by 5 spaces
18057 ISBN ISBN 1234567890
18059 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18062 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18072 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18073 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18074 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18077 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18078 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18079 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
18083 ISBN with empty prefix (parsoid test)
18087 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18090 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
18094 Bug 22905: <abbr> followed by ISBN followed by </a>
18096 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18098 <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>
18101 <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>
18109 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18114 Double RFC with a wiki link
18118 <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>
18127 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18130 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18134 Centre-aligned image
18136 [[Image:foobar.jpg|centre]]
18138 <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>
18145 [[Image:foobar.jpg|none]]
18147 <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>
18152 Width + Height sized image (using px) (height is ignored)
18154 [[Image:foobar.jpg|640x480px]]
18156 <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>
18161 Width-sized image (using px, no following whitespace)
18163 [[Image:foobar.jpg|640px]]
18165 <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>
18170 Width-sized image (using px, with following whitespace - test regression from r39467)
18172 [[Image:foobar.jpg|640px ]]
18174 <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>
18179 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18181 [[Image:foobar.jpg| 640px]]
18183 <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>
18188 Image with page parameter
18192 [[File:LoremIpsum.djvu|page=2]]
18194 <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>
18197 <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>
18201 Another italics / bold test
18209 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18215 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18218 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18223 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18225 Images with the "|" character in the comment
18227 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18229 <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>
18232 <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>
18236 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18238 <html><script>alert(1);</script></html>
18240 <p><html><script>alert(1);</script></html>
18245 HTML with raw HTML ($wgRawHtml==true)
18249 <html><script>alert(1);</script></html>
18251 <p><script>alert(1);</script>
18256 Parents of subpages, one level up
18258 subpage title=[[Subpage test/L1/L2/L3]]
18262 <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>
18268 Parents of subpages, one level up, not named
18270 subpage title=[[Subpage test/L1/L2/L3]]
18274 <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>
18281 Parents of subpages, two levels up
18283 subpage title=[[Subpage test/L1/L2/L3]]
18289 <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
18290 </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>
18295 Parents of subpages, two levels up, without trailing slash or name.
18297 subpage title=[[Subpage test/L1/L2/L3]]
18306 Parents of subpages, two levels up, with lots of extra trailing slashes.
18308 subpage title=[[Subpage test/L1/L2/L3]]
18312 <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>
18317 Subpage test/L1/L2/L3Sibling
18323 Transclusion of a sibling page (one level up)
18325 subpage title=[[Subpage test/L1/L2/L3]]
18334 Transclusion of a child page
18336 subpage title=[[Subpage test/L1/L2]]
18345 Non-transclusion because of too many up levels
18347 subpage title=[[Subpage test/L1/L2/L3]]
18349 {{../../../../More than parent}}
18351 <p>{{../../../../More than parent}}
18356 Definition list code coverage
18362 <dl><dt> title  </dt>
18364 <dt> title </dt>
18370 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18371 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18372 <dt>title</dt><dd> def</dd></dl>
18376 Don't fall for the self-closing div
18378 <div>hello world</div/>
18380 <div>hello world</div>
18389 <p>[[:Template:Msg]]
18398 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18402 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18404 Always escape literal '>' in output, not just after '<'
18418 <p>This is a test template
18419 This is a test template
18431 Inclusion of !userCanEdit() content
18435 <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>
18441 Out-of-order TOC heading levels
18450 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18452 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18454 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18455 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18458 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18460 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18461 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18467 <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>
18468 <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>
18469 <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>
18470 <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>
18471 <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>
18472 <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>
18478 ISBN with a dummy number
18488 ISBN with space-delimited number
18492 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18498 ISBN with multiple spaces, no number
18517 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18518 </p><p>ISBN 12345678901
18524 ISBN with trailing year (bug 8110)
18526 ISBN 1-234-56789-0 - 2006
18528 ISBN 1 234 56789 0 - 2006
18530 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18531 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18539 {{anchorencode:foo bar©#%n}}
18541 <p>foo_bar.C2.A9.23.25n
18546 anchorencode trims spaces
18548 {{anchorencode: __pretty__please__}}
18555 anchorencode deals with links
18557 {{anchorencode: [[hello|world]] [[hi]]}}
18564 anchorencode deals with templates
18566 {{anchorencode: {{Foo}} }}
18573 anchorencode encodes like the TOC generator: (bug 18431)
18575 === _ +:.3A%3A&&]] ===
18576 {{anchorencode: _ +:.3A%3A&&]] }}
18579 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
18580 <p>.2B:.3A.253A.26.26.5D.5D
18585 Bug 6200: blockquotes and paragraph formatting
18606 Bug 8293: Use of center tag ruins paragraph formatting
18627 Parsing of overlapping (improperly nested) inline html tags
18629 <span><s>x</span></s>
18631 <p><span><s>x</span></s></span>
18634 <p><span><s>x</s></span>
18639 ### Language variants related tests
18642 Self-link in language variants
18644 title=[[Dunav]] language=sr
18646 Both [[Dunav]] and [[Дунав]] are names for this river.
18648 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
18659 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
18661 title=[[Duna]] language=sr
18663 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
18665 <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.
18670 Link to a section of a variant of this title shouldn't be parsed as self-link
18672 title=[[Duna]] language=sr
18674 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
18676 <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.
18681 Link to pages in language variants
18685 Main Page can be written as [[Маин Паге]]
18687 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18693 Multiple links to pages in language variants
18697 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18699 <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>.
18705 Simple template in language variants
18711 <p>This is a test template
18717 Template with explicit namespace in language variants
18723 <p>This is a test template
18729 Basic test for template parameter in language variants
18733 {{парамтест|param=foo}}
18735 <p>This is a test template with parameter foo
18741 Simple category in language variants
18745 [[Category:МедиаWики Усер'с Гуиде]]
18747 <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>
18764 Don't convert blue categorylinks to another variant (bug 33210)
18768 [[A]][[Category:分类]]
18770 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18775 Stripping -{}- tags (language variants)
18779 Latin proverb: -{Ne nuntium necare}-
18781 <p>Latin proverb: Ne nuntium necare
18787 Prevent conversion with -{}- tags (language variants)
18789 language=sr variant=sr-ec
18791 Latinski: -{Ne nuntium necare}-
18793 <p>Латински: Ne nuntium necare
18799 Prevent conversion of text with -{}- tags (language variants)
18801 language=sr variant=sr-ec
18803 Latinski: -{Ne nuntium necare}-
18805 <p>Латински: Ne nuntium necare
18811 Prevent conversion of links with -{}- tags (language variants)
18813 language=sr variant=sr-ec
18817 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18823 -{}- tags within headlines (within html for parserConvert())
18825 language=sr variant=sr-ec
18829 <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>
18835 Explicit definition of language variant alternatives
18837 language=zh variant=zh-tw
18839 -{zh:China;zh-tw:Taiwan}-, not China
18841 <p>Taiwan, not China
18847 Conversion around HTML tags
18849 language=sr variant=sr-ec
18851 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
18852 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
18855 <span title="ЛаCтин">ски</span>
18861 Explicit session-wise language variant mapping (A flag and - flag)
18863 language=zh variant=zh-tw
18865 Taiwan is not China.
18866 But -{A|zh:China;zh-tw:Taiwan}- is China,
18867 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
18868 and -{China}- is China.
18870 <p>Taiwan is not China.
18871 But Taiwan is Taiwan,
18872 (This should be stripped!)
18873 and China is China.
18878 Explicit session-wise language variant mapping (H flag for hide)
18880 language=zh variant=zh-tw
18882 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
18885 <p>(This should be stripped!)
18891 Adding explicit conversion rule for title (T flag)
18893 language=zh variant=zh-tw showtitle
18895 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18898 <p>Should be stripped!
18903 Testing that changing the language variant here in the tests actually works
18905 language=zh variant=zh showtitle
18907 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18910 <p>Should be stripped!
18915 Recursive conversion of alt and title attrs shouldn't clear converter state
18917 language=zh variant=zh-cn showtitle
18919 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
18920 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
18924 Should be stripped<span title="Exclamation">!</span>
18929 Bug 24072: more test on conversion rule for title
18931 language=zh variant=zh-tw showtitle
18933 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18934 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
18937 <p>This should be stripped!
18938 This won't take interferes with the title rule.
18943 Partly disable title conversion if variant == main language code
18945 language=zh variant=zh title=[[ZH]] showtitle
18947 -{T|zh-cn:CN;zh-tw:TW}-
18955 Partly disable title conversion if variant == main language code, more
18957 language=zh variant=zh title=[[ZH]] showtitle
18967 Raw output of variant escape tags (R flag)
18969 language=zh variant=zh-tw
18971 Raw: -{R|zh:China;zh-tw:Taiwan}-
18973 <p>Raw: zh:China;zh-tw:Taiwan
18978 Strings evaluating false shouldn't be ignored by Language converter (T51072)
18980 language=zh variant=zh-cn
18982 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
18989 Conversion rules from [numeric-only string] to [something else] (T48634)
18991 language=zh variant=zh-cn
18993 -{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
19000 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19002 language=zh variant=zh-cn
19004 -{H|zh-cn:foo;zh-tw:;}-foobar
19011 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19013 language=zh variant=zh-cn
19015 -{H|=>zh-cn:foo;}-foobar
19022 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19024 language=zh variant=zh-cn
19033 Nested using of manual convert syntax
19035 language=zh variant=zh-hk
19037 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19039 <p>Nested: Hello Hong Kong!
19044 Proper conversion of text in external links
19046 language=sr variant=sr-ec
19048 http://www.google.com
19049 gopher://www.google.com
19050 [http://www.google.com http://www.google.com]
19051 [gopher://www.google.com gopher://www.google.com]
19052 [https://www.google.com irc://www.google.com]
19053 [ftp://www.google.com www.google.com/ftp://dir]
19054 [//www.google.com www.google.com]
19056 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19057 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19058 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19059 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19060 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19061 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19062 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19067 Do not convert roman numbers to language variants
19069 language=sr variant=sr-ec
19073 <p>Фридрих IV је цар.
19078 Unclosed language converter markup "-{"
19089 Don't convert raw rule "-{R|=>}-" to "=>"
19100 Don't break link parsing if language converter markup is in the caption.
19102 language=sr variant=sr-ec
19104 [[Main Page|-{R|main page}-]]
19106 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19110 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19112 Don't break image parsing if language converter markup is in the caption.
19116 [[File:Foobar.jpg|-{R|caption}-]]
19118 <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>
19122 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19124 Don't break list handling if language converter markup is in the item.
19126 language=zh variant=zh-cn
19128 ;-{zh-cn:AAA;zh-tw:BBB}-
19130 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19137 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19139 Don't break table handling if language converter markup is in the cell.
19141 language=sr variant=sr-ec
19164 Bug 529: Uncovered bullet
19173 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19174 # Templates in Wikipedia rely on this behavior, as tidy has always been
19175 # enabled there. These tests are normally run *without* tidy, so specify the
19176 # full output here.
19177 # To test realistic parsing behavior, apply a tidy-like transformation to both
19178 # the expected output and your parser's output.
19180 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19182 ******* Foo {{bullet}}
19184 <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>
19190 Bug 529: Uncovered table already at line-start
19213 Bug 529: Uncovered bullet in parser function result
19215 * Foo {{lc:{{bullet}} }}
19223 Bug 5678: Double-parsed template argument
19225 {{lc:{{{1}}}|hello}}
19232 Bug 5678: Double-parsed template invocation
19234 {{lc:{{paramtest {{!}} param = hello }} }}
19236 <p>{{paramtest | param = hello }}
19241 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19244 title=[[Main Page]]
19246 {{PRVNÍVELKÉ:ěščř}}
19247 {{prvnívelké:ěščř}}
19267 Morwen/13: Unclosed link followed by heading
19274 <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>
19279 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19286 <h1><span class="mw-headline" id="heading">heading</span></h1>
19291 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19298 <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>
19313 Paragraphs inside divs (no extra line breaks)
19325 Paragraphs inside divs (extra line break on open)
19340 Paragraphs inside divs (extra line break on close)
19355 Paragraphs inside divs (extra line break on open and close)
19372 Nesting tags, paragraphs on lines which begin with <div>
19374 <div></div><strong>A
19377 <p><strong>A</strong></p>
19378 <p><strong>B</strong></p>
19386 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19388 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19390 <blockquote>Line one
19392 Line two</blockquote>
19394 <blockquote>Line one
19395 Line two</blockquote>
19399 <p>Line one Line two</p>
19404 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19409 Line two</blockquote>
19414 Line two</blockquote>
19419 Line two</blockquote>
19423 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19425 <blockquote>Line one
19430 <blockquote>Line one
19443 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19465 Paragraphs inside blockquotes/divs (no extra line breaks)
19467 <blockquote><div>Line one
19469 Line two</div></blockquote>
19471 <blockquote><div>Line one
19472 Line two</div></blockquote>
19477 Paragraphs inside blockquotes/divs (extra line break on open)
19482 Line two</div></blockquote>
19487 Line two</div></blockquote>
19492 Paragraphs inside blockquotes/divs (extra line break on close)
19494 <blockquote><div>Line one
19497 </div></blockquote>
19499 <blockquote><div>Line one
19502 </div></blockquote>
19507 Paragraphs inside blockquotes/divs (extra line break on open and close)
19513 </div></blockquote>
19519 </div></blockquote>
19524 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19526 wgLinkHolderBatchSize=0
19532 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19533 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19534 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19539 Free external link invading image caption
19541 [[Image:Foobar.jpg|thumb|http://x|hello]]
19543 <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>
19548 Bug 15196: localised external link numbers
19552 [http://en.wikipedia.org/]
19554 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
19557 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
19561 Multibyte character in padleft
19563 {{padleft:-Hello|7|Æ}}
19570 Multibyte character in padright
19572 {{padright:Hello-|7|Æ}}
19579 formatdate parser function
19581 {{#formatdate:2009-03-24}}
19583 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
19588 formatdate parser function, with default format
19590 {{#formatdate:2009-03-24|mdy}}
19592 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
19597 Spacing of numbers in formatted dates
19599 {{#formatdate:January 15}}
19601 <p><span class="mw-formatted-date" title="01-15">January 15</span>
19606 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
19608 language=nl title=[[MediaWiki:Common.css]]
19610 {{#formatdate:2009-03-24|dmy}}
19612 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
19625 Edit comment with link
19629 I like the [[Main Page]] a lot
19631 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
19635 Edit comment with link and link text
19639 I like the [[Main Page|best pages]] a lot
19641 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19645 Edit comment with link and link text with suffix
19649 I like the [[Main Page|best page]]s a lot
19651 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
19655 Edit comment with section link (non-local, eg in history list)
19657 comment title=[[Main Page]]
19659 /* External links */ removed bogus entries
19661 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19665 Edit comment with section link and text before it (non-local, eg in history list)
19667 comment title=[[Main Page]]
19669 pre-comment text /* External links */ removed bogus entries
19671 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>
19675 Edit comment with section link (local, eg in diff view)
19677 comment local title=[[Main Page]]
19679 /* External links */ removed bogus entries
19681 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
19685 Edit comment with subpage link (bug 14080)
19689 title=[[Subpage test]]
19691 Poked at a [[/subpage]] here...
19693 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
19697 Edit comment with subpage link and link text (bug 14080)
19701 title=[[Subpage test]]
19703 Poked at a [[/subpage|neat little page]] here...
19705 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
19709 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
19712 title=[[Subpage test]]
19714 Poked at a [[/subpage]] here...
19716 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
19720 Edit comment with bare anchor link (local, as on diff)
19724 title=[[Main Page]]
19728 <a href="#section">#section</a>
19732 Edit comment with bare anchor link (non-local, as on history)
19735 title=[[Main Page]]
19739 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19743 Anchor starting with underscore
19747 <p><a href="#_ref">One</a>
19752 Id starting with underscore
19754 <div id="_ref"></div>
19756 <div id="_ref"></div>
19761 Space normalisation on autocomment (bug 22784)
19764 title=[[Main Page]]
19766 /* __hello__world__ */
19768 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19772 percent-encoding and + signs in comments (Bug 26410)
19776 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19778 <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>
19781 # Parsoid doesn't support this yet: see bug 73581
19782 # but it *should* omit the 'src' attribute if the image is bad.
19783 # PHP side of tests was disabled in
19784 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19785 # because of issues in the PHP parserTests infrastructure
19786 # (but the output below is indeed what the PHP side emits)
19788 Bad images - basic functionality
19791 !! DISABLED/html/php
19793 <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>
19797 Bad images - bug 16039: text after bad image disappears
19802 !! DISABLED/html/php
19808 <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>
19813 Verify that displaytitle works (bug #22501) no displaytitle
19817 wgAllowDisplayTitle=true
19818 wgRestrictDisplayTitle=false
19820 this is not the the title
19823 <p>this is not the the title
19828 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
19833 wgAllowDisplayTitle=true
19834 wgRestrictDisplayTitle=false
19836 this is not the the title
19837 {{DISPLAYTITLE:whatever}}
19840 <p>this is not the the title
19845 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
19850 wgAllowDisplayTitle=true
19851 wgRestrictDisplayTitle=true
19853 this is not the the title
19854 {{DISPLAYTITLE:whatever}}
19857 <p>this is not the the title
19862 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
19867 wgAllowDisplayTitle=true
19868 wgRestrictDisplayTitle=true
19870 this is not the the title
19871 {{DISPLAYTITLE:screen}}
19874 <p>this is not the the title
19879 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
19884 wgAllowDisplayTitle=false
19886 this is not the the title
19887 {{DISPLAYTITLE:screen}}
19890 <p>this is not the the title
19891 <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>
19896 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
19901 wgAllowDisplayTitle=false
19903 this is not the the title
19906 <p>this is not the the title
19911 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
19916 wgAllowDisplayTitle=true
19917 wgRestrictDisplayTitle=true
19919 this is not the the title
19920 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
19922 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
19923 <p>this is not the the title
19928 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
19933 wgAllowDisplayTitle=true
19934 wgRestrictDisplayTitle=true
19936 this is not the the title
19937 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
19939 <span style="color: red;">s</span>creen
19940 <p>this is not the the title
19945 Page status indicators: Empty name is invalid
19949 <indicator name=" "></indicator>
19950 <indicator></indicator>
19952 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19953 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19958 Page status indicators: Weird syntaxes that are okay
19962 <indicator name="empty" />
19963 <indicator name="name"></indicator>
19972 Page status indicators: Torture test
19976 <indicator name="01">hello world</indicator>
19977 <indicator name="02">[[Main Page]]</indicator>
19978 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
19979 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
19980 <indicator name="05">* foo
19982 <indicator name="06"><nowiki>foo</nowiki></indicator>
19983 <indicator name="07"> Preformatted</indicator>
19984 <indicator name="08"><div>Broken tag</indicator>
19985 <indicator name="09">{| class=wikitable
19988 <indicator name="10">Two
19990 paragraphs</indicator>
19993 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19994 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" />
19995 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>
19996 05=<ul><li> foo</li>
20000 07=<pre>Preformatted
20002 08=<div>Broken tag</div>
20004 09=<table class="wikitable">
20021 preload: check <noinclude> and <includeonly>
20025 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20031 preload: check <onlyinclude>
20035 Goodbye <onlyinclude>Hello world</onlyinclude>
20041 preload: can pass tags through if we want to
20045 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20047 <includeonly>Hello world</includeonly>
20051 preload: check that it doesn't try to do tricks
20055 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20057 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20061 Play a bit with r67090 and bug 3158
20063 <div style="width:50% !important"> </div>
20064 <div style="width:50% !important"> </div>
20065 <div style="width:50% !important"> </div>
20066 <div style="border : solid;"> </div>
20068 <div style="width:50% !important"> </div>
20069 <div style="width:50% !important"> </div>
20070 <div style="width:50% !important"> </div>
20071 <div style="border : solid;"> </div>
20074 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20075 <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>
20076 <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>
20077 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20082 HTML5 data attributes
20084 <span data-foo="bar">Baz</span>
20085 <p data-abc-def_hij="">Quuz</p>
20087 <p><span data-foo="bar">Baz</span>
20089 <p data-abc-def_hij="">Quuz</p>
20094 percent-encoding and + signs in internal links (Bug 26410)
20096 [[User:+%]] [[Page+title%]]
20097 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20098 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20099 [[%33%45]] [[%33%45+]]
20101 <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>
20102 <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>
20103 <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>
20104 <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>
20107 <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>
20108 <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>
20109 <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>
20110 <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>
20114 Special characters in embedded file links (bug 27679)
20116 [[File:Contains & ampersand.jpg]]
20117 [[File:Does not exist.jpg|Title with & ampersand]]
20119 <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>
20120 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20123 <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>
20124 <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>
20128 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20130 Text's been normalized?
20132 <p>Text's been normalized?
20137 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20139 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20141 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20146 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20148 [http://www.example.org/ ideograms]
20150 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20155 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20157 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20159 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20183 Bug 31098 Template which includes system messages which includes the template
20187 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20188 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20193 Bug31490 Turkish: ucfirst 'blah'
20204 Bug31490 Turkish: ucfirst 'ix'
20215 Bug31490 Turkish: lcfirst 'BLAH'
20226 Bug31490 Turkish: ucfırst (with a dotless i)
20232 <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>
20237 Bug31490 ucfırst (with a dotless i) with English language
20243 <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>
20248 Bug 26375: TOC with italics
20250 title=[[Main Page]]
20253 == ''Lost'' episodes ==
20255 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20257 <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>
20261 <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>
20266 Bug 26375: TOC with bold
20268 title=[[Main Page]]
20271 == '''should be bold''' then normal text ==
20273 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20275 <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>
20279 <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>
20284 Bug 33845: Headings become cursive in TOC when they contain an image
20286 title=[[Main Page]]
20289 == Image [[Image:foobar.jpg]] ==
20291 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20293 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20297 <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>
20302 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20304 title=[[Main Page]]
20307 == <blockquote>Quote</blockquote> ==
20309 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20311 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20315 <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>
20319 <div id="toc" class="toc">
20320 <div id="toctitle">
20324 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20328 <h2><span class="mw-headline" id="Quote"></span></h2>
20330 <p><span class="mw-headline" id="Quote">Quote</span></p>
20332 <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>
20336 Unclosed tags in TOC
20338 title=[[Main Page]]
20342 <small>Hanc marginis exiguitas non caperet.</small>
20345 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20347 <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>
20351 <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>
20352 <p><small>Hanc marginis exiguitas non caperet.</small>
20358 Multiple tags in TOC
20361 == <i>Foo</i> <b>Bar</b> ==
20363 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20365 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20367 <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>
20368 <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>
20372 <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>
20373 <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>
20377 <div id="toc" class="toc">
20378 <div id="toctitle">
20382 <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>
20383 <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>
20387 <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>
20388 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20390 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20392 <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>
20396 Tags with parameters in TOC
20399 == <sup class="in-h2">Hello</sup> ==
20401 == <sup class="a > b">Evilbye</sup> ==
20403 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20405 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20406 <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>
20410 <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>
20411 <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>
20416 span tags with directionality in TOC
20419 == <span dir="ltr">C++</span> ==
20421 == <span dir="rtl">זבנג!</span> ==
20423 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20425 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20427 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20429 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20431 <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>
20432 <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>
20433 <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>
20434 <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>
20435 <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>
20439 <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>
20440 <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>
20441 <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>
20442 <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>
20443 <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>
20448 Bug 72884: bdi element in ToC
20451 == <bdi>test</bdi> ==
20453 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20455 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20459 <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>
20463 # Note that the html output does not have the <p></p>, but the
20464 # html+tidy output *does*. This is because the empty <p></p> is
20465 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20467 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20472 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20474 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20478 <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>
20482 <div id="toc" class="toc">
20483 <div id="toctitle">
20487 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20491 <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>
20497 == {{int:headline_sample}} ==
20501 Bug 32057: Title needed when expanding <h> nodes.
20503 title=[[Main Page]]
20507 <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>
20512 Strip marker in urlencode
20514 {{urlencode:x<nowiki/>y}}
20515 {{urlencode:x<nowiki/>y|wiki}}
20516 {{urlencode:x<nowiki/>y|path}}
20517 {{urlencode:x<pre id="one">two</pre>y}}
20545 Strip marker in formatNum
20547 {{formatnum:1<nowiki/>2}}
20548 {{formatnum:1<nowiki/>2|R}}
20556 Check noCommafy in formatNum
20560 {{formatnum:123456.78}}
20561 {{formatnum:123456.78|NOSEP}}
20569 Wrong option for formatNum (bug 56199)
20571 {{formatnum:1,234.56|Random}}
20572 {{formatnum:1,234.56|EVERYTHING}}
20573 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
20582 Strip marker in grammar
20586 {{grammar:elative|foo<nowiki/>bar}}
20593 Strip marker in padleft
20595 {{padleft:|2|x<nowiki/>y}}
20602 Strip marker in padright
20604 {{padright:|2|x<nowiki/>y}}
20611 Strip marker in anchorencode
20613 {{anchorencode:x<nowiki/>y}}
20620 nowiki inside link inside heading (bug 18295)
20622 ==[[foo|x<nowiki>y</nowiki>z]]==
20624 <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>
20629 new support for bdi element (bug 31817)
20631 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20633 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
20638 Ignore pipe between table row attributes
20642 |- id=foo | style='color: red'
20650 <tr id="foo" style="color: red">
20657 Gallery override link with WikiLink (bug 34852)
20660 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
20663 <ul class="gallery mw-gallery-traditional">
20664 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20665 <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>
20666 <div class="gallerytext">
20676 Gallery override link with absolute external link (bug 34852)
20679 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20682 <ul class="gallery mw-gallery-traditional">
20683 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20684 <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>
20685 <div class="gallerytext">
20695 Gallery override link with malicious javascript (bug 34852)
20698 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20701 <ul class="gallery mw-gallery-traditional">
20702 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20703 <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>
20704 <div class="gallerytext">
20714 Gallery with invalid title as link (bug 43964)
20717 File:foobar.jpg|link=<
20720 <ul class="gallery mw-gallery-traditional">
20721 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20722 <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>
20723 <div class="gallerytext">
20731 Language parser function
20740 Padleft and padright as substr
20742 {{padleft:|3|abcde}}
20743 {{padright:|3|abcde}}
20751 Special parser function
20753 {{#special:RandomPage}}
20754 {{#special:BaDtItLe}}
20755 {{#special:Foobar}}
20764 Bug 34939 - Case insensitive link parsing ([HttP://])
20766 [HttP://MediaWiki.Org/]
20768 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20771 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20775 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20777 [HttP://MediaWiki.Org/ MediaWiki]
20779 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20784 Bug 34939 - Case insensitive link parsing (HttP://)
20786 HttP://MediaWiki.Org/
20788 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20791 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
20809 <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>
20810 <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>
20811 <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>
20812 <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>
20813 <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>
20819 ### Parsoid-specific tests
20820 ### Parsoid-PHP parser incompatibilities
20823 1. SOL-sensitive wikitext tokens as template-args
20825 parsoid=wt2html,wt2wt
20831 <span about="#mwt1" typeof="mw:Transclusion">
20832 </span><ul about="#mwt1"><li>a</li>
20834 <span about="#mwt2" typeof="mw:Transclusion">
20835 </span><ol about="#mwt2"><li>a</li>
20837 <span about="#mwt3" typeof="mw:Transclusion">
20838 </span><dl about="#mwt3"><dd>a</dd>
20842 #### -----------------------------------------------------------------
20843 #### Parsoid-specific functionality tests
20844 #### -----------------------------------------------------------------
20846 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
20847 # We know wt2wt will fail, but we expect selser to pass.
20848 # Due to the nature of our testing, wt2wt and selser tests will enter the
20849 # blacklist and we'll catch selser regressions based on changes to the
20850 # blacklist entries for selser tests.
20852 1. Bad treebuilder fixup of formatting elt is cleaned up
20854 parsoid=wt2html,wt2wt
20859 [[Image:Foobar.jpg|right|Test]]
20866 <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>
20873 2. Bad treebuilder fixup of formatting elt is cleaned up
20875 parsoid=wt2html,wt2wt
20877 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
20879 <small>[[Image:Foobar.jpg|right|300px]]</small>
20883 <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>
20885 <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>
20889 3. Bad treebuilder fixup of formatting elt is cleaned up
20891 parsoid=wt2html,wt2wt
20893 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
20895 <p><small><b>foo</b></small></p>
20896 <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>
20897 <p><small><b>bar</b></small></p>
20901 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
20903 parsoid=wt2html,wt2wt
20905 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
20907 <p><b><small></small></b></p>
20908 <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>
20912 #### ----------------------------------------------------------------
20913 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
20914 #### tags. Parsoid's output for these tags differs from that of the
20916 #### ----------------------------------------------------------------
20919 Ref: 1. ref-location should be replaced with an index span
20924 B <ref name="x">foo</ref>
20928 <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>
20929 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>
20930 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>
20931 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20932 <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>
20933 <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>
20934 <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>
20939 Ref: 2. ref-tags with identical names should all get the same index
20943 A <ref name="x">foo</ref>
20947 <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>
20948 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>
20949 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20950 <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>
20955 Ref: 3. spaces in ref-names should be ignored
20959 A <ref name="x">foo</ref>
20960 B <ref name=" x " />
20964 <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>
20965 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>
20966 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>
20967 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20968 <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>
20972 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
20974 Ref: 4. 'constructor' should be accepted as a valid ref-name
20978 A <ref name="constructor">foo</ref>
20981 <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>
20982 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20983 <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>
20988 Ref: 5. body should accept generic wikitext
20993 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
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="#mwt5" 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">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>
21007 Ref: 6. indent-pres should not be output in ref-body
21019 <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>
21021 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21022 <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
21030 Ref: 7. No p-wrapping in ref-body
21049 <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>
21051 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21052 <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
21067 Ref: 8. transclusion wikitext has lower precedence
21071 A <ref> foo {{echo|</ref> B C}}
21075 <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>
21076 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21077 <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>
21082 Ref: 9. unclosed comments should not leak out of ref-body
21086 A <ref> foo <!--</ref> B C
21089 <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>
21090 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21091 <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>
21096 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21100 A <ref> <b> foo </ref> B C
21104 <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>
21107 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21108 <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>
21113 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21121 <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
21122 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>
21123 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21124 <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>
21125 <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>
21130 Ref: 12. ref-tags act as trailing newline migration barrier
21132 <!--the newline at the end of this line moves out of the p tag-->a
21134 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21140 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21143 <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>
21144 <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>
21147 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21148 <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>
21149 <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>
21153 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21162 <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
21163 <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>
21164 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21165 <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>
21166 <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
21172 Ref: 14. A nested ref-tag should be emitted as plain text
21176 <ref>foo <ref>bar</ref> baz</ref>
21180 <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>
21182 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21183 <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>
21188 Ref: 15. ref-tags with identical names should get identical indexes
21192 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21193 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21197 <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>
21198 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>
21200 <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>
21204 ## We don't bother wt2wt-ing non-standard whitespace
21206 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21214 <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>
21215 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21216 <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>
21220 Ref: 17. Generate valid HTML5 id/about attributes
21224 <ref name="a b">foo</ref>
21228 <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>
21231 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21232 <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>
21237 Ref: 18. T58916: Extension attributes should be parsed as plain text
21241 <ref name="{{echo|a}}">foo</ref>
21245 <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>
21248 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21249 <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>
21254 Ref: 19. ref-tags with identical name encodings should get identical indexes
21258 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21262 <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>
21264 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21265 <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>
21270 Ref: 20. ref-tags with identical names but different content should keep it
21274 A <ref name="foo">Foo one</ref>
21275 B <ref name="foo">Foo two</ref>
21276 C <ref name="foo" />
21280 <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>
21281 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>
21282 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>
21284 <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>
21289 References: 1. references tag without any refs should be handled properly
21293 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21297 References: 2. references tag with group only outputs references from that group
21299 A <ref group="a">foo</ref>
21300 B <ref group="b">bar</ref>
21303 <references group="a" />
21305 <references group="b" />
21307 <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>
21308 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>
21309 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>
21311 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21312 <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>
21314 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21315 <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>
21317 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21318 <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>
21323 References: 3. ref list should be cleared after processing references
21333 <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>
21335 <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>
21338 <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>
21340 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21341 <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>
21346 References: 4. only referenced group should be cleared after processing references
21348 A <ref group="a">afoo</ref>
21351 <references group="a" />
21357 <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>
21358 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>
21360 <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>
21363 <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>
21365 <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>
21370 References: 5. ref tags in references should be processed while ignoring all other content
21373 B <ref name="b">bar</ref>
21376 <ref name="a">foo</ref>
21377 This should just get lost.
21380 <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>
21381 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>
21384 <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>
21389 References: 6. <references /> from a transclusion
21391 <ref>Foo</ref> {{echo|<references />}}
21393 <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>
21398 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21400 A <ref>foo bar for a</ref>
21401 B <ref group="X" name="b" />
21405 <references group="X">
21406 <ref name="b">foo</ref>
21409 <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>
21410 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>
21413 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21414 <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>
21417 <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"}}'>
21418 <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>
21423 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21425 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21428 <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>
21429 <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>
21433 # This test only works in wt2html now as the <references /> are always generated
21434 # unless selser is active. Once T72722 is fixed, we should add a changes test
21435 # here to ensure that unrelated changes don't add the new <references /> in
21438 References: 9. Generate missing references list at the end
21441 B <ref group="inexistent">bar</ref>
21443 <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>
21444 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21445 <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>
21447 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21448 <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>
21453 References: 10. New <references/> shouldn't be added for unrelated edits.
21456 "modes": ["selser"],
21457 "changes": [["#x", "remove"]],
21461 Unrelated text<span id="x"> that's going to disappear</span>.
21469 Entities in ref name
21471 <ref name="test & me">hi</ref>
21474 <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>
21475 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21476 <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>
21480 # This test is wt2html only because we're permitting the serializer to produce
21481 # dirty diffs, normalizing the unclosed references to the self-closed version.
21483 Generate references for unclosed references tag
21491 <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>
21492 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21493 <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>
21497 New reference serializes on its own line
21499 parsoid=wt2wt,html2wt
21504 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21507 #### ----------------------------------------------------------------
21508 #### Parsoid-only testing of Parsoid's impl of LST
21509 #### Not implemented yet, see
21510 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21511 #### ----------------------------------------------------------------
21514 LST Sections: 1. Simple section start and end
21516 <section begin="2011-05-16" />
21517 <section end="2014-04-10 (MW 1.23wmf22)" />
21519 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21520 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21523 #--------- Test stripping of empty nodes in template content ----------
21525 Empty LI and TR nodes should be stripped from template content
21530 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21534 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
21547 Empty LI and TR nodes should not be stripped from top-level content
21574 Empty TR nodes should not be stripped if they have any attributes set
21576 {{EmptyTRWithHTMLAttrTest}}
21578 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
21579 <tr align="center"></tr>
21580 <tr><td>foo</td></tr>
21581 <tr align="center"></tr>
21582 <tr><td>bar</td></tr>
21586 #### ----------------------------------------------------------------
21587 #### The following section of tests are primarily to test
21588 #### wikitext escaping capabilities of Parsoid. Given that
21589 #### escaping can be done any number of ways, the wikitext (input)
21590 #### is always adjusted to reflect how Parsoid adds nowiki
21593 #### We are marking several tests as parsoid-only since the
21594 #### HTML in the result section is different from what the
21595 #### PHP parser generates for it.
21596 #### ----------------------------------------------------------------
21599 #### --------------- Headings ---------------
21601 #### 1. Nested inside html <h1>=foo=</h1>
21602 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
21603 #### 3. Nested inside html with wikitext split by html tags
21604 #### 4. No escape needed
21605 #### 5. Empty headings <h1></h1>
21606 #### 6. Heading chars in SOL context
21607 #### ----------------------------------------
21609 Headings: 0. Unnested
21613 <nowiki>=foo=</nowiki>
21615 <nowiki> =foo= </nowiki>
21617 <nowiki>=foo=</nowiki>
21619 =foo''a''<nowiki>=</nowiki>
21621 <p><span typeof="mw:Nowiki">=foo=</span></p>
21623 <p><span typeof="mw:Nowiki"> =foo= </span>
21625 <span typeof="mw:Nowiki">=foo=</span></p>
21627 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
21630 # New headings and existing headings are handled differently
21632 Headings: 1. Nested inside html
21640 <h1 data-parsoid=''>=foo=</h1>
21641 <h2 data-parsoid=''>=foo=</h2>
21642 <h3 data-parsoid=''>=foo=</h3>
21643 <h4 data-parsoid=''>=foo=</h4>
21644 <h5 data-parsoid=''>=foo=</h5>
21645 <h6 data-parsoid=''>=foo=</h6>
21653 =<nowiki>=foo=</nowiki>=
21654 ==<nowiki>=foo=</nowiki>==
21655 ===<nowiki>=foo=</nowiki>===
21656 ====<nowiki>=foo=</nowiki>====
21657 =====<nowiki>=foo=</nowiki>=====
21658 ======<nowiki>=foo=</nowiki>======
21663 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
21672 <nowiki>*</nowiki>bar
21678 <nowiki>=bar=</nowiki>
21682 Headings: 3. Nested inside html with wikitext split by html tags
21684 parsoid=html2wt,wt2wt
21686 = ='''bold'''<nowiki>foo=</nowiki> =
21688 <h1>=<b>bold</b>foo=</h1>
21692 Headings: 4a. No escaping needed (testing just h1 and h2)
21717 <h1><i>=</i>foo=</h1>
21721 Headings: 4b. No escaping needed (inside p-tags)
21736 Headings: 5. Empty headings
21746 =====<nowiki/>=====
21748 ======<nowiki/>======
21750 <h1 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h1>
21752 <h2 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h2>
21754 <h3 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h3>
21756 <h4 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h4>
21758 <h5 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h5>
21760 <h6 data-parsoid='{}'><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/></h6>
21764 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21766 <nowiki>=a=</nowiki>
21768 <nowiki>=a=</nowiki>
21770 <nowiki>=a=</nowiki>
21772 <nowiki>=a=</nowiki>
21780 <p><span typeof="mw:Nowiki">=a=</span></p>
21782 <p><span typeof="mw:Nowiki">=a=</span></p>
21784 <p><span typeof="mw:Nowiki">=a=</span></p>
21786 <p><span typeof="mw:Nowiki">=a=</span></p>
21790 Headings: 6b. Heading chars in SOL context (with trailing newlines)
21814 <p><span typeof="mw:Nowiki">=a=
21817 <p><span typeof="mw:Nowiki">=a=
21820 <p><span typeof="mw:Nowiki">=a=
21823 <p><span typeof="mw:Nowiki">=a=
21828 Headings: 6c. Heading chars in SOL context (leading newline break)
21831 <nowiki>=b=</nowiki>
21838 <span typeof="mw:Nowiki">=b=</span>
21842 Headings: 6d. Heading chars in SOL context (with interspersed comments)
21844 <!--c0--><nowiki>=a=</nowiki>
21846 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
21852 <!--c0--><p><span typeof="mw:Nowiki">=a=</span></p>
21854 <!--c1--><p><span typeof="mw:Nowiki">=a=</span></p> <!--c2--> <!--c3-->
21858 Headings: 6d. Heading chars in SOL context (No escaping needed)
21868 Headings: 7. Insert a newline between new content and headings
21874 <h2 data-parsoid='{}'>A</h2>
21875 <p data-parsoid='{}'>a</p>
21885 #### --------------- Lists ---------------
21886 #### 0. Outside nests (*foo, etc.)
21887 #### 1. Nested inside html <ul><li>*foo</li></ul>
21888 #### 2. Inside definition lists
21889 #### 3. Only bullets at start should be escaped
21890 #### 4. No escapes needed
21891 #### 5. No unnecessary escapes
21892 #### 6. Escape bullets in SOL position
21893 #### 7. Escape bullets in a multi-line context
21894 #### ----------------------------------------
21897 Lists: 0. Outside nests
21899 <nowiki>*</nowiki>foo
21901 <nowiki>#</nowiki>foo
21903 <nowiki>;Foo:</nowiki>bar
21910 <p><span typeof="mw:Nowiki">*</span>foo</p>
21912 <p><span typeof="mw:Nowiki">#</span>foo</p>
21914 <p><span typeof="mw:Nowiki">;Foo:</span>bar</p>
21918 Lists: 1. Nested inside html
21920 *<nowiki>*foo</nowiki>
21922 *<nowiki>#foo</nowiki>
21924 *<nowiki>:foo</nowiki>
21926 *<nowiki>;foo</nowiki>
21928 #<nowiki>*foo</nowiki>
21930 #<nowiki>#foo</nowiki>
21932 #<nowiki>:foo</nowiki>
21934 #<nowiki>;foo</nowiki>
21936 <ul><li>*foo</li></ul>
21937 <ul><li>#foo</li></ul>
21938 <ul><li>:foo</li></ul>
21939 <ul><li>;foo</li></ul>
21940 <ol><li>*foo</li></ol>
21941 <ol><li>#foo</li></ol>
21942 <ol><li>:foo</li></ol>
21943 <ol><li>;foo</li></ol>
21948 Lists: 2. Inside definition lists
21950 ;<nowiki>;foo</nowiki>
21952 ;<nowiki>:foo</nowiki>
21954 ;<nowiki>:foo</nowiki>
21957 :<nowiki>:foo</nowiki>
21959 <dl><dt>;foo</dt></dl>
21960 <dl><dt>:foo</dt></dl>
21963 <dl><dd>:foo</dd></dl>
21968 Lists: 3. Only bullets at start of text should be escaped
21970 *<nowiki>*foo*bar</nowiki>
21972 *<nowiki>*foo</nowiki>''it''*bar
21974 <ul><li>*foo*bar</li></ul>
21975 <ul><li>*foo<i>it</i>*bar</li></ul>
21980 Lists: 4. No escapes needed
22001 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22005 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22011 Lists: 5. No unnecessary escapes
22013 * bar <span><nowiki>[[foo]]</nowiki></span>
22015 * =bar <span><nowiki>[[foo]]</nowiki></span>
22017 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22019 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22021 * =bar <span>foo]]</span>=
22027 <ul><li> bar <span>[[foo]]</span></li></ul>
22028 <ul><li> =bar <span>[[foo]]</span></li></ul>
22029 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22030 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22031 <ul><li> =bar <span>foo]]</span>=</li></ul>
22032 <ul><li> <s></s>: a</li></ul>
22033 <ul><li> <i>* foo</i></li></ul>
22038 Lists: 6. Escape bullets in SOL position
22042 <p><!--cmt-->*foo</p>
22044 <!--cmt--><nowiki>*</nowiki>foo
22048 Lists: 7. Escape bullets in a multi-line context
22051 <nowiki>*</nowiki>b
22059 Lists: 8. Escape colons only if not present in tags
22063 <dl><dt>a:b<i>c:d</i></dt></dl>
22065 ; <nowiki>a:b</nowiki>''c:d''
22068 #### --------------- HRs ---------------
22069 #### 1. Single line
22070 #### -----------------------------------
22073 HRs: 1. Single line
22075 ----<nowiki>----</nowiki>
22087 #### --------------- Tables ---------------
22088 #### 1a. Simple example
22089 #### 1b. No escaping needed (!foo)
22090 #### 1c. No escaping needed (|foo)
22091 #### 1d. No escaping needed (|}foo)
22093 #### 2a. Nested in td (<td>foo|bar</td>)
22094 #### 2b. Nested in td (<td>foo||bar</td>)
22095 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22097 #### 3a. Nested in th (<th>foo!bar</th>)
22098 #### 3b. Nested in th (<th>foo!!bar</th>)
22099 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22103 #### 4c. No escaping needed
22104 #### --------------------------------------
22107 Tables: 1a. Simple example
22118 Tables: 1b. No escaping needed
22127 Tables: 1c. No escaping needed
22136 Tables: 1d. No escaping needed
22145 Tables: 2a. Nested in td
22150 <td>foo|bar</td></tr>
22151 <tr><td>x<div>a|b</div></td>
22155 |<nowiki>foo|bar</nowiki>
22157 |x<div><nowiki>a|b</nowiki></div>
22173 Tables: 2b. Nested in td
22179 <td>a<i>b||c</i></td>
22180 <td>a<i><div>b||c</div></i></td>
22181 </tr></tbody></table>
22184 |<nowiki>foo||bar</nowiki>
22185 |a''<nowiki>b||c</nowiki>''
22186 |a''<div><nowiki>b||c</nowiki></div>''
22195 <td>a<i><div>b||c</div></i>
22201 Tables: 2c. Nested in td -- no escaping needed
22217 Tables: 3a. Nested in th
22233 Tables: 3b. Nested in th
22238 <tr><th>foo!!bar</th>
22239 <th><i>foo|bar</i></th>
22240 <th><i>foo!!bar</i></th>
22241 <th><i><span>foo!!bar</span></i></th>
22242 </tr></tbody></table>
22245 !<nowiki>foo!!bar</nowiki>
22246 !''<nowiki>foo|bar</nowiki>''
22247 !''<nowiki>foo!!bar</nowiki>''
22248 !''<span><nowiki>foo!!bar</nowiki></span>''
22257 <th><i>foo!!bar</i>
22259 <th><i><span>foo!!bar</span></i>
22265 Tables: 3c. Nested in th
22270 <tr><th>foo||bar</th>
22271 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22272 </tr></tbody></table>
22275 !<nowiki>foo||bar</nowiki>
22276 !<nowiki>foo||bar</nowiki>
22289 Tables: 4a. Escape -
22308 |<nowiki>-bar</nowiki>
22313 Tables: 4b. Escape +
22332 |<nowiki>+bar</nowiki>
22337 Tables: 4c. No escaping needed
22380 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22381 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22387 <div>a|b</div></td>
22392 Tables: 4d. No escaping needed
22402 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22411 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22412 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22413 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22418 Tables: Digest broken attributes on table and tr tag
22435 T97430: Don't emit empty nowiki pairs around marker meta tags
22439 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22440 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22442 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22443 <nowiki>|</nowiki>** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22447 Unclosed xmlish element in table line shouldn't eat end delimiters
22463 <tbody><tr><td> <foo</td>
22464 <td> bar></td></tr>
22468 #### --------------- Links ----------------
22469 #### 1. Quote marks in link text
22470 #### 2. Wikilinks: Escapes needed
22471 #### 3. Wikilinks: No escapes needed
22472 #### 4. Extlinks: Escapes needed
22473 #### 5. Extlinks: No escapes needed
22474 #### --------------------------------------
22476 Links 1. WikiLinks: No escapes needed
22480 [[Foo|x [Foobar] x]]
22482 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22483 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22484 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22487 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22488 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22489 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22493 Links 2. WikiLinks: Escapes needed
22497 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22498 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22499 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22500 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22501 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22502 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22503 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22504 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22505 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22506 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22508 [[Foo|<nowiki>Foobar]</nowiki>]]
22509 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22510 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22511 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22512 [[Foo|<nowiki>|Bar</nowiki>]]
22513 [[Foo|<nowiki>]]bar</nowiki>]]
22514 [[Foo|<nowiki>[[bar</nowiki>]]
22515 [[Foo|<nowiki>x [[ y</nowiki>]]
22516 [[Foo|<nowiki>x ]] y</nowiki>]]
22517 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22519 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22520 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22521 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22522 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22523 <a href="/wiki/Foo" title="Foo">|Bar</a>
22524 <a href="/wiki/Foo" title="Foo">]]bar</a>
22525 <a href="/wiki/Foo" title="Foo">[[bar</a>
22526 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22527 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22528 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22533 Links 3. WikiLinks: No escapes needed
22538 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22539 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22542 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22543 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22547 Links 4. ExtLinks: Escapes needed
22551 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
22552 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
22553 <p>[http://google.com]</p>
22554 <p>[http://google.com google]</p>
22556 [http://google.com <nowiki>[google]</nowiki>]
22557 [http://google.com <nowiki>google]</nowiki>]
22559 <nowiki>[http://google.com]</nowiki>
22561 <nowiki>[http://google.com google]</nowiki>
22564 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
22565 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
22566 </p><p>[http://google.com]
22567 </p><p>[http://google.com google]
22572 Links 5. ExtLinks: No escapes needed
22574 [http://google.com [google]
22576 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
22579 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
22583 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
22585 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
22586 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
22587 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
22588 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
22589 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
22590 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
22591 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22592 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
22593 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
22594 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
22595 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
22596 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
22597 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
22600 x<nowiki/>http://example.com<nowiki/>y
22601 http://example.com<nowiki/>?x
22602 http://example.com<nowiki/>&x
22603 http://example.com<nowiki/>'x
22604 http://example.com<nowiki/>,x
22605 http://example.com<nowiki/>.x
22606 http://example.com<nowiki/>;x
22607 http://example.com<nowiki/>:x
22608 http://example.com<nowiki/>;x
22609 http://example.com<nowiki/>!x
22610 http://example.com<nowiki/>=x
22611 http://example.com<nowiki/>(x)
22612 http://example.com(x<nowiki/>)
22616 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22619 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
22621 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
22622 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
22623 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
22624 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
22625 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
22631 "http://example.com"
22632 (http://example.com)
22633 (http://example.com) foo
22634 http://example.com,
22635 http://example.com, foo
22638 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
22640 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
22641 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
22642 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
22643 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
22644 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
22649 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
22651 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
22652 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
22654 http://example.com.,;:!?\
22655 -http://example.com:
22657 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
22658 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
22663 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
22665 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
22666 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
22667 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
22671 X<nowiki/>RFC 123<nowiki/>y
22675 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
22677 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
22678 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
22679 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
22686 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
22687 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
22688 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
22693 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
22695 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
22696 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22697 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
22701 X<nowiki/>PMID 123<nowiki/>y
22705 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
22707 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
22708 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
22709 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
22716 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
22717 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
22718 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
22723 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
22725 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
22726 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
22727 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
22730 ISBN 1234567890<nowiki/>1
22731 ISBN 1234567890<nowiki/>x
22732 a<nowiki/>ISBN 1234567890<nowiki/>b
22736 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
22738 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
22742 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
22747 Links 14. Protect link-like plain text. (Parsoid bug T78425)
22751 <p>this is not a link: http://example.com
22754 this is not a link: <nowiki>http://example.com</nowiki>
22758 Links 15. Link trails can't become link prefixes.
22762 [[Söfnuður]]-[[00]]
22764 <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>
22767 <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>
22770 #### --------------- Quotes ---------------
22771 #### 1. Quotes inside <b> and <i>
22772 #### 2. Link fragments separated by <i> and <b> tags
22773 #### 3. Link fragments inside <i> and <b>
22774 #### 4. No escaping needed
22775 #### --------------------------------------
22777 1a. Quotes inside <b> and <i>
22779 parsoid=html2wt,wt2wt
22782 ''<nowiki>''foo''</nowiki>''
22783 ''<nowiki>'''foo'''</nowiki>''
22785 '''<nowiki/>'foo''''
22786 '''<nowiki>''foo''</nowiki>'''
22787 '''<nowiki>'''foo'''</nowiki>'''
22788 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
22789 '''foo'''<nowiki/>'s
22795 '''foo'''<nowiki/>'
22796 ''''foo'''<nowiki/>'
22797 ''fools'<span> errand</span>''
22798 ''<span>fool</span>'s errand''
22799 '<nowiki/>''foo'' bar '''baz''
22800 a|!*#-:;+-~[]{}b'''x''
22809 <b>foo'<i>bar'</i>baz</b>
22818 <i>fools'<span> errand</span></i>
22819 <i><span>fool</span>'s errand</i>
22820 '<i>foo</i> bar '<i>baz</i>
22821 a|!*#-:;+-~[]{}b'<i>x</i>
22826 1b. Quotes inside <b> and <i> with other tags on same line
22828 parsoid=html2wt,wt2wt
22830 '''a'' foo ''[[bar]]''
22831 ''a''' foo ''[[bar]]''
22832 ''a''' foo '''{{echo|[[bar]]}}'''
22833 [[foo]] x'''[[bar]]''
22834 '''foo'' <ref>test</ref>
22835 '''foo'' <div title="name">test</div>
22836 '''foo'' and <br> bar
22839 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22840 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22841 <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>
22842 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
22843 '<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>
22844 '<i>foo</i> <div title="name">test</div>
22845 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
22846 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22847 <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>
22852 2. Link fragments separated by <i> and <b> tags
22854 [[''foo''<nowiki>hello]]</nowiki>
22856 [['''foo'''<nowiki>hello]]</nowiki>
22858 <p>[[<i>foo</i>hello]]
22859 </p><p>[[<b>foo</b>hello]]
22863 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
22864 # this is one of the shortcomings of this format
22866 3. Link fragments inside <i> and <b>
22868 ''[[foo''<nowiki>]]</nowiki>
22870 '''[[foo'''<nowiki>]]</nowiki>
22873 </p><p><b>[[foo</b>]]
22878 4. No escaping needed
22880 '<span>''bar''</span>'
22881 '<span>'''bar'''</span>'
22884 <p>'<span><i>bar</i></span>'
22885 '<span><b>bar</b></span>'
22890 #### ----------- Paragraphs ---------------
22891 #### 1. No unnecessary escapes
22892 #### --------------------------------------
22895 1. No unnecessary escapes
22897 bar <span><nowiki>[[foo]]</nowiki></span>
22899 =bar <span><nowiki>[[foo]]</nowiki></span>
22901 [[bar <span><nowiki>[[foo]]</nowiki></span>
22903 ]]bar <span><nowiki>[[foo]]</nowiki></span>
22905 =bar <span>foo]]</span><nowiki>=</nowiki>
22907 <p>bar <span>[[foo]]</span>
22908 </p><p>=bar <span>[[foo]]</span>
22909 </p><p>[[bar <span>[[foo]]</span>
22910 </p><p>]]bar <span>[[foo]]</span>
22911 </p><p>=bar <span>foo]]</span>=
22915 #### ----------------------- PRE --------------------------
22916 #### 1. Leading whitespace in SOL context should be escaped
22917 #### ------------------------------------------------------
22919 1. Leading whitespace in SOL context should be escaped
22923 <nowiki> </nowiki>a
22925 <nowiki> </nowiki> a
22927 <nowiki> </nowiki>a(tab)
22929 <nowiki> </nowiki> a
22931 <nowiki> </nowiki> a
22934 <nowiki> </nowiki>b
22937 <nowiki> </nowiki>b
22940 <nowiki> </nowiki> b
22946 <p><!--cmt--> a</p>
22956 2. Leading whitespace in non-indent-pre contexts should not be escaped
22964 <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>
22965 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22966 <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>
22972 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
22991 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
22995 [[File:Foobar.jpg|thumb|caption]]
22997 <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>
23001 5. Nowiki escaping should account for indent-pres
23011 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23024 #### --------------- Behavior Switches --------------------
23027 1. Valid behavior switches should be escaped
23034 <nowiki>__TOC__</nowiki>
23035 ''<nowiki>__TOC__</nowiki>''
23039 2. Invalid behavior switches should not be escaped
23050 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23052 Behavior switches should be SOL-transparent
23056 <!-- this one's bogus -->
23063 <meta property="mw:PageProp/toc" />
23065 <!-- this one's bogus -->
23068 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23070 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23073 #### --------------- HTML tags ---------------
23076 #### 3. multi-line html tag
23077 #### 4. extension tags
23078 #### -----------------------------------------
23084 <a href="http://google.com">google</a>
23086 <a href="http://google.com">google</a>
23092 * <nowiki><div>foo</div></nowiki>
23093 * <nowiki><div style="color:red">foo</div></nowiki>
23094 * <nowiki><td></nowiki>
23096 <ul><li> <div>foo</div></li>
23097 <li> <div style="color:red">foo</div></li>
23098 <li> <td></li></ul>
23103 3. multi-line html tag
23118 <nowiki><ref>foo</ref></nowiki>
23120 <nowiki><ref>bar</nowiki>
23122 baz<nowiki></ref></nowiki>
23124 <p><ref>foo</ref>
23125 </p><p><ref>bar
23126 </p><p>baz</ref>
23130 #### --------------- Others ---------------
23134 <nowiki>foo</nowiki>
23136 <p><nowiki>foo</nowiki>
23140 ## The quote-char in the input is necessary for triggering the bug
23142 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23144 parsoid=wt2wt,html2wt
23153 Tag-like HTML structures are passed through as text
23175 </p><p>1<d e>f
23180 HTML tag with necessary entities in attributes
23182 <span title="&amp;">foo</span>
23184 <p><span title="&amp;">foo</span>
23189 HTML tag with 'unnecessary' entity encoding in attributes
23191 <span title="&">foo</span>
23193 <p><span title="&">foo</span>
23198 HTML tag with broken attribute value quoting
23200 <span title="Hello world>Foo</span>
23202 <p><span>Foo</span>
23205 <p><span title="Hello world">Foo</span>
23210 Parsoid-only: HTML tag with broken attribute value quoting
23214 <span title="Hello world>Foo</span>
23216 <p><span title="Hello world">Foo</span>
23221 Table with broken attribute value quoting
23224 | title="Hello world|Foo
23235 <td title="Hello world">Foo
23241 Table with broken attribute value quoting on consecutive lines
23244 | title="Hello world|Foo
23245 | style="color:red|Bar
23258 <td title="Hello world">Foo
23259 </td><td style="color: red">Bar
23260 </td></tr></tbody></table>
23265 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23275 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23285 Accept empty td cell attribute
23288 | align="center" | foo || |
23293 <td align="center"> foo </td>
23300 Non-empty attributes in th-cells
23303 ! Foo !! style="color: red" | Bar
23309 <th style="color: red"> Bar
23315 Accept empty attributes in th-cells
23330 Empty table rows go away
23351 ### Parsoid-centric tests for testing RTing of inter-element separators
23352 ### Edge cases not tested by existing parser tests and specific to
23353 ### Parsoid-specific serialization strategies.
23357 RT-ed inter-element separators should be valid separators
23369 # Parsoid-only since PHP parser relies on Tidy for correct output
23371 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23385 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23386 <p>bar</p></small></td></tr>
23390 <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>
23394 # Note that the "style" attribute is really a template parameter here.
23395 # The = would have to be {{=}} if you wanted the literal.
23397 Empty TD followed by TD with tpl-generated attribute
23402 |{{echo|style='color:red'}}|foo
23416 Indented table with an empty td
23434 ## We have some newline diffs RT-ing this edge case
23435 ## and it is not important enough -- we seem to be emitting
23436 ## at most 2 newlines after a </tr> and this is unrelated to
23437 ## the issue from T85627 that this is testing.
23439 Indented table with blank lines in between (T85627)
23458 Indented block & table
23472 <div data-parsoid='{"stx":"html"}'>foo</div>
23474 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23479 Indent and comment before table row
23494 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23495 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
23499 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
23501 Empty TR followed by a template-generated TR
23507 {{echo|<tr><td>foo</td></tr>}}
23513 <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}}]}'>
23518 ## PHP and parsoid output differ for this, and since this is primarily
23519 ## for testing Parsoid's serializer, marking this Parsoid only
23521 Empty TR followed by mixed-ws-comment line should RT correctly
23537 <!--c--> </tr><!--d-->
23543 Multi-line image caption generated by templates with/without trailing newlines
23545 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
23546 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
23548 <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>
23549 <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>
23553 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
23557 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
23559 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
23561 <includeonly>foo</includeonly>
23569 ## PHP emits broken html for this, and since this is primarily
23570 ## a Parsoid serializer test, marking this Parsoid only
23572 Improperly nested inline or quotes tags with whitespace in between
23574 <span> <s>x</span> </s>
23577 <p><span> <s>x</s></span><s> </s>
23578 <b> <i>x</i></b><i> </i>
23583 Encapsulate protected attributes from wt
23585 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
23587 <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>
23591 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
23592 ## Having nested or stray pre tags results in the attempt to add duplicates,
23593 ## causing an assertion fail. This test tries to prevent that situation.
23595 Ensure ParagraphWrapper can deal with stray closing pre tags
23605 1. Ensure fostered text content is wrapped in element nodes
23609 <table>hi</table><table>ho</table>
23618 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
23620 parsoid=wt2html,wt2wt
23629 <tbody><tr><td> a</td></tr>
23634 Encapsulation properly handles null DSR information from foster box
23636 parsoid=wt2html,wt2wt
23638 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
23640 <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>
23644 1. Encapsulate foster-parented transclusion content
23646 parsoid=wt2wt,wt2html
23648 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
23650 <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>
23660 2. Encapsulate foster-parented transclusion content
23662 parsoid=wt2wt,wt2html
23664 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
23666 <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>
23677 3. Encapsulate foster-parented transclusion content
23679 parsoid=wt2wt,wt2html
23681 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23683 <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>"]}">
23696 4. Encapsulate foster-parented transclusion content
23698 parsoid=wt2wt,wt2html
23700 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
23702 <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>"]}">
23715 5. Encapsulate foster-parented transclusion content
23717 parsoid=wt2wt,wt2html
23719 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
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"}},"i":0}},"</tr></table>"]}">foo</p>
23736 6. Encapsulate foster-parented transclusion content
23738 parsoid=wt2wt,wt2html
23740 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
23742 <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>
23758 7. Encapsulate foster-parented transclusion content
23760 parsoid=wt2wt,wt2html
23762 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
23764 <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>
23774 # Note that the wt is broken on purpose: the = should be {{=}} if you
23775 # don't want it to be a template parameter key.
23777 8. Encapsulate foster-parented transclusion content
23779 parsoid=wt2wt,wt2html
23782 }}{|{{echo|style='color:red'}}
23787 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
23789 <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>
23800 9. Encapsulate foster-parented transclusion content
23802 parsoid=wt2wt,wt2html
23804 <table>{{echo|hi</table>hello}}
23806 <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>
23810 Table in fosterable position
23812 parsoid=wt2html,wt2wt
23821 <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">
23823 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
23829 # Parsoid only for bug 64747
23831 Properly encapsulate empty-content transclusions in fosterable positions
23839 <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":["","","",""]}]]}'>
23845 Support <object> element with .data attribute
23849 <object data="test.swf"></object>
23851 <object data="test.swf"></object>
23855 Don't block XML namespace declaration
23857 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
23859 <p><span>MediaWiki</span>
23862 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
23865 # -----------------------------------------------------------------
23866 # The following section of tests are primarily to spec requirements
23867 # around serialization of new/edited content.
23869 # All these tests are marked Parsoid html2wt and html2html only
23870 # ----------------------------------------------------------------
23872 # 'mi' is a localinterwiki prefix as well as a language
23874 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
23878 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
23885 New wikilinks should be serialized properly
23889 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
23890 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
23897 New wiki links (href variations)
23901 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23902 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
23903 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
23904 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
23909 [[Toxine bactérienne]]
23913 New wiki links (content string variations)
23917 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23918 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
23919 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
23923 [[Foo_bar|./Foo_bar]]
23927 New category links (href variations)
23931 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
23932 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
23933 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
23935 [[Category:Toxine bactérienne]]
23936 [[Category:Toxine bactérienne]]
23937 [[Category:Toxine bactérienne]]
23941 New sol transparent links don't need indent-pre nowiki protection
23946 <link rel="mw:PageProp/redirect" href="./Main_Page">
23947 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
23948 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
23950 #WEITERLEITUNG [[Main Page]]
23951 <!-- this is good --> [[Category:Good]]
23952 <!-- this is great --> [[Kategorie:Great]]
23956 New interlanguage links (href variations)
23960 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
23961 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
23962 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
23964 [[es:Toxine bactérienne]]
23965 [[es:Toxine_bactérienne]]
23966 [[es:Toxine_bactérienne]]
23970 Image: Modifying size of an image (1)
23973 "modes": ["wt2wt"],
23975 ["img[height]", "attr", "height", "22"],
23976 ["img[width]", "attr", "width", "200"]
23980 [[Image:Foobar.jpg|230x230px]]
23982 [[Image:Foobar.jpg|200x200px]]
23986 Image: Modifying size of an image (2)
23989 "modes": ["wt2wt"],
23991 ["img[height]", "attr", "height", "100"],
23992 ["img[width]", "attr", "width", "500"]
23996 [[Image:Foobar.jpg|230x230px]]
23998 [[Image:Foobar.jpg|500x500px]]
24001 # Change in size is ignored so long as class='mw-default-size'
24003 Image: Modifying size of an image (3)
24006 "modes": ["wt2wt"],
24008 ["figure[class]", "removeClass", "mw-default-size"],
24009 ["figure img", "attr", "height", "19"],
24010 ["figure img", "attr", "width", "170"]
24014 [[Image:Foobar.jpg|thumb]]
24016 [[Image:Foobar.jpg|thumb|170x170px]]
24020 Image: Modifying alignment of an image (bug 48665)
24023 "modes": ["wt2wt"],
24025 ["figure[class]", "removeClass", "mw-halign-right"],
24026 ["figure[class]", "addClass", "mw-halign-left"]
24030 [[Image:Foobar.jpg|thumb|caption|right]]
24032 [[Image:Foobar.jpg|thumb|caption|left]]
24036 Image: Modifying mw-default-size of an frameless image (bug 62805)
24039 "modes": ["wt2wt"],
24041 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24045 [[Image:Foobar.jpg|frameless|right]]
24047 [[Image:Foobar.jpg|frameless|right|220x220px]]
24051 Image: Modifying valign of an image (bug 49221)
24054 "modes": ["wt2wt"],
24056 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24057 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24061 [[File:Foobar.jpg|20px|middle]]
24063 [[File:Foobar.jpg|20px|text-top]]
24067 Image: Modifying alt attribute of an image (bug 56400)
24070 "modes": ["wt2wt"],
24072 ["img[alt]", "attr", "alt", "some alternate edited text"]
24076 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24078 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24082 Image: Modifying caption of an image
24085 "modes": ["wt2wt"],
24087 ["figcaption", "text", "new caption"]
24091 [[Image:Foobar.jpg|thumb|original caption]]
24093 [[Image:Foobar.jpg|thumb|new caption]]
24097 Image: empty alt attribute (bug 48924)
24101 [[File:Foobar.jpg|thumb|alt=|bar]]
24103 <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>
24107 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24112 #<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>
24114 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24118 Image: Block level image should have \n before and after
24121 [[File:Foobar.jpg|right|thumb|150x150px]]
24125 <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>
24130 Image: New block level image should have \n before and after (existing content)
24133 [[File:Foobar.jpg|right|thumb|150x150px]]
24137 <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>
24142 Image: upright option (parsoid)
24144 [[File:Foobar.jpg|thumb|upright|caption]]
24145 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24146 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24148 <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>
24149 <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>
24150 <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>
24154 Image: upright option is ignored on inline and frame images (parsoid)
24156 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24158 <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>
24162 Image: from basic HTML (1)
24166 <span typeof="mw:Image">
24167 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24170 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24174 Image: from basic HTML (2)
24178 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24180 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24184 Image: from basic HTML (3)
24188 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24190 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24194 Image: from basic HTML (4)
24198 <img src="./File:Foobar.jpg">
24200 [[File:Foobar.jpg|link=]]
24204 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24209 <li><p>foo</p></li>
24216 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24220 <ul> <li>foo</li></ul>
24226 Don't strip leading whitespace when handling indent-pre suppressing tags
24231 <tr><td> indented row</td></tr>
24234 <b>This is very bold of you!</b>
24237 indented cell (no pre-wrapping!)
24247 '''This is very bold of you!'''
24251 indented cell (no pre-wrapping!)
24259 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24264 <nowiki> </nowiki><span>bar</span>
24267 <nowiki> </nowiki></span>bar2
24270 <nowiki> </nowiki><span>bar</span>
24273 <nowiki> </nowiki><span>foo</span>
24291 Lists: Dont insert newlines in a serialized list item.
24295 <ul><li>a<br>b</li><li>c</li></ul>
24302 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24305 "modes": ["html2wt"],
24306 "scrubWikitext": false
24309 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
24310 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24312 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24313 <h2>it goes well <link href="Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24315 <h2 data-parsoid='{}'>howdy<link href="Category:A5" rel="mw:PageProp/Category" /></h2>
24317 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24319 == hello there [[Category:A1]] ==
24321 == [[Category:A2]] hi pal ==
24323 == <!--foo--> [[Category:A3]] how goes it ==
24325 == it goes well [[Category:A4]] <!--bar--> ==
24327 ==howdy [[Category:A5]] ==
24333 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24336 "modes": ["html2wt"],
24337 "scrubWikitext": true
24340 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
24341 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24343 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24344 <h2>it goes well <link href="Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24346 <h2 data-parsoid='{}'>howdy<link href="Category:A5" rel="mw:PageProp/Category" /></h2>
24348 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24356 <!--foo--> [[Category:A3]]
24361 [[Category:A4]] <!--bar-->
24363 ==howdy [[Category:A5]] ==
24371 Headings: Don't hoist metas that come from templates
24374 "modes": ["html2wt"],
24375 "scrubWikitext": true
24378 <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>
24380 == {{echo|foo [[Category:Foo]]}} ==
24384 Headings: Category in ref isn't hoisted
24387 "modes": ["html2wt"],
24388 "scrubWikitext": true
24391 <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>
24393 <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>
24396 [[Category:Baz]] </ref> ==
24402 Parsoid: Serialize positional parameters with = in them as named parameter
24406 <p about="#mwt1" typeof="mw:Transclusion"
24407 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24409 <p about="#mwt1" typeof="mw:Transclusion"
24410 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24412 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24413 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24414 <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>
24418 {{echo|1 = f=oo|2 = bar}}
24420 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24421 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24422 {{echo|<nowiki>f=oo</nowiki>|bar}}
24426 Parsoid: Serialize positional parameters with = in extlink as named parameter
24430 <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>
24432 {{echo|1 = http://stuff?is=ok}}
24436 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24440 <div>a<p>b</p></div>
24461 Substrings resembling wikitext in hrefs should not get nowiki escapes
24465 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24471 Enforce single-line context in the serializer
24478 <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">
24479 </span><span about="#mwt1">you</span> </h2>
24481 <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>
24483 <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
24484 there</span></li></ol>
24496 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
24503 </tbody></table></dd></dl>
24507 == hi {{bogus|there
24518 * foo '''bar''' baz
24530 Serialize new placeholder space without spans
24534 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
24536 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
24538 <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>
24544 <ref>foo : bar</ref>ok
24548 #-----------------------
24549 # Tag minimization tests
24550 #-----------------------
24553 1. I/B quote minimization: wikitext-only tags should be combined
24557 <p><i>A</i><i>B</i></p>
24558 <p><b>A</b><b>B</b></p>
24559 <p><i>A</i><b><i>B</i></b></p>
24560 <p><b>A</b><i><b>B</b></i></p>
24561 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
24562 <p><i><b>A</b></i><i><b>B</b></i></p>
24563 <p><i><b>A</b></i><b><i>B</i></b></p>
24564 <p><b><i>A</i></b><i><b>B</b></i></p>
24584 2. I/B quote minimization: wikitext and html tags should not be combined
24588 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
24589 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
24593 ''A''<nowiki/>'''<i>B</i>'''
24597 3. I/B quote minimization: templated content stops minimization
24601 <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>
24602 <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>
24604 ''A''{{echo|''B''}}
24606 ''A''{{echo|'''''B'''''}}
24610 4. I/B quote minimization: new content should be mimimized with adjacent old content
24614 <p><i>A</i><i>B</i></p>
24615 <p><b>A</b><b>B</b></p>
24616 <p><i>A</i><b><i>B</i></b></p>
24626 5a. Merge adjacent quote nodes if they've been edited
24629 "modes": ["wt2wt", "selser"],
24631 ["p", "contents", "remove", ":contains('b')"]
24641 5b. Merge adjacent quote nodes if they've been edited
24644 "modes": ["wt2wt", "selser"],
24650 ''a''<span id="x">b</span>''c''
24656 1. Merge adjacent link nodes as long as at least one element is new
24659 "modes": ["html2wt"],
24660 "scrubWikitext": true
24663 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24664 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24665 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
24669 [[Football|Foot]][[Football|ball]]
24673 2. Merge adjacent link nodes and enable additional normalizations
24676 "modes": ["html2wt"],
24677 "scrubWikitext": true
24680 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
24682 [[Football|''Football'']]
24686 3. Don't merge adjacent link nodes if scrubWikitext is false
24689 "modes": ["html2wt"],
24690 "scrubWikitext": false
24693 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
24695 [[Football|Foot]][[Football|ball]]
24698 #------------------------------
24699 # End of tag minimization tests
24700 #------------------------------
24703 Bug 54262: New entities
24709 <span typeof="mw:Entity"> </span>
24712 ## Note that there is no wikitext output for 'unknownproperty' ##
24713 ## Unknown magic words are silently dropped ##
24720 <meta property='mw:PageProp/toc' />
24721 <meta property='mw:PageProp/notoc' />
24722 <meta property='mw:PageProp/forcetoc' />
24723 <meta property='mw:PageProp/index' />
24724 <meta property='mw:PageProp/noindex' />
24725 <meta property='mw:PageProp/nogallery' />
24726 <meta property='mw:PageProp/noeditsection' />
24727 <meta property='mw:PageProp/notitleconvert' />
24728 <meta property='mw:PageProp/nocontentconvert' />
24729 <meta property='mw:PageProp/unknownproperty' />
24739 __NOCONTENTCONVERT__
24743 Consecutive <pre>s should not get merged
24745 parsoid=html2wt,html2html
24747 <pre>a</pre><pre>b</pre>
24775 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
24779 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
24781 [[Special:BookSources/1234567890|ISBN 1234567895]]
24785 Edited RFC links not serializable as RFC links should serialize as extlinks
24789 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
24791 [//tools.ietf.org/html/rfc123 New RFC]
24795 Edited PMID links not serializable as PMID links should serialize as extlinks
24799 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
24801 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
24805 WTS of autolinks with trailing/surrounding context
24809 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
24810 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
24811 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
24812 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
24813 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
24814 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
24816 http://cscott.net<nowiki/>'''foo'''
24818 http://cscott.net<b>foo</b>
24820 '''http://cscott.net<nowiki/>'''
24822 '''http://cscott.net '''
24824 '''http://cscott.net<nowiki/>x'''
24826 http://cscott.net<nowiki/>x
24830 WTS of autolinks with nowikis (round-trip)
24832 x<nowiki/>http://cscott.net<nowiki/>x
24834 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
24837 # this is the "easy" test because it leaves in place all the
24838 # data-parsoid information indicating this is an autolink
24840 WTS of autolinks with escapes (editing)
24843 "modes": ["wt2wt"],
24845 [ "meta", "remove" ]
24849 x<nowiki/>http://cscott.net<nowiki/>x
24851 x<nowiki/>http://cscott.net<nowiki/>x
24855 WTS of edited autolink-like text (T103364)
24858 "modes": ["wt2wt"],
24860 [ "span[typeof]", "removeAttr", "typeof" ]
24864 Not a link: <nowiki>http://example.com</nowiki>.
24866 Not a link: <span><nowiki>http://example.com</nowiki></span>.
24870 WTS of newly-authored autolink-like text (T103364)
24874 <p>http://example.com is not a link.</p>
24876 <nowiki>http://example.com is not a link.</nowiki>
24880 Edited Redirect link should emit a non-piped wikitext link
24884 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
24890 T75121: Infer extension name from typeOf if data-mw is not present
24894 <div typeOf="mw:Extension/foo"></div>
24899 # Note that the <p> wrapping isn't present in PHP parser output
24900 # The important thing for this test is that P-wrapping doesn't
24901 # interfere with the <nowiki> protection for leading - in <td>
24902 # (which isn't necessary for <th>).
24904 T88318: p-wrapped dash in table.
24906 parsoid=html2wt,wt2wt
24909 <tr><th><p>-</p></th><th><p>- </p></th></tr>
24910 <tr><td><p>-</p></td><td><p>- </p></td></tr>
24911 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
24918 |<nowiki>-</nowiki>
24919 |<nowiki>- </nowiki>
24938 <td><small>-</small></td>
24950 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
24955 <td id='mwAc'>foo</td>
24956 <td id='serialize-this'>bar</td>
24961 | id="serialize-this" |bar
24966 Parsoid-like element ids should not be serialized to wikitext unless shadowed
24970 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
24972 <div id="hello">ok</div>
24979 "modes": ["wt2wt"],
24981 [ "#xyz", "before", "<b>before</b> stuff " ],
24982 [ "#xyz", "after", " stuff <i>after</i>" ],
24983 [ "#xyz", "html", "x <b>y</b> z" ]
24987 <span id="xyz">hello</span>
24989 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
24993 Never serialize a-tag as html, regardless of what data-parsoid has to say
24997 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25002 ## SSS FIXME: This is broken output nevertheless.
25003 ## What might be a reasonable non-broken output for this?
25004 ## This is an edge case unlikely to be seen in production
25005 ## that I am not wasting more time on this right now.
25007 Never serialize a-tag as html, no matter what attributes it has
25011 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25013 [http://boo.org http://boohoo.org]
25016 # --------------------------------------------
25017 # Tests spec'ing wikitext serialization norms |
25018 # --------------------------------------------
25021 Lists: Add space after bullets
25028 <li><span> baz</span></li>
25033 * <span> baz</span>
25037 1. Headings: Add space before/after == (T53744)
25044 <h2><span> baz</span></h2>
25052 == <span> baz</span> ==
25056 2. Headings: Add space before/after == even after hoisted content
25059 "modes": ["html2wt"],
25060 "scrubWikitext": true
25063 <h2> <link href="Category:A2" rel="mw:PageProp/Category" />ok</h2>
25071 1. Headings: suppress newly created empty headings
25074 "modes": ["html2wt"],
25075 "scrubWikitext": true
25083 2. Headings: don't suppress empty headings if scrubWikitext is false
25093 3. Headings: don't suppress empty headings for existing headings even if scrubWikitext is true
25096 "modes": ["html2wt"],
25097 "scrubWikitext": true
25100 <h2 data-parsoid='{}'></h2>
25106 1. WT Quote Tags: suppress newly created empty style tags
25109 "modes": ["html2wt"],
25110 "scrubWikitext": true
25118 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
25124 ''<nowiki/>'''''<nowiki/>'''
25128 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
25131 "modes": ["html2wt"],
25132 "scrubWikitext": true
25144 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
25151 <nowiki> </nowiki>hi
25153 <nowiki> </nowiki> hello
25157 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
25160 "modes": ["html2wt"],
25161 "scrubWikitext": true
25170 baz bang</td></tr></table>
25176 bar<span>boo</span></p>
25192 bar<span>boo</span>
25196 1. New links that end in spaces
25199 "modes": ["html2wt"],
25200 "scrubWikitext": false
25203 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25204 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25206 [[Berlin ]]<nowiki/>is the capital of Germany.
25212 2. New links that end in spaces
25215 "modes": ["html2wt"],
25216 "scrubWikitext": true
25219 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25220 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25222 [[Berlin]] is the capital of Germany.
25228 3. Existing links that end in spaces
25231 "modes": ["html2wt"],
25232 "scrubWikitext": true
25235 <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>
25237 <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>
25239 [[Berlin ]]<nowiki/>is the capital of Germany.
25244 # ---------------------------------------------------
25245 # End of tests spec'ing wikitext serialization norms |
25246 # ---------------------------------------------------
25248 # -----------------------------------------------------------------
25249 # End of section for Parsoid-only html2wt tests for serialization
25251 # -----------------------------------------------------------------
25253 # -----------------------------------------------------------------
25254 # The following section of tests are primarily to spec behavior of
25255 # the selective serializer. All these tests have manual selser
25256 # changes. The automated selser changes for all tests handle the
25257 # wide variation of changes, but these tests here capture specs
25258 # deterministically.
25259 # ----------------------------------------------------------------
25263 Selser: New comments should not be lost
25266 "modes": ["selser"],
25268 [ "#a", "after", "<!--c1-->" ],
25269 [ "#b", "before", "<!--c2-->" ]
25273 <span id="a">a</span>
25275 <span id="b">b</span>
25277 <span id="a">a</span><!--c1-->
25279 <!--c2--><span id="b">b</span>
25284 Selser: Check for validity of DSR before using it
25287 "modes": ["selser"],
25289 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
25293 <span id="a">a</span>
25295 {{DISPLAYTITLE:foo}}
25296 <span id="a">a</span>
25300 1. DOMDiff: Changes to <ref> content should be looked up using id
25303 "modes": ["selser"],
25305 ["#X", "after", "bar"],
25306 ["#Y", "after", "baz"]
25310 X <ref><span id="X">foo</span></ref>
25313 <ref name="a"><span id="Y">foo</span></ref>
25316 X <ref><span id="X">foo</span>bar</ref>
25319 <ref name="a"><span id="Y">foo</span>baz</ref>
25324 2. DOMDiff: Changes to <ref> content should be looked up using id
25327 "modes": ["selser"],
25329 ["#Z", "after", "bar"]
25333 A <ref>foo bar for a</ref>
25334 B <ref group="X" name="b" />
25338 <references group="X">
25339 <ref name="b"><span id="Z">foo</span></ref>
25342 A <ref>foo bar for a</ref>
25343 B <ref group="X" name="b" />
25347 <references group="X">
25348 <ref name="b"><span id="Z">foo</span>bar</ref>