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 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml
40 # For testing purposes, temporary articles can created:
41 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
42 # where '/' denotes a newline.
44 # This is the standard article assumed to exist.
81 MediaWiki:bad image list
83 * [[File:Bad.jpg]] except [[Nasty page]]
111 Template:echo_with_span
117 Template:echo_with_div
130 Template:table_attribs
133 |</noinclude>style="color:red;"|Foo
137 Template:table_attribs_2
140 |</noinclude>style="color:red;"|Foo
145 Template:table_attribs_3
148 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
152 Template:table_attribs_4
154 | style="background-color:#DC241f;" width="10px" |
158 Template:table_attribs_5
161 |</noinclude>style="color:red;"||Bar
165 Template:table_attribs_6
167 style="background: <nowiki>
174 Template:table_attribs_7
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
181 Template:table_header_cells
183 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
189 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
193 Template:PartialTable
200 Template:image_attribs
203 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
206 ## See T48811 for details
208 Template:mixed_attr_content_template
210 style="color:red;" title="T48811"
216 Template:definition_list
263 Template:EmptyTRWithHTMLAttrTest
266 <tr align="center"></tr>
267 <tr><td>foo</td></tr>
268 <tr align="center"></tr>
269 <tr><td>bar</td></tr>
286 This is a simple paragraph.
288 <p>This is a simple paragraph.
293 Paragraphs with extra newline spacing
316 Paragraphs with newline spacing with comment lines in between
324 <!--foo--><!--More than 1 comment, still stripped-->
328 <!--foo--> <!----> <!-- bar -->
389 Paragraphs with newline spacing with non-empty white-space lines in between
416 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
424 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
463 Extra newlines: More paragraphs with indented comment
478 Extra newlines followed by heading
493 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
494 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
497 <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>
502 Extra newlines between heading and content are swallowed
510 <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>
511 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
518 http://fr.wikipedia.org/wiki/🍺
519 <!-- EasterEgg we love beer, better be able be able to link to it -->
521 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
525 # Note that the html+tidy output removes the spaces after the <li>,
526 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
527 # This is an issue for all tests with lists. We intentionally do
528 # *not* add html+tidy clauses for these, as we don't want to
529 # document/test the broken behavior. (Parsoid matches the non-tidy
530 # output in these cases.)
539 <li> Item 2</li></ul>
547 * plain''italic''plain
548 * plain''italic''plain''italic''plain
549 * plain'''bold'''plain
550 * plain'''bold'''plain'''bold'''plain
551 * plain''italic''plain'''bold'''plain
552 * plain'''bold'''plain''italic''plain
553 * plain''italic'''bold-italic'''italic''plain
554 * plain'''bold''bold-italic''bold'''plain
555 * plain'''''bold-italic'''italic''plain
556 * plain'''''bold-italic''bold'''plain
557 * plain''italic'''bold-italic'''''plain
558 * plain'''bold''bold-italic'''''plain
559 * plain l'''italic''plain
560 * plain l''''bold''' plain
563 <li> plain<i>italic</i>plain</li>
564 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
565 <li> plain<b>bold</b>plain</li>
566 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
567 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
568 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
569 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
570 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
571 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
572 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
573 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
574 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
575 <li> plain l'<i>italic</i>plain</li>
576 <li> plain l'<b>bold</b> plain</li></ul>
580 # this example taken from the [[simple:Moon]] article (bug 47326)
582 Italics and possessives (1)
584 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
586 <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
590 # this example taken from [[en:Flaming Pie]] (bug 49926)
592 Italics and possessives (2)
594 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
596 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
600 # this example taken from [[en:Dictionary]] (bug 49926)
602 Italics and possessives (3)
604 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''.
606 <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>.
612 ### 2-quote opening sequence tests
615 Italics and bold: 2-quote opening sequence: (2,2)
624 Italics and bold: 2-quote opening sequence: (2,3)
633 Italics and bold: 2-quote opening sequence: (2,4)
643 # same html as previous, but wikitext adjusted to match parsoid html2wt
645 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
647 ''foo<nowiki>''</nowiki>''
653 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
655 Italics and bold: 2-quote opening sequence: (2,5)
668 # same html as previous, but wikitext adjusted to match parsoid html2wt
670 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
672 ''foo'''''<nowiki/>'''
683 ### 3-quote opening sequence tests
687 Italics and bold: 3-quote opening sequence: (3,2)
696 Italics and bold: 3-quote opening sequence: (3,3)
705 Italics and bold: 3-quote opening sequence: (3,4)
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 3-quote opening sequence: (3,5)
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
732 '''foo'''''<nowiki/>''
743 ### 4-quote opening sequence tests
747 Italics and bold: 4-quote opening sequence: (4,2)
757 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
761 <nowiki>''</nowiki>''foo''
768 Italics and bold: 4-quote opening sequence: (4,3)
777 Italics and bold: 4-quote opening sequence: (4,4)
787 # same html as previous, but wikitext adjusted to match parsoid html2wt
789 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
797 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
799 Italics and bold: 4-quote opening sequence: (4,5)
808 <p>'<b>foo</b><i></i>
812 # same html as previous, but wikitext adjusted to match parsoid html2wt
814 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
816 '<nowiki/>'''foo'''''<nowiki/>''
821 <p>'<b>foo</b><i></i>
827 ### 5-quote opening sequence tests
831 Italics and bold: 5-quote opening sequence: (5,2)
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: 5-quote opening sequence: (5,2+3)
852 Italics and bold: 5-quote opening sequence: (5,3)
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: 5-quote opening sequence: (5,3+2)
873 Italics and bold: 5-quote opening sequence: (5,4)
879 <p><i><b>foo'</b></i>
884 Italics and bold: 5-quote opening sequence: (5,5)
893 Italics and bold: 5-quote opening sequence: (5,6)
897 <p><i><b>foo'</b></i>
902 ### multiple quote sequences in a line
905 Italics and bold: multiple quote sequences: (2,4,2)
911 <p><i>foo'<b>bar</b></i>
916 # same html as previous, but wikitext adjusted to match parsoid html2wt
918 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
920 ''foo'<nowiki/>'''bar'''''
922 <p><i>foo'<b>bar</b></i>
928 Italics and bold: multiple quote sequences: (2,4,3)
934 <p><i>foo'<b>bar</b></i>
939 # same html as previous, but wikitext adjusted to match parsoid html2wt
941 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
943 ''foo'<nowiki/>'''bar'''''
945 <p><i>foo'<b>bar</b></i>
951 Italics and bold: multiple quote sequences: (2,4,4)
957 <p><i>foo'<b>bar'</b></i>
962 # same html as previous, but wikitext adjusted to match parsoid html2wt
964 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
966 ''foo'<nowiki/>'''bar'<nowiki/>'''''
968 <p><i>foo'<b>bar'</b></i>
973 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
975 Italics and bold: multiple quote sequences: (3,4,2)
984 <p><b>foo'</b>bar<i></i>
988 # same html as previous, but wikitext adjusted to match parsoid html2wt
990 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
994 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
999 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1004 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1006 Italics and bold: multiple quote sequences: (3,4,3)
1015 <p><b>foo'</b>bar<b></b>
1019 # same html as previous, but wikitext adjusted to match parsoid html2wt
1021 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1023 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1028 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1033 ### other quote tests
1036 Italics and bold: other quote tests: (2,3,5)
1038 ''this is about '''foo's family'''''
1040 <p><i>this is about <b>foo's family</b></i>
1046 Italics and bold: other quote tests: (2,(3,3),2)
1048 ''this is about '''foo's''' family''
1050 <p><i>this is about <b>foo's</b> family</i>
1056 Italics and bold: other quote tests: (3,2,3,2)
1060 '''this is about ''foo'''s family''
1062 <p><b>this is about <i>foo</i></b><i>s family</i>
1067 # same html as previous, but wikitext adjusted to match parsoid html2wt
1069 Italics and bold: other quote tests: (3,2,3+2+2,2)
1071 '''this is about ''foo'''''<nowiki/>''s family''
1073 <p><b>this is about <i>foo</i></b><i>s family</i>
1079 Italics and bold: other quote tests: (3,2,3,3)
1081 '''this is about ''foo'''s family'''
1083 <p>'<i>this is about </i>foo<b>s family</b>
1089 Italics and bold: other quote tests: (3,(2,2),3)
1091 '''this is about ''foo's'' family'''
1093 <p><b>this is about <i>foo's</i> family</b>
1099 Italicized possessive
1101 The ''[[Main Page]]'''s talk page.
1103 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1106 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1110 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1111 (Requires tidy for PHP parser output to be fixed up)
1113 parsoid=wt2html,wt2wt
1130 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1131 <td><i>a</i></td><td><i>b</i></td></tr>
1140 Non-html5 tags should be accepted
1142 <center>''foo''</center>
1144 <font>''foo''</font>
1145 <strike>''foo''</strike>
1148 <center><i>foo</i></center>
1149 <p><big><i>foo</i></big>
1150 <font><i>foo</i></font>
1151 <strike><i>foo</i></strike>
1157 <wbr> is valid wikitext (bug 52468)
1165 # <strike> is HTML4, <s> is HTML4/5.
1167 <s> or <strike> for strikethrough
1169 <strike>strike</strike>
1173 <p><strike>strike</strike>
1181 Text-level semantic html elements in wikitext
1184 <strong>text</strong>
1200 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1207 <strong>text</strong>
1223 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1231 # test cases taken from
1232 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1234 Ruby markup (W3C-style)
1236 ; Mono-ruby for individual base characters
1237 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1239 : <ruby>今日<rt>きょう</rt></ruby>
1241 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1243 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1245 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1247 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1248 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1249 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1252 <dl><dt> Mono-ruby for individual base characters</dt>
1253 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1254 <dt> Group ruby</dt>
1255 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1256 <dt> Jukugo ruby</dt>
1257 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1258 <dt> Inline ruby</dt>
1259 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1260 <dt> Double-sided ruby</dt>
1261 <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>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1270 # The next two test different paths in the sanitizer.
1272 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1274 <blockquote|>a</blockquote>
1276 <b→> doesn't terminate </b→>
1278 <bä> doesn't terminate </bä>
1280 <boo> doesn't terminate </boo>
1282 <s.foo> doesn't terminate </s.foo>
1286 <p><blockquote|>a</blockquote>
1287 </p><p><b→> doesn't terminate </b→>
1288 </p><p><bä> doesn't terminate </bä>
1289 </p><p><boo> doesn't terminate </boo>
1290 </p><p><s.foo> doesn't terminate </s.foo>
1291 </p><p><sub-ID#1>
1295 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1296 # If the non-word-character tag made it through the sanitizer, tidy
1297 # would munge it up.
1299 Non-word characters don't terminate tag names + tidy
1301 <blockquote|>a</blockquote>
1303 <b→> doesn't terminate </b→>
1305 <bä> doesn't terminate </bä>
1307 <boo> doesn't terminate </boo>
1309 <s.foo> doesn't terminate </s.foo>
1313 <p><blockquote|>a</p>
1314 <p><b→> doesn't terminate </b→></p>
1315 <p><bä> doesn't terminate </bä></p>
1316 <p><boo> doesn't terminate </boo></p>
1317 <p><s.foo> doesn't terminate </s.foo></p>
1318 <p><sub-ID#1></p>
1322 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1323 ### This checks that HTML5 tags (with non-word characters in the tag
1324 ### name) make it safely through the parser -- the Sanitizer will
1325 ### munge them later, as it should.
1328 Non-word characters are valid in extension tags (T19663)
1339 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
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|<nowiki>a }} b</nowiki>}}
1544 {{echo|<nowiki>a [[ b</nowiki>}}
1545 {{echo|<nowiki>a | {{ ]]</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
1814 <!--c2--><!--c3--><!--c4-->
1821 ### paragraph wrapping tests
1836 Block tag on one line (<div>)
1852 Block tag on one line (<blockquote>)
1854 a <blockquote>foo</blockquote>
1858 a <blockquote>foo</blockquote>
1870 Block tag on both lines (<div>)
1887 Block tag on both lines (<blockquote>)
1889 a <blockquote>foo</blockquote>
1891 b <blockquote>foo</blockquote>
1893 a <blockquote>foo</blockquote>
1894 b <blockquote>foo</blockquote>
1908 Multiple lines without block tags
1932 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1933 # So, we have a separate section for Parsoid. We don't want
1934 # to mimic this stripping behavior in Parsoid. It affects
1935 # editing experience and also requires us to maintain additional
1938 Empty lines between lines with block tags
1976 <div data-parsoid='{"stx":"html"}'></div>
1979 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1982 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1984 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1987 <div data-parsoid='{"stx":"html"}'>e</div>
1990 ## PHP parser emits output which is broken
1992 Unclosed HTML p-tags should be handled properly
2005 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2010 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2011 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2014 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2018 a [[Category:A1]] [[Category:A2]]
2023 <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"/>
2027 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2033 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2037 ### Preformatted text
2046 And a [[Main Page|link]]
2052 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2057 Tabs don't trigger preformatted text
2061 This is preformatted text.
2067 <pre>This is preformatted text.
2072 preformatted text.</p>
2073 <pre>This is preformatted text.
2078 Space before tab needs nowiki pre protection
2084 <nowiki> </nowiki> a
2088 Ident preformatting with inline content
2099 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2116 Regression with preformatted in <center>
2130 Bug 52763: Preformatted in <blockquote>
2136 indented cell (no pre-wrapping!)
2146 <p> indented cell (no pre-wrapping!)
2154 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2171 Bug 15491: <ins>/<del> in blockquote
2174 Foo <del>bar</del> <ins>baz</ins> quux
2178 <p>Foo <del>bar</del> <ins>baz</ins> quux
2184 # Note that the p-wrapping is newline sensitive, which could be
2185 # considered a bug: tidy will wrap only the 'Foo' in the example
2186 # below in a <p> tag. (see comment 23-25 of bug #6200)
2188 Bug 15491: <ins>/<del> in blockquote (2)
2190 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2193 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2199 <del>bar</del> <ins>baz</ins> quux</blockquote>
2203 <pre> with attributes (bug 3202)
2205 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2207 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2212 <pre> with width attribute (bug 3202)
2214 <pre width="8">Narrow screen goodies</pre>
2216 <pre width="8">Narrow screen goodies</pre>
2221 <pre> with forbidden attribute (bug 3202)
2223 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2225 <pre width="8">Narrow screen goodies</pre>
2230 Entities inside <pre>
2239 <pre> with forbidden attribute values (bug 3202)
2241 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2243 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2248 <nowiki> inside <pre> (bug 13238)
2256 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2264 <pre><nowiki>Foo</nowiki></pre>
2269 <nowiki> inside of #tag:pre
2271 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2273 <pre>Foo →bar</pre>
2276 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2280 <nowiki> and <pre> preference (first one wins)
2309 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2311 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2314 <p><span typeof="mw:Nowiki">
2323 </pre> inside nowiki
2325 <nowiki></pre></nowiki>
2331 # Parsoid doesn't strip empty tags, like Tidy does.
2333 Empty pre; pre inside other HTML tags (bug 54946)
2335 parsoid=wt2html,wt2wt
2366 HTML pre followed by indent-pre
2376 # Note that tidy removes the empty <p> tags from the start and end.
2377 # Parsoid does not, by design.
2381 <p><pre>foo</pre></p>
2387 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2391 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2399 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2409 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2421 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2442 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2446 {{echo| foo}}{{echo| bar}}
2451 {{echo|<!--cmt--> foo}}
2453 <!--cmt-->{{echo| foo}}
2455 {{echo|{{echo| }}bar}}
2473 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2510 Pres with newline attributes
2515 <pre class="one two">hi</pre>
2519 two" data-parsoid='{"stx":"html"}'>hi</pre>
2523 Things that look like <pre> tags aren't treated as such
2525 Barack Obama <President> of the United States
2526 <President></President>
2528 <p>Barack Obama <President> of the United States
2529 <President></President>
2534 Handle broken pre-like tags (bug 64025)
2538 {{echo|<pre <pre>x</pre>}}
2540 <table><pre </table>
2543 <table><pre </table>
2551 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2560 Parsoid: handle pre with space after attribute
2564 <pre style="width:50%;" >{{echo|foo}}</pre>
2566 <pre style="width:50%;">{{echo|foo}}</pre>
2569 <pre style="width:50%;">{{echo|foo}}</pre>
2572 # TODO / maybe: fix wt2wt for this
2574 Parsoid: Don't paragraph-wrap fosterable content
2600 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2628 #--------------------------------------------------------------------
2629 # Transclusion parameter whitespace stripping tests
2630 # Behavior is different for positional and named parameters
2631 #--------------------------------------------------------------------
2633 Templates: Strip leading and trailing whitespace from named-param values
2637 {{echo|1= {{echo|b}} }}
2650 <ul><li> d</li></ul>
2655 Templates: Don't strip whitespace from positional-param values
2659 {{echo|{{echo|b}} }}
2691 <ul><li> f</li></ul>
2699 Templates: Handle empty comment-and-ws-only lines correctly
2702 <!--should be ignored-->
2703 <!--should be ignored as well-->
2712 Templates: Handle comments in the target
2715 <!-- should be ignored -->
2718 {{echo<!-- should be ignored -->
2721 {{echo<!-- should be ignored -->|foo}}
2723 {{<!-- should be ignored -->echo|foo}}
2725 <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>
2727 <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>
2729 <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>
2731 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2735 Templates: Handle comments in parameter names (bug 67657)
2738 <!-- should be ignored -->
2742 <!-- should be ignored -->
2745 {{echo|1<!-- should be ignored -->=foo}}
2747 {{echo|<!-- should be ignored -->1=foo}}
2749 <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>
2751 <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>
2753 <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>
2755 <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>
2759 Templates: Other wikitext in parameter names (bug 67657)
2763 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2769 #--------------------------------------------------------------------
2770 # Transclusion parameter escaping tests
2771 #--------------------------------------------------------------------
2773 Templates: Parsoid parameter escaping test 1
2775 {{echo|[foo]|{{echo|[bar]}}}}
2779 <p about="#mwt1" typeof="mw:Transclusion"
2780 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2784 Parsoid: Pipes in external links in template parameter
2786 {{echo|[{{echo|http://example.com}} link]}}
2788 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2790 <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>
2794 Parsoid: pipe in transclusion parameter
2796 {{echo|http://foo.com/a|b}}
2798 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2800 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2801 typeof="mw:Transclusion"
2802 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>
2806 Parsoid: Pipe in external link target and content in template parameter
2808 parsoid=html2wt,wt2wt
2810 {{echo|[http://foo.com/a|b a|b]}}
2812 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2814 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2815 typeof="mw:Transclusion"
2816 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2817 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2821 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2825 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2827 <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>
2831 Templates: Don't escape already nowiki-escaped text in template parameters
2833 parsoid=html2wt,wt2wt
2835 {{echo|foo<nowiki>|</nowiki>bar}}
2836 {{echo|<nowiki><div></nowiki>}}
2837 {{echo|<nowiki></nowiki>}}
2839 <p>foo|bar <div></p>
2841 <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>
2842 <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>
2843 <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>
2849 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2851 parsoid=html2wt,wt2wt
2853 {{echo|{{echo|1=bar}}}}
2857 <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>
2862 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2868 <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>
2873 Templates: Preserve blank parameter names
2879 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2883 Templates: Preserve blank parameter names in other positions
2885 {{blank_param|bar|=foo}}
2889 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2894 ### Parsoid-centric tests for testing RT edge cases for pre
2898 1a. Indent-Pre and Comments
2911 1b. Indent-Pre and Comments
2924 1c. Indent-Pre and Comments
2937 1d. Indent-Pre and Comments
2938 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2951 2a. Indent-Pre and tables
2972 2b. Indent-Pre and tables
2988 2c. Indent-Pre and tables (bug 42252)
3005 2d. Indent-Pre and tables
3022 <tbody><tr><td> b</td></tr>
3027 2e. Indent-Pre and table-line syntax
3040 2f. Indent-pre started by table-line syntax
3059 3a. Indent-Pre and block tags (single-line html)
3063 c <blockquote> foo </blockquote>
3068 c <blockquote> foo </blockquote>
3069 <pre><span> foo </span>
3072 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3073 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3074 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3075 <pre><span> foo </span>
3092 3b. Indent-Pre and block tags (multi-line html)
3097 <pre>a <span>foo</span>
3102 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3103 b <div data-parsoid='{"stx":"html"}'> foo </div>
3113 3c. Indent-Pre and block tags (pre-content on separate line)
3177 4. Indent-Pre and extension tags
3183 a <ul class="gallery mw-gallery-traditional">
3184 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3185 <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>
3186 <div class="gallerytext">
3193 <ul class="gallery mw-gallery-traditional">
3194 <li class="gallerybox" style="width: 155px">
3195 <div style="width: 155px">
3196 <div class="thumb" style="width: 150px;">
3197 <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>
3199 <div class="gallerytext"></div>
3206 Table wikitext syntax outside wiki-tables
3209 ! not a table heading
3212 | class="foo bar" | baz
3219 ! not a table heading
3222 | class="foo bar" | baz
3231 Render paragraphs when indent-pre is suppressed in blocklevels
3248 4. Multiple spaces at start-of-line
3266 ## NOTE: the leading white-space chars on empty line are significant
3268 5a. White-space in indent-pre
3280 ## NOTE: the leading white-space chars on empty line are significant
3282 5b. White-space in indent-pre
3301 5c. White-space in indent-pre
3314 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3337 7a. Indent-pre and category links
3339 parsoid=wt2html,wt2wt
3341 [[Category:foo]] <!-- No pre-wrapping -->
3342 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3345 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3346 <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 -->
3349 ## We used to, but no longer wt2wt this test since the default serializer
3350 ## will normalize all categories to serialize on their own line.
3351 ## This wikitext usage is going to be fairly uncommon in production and
3352 ## selser will take care of preserving formatting in those scenarios.
3354 7b. Indent-pre and category links
3359 [[Category:foo]] {{echo|b}}
3361 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3362 <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>
3366 Indent-Pre: Newlines in comments shouldn't affect sol state
3380 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3384 HTML-pre: 1. embedded newlines
3419 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3421 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3425 <pre data-parsoid='{"stx":"html"}'>
3430 <pre data-parsoid='{"stx":"html"}'>
3438 HTML-pre: big spaces
3474 <pre data-parsoid='{"stx":"html"}'>
3493 HTML-pre: 2: indented text
3506 HTML-pre: 3: other wikitext
3525 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3534 ### Definition lists
3541 <dl><dt> name </dt>
3542 <dd> Definition</dd></dl>
3547 Definition list for indentation only
3551 <dl><dd> Indented text</dd></dl>
3556 Definition list with no space
3561 <dd>Definition</dd></dl>
3566 Definition list with URL link
3568 ; http://example.com/ : definition
3570 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3571 <dd> definition</dd></dl>
3576 Definition list with bracketed URL link
3578 ;[http://www.example.com/ Example]:Something about it
3580 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3581 <dd>Something about it</dd></dl>
3586 Definition list with wikilink containing colon
3588 ; [[Help:FAQ]]: The least-read page on Wikipedia
3590 <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>
3591 <dd> The least-read page on Wikipedia</dd></dl>
3595 # At Brion's and JeLuF's insistence... :)
3597 Definition list with news link containing colon
3599 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3601 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3602 <dd> This isn't even a real newsgroup!</dd></dl>
3605 <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>
3609 Malformed definition list with colon
3611 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3613 <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>
3618 Definition lists: colon in external link text
3620 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3622 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3623 <dd> OK, I made that up</dd></dl>
3628 Definition lists: colon in HTML attribute
3630 ;<b style="display: inline">bold</b>
3632 <dl><dt><b style="display: inline">bold</b></dt></dl>
3637 Definition lists: self-closed tag
3639 ;one<br/>two : two-line fun
3641 <dl><dt>one<br />two </dt>
3642 <dd> two-line fun</dd></dl>
3647 Bug 11748: Literal closing tags
3651 <dd>test test test test test</dd>
3653 <dd>test test test test test</dd>
3658 <dd>test test test test test</dd>
3660 <dd>test test test test test</dd>
3666 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3669 ; term : description
3674 <dl><dt> term </dt>
3675 <dd> description</dd></dl>
3676 <ul><li> unordered</li></ul>
3683 Definition list with empty definition and following paragraph
3695 Nested definition lists using html syntax
3704 Definition Lists: No nesting: Multiple dd's
3717 Definition Lists: Indentation: Regular
3725 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3730 Definition Lists: Indentation: Missing 1st level
3736 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3741 Definition Lists: Indentation: Multi-level indent
3745 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3750 Definition Lists: Hacky use to indent tables
3757 should be left alone
3759 <dl><dd><dl><dd><table>
3764 </td></tr></table></dd></dl></dd></dl>
3766 should be left alone
3771 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3779 should be left alone
3782 <dl><dd><dl><dd><table><tr>
3785 </tr></table><!-- bar --></dd></dl></dd></dl>
3787 should be left alone</p>
3791 Definition Lists: Hacky use to indent tables, with comment before table
3797 <dl><dd><dl><dd><!-- foo --><table><tr>
3799 </tr></table></dd></dl></dd></dl>
3802 # The trailing whitespace in this test is to catch a regression in
3803 # Parsoid after T54473.
3805 Definition Lists: Hacky use to indent tables (WS-insensitive)
3814 </td></tr></table></dd></dl>
3818 <tbody><tr><td>a</td></tr>
3819 </tbody></table> </dd></dl>
3822 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3823 ## as an empty dt item. It also ignores all but the last ";" when followed
3824 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3825 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3828 ## Ex: ";;t2 ::d2" is transformed into:
3840 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3841 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3852 ## All Parsoid only definition list tests have this difference.
3854 ## See also: https://phabricator.wikimedia.org/T8569
3855 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3858 Table / list interaction: indented table with lists in table contents
3873 <ul><li> b</li></ul>
3877 <ul><li> d</li></ul>
3878 </td></tr></table></dd></dl>
3883 Table / list interaction: lists nested in tables nested in indented lists
3906 </td></tr></table></dd></dl>
3913 Definition Lists: Nesting: Multi-level (Parsoid only)
3943 Definition Lists: Nesting: Test 2 (Parsoid only)
3970 Definition Lists: Nesting: Test 3 (Parsoid only)
4013 Definition Lists: Nesting: Test 4
4018 <dl><dd><dl><dd><dl><dt>t3</dt>
4019 <dd>d3</dd></dl></dd></dl></dd></dl>
4024 ## The Parsoid team believes the following three test exposes a
4025 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4026 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4027 ## It also exposes a "misfeature" in tidy, which doesn't like
4028 ## <dl> tags with a single <dt> child; it converts the <dt> into
4029 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4031 Definition Lists: Mixed Lists: Test 1
4037 <dl><dd><dl><dt><ul><li> foo</li>
4038 <li> bar</li></ul></dt></dl>
4039 <dl><dt> baz</dt></dl></dd></dl>
4074 Definition Lists: Mixed Lists: Test 2
4079 <ul><li><dl><dd> d1</dd>
4080 <dd> d2</dd></dl></li></ul>
4086 Definition Lists: Mixed Lists: Test 3
4091 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4092 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4098 Definition Lists: Mixed Lists: Test 4
4103 <ul><li><dl><dt>d1 </dt>
4106 <dd>d4</dd></dl></li></ul>
4112 Definition Lists: Mixed Lists: Test 5
4118 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4124 Definition Lists: Mixed Lists: Test 6
4129 <ol><li><ul><li><dl><dd>d1
4130 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4136 Definition Lists: Mixed Lists: Test 7
4141 <dl><dd><ul><li> d1</li>
4142 <li> d2</li></ul></dd></dl>
4148 Definition Lists: Mixed Lists: Test 8
4153 <dl><dd><ul><li> d1</li></ul>
4154 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4160 Definition Lists: Mixed Lists: Test 9
4164 <ul><li><dl><dt>foo </dt>
4165 <dd>bar</dd></dl></li></ul>
4171 Definition Lists: Mixed Lists: Test 10
4175 <ul><li><ol><li><dl><dt>foo </dt>
4176 <dd>bar</dd></dl></li></ol></li></ul>
4180 # The Parsoid team disagrees with the PHP parser's seemingly-random
4181 # rules regarding dd/dt on the next two tests. Parsoid is more
4182 # consistent, and recognizes the shared nesting and keeps the
4183 # still-open tags around until the nesting is complete.
4184 # (And tidy again converts <dt> to <dd> before 'bar'.)
4187 Definition Lists: Mixed Lists: Test 11
4192 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4193 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4194 <dl><dt>boo </dt>
4195 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4250 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4251 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4255 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4256 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4265 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4267 # * The test is wrong, there are two colons where there should be :;
4268 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4270 Definition Lists: Weird Ones: Test 1
4272 *#;*::;; foo : bar (who uses this?)
4274 <ul><li><ol><li><dl><dt> foo </dt>
4275 <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>
4294 <dt>bar (who uses this?)</dt>
4326 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4327 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4339 Definition Lists: colons occurring in tags
4357 <dt><span>a:b</span></dt>
4384 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4386 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4387 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4388 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4389 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4391 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4392 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4393 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4397 Definition Lists: colons and tables 1
4409 </td></tr></table></dd></dl>
4413 </td></tr></table></dd></dl>
4417 # Parsoid's output (as documented below) differs from php's in this case.
4418 # This is probably a bug. If we fixup parsoid to match php's output, the
4419 # above test should pass and the below test case can be removed. It is
4420 # unclear which output is more desirable.
4423 Definition Lists: colons and tables 2
4435 </td></tr></table></dd>
4439 </td></tr></table></dd></dl>
4443 Definition Lists: template interaction
4445 ::{{definition_list}}
4448 ::{{definition_list}}
4453 <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">
4454 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4456 <dl><dd data-parsoid='{}'>one
4457 <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">
4458 </span><dd about="#mwt2">two
4460 <dd>three</dd></dl></dd>
4461 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4469 External links: non-bracketed
4471 Non-bracketed: http://example.com
4473 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4477 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4479 External links: numbered
4481 Numbered: [http://example.com]
4482 Numbered: [http://example.net]
4483 Numbered: [http://example.com]
4485 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4486 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4487 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4490 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4491 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4492 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4496 External links: specified text
4498 Specified text: [http://example.com link]
4500 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4505 External links: trail
4507 Linktrails should not work for external links: [http://example.com link]s
4509 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4514 External links: dollar sign in URL
4516 http://example.com/1$2345
4518 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4522 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4524 External links: dollar sign in URL (autonumber)
4526 [http://example.com/1$2345]
4528 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4531 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4535 External links: open square bracket forbidden in URL (bug 4377)
4537 parsoid=wt2html,wt2wt,html2html
4539 http://example.com/1[2345
4541 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4544 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4548 External links: open square bracket forbidden in URL (named) (bug 4377)
4550 parsoid=wt2html,html2html
4552 [http://example.com/1[2345]
4554 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4557 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4560 # parsoid adds a space before the link name
4562 External links: open square bracket forbidden in URL (named) (bug 4377)
4565 [http://example.com/1 [2345]
4567 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4572 External links: nowiki in URL link text (bug 6230)
4574 [http://example.com/ <nowiki>''example site''</nowiki>]
4576 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4581 External links: newline forbidden in text (bug 6230 regression check)
4583 [http://example.com/ first
4586 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4592 External links: Pipe char between url and text
4594 [http://example.com | link]
4596 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4601 External links: protocol-relative URL in brackets
4603 [//example.com/ Test]
4605 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4609 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4611 External links: protocol-relative URL in brackets without text
4615 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4618 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4622 External links: protocol-relative URL in free text is left alone
4626 <p>//example.com/Foo
4631 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4633 foo//example.com/Foo
4635 <p>foo//example.com/Foo
4640 External links: with no contents
4642 [http://en.wikipedia.org/wiki/Foo]
4644 [[wikipedia:Foo|Bar]]
4646 [[wikipedia:Foo|<span>Bar</span>]]
4648 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4649 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4650 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4653 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4654 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4655 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4659 External links: Free with trailing punctuation
4669 http://example.com/url_with_(brackets)
4670 (http://example.com/url_without_brackets)
4671 http://example.com/url_with_entity&
4672 http://example.com/url_with_entity&
4673 http://example.com/url_with_entity&
4674 http://example.com/url_with_entity
4675 http://example.com/url_with_entity 
4676 http://example.com/url_with_entity 
4677 http://example.com/url_with_entity<
4678 http://example.com/url_with_entity<
4679 http://example.com/url_with_entity<
4681 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4682 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4683 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4684 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4685 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4686 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4687 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4688 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4689 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4690 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4691 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4692 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4693 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4694 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4695 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4696 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4697 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4698 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4699 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4702 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4703 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4704 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4705 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4706 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4707 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4708 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4709 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4710 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4711 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4712 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4713 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4714 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4715 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4716 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4717 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4718 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4719 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4720 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4724 External links: tricky Parsoid html2html case
4726 parsoid=wt2html,wt2wt,html2html
4728 http://example.com/url_with_entity&amp;
4730 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4733 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4737 External links: Free with trailing quotes (T113666)
4739 '''News:''' Stuff here
4743 <p><b>News:</b> Stuff here
4744 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4747 <p><b>News:</b> Stuff here</p>
4748 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4752 External links: Lone protocols are never linked (T105697)
4771 External links: No preceding word characters allowed (bug 65278)
4773 NOPEhttp://example.com
4774 N0http://example.com
4775 ok:http://example.com
4776 ok-http://example.com
4778 <p>NOPEhttp://example.com
4779 N0http://example.com
4780 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4781 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4788 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4790 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4795 External image from https
4797 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4799 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4804 External image (when not allowed)
4806 wgAllowExternalImages=0
4808 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4810 <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>
4815 Link to non-http image, no img tag
4817 Link to non-http image, no img tag: ftp://example.com/test.jpg
4819 <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>
4824 External links: terminating separator
4826 Terminating separator: http://example.com/thing,
4828 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4833 External links: intervening separator
4835 Intervening separator: http://example.com/1,2,3
4837 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4842 External links: old bug with URL in query
4844 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4846 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4851 External links: old URL-in-URL bug, mixed protocols
4853 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4855 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4860 External links: URL in text
4862 URL in text: [http://example.com http://example.com]
4864 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4869 External links: Clickable images
4871 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4873 <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>
4876 <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>
4880 External links: raw ampersand
4882 Old & use: http://x&y
4884 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4889 External links: encoded ampersand
4891 Old & use: http://x&y
4893 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4896 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4900 External links: encoded equals (bug 6102)
4902 http://example.com/?foo=bar
4904 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4907 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4911 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4912 ## does it number them. As discussed in bug 53505, we can identify
4913 ## autonumbered links via CSS.
4917 External links: [raw ampersand]
4919 Old & use: [http://x&y]
4921 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4924 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4927 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4928 # mode will return the [raw ampersand] wikitext
4930 External links: [encoded ampersand]
4932 parsoid=wt2html,wt2wt,html2html
4934 Old & use: [http://x&y]
4936 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4939 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4943 External links: [raw equals]
4945 [http://example.com/?foo=bar]
4947 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4950 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4953 # note that parsoid html is identical to [raw equals] case; so html2wt
4954 # mode will return the [raw equals] wikitext
4956 External links: [encoded equals] (bug 6102)
4958 parsoid=wt2html,wt2wt,html2html
4960 [http://example.com/?foo=bar]
4962 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4965 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4968 # xxx parsoid strips the IDN character, so the round-trip tests will
4969 # obviously fail and are disabled. --cscott
4971 External links: [IDN ignored character reference in hostname; strip it right off]
4973 parsoid=wt2html,wt2wt,html2html
4975 [http://e‌xample.com/]
4977 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4980 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4983 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4984 # Where an external link could easily circumvent the sanitization of the text of
4985 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4986 # test demands a higher standard. That's a bit strange.
4990 # http://example.com -> [http://example.com|http://example.com]
4991 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4993 # The first example is sanitized, but the second is not. Any security benefits
4994 # from this production are trivial to circumvent. Either remove this test and
4995 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4996 # the test accordingly.
5000 # xxx parsoid strips the IDN character, so the round-trip tests will
5001 # obviously fail and are disabled. --cscott
5003 External links: IDN ignored character reference in hostname; strip it right off
5005 parsoid=wt2html,html2html
5007 http://e‌xample.com/
5009 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5012 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5016 External links: www.jpeg.org (bug 554)
5020 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5024 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5026 External links: URL within URL (original bug 2)
5028 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5030 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5033 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5037 BUG 361: URL inside bracketed URL
5039 [http://www.example.com/foo http://www.example.com/bar]
5041 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5046 BUG 361: URL within URL, not bracketed
5048 http://www.example.com/foo?=http://www.example.com/bar
5050 <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>
5055 BUG 289: ">"-token in URL-tail
5057 http://www.example.com/<hello>
5059 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5064 BUG 289: literal ">"-token in URL-tail
5066 http://www.example.com/<b>html</b>
5068 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5071 <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>
5075 BUG 289: ">"-token in bracketed URL
5077 [http://www.example.com/<hello> stuff]
5079 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5084 BUG 289: literal ">"-token in bracketed URL
5086 [http://www.example.com/<b>html</b> stuff]
5088 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5093 BUG 289: literal double quote at end of URL
5095 http://www.example.com/"hello"
5097 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5102 BUG 289: literal double quote in bracketed URL
5104 [http://www.example.com/"hello" stuff]
5106 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5111 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5113 [http://www.example.com test]
5115 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5120 External links: link text with spaces
5122 [http://www.example.com a b c]
5123 [http://www.example.com ''a'' ''b'']
5125 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5126 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5131 External links: wiki links within external link (Bug 3695)
5133 parsoid=wt2html,html2html
5135 [http://example.com [[wikilink]] embedded in ext link]
5137 <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>
5140 <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>
5144 BUG 787: Links with one slash after the url protocol are invalid
5148 [http:/example.com title]
5150 <p>http:/example.com
5151 </p><p>[http:/example.com title]
5156 Bracketed external links with template-generated invalid target
5158 [{{echo|http:/example.com}} title]
5160 <p>[http:/example.com title]
5165 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5167 ''[http://example.com text'']
5168 [http://example.com '''text]'''
5169 ''Something [http://example.com in italic'']
5170 ''Something [http://example.com mixed''''', even bold]'''
5171 '''''Now [http://example.com both''''']
5173 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5174 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5175 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5176 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5177 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5183 Bug 4781: %26 in URL
5185 http://www.example.com/?title=AT%26T
5187 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5190 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5193 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5194 # % is actually legal in HTML5. Any change in output would need testing though.
5196 Bug 4781, 5267: %25 in URL
5198 http://www.example.com/?title=100%25_Bran
5200 <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>
5203 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5207 Bug 4781, 5267: %28, %29 in URL
5209 http://www.example.com/?title=Ben-Hur_%281959_film%29
5211 <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>
5214 <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>
5219 Bug 4781: %26 in autonumber URL
5221 [http://www.example.com/?title=AT%26T]
5223 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5226 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5230 Bug 4781, 5267: %26 in autonumber URL
5232 [http://www.example.com/?title=100%25_Bran]
5234 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5237 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5241 Bug 4781, 5267: %28, %29 in autonumber URL
5243 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5245 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5248 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5253 Bug 4781: %26 in bracketed URL
5255 [http://www.example.com/?title=AT%26T link]
5257 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5260 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5264 Bug 4781, 5267: %25 in bracketed URL
5266 [http://www.example.com/?title=100%25_Bran link]
5268 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5273 Bug 4781, 5267: %28, %29 in bracketed URL
5275 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5277 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5280 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5284 External link containing a period in the anchor. (bug 63947)
5286 [//foo.org/bar#baz. bang]
5288 [//foo.org/bar. bang]
5290 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5291 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5294 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5295 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5299 External link containing a single quote. (bug 63947)
5303 [//foo.org/bar'baz bang]
5305 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5306 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5309 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5310 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5314 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5316 Some [http://example.com/ pretty ''italics'' and stuff]!
5318 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5323 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5325 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5327 <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>
5332 External link containing double-single-quotes with no space separating the url from text in italics
5334 [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]].]
5336 <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>
5339 <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>
5341 <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>
5345 External link with comments in link text
5347 [http://www.google.com Google <!-- comment -->]
5349 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5352 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5356 External link to bare IPv4 address
5358 [http://192.168.0.1 Link]
5360 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5363 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5367 URL-encoding in URL functions (single parameter)
5369 {{localurl:Some page|amp=&}}
5371 <p>/index.php?title=Some_page&amp=&
5376 URL-encoding in URL functions (multiple parameters)
5378 {{localurl:Some page|q=?&=&}}
5380 <p>/index.php?title=Some_page&q=?&amp=&
5387 http://example.com/index.php?foozoid%5B%5D=bar
5389 http://example.com/index.php?foozoid[]=bar
5391 <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>
5392 </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>
5395 <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>
5397 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5401 IPv6 urls, autolink format (T23261)
5403 http://[2404:130:0:1000::187:2]/index.php
5405 Examples from RFC 2373, section 2.2:
5406 * http://[1080::8:800:200C:417A]/unicast
5407 * http://[FF01::101]/multicast
5408 * http://[::1]/loopback
5409 * http://[::]/unspecified
5410 * http://[::13.1.68.3]/ipv4compat
5411 * http://[::FFFF:129.144.52.38]/ipv4compat
5413 Examples from RFC 2732, section 2:
5414 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5415 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5416 * http://[3ffe:2a00:100:7031::1]
5417 * http://[1080::8:800:200C:417A]/foo
5418 * http://[::192.9.5.5]/ipng
5419 * http://[::FFFF:129.144.52.38]:80/index.html
5420 * http://[2010:836B:4179::836B:4179]
5423 <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>
5424 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5426 <ul><li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5427 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5428 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5429 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5430 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5431 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5432 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5434 <ul><li> <a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5435 <li> <a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5436 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5437 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5438 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5439 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5440 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5443 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5445 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5446 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5447 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5448 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5449 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5450 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5451 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5453 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5454 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5455 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5456 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5457 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5458 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5459 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5460 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5464 IPv6 urls, bracketed format (T23261)
5466 [http://[2404:130:0:1000::187:2]/index.php test]
5468 Examples from RFC 2373, section 2.2:
5469 * [http://[1080::8:800:200C:417A] unicast]
5470 * [http://[FF01::101] multicast]
5471 * [http://[::1]/ loopback]
5472 * [http://[::] unspecified]
5473 * [http://[::13.1.68.3] ipv4compat]
5474 * [http://[::FFFF:129.144.52.38] ipv4compat]
5476 Examples from RFC 2732, section 2:
5477 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5478 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5479 * [http://[3ffe:2a00:100:7031::1] 3]
5480 * [http://[1080::8:800:200C:417A]/foo 4]
5481 * [http://[::192.9.5.5]/ipng 5]
5482 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5483 * [http://[2010:836B:4179::836B:4179] 7]
5486 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5487 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5489 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5490 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5491 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5492 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5493 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5494 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5495 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5497 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5498 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5499 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5500 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5501 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5502 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5503 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5506 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5508 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5509 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5510 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5511 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5512 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5513 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5514 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5516 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5517 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5518 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5519 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5520 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5521 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5522 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5523 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5527 Non-extlinks in brackets
5536 [{{echo|foo}} ''bar'']
5537 [{{echo|foo}}l's] errand
5538 [{{echo|foo}}l's errand]
5540 [url=http://example.com]
5541 [http:// bare protocols don't count]
5554 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5555 [http:// bare protocols don't count]
5563 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5564 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5565 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5566 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5567 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5568 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5569 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5570 [http:// bare protocols don't count]</p>
5574 Percent encoding in external links
5576 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5578 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5581 <p><a rel="mw:ExtLink"
5582 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5586 Use url link syntax for links where the content is equal the link target
5590 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5593 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5597 Parenthesis in external links, especially URL links
5601 http://example.com/test)
5603 http://example.com/(test)
5605 http://example.com/((test)
5607 (http://example.com/(test))
5609 (http://example.com/(test)))))
5611 http://example.com/a)b
5613 [http://example.com) foo]
5615 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5616 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5617 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5618 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5619 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5620 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5621 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5622 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5625 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5626 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5627 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5628 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5629 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5630 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5631 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5632 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5636 Parenthesis in external links, w/ transclusion or comment
5638 (http://example.com/{{echo|hi}})
5640 (http://example.com<!-- hi -->)
5642 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5643 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5646 <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='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
5648 <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>
5652 Serialize <a> tags with invalid link targets as plain text
5654 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5656 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5657 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5658 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5659 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5662 <nowiki>*</nowiki>text
5663 <nowiki>[[foo]]</nowiki>
5664 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5668 mw:ExtLink -vs- mw:WikiLink (T94723)
5672 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5673 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5674 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5675 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5677 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5678 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5683 [[wikipedia:Foo|Bar]]
5684 [[wikipedia:Foo|Bar]]
5686 [[wikipedia:European_Robin|European Robin]]
5687 [[wikipedia:European_Robin|European Robin]]
5691 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5695 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5697 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5708 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5710 Normal text. '''''Bold italic text.''''' Normal text.
5712 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5713 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5718 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5719 # parser strips. The wikitext contains just the first half of the bold
5722 Unclosed and unmatched quotes
5724 '''''Bold italic text '''with bold deactivated''' in between.'''''
5726 '''''Bold italic text ''with italic deactivated'' in between.'''''
5730 ..spanning two paragraphs (should not work).'''
5732 '''Bold tag left open
5734 ''Italic tag left open
5738 <!-- Unmatching number of opening, closing tags: -->
5739 '''This year''''s election ''should'' beat '''last year''''s.
5741 ''Tom'''s car is bigger than ''Susan'''s.
5743 Plain ''italic'''s plain
5745 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5746 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5747 </p><p><b>Bold text..</b>
5748 </p><p>..spanning two paragraphs (should not work).
5749 </p><p><b>Bold tag left open</b>
5750 </p><p><i>Italic tag left open</i>
5752 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5753 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5754 </p><p>Plain <i>italic'</i>s plain
5757 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5758 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5759 </p><p><b>Bold text..</b>
5760 </p><p>..spanning two paragraphs (should not work).<b></b>
5761 </p><p><b>Bold tag left open</b>
5762 </p><p><i>Italic tag left open</i>
5765 <!-- Unmatching number of opening, closing tags: -->
5766 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5767 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5768 </p><p>Plain <i>italic'</i>s plain
5775 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5778 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5779 # is the bare minimum required by the spec, see:
5780 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5781 # Parsoid team replies: empty table tags are legal in HTML5
5783 A table with no data.
5796 A table with stray table end tags on start tag line (wt2html)
5800 {|style="color: red;"|}
5802 {|style="color: red;" |}
5806 {|style="color: red;"|} id="foo"
5810 {|style="color: red;" |} id="foo"
5814 <table style="color: red;"></table>
5816 <table style="color: red;">
5822 <table style="color: red;" id="foo">
5828 <table style="color: red;" id="foo">
5837 A table with no data (take 2)
5845 # A table with nothing but a caption is invalid XHTML, we might want to render
5846 # this as <p>caption</p>
5847 # Parsoid team replies: table with only a caption is legal in HTML5
5849 A table with nothing but a caption
5857 </caption><tr><td></td></tr></table>
5860 <table><caption> caption</caption></table>
5864 A table with caption with default-spaced attributes and a table row
5867 |+ style="color: red;" | caption1
5873 <caption style="color: red;"> caption1
5882 A table with captions with non-default spaced attributes and a table row
5885 |+style="color: red;"|caption2
5886 |+ style="color: red;"| caption3
5892 <caption style="color: red;">caption2
5894 <caption style="color: red;"> caption3
5903 Table td-cell syntax variations
5907 | foo bar foo || baz
5908 | style='color:red;' | baz
5909 | style='color:red;' || baz
5916 <td> foo bar foo </td>
5919 <td style="color:red;"> baz
5921 <td> style='color:red;' </td>
5949 Simple table but with multiple dashes for row wikitext
5968 Multiplication table
5970 {| border="1" cellpadding="2"
5971 |+Multiplication table
5973 ! × !! 1 !! 2 !! 3
5991 <table border="1" cellpadding="2">
5992 <caption>Multiplication table
6039 Accept "||" in table headings
6054 Accept "!!" in table data
6068 <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>
6073 Accept "||" in indented table headings
6083 </th></tr></table></dd></dl>
6088 Accept "!!" in templates
6102 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' 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>
6106 Accept "!!" in table headings after newline
6123 <p>b!!c</p></th></tr>
6128 Accept "!!" in table data of mixed wikitext / html syntax
6132 <tr><td>b!!c</td></tr>
6145 <tbody><tr><th>a</th></tr>
6146 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6151 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6168 Accept "| !" at start of line in tables (ignore !-attribute)
6172 | !style="color:red" | bar
6184 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 +/-
6188 |style='color:red;'|+1
6189 |style='color:blue;'|-1
6201 <td style="color:red;">+1
6203 <td style="color:blue;">-1
6227 |rowspan=2| Cell 2, row 1 (and 2)
6238 <td rowspan="2"> Cell 2, row 1 (and 2)
6256 {| bgcolor=#ABCDEF border=2
6261 |the original table again
6269 <table bgcolor="#ABCDEF" border="2">
6277 <td>the original table again
6283 Invalid attributes in table cell (bug 1830)
6297 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6301 | title="foo<nowiki>|</nowiki>" |bar
6302 | title="foo<nowiki>|</nowiki>" bar
6309 <td title="foo|">bar
6311 <td> title="foo|" bar
6316 <tbody><tr><td title="foo">bar</td>
6317 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6318 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6322 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6323 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6324 # *2wt modes will fail.
6326 Table security: embedded pipes
6328 parsoid=wt2html,html2html
6331 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6335 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6336 <td>]" onmouseover="alert(document.cookie)">test
6344 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6348 Element attributes with double ! should not be broken up by <th>
6351 ! hi <div class="!!">ha</div> ho
6356 <th> hi <div class="!!">ha</div> ho
6361 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6366 ! and || in element attributes should not be parsed as <th>/<td>
6369 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6374 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6379 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6383 # FIXME: The output seems broken. Filed as T110268.
6385 ! and || in td attributes should not be parsed as <th>/<td>
6390 | style="color: red !important;" data-contrived="put this here ||" | foo
6395 <td> style="color: red !important;" data-contrived="put this here </td>
6401 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx_v":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6406 Break on | in element attribute in template
6408 parsoid=wt2html,html2html
6410 {{echo|1=<div class="hi|ho">ha</div>}}
6412 <p>ho">ha</div>
6415 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</span>
6419 Indented table markup mixed with indented pre content (proposed in bug 6200)
6424 Text that should be rendered preformatted
6432 <pre>Text that should be rendered preformatted
6441 1. Template-generated table cell attributes and cell content
6446 || {{table_attribs_5}}
6447 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6448 |align=center {{table_attribs}}
6449 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6454 <td style="color:red;">Foo
6456 <td style="color:red;">Foo
6458 <td> style="color:red;"</td>
6461 <td style="color:red;">Foo
6463 <td align="center" style="color:red;">Foo
6465 <td align="center" style="color:red;">Foo
6471 2. Template-generated table cell attributes and cell content
6474 |{{table_attribs_2}}
6479 <td style="color:red;">Foo
6487 <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>
6488 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6493 3. Template-generated table cell attributes and cell content
6496 !align=center {{table_header_cells}}
6498 |align=center {{table_cells}}
6503 <th align="center" style="color:red;">Foo</th>
6504 <th style="color:red;"><i>Bar</i></th>
6505 <th style="color:brown;"><i>Foo</i> and Baz
6508 <td align="center" style="color:red;">Foo</td>
6509 <td style="color:red;"><i>Bar</i></td>
6510 <td style="color:brown;"><i>Foo</i> and Baz
6515 <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>
6516 <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>
6521 4. Template-generated table cell attributes and cell content inside a templated table
6524 !align=center {{table_header_cells}}
6526 |align=center {{table_cells}}
6531 <th align="center" style="color:red;">Foo</th>
6532 <th style="color:red;"><i>Bar</i></th>
6533 <th style="color:brown;"><i>Foo</i> and Baz
6536 <td align="center" style="color:red;">Foo</td>
6537 <td style="color:red;"><i>Bar</i></td>
6538 <td style="color:brown;"><i>Foo</i> and Baz
6542 <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}}]}'>
6543 <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>
6545 <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>
6549 ## Edge case fix to prevent future regressions
6551 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6554 |{{table_attribs_7}}
6559 <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>
6561 <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>
6565 Table with row followed by newlines and table heading
6583 Table with empty line following the start tag
6601 Table attributes with empty value
6603 parsoid=wt2html,html2html
6616 <tbody><tr><td style=""> hello</td></tr>
6621 Wikitext table with a lot of comments
6644 Wikitext table comments represented in parsoid dom
6646 {|<!--c1--><!--c2-->
6657 <table><!--c1--><!--c2-->
6658 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6659 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6664 Wikitext table with double-line table cell
6681 Table cell with a single comment
6698 Table-cell after a comment-only-empty-line
6715 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6717 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6723 Build table with {{!}}
6725 {{{!}} class="wikitable"
6728 {{!}}- style="color:red;"
6729 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6732 <table class="wikitable">
6738 <tr style="color:red;">
6740 <td style="color:red;"> second data
6746 Build table with pipe as data
6748 {| class="wikitable"
6751 |- style="color:red;"
6752 | data || style="color:red;" | second data
6754 | style="color:red;" | data with | || style="color:red;" | second data with |
6756 || data with | ||| second data with |
6759 <table class="wikitable">
6765 <tr style="color:red;">
6767 <td style="color:red;"> second data
6770 <td style="color:red;"> data with | </td>
6771 <td style="color:red;"> second data with |
6774 <td> data with | </td>
6775 <td> second data with |
6781 Build table with wikilink
6783 {| class="wikitable"
6784 ! header || second header
6785 |- style="color:red;"
6786 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6788 | data || second data [[Main Page|link|text with pipe]]
6791 <table class="wikitable">
6796 <tr style="color:red;">
6797 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6798 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6802 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6807 # The expected HTML structure in this test is debatable. The PHP parser does
6808 # not parse this kind of table at all. The main focus for Parsoid is on
6809 # round-tripping, so this output is ok for now. TODO: revisit!
6811 Wikitext table with html-syntax row
6821 <td>foo</td></tr></tbody></table>
6824 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6825 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6826 ## PHP parser, which tidy then compounds by fostering the content
6827 ## entirely out of the table. Parsoid recognizes the table context
6828 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6829 ## depends on PHP's treatment of broken table markup!
6831 Implicit <td> after a |-
6833 parsoid=wt2html,html2html
6853 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6855 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6857 parsoid=wt2html,html2html
6890 <tr><td><pre>a</pre></td></tr>
6891 <tr><td> b</td></tr>
6896 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6897 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6899 Lists should be recognized in an implicit <td> context
6901 parsoid=wt2html,html2html
6928 Table cells not properly parsed in an implicit-td context
6932 {{table_attribs_4}} || a || b
6937 <td style="background-color:#DC241f;" width="10px"></td>
6944 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6945 <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>
6950 Parsoid: Round-trip tables directly followed by content (bug 51219)
6952 parsoid=wt2html,wt2wt
6977 Parsoid: Default to a newline after tables in new content (bug 51219)
6982 <tr><td>foo</td></tr></tbody></table> bar
6984 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6989 <nowiki> </nowiki>bar
6997 Parsoid: newline inducing block nodes don't suppress <nowiki>
7009 Parsoid: Row-syntax table headings followed by comment & table cells
7011 parsoid=wt2html,wt2wt
7015 <!-- foo --> || baz || quux
7029 <tbody><tr><th> foo </th><th> bar
7030 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7035 Parsoid: Recover better from broken table attributes
7055 <p>foo</p></td></tr>
7060 Tables: Digest broken attributes on table and tr tag
7077 Strip unsupported table tags
7125 Testing serialization after deletion in references
7134 hi <ref><div id="x">ho</div></ref>
7144 Testing serialization after deletion of table cells
7147 "modes": ["wt2wt", "selser"],
7155 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7168 Plain link, capitalized
7172 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7177 Plain link, uncapitalized
7181 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7188 [[Main Page|The Main Page]]
7190 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7195 Piped link with comment in link text
7197 [[Main Page|The Main<!--front--> Page]]
7199 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7204 Piped link with multiple pipe characters in link text
7206 [[Main Page||The|Main|Page|]]
7208 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7211 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7215 Piped link with no link text
7217 [[Thomas Bek (bishop of St David's)|]]
7219 <p>[[Thomas Bek (bishop of St David's)|]]
7222 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7230 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7235 Broken link with fragment
7237 [[Zigzagzogzagzig#zug]]
7239 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7244 Special page link with fragment
7246 [[Special:Version#anchor]]
7248 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7253 Nonexistent special page link with fragment
7255 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7257 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7264 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7266 <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>
7273 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7275 <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>!!!
7286 Bug 43661: Piped links with identical prefixes
7288 [[prefixed article|prefixed articles with spaces]]
7290 [[prefixed article|prefixed articlesaoeu]]
7292 [[Main Page|Main Page test]]
7294 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7295 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7296 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7302 Link with HTML entity in suffix / tail
7304 [[Main Page]]", [[Main Page]]a
7306 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7309 <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>
7313 Link with 3 brackets
7324 Link with 4 brackets
7328 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7333 Piped link with 3 brackets
7335 [[[main page|the main page]]]
7337 <p>[[[main page|the main page]]]
7342 Piped link with extlink-like text
7345 [[Main Page|This is a [bar]]]
7347 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7348 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7351 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7352 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7356 Link with multiple pipes
7358 [[Main Page|The|Main|Page]]
7360 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7364 # Note that parsoid does not munge anchor text; all non-space
7365 # characters are valid in HTML5 ids.
7367 Anchor containing a #. (bug 63430)
7369 [[Main Page#And#Link]]
7371 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7374 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7380 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7382 <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>
7387 Link with space in namespace
7389 [[User talk:Foo bar]]
7391 <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>
7396 MemoryAlpha:AlphaTest
7398 This is an article in the MemoryAlpha namespace
7399 (which shadows the memoryalpha interwiki link).
7403 Namespace takes precedence over interwiki link (bug 51680)
7405 [[MemoryAlpha:AlphaTest]]
7407 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7411 # The previous test doesn't work correctly in html2*, due to not recognizing the
7412 # link as an internal one. This one checks for the correct behavior.
7414 Link to namespace preferred over interwiki with correct rel attribute
7416 parsoid=html2wt,html2html
7418 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7420 [[MemoryAlpha:AlphaTest]]
7424 Piped link to namespace
7426 [[Meta:Disclaimers|The disclaimers]]
7428 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7435 [[Usually caused by a typo (oops}]]
7437 <p>[[Usually caused by a typo (oops}]]
7444 Just a test of an article title containing a percent.
7448 Link containing % (not as a hex sequence)
7452 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7455 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7458 # note that the parsoid HTML is identical to the previous test output,
7459 # so the previous test ensures that the html2wt mode will generate the
7460 # "not as a hex sequence" wikitext.
7462 Link containing % as a single hex sequence interpreted to char
7464 parsoid=wt2wt,wt2html,html2html
7468 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7471 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7475 Link containing % as a double hex sequence interpreted to hex sequence
7479 <p>[[7%2525 Solution]]
7483 # note that parsoid does not munge anchor text; all non-space
7484 # characters are valid in HTML5 anchors.
7486 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7487 Example for such a section: == < ==
7489 [[%23%3c]][[%23%3e]]
7491 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7494 <p><a rel="mw:WikiLink" href="./Main_Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main_Page#%3E" title="Main Page">#></a></p>
7498 Link containing "<#" and ">#" as a hex sequences
7500 [[%3c%23]][[%3e%23]]
7502 <p>[[%3c%23]][[%3e%23]]
7507 Link containing an equals sign
7509 [[Special:BookSources/isbn=4-00-026157-6]]
7511 <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>
7514 <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>
7520 Just a test of an article title containing a tilde.
7523 # note that links containing signatures, like [[Foo~~~~]], are
7524 # massaged by the pre-save transform (PST) and so the tildes are never
7525 # seen by the parser.
7527 Link containing a tilde
7531 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7534 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7538 Link containing double-single-quotes '' (bug 4598)
7540 [[Lista d''e paise d''o munno]]
7542 <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>
7545 <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>
7549 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7551 Some [[Link|pretty ''italics'' and stuff]]!
7553 <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>!
7556 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7560 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7562 ''Some [[Link|pretty ''italics'' and stuff]]!''
7564 <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>
7569 Link with double quotes in title part (literal) and alternate part (interpreted)
7571 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7575 [[''Pentecoste''|Pentecoste]]
7577 [[''Pentecoste''|''Pentecoste'']]
7579 <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>
7580 </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>
7581 </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>
7582 </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>
7585 <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>
7586 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7587 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7588 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7592 Broken image links with HTML captions (bug 39700)
7594 [[File:Nonexistent|<script></script>]]
7595 [[File:Nonexistent|100x100px|<script></script>]]
7596 [[File:Nonexistent|<]]
7597 [[File:Nonexistent|a<i>b</i>c]]
7599 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7600 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7601 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7602 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7605 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7606 <span typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7607 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7608 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span></p>
7614 [[http://www.example.com]]
7616 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7619 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7623 Plain link to URL with link text
7625 [[http://www.example.com Link text]]
7627 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7632 Plain link to protocol-relative URL
7634 [[//www.example.com]]
7636 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7639 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7643 Plain link to protocol-relative URL with link text
7645 [[//www.example.com Link text]]
7647 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7652 Plain link to page with question mark in title
7658 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7659 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7664 # I'm fairly sure the expected result here is wrong.
7665 # We want these to be URL links, not pseudo-pages with URLs for titles....
7666 # However the current output is also pretty screwy.
7669 # I'm changing it to match the current output--it arguably makes more
7670 # sense in the light of the test above. Old expected result was:
7671 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7673 # But I think this test is bordering on "garbage in, garbage out" anyway.
7678 Piped link to URL: [[http://www.example.com|an example URL]]
7680 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7683 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7687 BUG 2: [[page|http://url/]] should link to page, not http://url/
7689 [[Main Page|http://url/]]
7691 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7694 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7697 # Parsoid does not mark self-links, by design.
7699 BUG 337: Escaped self-links should be bold
7703 [[Bug462]] [[Bug462]]
7705 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7708 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7710 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7714 Self-link to section should not be bold
7718 [[Main Page#section]]
7720 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7731 Self-link to numeric title
7737 <p><strong class="selflink">0</strong>
7742 Link to numeric-equivalent title
7748 <p><a href="/wiki/00" title="00">00</a>
7753 <nowiki> inside a link
7755 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7757 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7762 Non-breaking spaces in title
7764 [[ Main Page ]]
7766 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7771 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7777 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7782 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7788 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7793 Internal link with en linktrail: no apostrophes (bug 27473)
7799 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7804 Internal link with ca linktrail with apostrophes (bug 27473)
7810 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7815 Internal link with kaa linktrail with apostrophes (bug 27473)
7821 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7826 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7828 [[User:Foo/Test/63636:Bar|Test]]
7830 <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>
7833 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7837 Purely hash wikilink
7839 title=[[User:test/123]]
7843 <p><a href="#a">b</a>
7846 <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>
7850 1. Interaction of linktrail and template encapsulation
7856 <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>
7860 2. Interaction of linktrail and template encapsulation
7864 {{echo|Some [[Fool]]}}s
7866 <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"}]]}'>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>
7870 3. Interaction of linktrail and template encapsulation
7874 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7876 <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"}]]}'>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>
7886 Internal link with is link prefix
7890 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7892 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7903 Internal link with is link trail and link prefix
7907 [[mótmælendatrú|xxx]]ar
7909 mótmælenda[[söfnuður]]
7910 mótmælenda[[söfnuður|söfnuðir]]
7911 mótmælenda[[söfnuður|söfnuðir]]xxx
7913 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7914 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7915 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7916 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7917 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7922 Parsoid link trail escaping
7924 parsoid=html2wt,html2html
7926 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7932 Parsoid link prefix escaping
7935 parsoid=html2wt,html2html
7937 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7939 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7943 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7951 [http://wp.org ''foo'']
7953 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7954 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7955 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7956 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7961 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7965 [[Foo|{{echo|a}} b {{echo|c}}]]
7967 <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>
7971 Link with angle bracket after anchor
7975 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7978 <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>
7982 ### Interwiki links (see maintenance/interwiki.sql)
7986 Inline interwiki link
7988 parsoid=wt2html,wt2wt,html2html
7990 [[MeatBall:SoftSecurity]]
7992 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7995 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7999 Inline interwiki link with empty title (bug 2372)
8001 parsoid=wt2html,wt2wt,html2html
8005 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8008 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8012 Interwiki link encoding conversion (bug 1636)
8014 *[[Wikipedia:ro:Olteniţa]]
8015 *[[Wikipedia:ro:Olteniţa]]
8017 <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>
8018 <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>
8022 <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>
8023 <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>
8028 Interwiki link with fragment (bug 2130)
8030 [[MeatBall:SoftSecurity#foo]]
8032 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8036 # Ideally the wikipedia: prefix here should be proto-relative too
8037 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8038 # define the 'en' prefix, and originally the test used 'wikipedia',
8039 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8042 Different interwiki prefixes mapping to the same URL
8050 [[:wikipedia:Foo|Foo]]
8052 [[wikipedia:en:Foo]]
8054 [[:wikipedia:en:Foo]]
8058 <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>
8060 <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>
8062 <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>
8064 <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>
8066 <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>
8068 <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>
8070 <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>
8074 Interwiki links that cannot be represented in wiki syntax
8077 [[meatball:ok#foo|ok with fragment]]
8078 [[meatball:ok_as_well?|ok ending with ? mark]]
8079 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8080 [http://de.wikipedia.org/wiki/#foo is just fragment]
8083 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8084 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8085 <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>
8086 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8087 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8090 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8091 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8092 <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>
8093 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8094 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8098 Interwiki links: trail
8100 [[wikipedia:Foo|Ba]]r
8102 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8105 <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>
8109 Local interwiki link
8111 parsoid=wt2html,wt2wt,html2html
8113 [[local:Template:Foo]]
8115 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8118 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8121 # Parsoid does not mark self-links, by design.
8123 Local interwiki link: self-link to current page
8126 parsoid=wt2html,wt2wt,html2html
8130 <p><strong class="selflink">local:Main Page</strong>
8133 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8137 Local interwiki link: prefix only (bug 64167)
8139 parsoid=wt2html,wt2wt,html2html
8143 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8146 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8150 Local interwiki link: with additional interwiki prefix (bug 61357)
8152 parsoid=wt2html,wt2wt,html2html
8154 [[local:meatball:Hello]]
8156 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8159 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8163 Multiple local interwiki link prefixes
8165 [[local:local:local:local:mi:local:Foo]]
8167 parsoid=wt2html,wt2wt,html2html
8169 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8172 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8176 ### Interlanguage links
8177 ### Language links (so that searching for '### language' matches..)
8183 parsoid=wt2html,wt2wt,html2html
8191 <p>Blah blah blah</p>
8192 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8196 Interlanguage link with spacing
8198 parsoid=wt2html,wt2wt,html2html
8206 <p>Blah blah blah</p>
8207 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8211 Double interlanguage link
8213 parsoid=wt2html,wt2wt,html2html
8222 <p>Blah blah blah</p>
8223 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8224 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8228 Interlanguage link variations
8230 parsoid=wt2html,wt2wt,html2html
8240 <p>Blah blah blah</p>
8241 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8242 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8243 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8247 Space and question mark encoding in interlanguage links (T95473)
8249 parsoid=wt2html,wt2wt,html2html
8257 <p>Blah blah blah</p>
8258 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8262 Interlanguage link, with prefix links
8272 <p>Blah blah blah</p>
8273 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8277 Double interlanguage link, with prefix links (bug 8897)
8288 <p>Blah blah blah</p>
8289 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8290 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8294 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8302 <p>Blah blah blah</p>
8303 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8307 Parsoid-specific test: Wikilinks with should RT properly
8313 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8318 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8322 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8323 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8325 He&nbsp;llo [[Foo|He&nbsp;llo]]
8327 He&nbsp;llo [[He&nbsp;llo]]
8331 Parsoid: handle constructor well
8337 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8338 </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>
8341 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8343 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8352 # Note that `ko` isn't a known interlanguage prefix
8354 Parsoid: recognize interlanguage links without a target page
8364 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8366 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8369 # Note that `ko` isn't a known interwiki prefix
8371 Parsoid: recognize interwiki links without a target page
8373 parsoid=wt2html,wt2wt,html2html
8379 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8380 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8383 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8384 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8388 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8392 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8395 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8399 Interlanguage link with preceding local interwiki link (bug 68085)
8401 parsoid=wt2html,wt2wt,html2html
8404 [[local:es:Spanish]]
8407 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8411 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8415 Looks like an interlanguage link, but is actually a local interwiki
8417 parsoid=wt2html,wt2wt,html2html
8423 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8427 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8431 ### Redirects, Parsoid-only
8435 1. Simple redirect to page
8437 #REDIRECT [[Main Page]]
8439 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8443 2. Other redirect variants
8445 #REDIRECT [[Main_Page]]
8447 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8450 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8451 # This tests the Parsoid bail-out code.
8453 3. Other redirect variants
8455 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8457 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8461 4. Redirect to a templated destination
8463 #REDIRECT [[{{echo|Foo}}bar]]
8465 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
8471 parsoid=wt2html,wt2wt
8476 <li>REDIRECT [[]]</li></ol>
8480 Optional colon in #REDIRECT
8482 # the colon is archaic syntax. we support it for wt2html, but we
8483 # don't care that it roundtrips back to the modern syntax.
8484 parsoid=wt2html,html2html
8486 #REDIRECT:[[Main Page]]
8488 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8492 Whitespace in #REDIRECT with optional colon
8494 # the colon and gratuitous whitespace is archaic syntax. we support
8495 # it for wt2html, but we don't care that it roundtrips back to the
8496 # modern syntax (without extra whitespace)
8497 parsoid=wt2html,html2html
8504 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8508 Piped link in #REDIRECT
8510 # content after piped link is ignored. we support this syntax,
8511 # but don't care that the piped link is lost when we roundtrip this.
8514 #REDIRECT [[Main Page|bar]]
8516 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8520 Redirect to category (T104502)
8522 parsoid=wt2html,wt2wt
8524 #REDIRECT [[Category:Foo]]
8526 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8530 Redirect to category with URL encoding (T104502)
8534 #REDIRECT [[Category%3AFoo]]
8536 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8540 Redirect to category page
8542 #REDIRECT [[:Category:Foo]]
8544 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8548 Redirect to image page (1)
8550 #REDIRECT [[File:Wiki.png]]
8552 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8556 Redirect to image page (2)
8558 #REDIRECT [[Image:Wiki.png]]
8560 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8563 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8564 # Next test confirms this.
8566 Redirect to language (1) (T104918)
8568 parsoid=wt2html,wt2wt,html2html
8570 #REDIRECT [[en:File:Wiki.png]]
8572 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8576 Redirect to language (2) (T104918)
8578 #REDIRECT [[:en:File:Wiki.png]]
8580 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8584 Redirect to interwiki (T104918)
8586 #REDIRECT [[meatball:File:Wiki.png]]
8588 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8592 Non-English #REDIRECT
8596 #TILVÍSUN [[Main Page]]
8598 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8602 Redirect syntax under text isn't considered a redirect
8605 #redirect [[Main Page]]
8608 <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>
8611 # FIXME: Should hoist the redirect to the top of the page and ensure there
8618 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8638 Broken br tag sanitization
8646 # TODO: Fix html2html mode (bug 51055)!
8648 Parsoid: Broken br tag recognition
8661 Incorrecly removing closing slashes from correctly formed XHTML
8663 <br style="clear:both;" />
8665 <p><br style="clear:both;" />
8670 Failing to transform badly formed HTML into correct XHTML
8672 <br style="clear: left;">
8673 <br style="clear: right;">
8674 <br style="clear: both;">
8676 <p><br style="clear: left;" />
8677 <br style="clear: right;" />
8678 <br style="clear: both;" />
8682 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8683 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8685 Handling html with a div self-closing tag
8694 <p><div title />
8698 <p><div title=bar />
8699 <div title=bar/>
8701 <div title="bar/"></div>
8705 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8706 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8707 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8708 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8709 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8710 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8714 Handling html with a br self-closing tag
8741 Horizontal ruler (should it add that extra space?)
8756 Horizontal ruler -- 4+ dashes render hr
8765 Horizontal ruler -- eats additional dashes on the same line
8774 Horizontal ruler -- does not collapse dashes on consecutive lines
8785 Horizontal ruler -- <4 dashes render as plain text
8794 Horizontal ruler -- Supports content following dashes on same line
8806 ### Block-level elements
8815 <ul><li>Common list</li>
8817 <li>item 3</li></ul>
8828 <ol><li>Numbered list</li>
8830 <li> item 3</li></ol>
8844 ***#Number on level 4
8846 **#Number on level 3
8847 **#Number on level 3
8851 #** Level 3, but ordered
8854 <ol><li> with numbers</li></ol>
8855 <ul><li> and bullets</li></ul>
8856 <ol><li> and numbers</li></ol></li>
8858 <ul><li>bullet level 2
8859 <ul><li>bullet level 3
8860 <ol><li>Number on level 4</li></ol></li></ul></li>
8862 <ol><li>Number on level 3</li>
8863 <li>Number on level 3</li></ol></li></ul>
8864 <ol><li>number level 2</li></ol></li>
8866 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8867 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8872 1. Nested mixed wikitext and html list
8875 * <ul><li>ho</li></ul>
8880 <li> <ul><li>ho</li></ul></li>
8882 <ul><li> ho</li></ul></li></ul>
8886 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
8888 <ul><li> ho</li></ul></li></ul>
8892 2. Nested mixed wikitext and html list (incompatible)
8895 : {{echo|<li>ho</li>}}
8898 <dd> <li>ho</li></dd></dl>
8902 <dd> <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
8912 <ul><li>bar</li></ul></li></ul>
8922 <ul><li><ul><li>foo</li></ul></li>
8928 Nested lists 3 (first element empty)
8934 <ul><li>bar</li></ul></li></ul>
8939 Nested lists 4 (first element empty)
8944 <ul><li><ul><li></li></ul></li>
8950 Nested lists 5 (both elements empty)
8955 <ul><li><ul><li></li></ul></li>
8961 Nested lists 6 (both elements empty)
8967 <ul><li></li></ul></li></ul>
8972 Nested lists 7 (skip initial nesting levels)
8976 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8981 Nested lists 8 (multiple nesting transitions)
8989 <ul><li><ul><li> bar</li></ul></li>
8990 <li> baz</li></ul></li>
8996 Nested lists 9 (extension interaction)
9002 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9006 1. Lists with start-of-line-transparent tokens before bullets: Comments
9019 2. Lists with start-of-line-transparent tokens before bullets: Template close
9024 <ul><li>foo bar</li>
9030 List items are not parsed correctly following a <pre> block (bug 785)
9036 <ul><li> <pre>foo</pre></li>
9037 <li> <pre>bar</pre></li>
9041 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9042 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9047 List items from template
9058 * notSOL{{inner list}}
9061 <ul><li> item 1</li>
9062 <li> item 2</li></ul>
9063 <ul><li> item 0</li>
9065 <li> item 2</li></ul>
9066 <ul><li> item 0</li>
9069 <li> item 2</li></ul>
9074 List interrupted by empty line or heading
9082 <ul><li> foo</li></ul>
9083 <ul><li><ul><li> bar</li></ul></li></ul>
9084 <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>
9085 <ul><li> Another list item</li></ul>
9090 Multiple list tags generated by templates
9111 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9114 <!--This line will NOT split the list-->
9116 <!--This line will NOT split the list either-->
9118 <!--foo--> <!----> <!--This line NOT split the list either-->
9129 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9132 <!--This line will NOT split the list-->
9134 <!--This line will NOT split the list either-->
9136 <!--foo--> <!----> <!--This line NOT split the list
9149 (The PHP parser relies on Tidy for the hack)
9151 parsoid=wt2html,wt2wt
9155 * {{echo|<li>templated li-hack}}
9156 * <!--foo--> <li> unsupported li-hack with preceding comments
9159 <li><li>not a li-hack
9166 <li>templated li-hack</li>
9167 <li>unsupported li-hack with preceding comments</li>
9170 <li>not a li-hack</li>
9175 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9202 Parsoid: Test of whitespace serialization with Templated bullets
9209 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9213 # ------------------------------------------------------------------------
9214 # The next set of tests are about Parsoid's ability to handle badly nested
9215 # tags (parse, minimize scope of fixup, and roundtrip back)
9216 # ------------------------------------------------------------------------
9219 Unbalanced closing block tags break a list
9220 (php parser relies on Tidy to fix up)
9238 # Parsoid fails this test, but it might be tricky to support properly.
9241 Unbalanced closing non-block tags don't break a list
9242 (php parser relies on Tidy to fix up)
9249 <li><span>a</span></li>
9250 <li><span>b</span></li>
9264 Unclosed formatting tags that straddle lists are closed and reopened
9265 (php parser relies on Tidy to fix up)
9267 parsoid=wt2html,wt2wt,html2html
9277 <ol><li> <s> a</s></li>
9278 <li><s> b </s></li></ol>
9283 1. List embedded in a formatting tag
9290 <li><small>foo</small></li>
9300 ## Ugly Parsoid output here
9301 ## Not sure what the right output is.
9303 2. List embedded in a formatting tag
9310 <li><small>a</small></li>
9311 <li><small>b</small></li>
9318 <li><small>b</small></li>
9322 # Ugly Parsoid and PHP parser output here
9323 # Not sure if we want to make this a test!
9326 ## 3. Unclosed formatting tags in list elements
9332 ## <li><small>a</small></li>
9333 ## <li><small><small>b</small></small></li>
9337 ## <li><small>a</small></li>
9339 ## <li><small>b</small></li>
9343 # This is a bug in the PHP parser + tidy combination.
9344 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9345 # and then fostered out of the table by tidy.)
9346 # We believe the Parsoid output to be correct.
9348 Table with missing opening <tr> tag
9350 parsoid=wt2html,wt2wt
9368 # Note that the current date is hard-coded as
9369 # 1970-01-01T00:02:03Z (a Thursday)
9370 # when running parser tests. The timezone is also fixed to GMT, so
9371 # local date will be identical to current date.
9374 Magic Word: {{CURRENTDAY}}
9383 Magic Word: {{CURRENTDAY2}}
9392 Magic Word: {{CURRENTDAYNAME}}
9401 Magic Word: {{CURRENTDOW}}
9410 Magic Word: {{CURRENTMONTH}}
9419 Magic Word: {{CURRENTMONTH1}}
9428 Magic Word: {{CURRENTMONTHABBREV}}
9430 {{CURRENTMONTHABBREV}}
9437 Magic Word: {{CURRENTMONTHNAME}}
9439 {{CURRENTMONTHNAME}}
9446 Magic Word: {{CURRENTMONTHNAMEGEN}}
9448 {{CURRENTMONTHNAMEGEN}}
9455 Magic Word: {{CURRENTTIME}}
9464 Magic Word: {{CURRENTHOUR}}
9473 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9482 Magic Word: {{CURRENTYEAR}}
9491 Magic Word: {{CURRENTTIMESTAMP}}
9493 {{CURRENTTIMESTAMP}}
9500 Magic Words LOCAL (UTC)
9504 * {{LOCALMONTHNAME}}
9505 * {{LOCALMONTHNAMEGEN}}
9506 * {{LOCALMONTHABBREV}}
9515 * {{LOCALTIMESTAMP}}
9530 <li> 19700101000203</li></ul>
9535 Magic Word: {{FULLPAGENAME}}
9537 title=[[User:Ævar Arnfjörð Bjarmason]]
9541 <p>User:Ævar Arnfjörð Bjarmason
9546 Magic Word: {{FULLPAGENAMEE}}
9548 title=[[User:Ævar Arnfjörð Bjarmason]]
9552 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9557 Magic Word: {{TALKSPACE}}
9559 title=[[User:Ævar Arnfjörð Bjarmason]]
9568 Magic Word: {{TALKSPACE}}, same namespace
9570 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9579 Magic Word: {{TALKSPACE}}, main namespace
9581 title=[[Parser Test]]
9590 Magic Word: {{TALKSPACEE}}
9592 title=[[User:Ævar Arnfjörð Bjarmason]]
9601 Magic Word: {{SUBJECTSPACE}}
9603 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9612 Magic Word: {{SUBJECTSPACE}}, same namespace
9614 title=[[User:Ævar Arnfjörð Bjarmason]]
9623 Magic Word: {{SUBJECTSPACE}}, main namespace
9625 title=[[Parser Test]]
9633 Magic Word: {{SUBJECTSPACEE}}
9635 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9644 Magic Word: {{NAMESPACE}}
9646 title=[[User:Ævar Arnfjörð Bjarmason]]
9655 Magic Word: {{NAMESPACEE}}
9657 title=[[User:Ævar Arnfjörð Bjarmason]]
9666 Magic Word: {{NAMESPACENUMBER}}
9668 title=[[User:Ævar Arnfjörð Bjarmason]]
9677 Magic Word: {{SUBPAGENAME}}
9679 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9688 Magic Word: {{SUBPAGENAMEE}}
9690 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9699 Magic Word: {{ROOTPAGENAME}}
9701 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9705 <p>Ævar Arnfjörð Bjarmason
9710 Magic Word: {{ROOTPAGENAMEE}}
9712 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9716 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9721 Magic Word: {{BASEPAGENAME}}
9723 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9727 <p>Ævar Arnfjörð Bjarmason
9732 Magic Word: {{BASEPAGENAMEE}}
9734 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9738 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9743 Magic Word: {{TALKPAGENAME}}
9745 title=[[User:Ævar Arnfjörð Bjarmason]]
9749 <p>User talk:Ævar Arnfjörð Bjarmason
9754 Magic Word: {{TALKPAGENAMEE}}
9756 title=[[User:Ævar Arnfjörð Bjarmason]]
9760 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9765 Magic Word: {{SUBJECTPAGENAME}}
9767 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9771 <p>User:Ævar Arnfjörð Bjarmason
9776 Magic Word: {{SUBJECTPAGENAMEE}}
9778 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9780 {{SUBJECTPAGENAMEE}}
9782 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9787 Magic Word: {{NUMBEROFFILES}}
9796 Magic Word: {{PAGENAME}}
9798 title=[[User:Ævar Arnfjörð Bjarmason]]
9802 <p>Ævar Arnfjörð Bjarmason
9807 Magic Word: {{PAGENAME}} with metacharacters
9809 title=[['foo & bar = baz']]
9813 <p><i>'foo & bar = baz'</i>
9816 <p><i>'foo & bar = baz'</i></p>
9820 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9822 title=[[*RFC 1234 http://example.com/]]
9826 <p>*RFC 1234 http://example.com/
9829 <p>*RFC 1234 http://example.com/</p>
9833 Magic Word: {{PAGENAMEE}}
9835 title=[[User:Ævar Arnfjörð Bjarmason]]
9839 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9844 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9846 title=[[*RFC 1234 http://example.com/]]
9850 <p>*RFC_1234_http://example.com/
9853 <p>*RFC_1234_http://example.com/</p>
9857 Magic Word: {{REVISIONID}}
9866 Magic Word: {{SCRIPTPATH}}
9874 Magic Word: {{STYLEPATH}}
9883 Magic Word: {{SERVER}}
9887 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9892 Magic Word: {{SERVERNAME}}
9901 Magic Word: {{SITENAME}}
9910 Case-sensitive magic words, when cased differently, should just be template transclusions
9917 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9918 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9919 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9920 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9925 Case-insensitive magic words should still work with weird casing.
9935 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9939 # From plwiki:PLOS_ONE
9941 Parsoid: Page property magic word with magic word contents
9943 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9945 <meta property="mw:PageProp/displaytitle" content="Main_Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main_Page</span></i>"}]]}'/>
9949 Parsoid: Template-generated DISPLAYTITLE
9951 {{{{echo|DISPLAYTITLE}}:Foo}}
9953 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
9957 Namespace 1 {{ns:1}}
9966 Namespace 1 {{ns:01}}
9975 Namespace 0 {{ns:0}} (bug 4783)
9983 Namespace 0 {{ns:00}} (bug 4783)
9991 Namespace -1 {{ns:-1}}
10000 Namespace User {{ns:User}}
10009 Namespace User talk {{ns:User_talk}}
10018 Namespace User talk {{ns:uSeR tAlK}}
10027 Namespace File {{ns:File}}
10036 Namespace File {{ns:Image}}
10045 Namespace (lang=de) Benutzer {{ns:User}}
10056 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10062 <p>Benutzer Diskussion
10070 {{urlencode:hi world?!}}
10071 {{urlencode:hi world?!|WIKI}}
10072 {{urlencode:hi world?!|PATH}}
10073 {{urlencode:hi world?!|QUERY}}
10083 Magic Word: prioritize type info over data-parsoid
10087 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10093 Magic Word: serialize on separate line (parsoid)
10095 parsoid=wt2wt,html2wt
10101 foo<meta property="mw:PageProp/notoc"/>bar
10105 Magic Word: rt non-english wikis
10112 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10116 __proto__ is treated as normal wikitext (T105997)
10128 Magic links: internal link to RFC (bug 479)
10132 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10135 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10139 Magic links: RFC (bug 479)
10143 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10146 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10150 Magic links: RFC (bug 65278)
10152 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10154 <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.
10157 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10161 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10163 RFC      822
10167 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10172 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
10178 Magic links: ISBN (bug 1937)
10182 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10185 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10189 Magic links: ISBN (bug 65278)
10191 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10193 <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.
10196 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
10200 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10202 ISBN      978 0 316 09811 3
10208 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10215 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
10223 Magic links: PMID incorrectly converts space to underscore
10227 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10230 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10234 Magic links: PMID (bug 65278)
10236 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10238 <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.
10241 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
10245 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10247 PMID      1234
10251 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10256 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
10261 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10262 # since these are ExtLinkText, not MagicLinkText
10264 Magic links: use appropriate serialization for "almost" magic links.
10266 X[[Special:BookSources/0978739256|foo]]
10268 X[//tools.ietf.org/html/rfc1234 foo]
10270 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10271 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10274 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10275 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10283 Nonexistent template
10285 {{thistemplatedoesnotexist}}
10287 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10292 Template with invalid target containing tags
10294 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10296 <p>{{a<b>b</b>|foo|a=b|a = b}}
10301 Template with invalid target containing unclosed tag
10303 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10305 <p>{{a<b>|foo|a=b|a = b}}</b>
10310 Template with invalid target containing wikilink
10314 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10317 <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>
10321 Template with just whitespace in it, bug #68421
10325 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
10331 This is a test template
10339 <p>This is a test template
10344 Template with explicit namespace
10348 <p>This is a test template
10356 This is a test template with parameter {{{param}}}
10362 {{paramtest|param=foo}}
10364 <p>This is a test template with parameter foo
10369 Template:paramtestnum
10371 [[{{{1}}}|{{{2}}}]]
10375 Template unnamed parameter
10377 {{paramtestnum|Main Page|the main page}}
10379 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10384 Template:templatesimple
10390 Template:templateredirect
10392 #redirect [[Template:templatesimple]]
10396 Template:templateasargtestnum
10402 Template:templateasargtest
10404 {{template{{{templ}}}}}
10408 Template:templateasargtest2
10414 Template with template name as unnamed argument
10416 {{templateasargtestnum|templatesimple}}
10423 Template with template name as argument
10425 {{templateasargtest|templ=simple}}
10432 Template with template name as argument (2)
10434 {{templateasargtest2|templ=templatesimple}}
10441 Template:templateasargtestdefault
10443 {{{{{templ|templatesimple}}}}}
10453 Template with default value
10455 {{templateasargtestdefault}}
10462 Template with default value (value set)
10464 {{templateasargtestdefault|templ=templa}}
10473 {{templateredirect}}
10478 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10482 Template with argument in separate line
10484 {{ templateasargtest |
10492 Template with complex template as argument
10495 param ={{ templateasargtest |
10496 templ = simple }}}}
10498 <p>This is a test template with parameter (test)
10503 Template with thumb image (with link in description)
10505 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10507 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>
10510 <p>This is a test template with parameter</p>
10511 <div class="thumb tright">
10512 <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>
10513 <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>
10517 <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>
10521 Template:complextemplate
10523 {{{1}}} {{paramtest|
10524 param ={{{param}}}}}
10528 Template with complex arguments
10531 param ={{ templateasargtest |
10532 templ = simple }}|[[Template:complextemplate|link]]}}
10534 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10539 BUG 553: link with two variables in a piped link
10542 |[[{{{1}}}|{{{2}}}]]
10547 <td>[[{{{1}}}|{{{2}}}]]
10552 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-parsoid='{"src":"{{{1}}}"}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-parsoid='{"src":"{{{2}}}"}'>{{{2}}}</span>]]</td></tr>
10557 Abort table cell attribute parsing on wikilink
10560 | testing [[one|two]] | three || four
10561 | testing one two | three || four
10562 | testing="[[one|two]]" | three || four
10567 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10573 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10579 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
10580 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
10581 <td> testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td></tr>
10586 Don't abort table cell attribute parsing if wikilink is found in template arg
10589 | Test {{#tag:ref|One two "[[three]]" four}}
10593 <tbody><tr><td> Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"#tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
10598 Magic variable as template parameter
10600 {{paramtest|param={{SITENAME}}}}
10602 <p>This is a test template with parameter MediaWiki
10609 [[{{{param}}}|link]]
10613 Template parameter as link source
10615 {{linktest|param=Main Page}}
10617 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10622 Template:paramtest2
10624 including another template, {{paramtest|param={{{arg}}}}}
10628 Template passing argument to another template
10630 {{paramtest2|arg='hmm'}}
10632 <p>including another template, This is a test template with parameter 'hmm'
10643 Template as link source
10647 [[{{linktest2}}|Main Page]]
10649 [[{{linktest2}}]]Page
10651 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10652 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10653 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10671 Template infinite loop
10675 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10680 Template from main namespace
10699 BUG 529: Template with table, not included at beginning of line
10718 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10738 BUG 41: Template parameters shown as broken links
10747 Template with targets containing wikilinks
10751 {{[[{{echo|foo}}]]}}
10753 {{{{echo|[[foo}}]]}}
10755 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10756 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10768 Templates: Double quotes as template target
10775 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10779 ## This test is about making sure Parsoid's data-mw is well formed in the
10780 ## face of multiple templates with intersecting and overlapping ranges. The
10781 ## wikitext itself is wretched.
10783 Templates with intersecting and overlapping ranges
10808 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
10810 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
10812 <tbody><tr><td>hi</td></tr>
10817 Template:MSGNW test
10819 ''None'' of '''this''' should be
10821 but rather passed unmodified
10829 # hmm, fix this or just deprecate msgnw and document its behavior?
10833 {{msgnw:MSGNW test}}
10835 <p>''None'' of '''this''' should be
10837  but rather passed unmodified
10838 {{test}}
10842 <!-- comment -->
10849 {{int:youhavenewmessages|lots of money|not!}}
10851 <p>You have lots of money (not!).
10856 int keyword - non-existing message
10867 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10871 <includeonly> and <noinclude> being included
10882 <onlyinclude>Foo</onlyinclude>bar
10886 <onlyinclude> being included
10898 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10902 <onlyinclude> and <includeonly> being included
10911 <includeonly> and <noinclude> on a page
10913 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10920 Un-closed <noinclude>
10927 <onlyinclude> on a page
10929 <onlyinclude>Foo</onlyinclude>bar
10936 Un-closed <onlyinclude>
10943 Self-closed noinclude, includeonly, onlyinclude tags
10954 Unbalanced includeonly and noinclude tags
10958 |b</noinclude></noinclude>
10959 |c</noinclude></includeonly>
10960 |d</includeonly></includeonly>
10969 <td>c</includeonly>
10971 <td>d</includeonly></includeonly>
10977 Template:Includeonly section
10980 ==Includeonly section==
10986 Bug 6563: Edit link generation for section shown by <includeonly>
10988 {{includeonly section}}
10990 <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>
10991 <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>
10995 # Uses same input as the contents of [[Template:Includeonly section]]
10997 Bug 6563: Section extraction for section shown by <includeonly>
11002 ==Includeonly section==
11010 Bug 6563: Edit link generation for section suppressed by <includeonly>
11013 ==Includeonly section==
11017 <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>
11022 Bug 6563: Section extraction for section suppressed by <includeonly>
11027 ==Includeonly section==
11035 Un-closed <includeonly>
11040 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11043 ## We used to, but no longer wt2wt this test since the default serializer
11044 ## will normalize the include directives to serialize on their own line.
11045 ## Selser will take care of preserving formatting in scenarios where they
11046 ## intermingled with other wikitext.
11048 Includes and comments at SOL
11050 parsoid=wt2html,html2html
11052 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11056 </noinclude>* stuff
11059 <includeonly>can have stuff</includeonly>=== here ===
11062 <h2><span class="mw-headline" id="hu">hu</span></h2>
11065 <ul><li> stuff</li>
11066 <li> here</li></ul>
11067 <h3><span class="mw-headline" id="here">here</span></h3>
11070 <!-- 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>
11072 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11074 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11075 <li> here</li></ul>
11077 <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>
11081 # TODO: test with DOM fragment reuse!
11083 Parsoid: DOM fragment reuse
11085 parsoid=wt2wt,wt2html
11087 a{{echo|b<table></table>c}}d
11099 <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"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
11101 <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"}]]}'>ab</p><span about="#mwt2">
11102 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11103 </span><p about="#mwt2">cd</p>
11105 <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"}]]}'>a</p><span about="#mwt3">
11107 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11109 </span><p about="#mwt3">b</p>
11113 Parsoid: Merge double tds (T52603)
11118 |{{echo|{{!}} foo}}
11122 <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>
11127 Parsoid: Merge double tds in nested transclusion content (T52603)
11133 |{{echo|{{!}} foo}}
11137 <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}}]}'>
11139 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11145 ### <includeonly> and <noinclude> in attributes
11148 0. includeonly around the entire attribute
11150 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11152 <p><span id="v2">bar</span>
11157 1. includeonly in html attr key
11159 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11161 <p><span id="foo">bar</span>
11166 2. includeonly in html attr value
11168 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11169 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11171 <p><span id="v1">bar</span>
11172 <span id="v1">bar</span>
11177 3. includeonly in part of an attr value
11179 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11181 <p><span style="color:red;">bar</span>
11186 4. includeonly in table attributes
11210 ### Token Stream Patcher tests
11212 ### These tests won't always pass wt2wt and other modes because
11213 ### on serialization, the table will be output on a new line.
11214 ### For now, we are blacklisting them, and using this to test selser.
11218 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11220 parsoid=wt2html,wt2wt
11222 {{echo|}}{| width = '100%'
11226 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11227 <tbody><tr><td>foo</td></tr>
11231 ## We used to, but no longer wt2wt this test since the default serializer
11232 ## will normalize the include directives to serialize on their own line.
11233 ## Selser will take care of preserving formatting in scenarios where they
11234 ## intermingled with other wikitext.
11236 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11240 <includeonly>a</includeonly>{| {{{b}}}
11244 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"dsr\":[31,38,null,null],\"src\":\"{{{b}}}\"}'>{{{b}}}</span>"},{"html":""}]]}'>
11245 <tbody><tr><td>c</td></tr>
11250 ### Testing parsing of templates where a template arg
11251 ### has the same name as the template itself.
11257 {{{quote|{{{1}}}}}}
11261 Templates: Template Name/Arg clash: 1. Use of positional param
11270 Templates: Template Name/Arg clash: 2. Use of named param
11272 {{quote|quote=foo}}
11279 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11288 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11292 Templates: 1. Simple use
11301 Templates: 2. Inside a block tag
11303 <div>{{echo|Foo}}</div>
11304 <blockquote>{{echo|Foo}}</blockquote>
11307 <blockquote>Foo</blockquote>
11317 Templates: P-wrapping: 1a. Templates on consecutive lines
11328 Templates: P-wrapping: 1b. Templates on consecutive lines
11342 Templates: P-wrapping: 1c. Templates on consecutive lines
11345 {{echo|bar}} <div>baz</div>
11358 Templates: P-wrapping: 1d. Template preceded by comment-only line
11367 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11371 Templates: Inline Text: 1. Multiple template uses
11373 {{echo|Foo}}bar{{echo|baz}}
11380 Templates: Inline Text: 2. Back-to-back template uses
11382 {{echo|Foo}}{{echo|bar}}
11389 Templates: Block Tags: 1. Multiple template uses
11391 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11393 <div>Foo</div><div>bar</div><div>baz</div>
11398 Templates: Block Tags: 2. Back-to-back template uses
11400 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11402 <div>Foo</div><div>bar</div>
11406 # This is an edge case relating to paragraph wrapping.
11408 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11413 <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
11418 Templates: Links: 1. Simple example
11420 {{echo|[[Foo|bar]]}}
11422 <p><a href="/wiki/Foo" title="Foo">bar</a>
11427 Templates: Links: 2. Generation of link href
11429 [[{{echo|Foo}}|bar]]
11431 <p><a href="/wiki/Foo" title="Foo">bar</a>
11436 Templates: Links: 3. Generation of part of a link href
11438 [[Fo{{echo|o}}|bar]]
11440 [[Foo{{echo|bar}}]]
11442 [[Foo{{echo|bar}}baz]]
11444 [[Foo{{echo|bar}}|bar]]
11446 [[:Foo{{echo|bar}}]]
11448 [[:Foo{{echo|bar}}|bar]]
11450 <p><a href="/wiki/Foo" title="Foo">bar</a>
11451 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11452 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11453 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11454 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11455 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11460 Templates: Links: 4. Multiple templates generating link href
11462 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11464 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11469 Templates: Links: 5. Generation of link text
11471 [[Foo|{{echo|bar}}]]
11473 <p><a href="/wiki/Foo" title="Foo">bar</a>
11478 Templates: Links: 5. Nested templates (only outermost template should be marked)
11480 {{echo|[[{{echo|Foo}}|bar]]}}
11482 <p><a href="/wiki/Foo" title="Foo">bar</a>
11487 Templates: HTML Tag: 1. Generation of HTML attr. key
11489 <div {{echo|style}}="color:red;">foo</div>
11491 <div style="color:red;">foo</div>
11496 Templates: HTML Tag: 2. Generation of HTML attr. value
11498 <div style={{echo|'color:red;'}}>foo</div>
11500 <div style="color:red;">foo</div>
11505 Templates: HTML Tag: 3. Generation of HTML attr key and value
11507 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11509 <div style="color:red;">foo</div>
11514 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11516 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11518 <div title="This is a long title with just one piece templated">foo</div>
11523 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11525 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11527 <div title="This is a long title with just one piece templated">foo</div>
11532 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11534 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11536 <div title="This is a long title with just one piece templated">foo</div>
11540 # SSS FIXME: While it is great we added support for all this,
11541 # do we want to make this part of the spec? Maybe we want to
11542 # deprecate this kind of usage in the future?
11544 Templates: HTML Tag: 7. Generation of partial attribute key string
11546 <div st{{echo|yle}}="color:red;">foo</div>
11548 <div style="color:red;">foo</div>
11553 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11555 <div {{echo|1=id="v1"}}>bar</div>
11557 <div id="v1">bar</div>
11562 Templates: HTML Tag: 9. Multiple template-generated attributes
11564 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11566 <div id="v1" title="foo">bar</div>
11571 Templates: Support for templates generating attributes and content
11573 {| {{mixed_attr_content_template}}
11578 <table style="color:red;" title="T48811">
11588 <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|}"]}'>
11597 1. Entities and nowikis inside templated attributes should be handled correctly
11599 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11601 <div style="background:#f9f9f9;">foo</div>
11604 <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='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":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='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
11608 2. Entities and nowikis inside templated attributes should be handled correctly
11611 |{{table_attribs_3}}
11616 <td style="background:#f9f9f9;">Foo
11621 <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>
11626 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11629 |{{table_attribs_3}}
11634 <td style="background:#f9f9f9;">Foo
11638 <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}}]}'>
11639 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11645 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11648 | {{table_attribs_6}} hi
11653 <td style="background: red;"> hi
11658 <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>
11663 Templates: HTML Tables: 1. Generating start of a HTML table
11665 {{echo|<table><tr><td>foo</td>}}</tr></table>
11667 <table><tr><td>foo</td></tr></table>
11672 Templates: HTML Tables: 2a. Generating middle of a HTML table
11674 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11676 <table><tr><td>foo</td></tr></table>
11681 Templates: HTML Tables: 2b. Generating middle of a HTML table
11683 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11685 <table><tr><td>foo</td></tr></table>
11690 Templates: HTML Tables: 3. Generating end of a HTML table
11692 <table><tr>{{echo|<td>foo</td></tr></table>}}
11694 <table><tr><td>foo</td></tr></table>
11699 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11701 {{echo|<table>}}<tr><td>foo</td></tr></table>
11703 <table><tr><td>foo</td></tr></table>
11708 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11710 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11712 <table><tr><td>foo</td></tr></table>
11717 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11719 <table><tr>{{echo|<td>}}foo</td></tr></table>
11721 <table><tr><td>foo</td></tr></table>
11726 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11728 <table><tr><td>foo{{echo|</td>}}</tr></table>
11730 <table><tr><td>foo</td></tr></table>
11735 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11737 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11739 <table><tr><td>foo</td></tr></table>
11744 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11746 <table><tr><td>foo</td></tr>{{echo|</table>}}
11748 <table><tr><td>foo</td></tr></table>
11753 Templates: HTML Tables: 5. Proper fostering of categories from inside
11755 parsoid=wt2html,wt2wt
11757 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11758 <!--Two categories (Bug 50330)-->
11759 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11761 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11762 <!--Two categories (Bug 50330)-->
11763 <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>
11767 Templates: Wiki Tables: 1a. Fostering of entire template content
11775 <tr><td></td></tr></table>
11787 Templates: Wiki Tables: 1b. Fostering of entire template content
11800 <tr><td></td></tr></table>
11814 Templates: Wiki Tables: 2. Fostering of partial template content
11824 <tr><td></td></tr></table>
11837 Templates: Wiki Tables: 3. td-content via multiple templates
11840 {{echo|{{pipe}}a}}{{echo|b}}
11851 Templates: Wiki Tables: 4. Templated tags, no content
11857 <tr><td></td></tr></table>
11862 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11876 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11889 ## This test case is very specific to Parsoid's internals
11890 ## and is hence only tested for Parsoid's code. Parsoid uses
11891 ## a <meta> marker tag for <ref> tags and they are expanded
11892 ## much later. We are verifying that this <meta> tag usage
11893 ## doesn't prevent foster parenting.
11895 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11897 {{PartialTable}}<ref>foo</ref>
11902 <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">
11906 <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>
11910 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11920 <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{{!}}}"]}'>
11921 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11925 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11930 Templates: Lists: Multi-line list-items via templates
11932 *{{echo|a {{nonexistent|
11934 *{{echo|b {{nonexistent|
11937 <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>
11938 <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>
11943 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11945 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11947 <p><i>ab</i>c<i>d</i>e
11952 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11953 (PHP parser generates misnested html)
11955 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11957 <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>
11961 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11962 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11964 parsoid=wt2html,wt2wt
11966 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11968 <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>
11969 <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>
11970 <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>
11974 Templates: Ugly nesting: 4. Divs opened/closed across templates
11976 a<div>b{{echo|c</div>d}}e
11987 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11993 |{{echo|foo</table>}}
11997 <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|}"]}'>
12001 <td>foo</td></tr></tbody></table><span about="#mwt1">
12002 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12007 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12017 <td>1. {{echo|foo </table>}}</td>
12019 <td>2. {{echo|baz </table>}}</td>
12032 <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>"]}'>
12037 <td>1. foo </td></tr></tbody></table></td>
12039 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12040 </span><span about="#mwt2">
12041 </span><span about="#mwt2">
12042 </span><span about="#mwt2">abc</span><span about="#mwt2">
12043 </span><span about="#mwt2">
12044 </span><span about="#mwt2">
12045 </span><span about="#mwt2">
12046 </span><span about="#mwt2">
12047 </span><span about="#mwt2">
12048 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12049 </span><span about="#mwt2">
12054 Templates: Ugly templates: 3. newline-only template parameter
12063 # This looks like a bug: a single newline triggers p/br for some reason.
12065 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12074 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12075 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12077 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12083 <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"}],[{"k":"1"}],[{"k":"1"}]]}'>foo
12084 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12088 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12089 # that are "identical" and generate nesting cycles in the algorithm
12091 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12093 {{echo|<table><tr><td><table>}}
12097 <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"}],[{"k":"1"}],[{"k":"1"}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
12098 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12099 </table></td></tr></tbody></table>
12103 Templates: Parameters substituted at the top-level
12105 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12107 <p><i>who</i> me? <b>never!</b>
12110 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12114 Parser Functions: 1. Simple example
12123 Parser Functions: 2. Nested use (only outermost should be marked up)
12132 ### Pre-save transform tests
12135 pre-save transform: subst:
12141 This is a test template
12145 pre-save transform: normal template
12155 pre-save transform: nonexistent template
12159 {{thistemplatedoesnotexist}}
12161 {{thistemplatedoesnotexist}}
12165 pre-save transform: subst magic variables
12174 # This is bug 89, which I fixed. -- wtm
12176 pre-save transform: subst: templates with parameters
12180 {{subst:paramtest|param="something else"}}
12182 This is a test template with parameter "something else"
12186 Template:nowikitest
12188 <nowiki>'''not wiki'''</nowiki>
12192 pre-save transform: nowiki in subst (bug 1188)
12196 {{subst:nowikitest}}
12198 <nowiki>'''not wiki'''</nowiki>
12202 Template:commenttest
12204 This template has <!-- a comment --> in it.
12208 pre-save transform: comment in subst (bug 1936)
12212 {{subst:commenttest}}
12214 This template has <!-- a comment --> in it.
12218 pre-save transform: unclosed tag
12222 <nowiki>'''not wiki'''
12224 <nowiki>'''not wiki'''
12228 pre-save transform: mixed tag case
12232 <NOwiki>'''not wiki'''</noWIKI>
12234 <NOwiki>'''not wiki'''</noWIKI>
12238 pre-save transform: unclosed comment in <nowiki>
12242 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12244 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12247 # Leading @ in this template definition works around a limitation
12248 # in parsoid's parserTests which otherwise strips the <span> from the
12249 # result (confusing it for a template wrapper)
12253 @<span onmouseover="alert('crap')">Oh no</span>
12257 (confirming safety of fix for subst bug 1936)
12259 {{Template:dangerous}}
12261 <p>@<span>Oh no</span>
12266 pre-save transform: comment containing gallery (bug 5024)
12270 <!-- <gallery>data</gallery> -->
12272 <!-- <gallery>data</gallery> -->
12276 pre-save transform: comment containing extension
12280 <!-- <tag>data</tag> -->
12282 <!-- <tag>data</tag> -->
12286 pre-save transform: comment containing nowiki
12290 <!-- <nowiki>data</nowiki> -->
12292 <!-- <nowiki>data</nowiki> -->
12296 pre-save transform: <noinclude> in subst (bug 3298)
12306 pre-save transform: <onlyinclude> in subst (bug 3298)
12310 {{subst:Includes2}}
12318 {{<includeonly>subst:</includeonly>Includes}}
12322 Template:SafeSubstTest
12324 {{<includeonly>safesubst:</includeonly>Includes}}
12328 bug 22297: safesubst: works during PST
12332 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12338 bug 22297: safesubst: works during normal parse
12347 subst: does not work during normal parse
12351 <p>{{subst:Includes}}
12356 pre-save transform: context links ("pipe trick")
12360 [[Article (context)|]]
12363 [[Bar:Article (context)|]]
12364 [[:Bar:Article (context)|]]
12366 [[|Article (context)]]
12370 [[Article (context)|Article]]
12371 [[Bar:Article|Article]]
12372 [[:Bar:Article|Article]]
12373 [[Bar:Article (context)|Article]]
12374 [[:Bar:Article (context)|Article]]
12376 [[Article (context)]]
12377 [[Bar:X (Y) Z|X (Y) Z]]
12378 [[:Bar:X (Y) Z|X (Y) Z]]
12382 pre-save transform: context links ("pipe trick") with interwiki prefix
12386 [[interwiki:Article|]]
12387 [[:interwiki:Article|]]
12388 [[interwiki:Bar:Article|]]
12389 [[:interwiki:Bar:Article|]]
12391 [[interwiki:Article|Article]]
12392 [[:interwiki:Article|Article]]
12393 [[interwiki:Bar:Article|Bar:Article]]
12394 [[:interwiki:Bar:Article|Bar:Article]]
12398 pre-save transform: context links ("pipe trick") with parens in title
12400 pst title=[[Somearticle (context)]]
12404 [[Article (context)|Article]]
12408 pre-save transform: context links ("pipe trick") with comma in title
12410 pst title=[[Someplace, Somewhere]]
12413 [[Otherplace, Elsewhere|]]
12414 [[Otherplace, Elsewhere, Anywhere|]]
12416 [[Otherplace, Somewhere|Otherplace]]
12417 [[Otherplace, Elsewhere|Otherplace]]
12418 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12422 pre-save transform: context links ("pipe trick") with parens and comma
12424 pst title=[[Someplace (IGNORED), Somewhere]]
12427 [[Otherplace (place), Elsewhere|]]
12429 [[Otherplace, Somewhere|Otherplace]]
12430 [[Otherplace (place), Elsewhere|Otherplace]]
12434 pre-save transform: context links ("pipe trick") with comma and parens
12436 pst title=[[Who, me? (context)]]
12439 [[Me, Myself, and I (1937 song)|]]
12441 [[Yes, you. (context)|Yes, you.]]
12442 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12446 pre-save transform: context links ("pipe trick") with namespace
12448 pst title=[[Ns:Somearticle]]
12452 [[Ns:Article|Article]]
12456 pre-save transform: context links ("pipe trick") with namespace and parens
12458 pst title=[[Ns:Somearticle (context)]]
12462 [[Ns:Article (context)|Article]]
12466 pre-save transform: context links ("pipe trick") with namespace and comma
12468 pst title=[[Ns:Somearticle, Context, Whatever]]
12472 [[Ns:Article, Context, Whatever|Article]]
12476 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12478 pst title=[[Ns:Somearticle, Context (context)]]
12482 [[Ns:Article (context)|Article]]
12486 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12488 pst title=[[Ns:Somearticle (IGNORED), Context]]
12492 [[Ns:Article, Context|Article]]
12496 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12500 [[Article(context)|]]
12501 [[Bar:Article(context)|]]
12502 [[:Bar:Article(context)|]]
12503 [[|Article(context)]]
12507 [[Article(context)|Article]]
12508 [[Bar:Article(context)|Article]]
12509 [[:Bar:Article(context)|Article]]
12510 [[Article(context)]]
12511 [[Bar:X(Y)Z|X(Y)Z]]
12512 [[:Bar:X(Y)Z|X(Y)Z]]
12516 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12520 [[Article (context)|]]
12521 [[Bar:Article (context)|]]
12522 [[:Bar:Article (context)|]]
12523 [[|Article (context)]]
12527 [[Article (context)|Article]]
12528 [[Bar:Article (context)|Article]]
12529 [[:Bar:Article (context)|Article]]
12530 [[Article (context)]]
12531 [[Bar:X (Y) Z|X (Y) Z]]
12532 [[:Bar:X (Y) Z|X (Y) Z]]
12536 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12540 [[Article(context)|]]
12541 [[Bar:Article(context)|]]
12542 [[:Bar:Article(context)|]]
12543 [[|Article(context)]]
12547 [[Article(context)|Article]]
12548 [[Bar:Article(context)|Article]]
12549 [[:Bar:Article(context)|Article]]
12550 [[Article(context)]]
12551 [[Bar:X(Y)Z|X(Y)Z]]
12552 [[:Bar:X(Y)Z|X(Y)Z]]
12556 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12560 [[Article (context), context|]]
12561 [[Article (context),context|]]
12562 [[Bar:Article (context), context|]]
12563 [[Bar:Article (context),context|]]
12564 [[:Bar:Article (context), context|]]
12565 [[:Bar:Article (context),context|]]
12567 [[Article (context), context|Article]]
12568 [[Article (context),context|Article]]
12569 [[Bar:Article (context), context|Article]]
12570 [[Bar:Article (context),context|Article]]
12571 [[:Bar:Article (context), context|Article]]
12572 [[:Bar:Article (context),context|Article]]
12576 pre-save transform: trim trailing empty lines
12580 Empty lines are trimmed
12586 Empty lines are trimmed
12590 pre-save transform: Signature expansion
12595 * <noinclude>~~~</noinclude>
12596 * <includeonly>~~~</includeonly>
12597 * <onlyinclude>~~~</onlyinclude>
12599 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12600 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12601 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12602 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12607 pre-save transform: Signature expansion in nowiki tags (bug 93)
12613 <nowiki>~~~~</nowiki>
12615 <includeonly><nowiki>~~~~</nowiki></includeonly>
12617 <noinclude><nowiki>~~~~</nowiki></noinclude>
12619 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12621 {{subst:Foo}} shall be converted to FOO
12623 As well as inside noinclude/onlyinclude
12624 <noinclude>{{subst:Foo}}</noinclude>
12625 <onlyinclude>{{subst:Foo}}</onlyinclude>
12627 But not inside includeonly
12628 <includeonly>{{subst:Foo}}</includeonly>
12632 <nowiki>~~~~</nowiki>
12634 <includeonly><nowiki>~~~~</nowiki></includeonly>
12636 <noinclude><nowiki>~~~~</nowiki></noinclude>
12638 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12640 FOO shall be converted to FOO
12642 As well as inside noinclude/onlyinclude
12643 <noinclude>FOO</noinclude>
12644 <onlyinclude>FOO</onlyinclude>
12646 But not inside includeonly
12647 <includeonly>{{subst:Foo}}</includeonly>
12651 Parsoid: Recognize nowiki with trailing space in tags
12655 <nowiki ><div>[[foo]]</nowiki >
12663 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12670 Parsoid: Recognize nowiki with odd capitalization
12674 <noWikI ><div>[[foo]]</Nowiki >
12676 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12681 Parsoid: Escape nowiki with trailing space in tags
12685 <p><nowiki > foo </nowiki ></p>
12686 <p>a<nowiki />b</p>
12687 <p>c<nowiki/ >d</p>
12689 <nowiki > foo </nowiki >
12697 Parsoid: Escape weird noWikI capitalizations
12701 <p><noWikI > foo </NoWikI ></p>
12703 <noWikI > foo </NoWikI >
12707 ### Message transform tests
12710 message transform: magic variables
12720 message transform: should not transform wiki markup
12730 message transform: <noinclude> in transcluded template (bug 4926)
12740 message transform: <onlyinclude> in transcluded template (bug 4926)
12750 {{#special:}} page name, known
12754 {{#special:Recentchanges}}
12756 Special:RecentChanges
12760 {{#special:}} page name with subpage, known
12764 {{#special:Recentchanges/param}}
12766 Special:RecentChanges/param
12770 {{#special:}} page name, unknown
12774 {{#special:foobar nonexistent}}
12776 Special:Foobar nonexistent
12780 {{#speciale:}} page name, known
12784 {{#speciale:Recentchanges}}
12786 Special:RecentChanges
12790 {{#speciale:}} page name with subpage, known
12794 {{#speciale:Recentchanges/param}}
12796 Special:RecentChanges/param
12800 {{#speciale:}} page name, unknown
12804 {{#speciale:foobar nonexistent}}
12806 Special:Foobar_nonexistent
12812 ### For Parsoid-specific tests, see
12813 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12818 parsoid=wt2html,wt2wt,html2html
12820 [[Image:foobar.jpg]]
12822 <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>
12825 <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>
12829 Simple image (using File: namespace, now canonical)
12831 [[File:Foobar.jpg]]
12833 <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>
12836 <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>
12840 Right-aligned image
12842 [[File:Foobar.jpg|right]]
12844 <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>
12847 <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>
12853 [[File:Foobar.jpg|right|Caption text]]
12855 <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>
12858 <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>
12862 Image with caption, bug 53312 #1
12864 [[File:Foobar.jpg|right|Caption page stuff]]
12866 <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>
12869 <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>
12873 Image with caption, bug 53312 #2
12875 [[File:Foobar.jpg|right|Caption page=]]
12877 <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>
12880 <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>
12884 Image with caption, bug 53312 #3
12886 [[File:Foobar.jpg|right|Caption page=stuff]]
12888 <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>
12891 <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>
12895 Allow empty links in image captions (Bug 60753)
12899 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12904 <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>
12907 <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>
12909 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12910 </figcaption></figure>
12914 Titles in unlinked images (T23454)
12916 [[File:Foobar.jpg|link=|stuff]]
12918 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12923 Link with empty target
12932 Image with link trail
12934 Linktrails should not work for images: [[File:Foobar.jpg]]s
12936 <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
12939 <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>
12943 Image with empty attribute
12945 parsoid=wt2html,wt2wt,html2html
12947 [[File:Foobar.jpg|right||Caption text]]
12949 <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>
12952 <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>
12956 1. Block image with individual attributes from templates
12958 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12960 <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>
12963 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</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/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
12967 2. Block Image with individual attributes from templates
12969 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12971 <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>
12974 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}'>thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</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/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
12978 3. Inline image with individual attributes from templates
12980 [[File:Foobar.jpg|{{echo|50px}}]]
12982 <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>
12985 <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='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
12988 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12989 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12991 Image with multiple attributes from the same template
12993 [[File:Foobar.jpg|{{image_attribs}}]]
12995 <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>
12998 <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>
13002 Image with link tails
13006 123[[File:Foobar.jpg]]456
13007 123[[File:Foobar.jpg|right]]456
13008 123[[File:Foobar.jpg|thumb]]456
13010 <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
13012 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
13013 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
13016 <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>
13018 <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>
13020 <div class="thumb tright">
13021 <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>
13022 <div class="thumbcaption">
13023 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13029 <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>
13030 <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>
13031 <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>
13035 Image with multiple captions -- only last one is accepted
13037 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13039 <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>
13042 <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>
13046 Image with multiple widths -- use last
13048 [[File:Foobar.jpg|200px|300px|caption]]
13050 <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>
13053 <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>
13057 Image with multiple alignments -- use first (bug 48664)
13061 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13063 [[File:Foobar.jpg|middle|text-top|caption]]
13065 <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>
13066 <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>
13069 <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>
13070 <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>
13074 Image with width attribute at different positions
13076 [[File:Foobar.jpg|200px|right|Caption]]
13077 [[File:Foobar.jpg|right|200px|Caption]]
13078 [[File:Foobar.jpg|right|Caption|200px]]
13080 <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>
13081 <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>
13082 <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>
13085 <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>
13086 <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>
13087 <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>
13090 # a sad bit of backward-compatibility
13092 Image with size specified with pxpx (bug 13500, 51628)
13094 parsoid=wt2html,wt2wt,html2html
13096 [[File:Foobar.jpg|20pxpx]]
13097 [[File:Foobar.jpg|200x20pxpx]]
13099 <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>
13100 <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>
13103 <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>
13107 Image with link parameter, wiki target
13109 [[File:Foobar.jpg|link=Main Page]]
13111 <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>
13114 <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>
13117 # parsoid bug 49293 (part 1)
13119 Image with link parameter, URL target
13121 [[File:Foobar.jpg|link=http://example.com/]]
13123 <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>
13126 <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>
13129 # parsoid bug 49293 (part 2)
13131 Image with link parameter, protocol-less URL target
13133 [[File:Foobar.jpg|link=//example.com/]]
13135 <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>
13138 <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>
13142 Escaping non-block captions (T107435)
13145 "modes": ["wt2wt"],
13147 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13151 [[Image:Foobar.jpg|caption]]
13153 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13156 # wgExternalLinkTarget not supported by Parsoid
13158 Image with link parameter, wgExternalLinkTarget
13160 [[Image:foobar.jpg|link=http://example.com/]]
13162 wgExternalLinkTarget='foobar'
13164 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13169 Image with link parameter, wgNoFollowLinks set to false
13171 [[Image:foobar.jpg|link=http://example.com/]]
13173 wgNoFollowLinks=false
13175 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13180 Image with link parameter, wgNoFollowDomainExceptions
13182 [[Image:foobar.jpg|link=http://example.com/]]
13184 wgNoFollowDomainExceptions='example.com'
13186 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13190 # wgExternalLinkTarget not supported by Parsoid
13192 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13194 [[Image:foobar.jpg|link=http://example.com/|Title]]
13196 wgExternalLinkTarget='foobar'
13198 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13203 Image with empty link parameter
13205 [[File:Foobar.jpg|link=]]
13207 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13210 <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>
13214 Image with link parameter (wiki target) and unnamed parameter
13216 [[File:Foobar.jpg|link=Main_Page|Title]]
13218 <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>
13221 <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>
13225 Image with link parameter (URL target) and unnamed parameter
13227 [[File:Foobar.jpg|link=http://example.com/|Title]]
13229 <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>
13232 <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>
13236 Thumbnail image with link parameter
13239 parsoid=wt2html,wt2wt,html2html
13241 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13243 <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>
13246 <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>
13250 Manually-specified thumbnail image
13254 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13256 <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>
13259 <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>
13263 Manually-specified thumbnail image with explicit link to wiki page
13266 parsoid=wt2html,wt2wt,html2html
13268 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13270 <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>
13273 <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>
13277 Manually-specified thumbnail image with explicit link to url
13280 parsoid=wt2html,wt2wt,html2html
13282 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13284 <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>
13287 <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>
13291 Manually-specified thumbnail image with explicit no link
13294 parsoid=wt2html,wt2wt,html2html
13296 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13298 <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>
13301 <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>
13305 Manually-specified thumbnail image with explicit link and alt text
13308 parsoid=wt2html,wt2wt,html2html
13310 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13312 <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>
13315 <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>
13319 Image with frame and link
13321 parsoid=wt2html,wt2wt,html2html
13323 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13325 <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>
13328 <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>
13332 Image with frame and link and explicit alt
13334 parsoid=wt2html,wt2wt,html2html
13336 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13338 <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>
13341 <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>
13345 Image with wiki markup in implicit alt
13347 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13349 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13351 <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>
13352 </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>
13355 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing '''bold''' in alt"}]}' data-mw='{"caption":"testing <b data-parsoid='{\"dsr\":[27,37,3,3]}'>bold</b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
13357 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></span></p>
13361 Alt image option should handle most kinds of wikitext without barfing
13363 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13365 <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>
13368 <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='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&#39;&#39;bold template&#39;&#39;\"}},\"i\":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>
13371 ###################
13372 # Conflicting image format options.
13373 # First option specified should 'win'.
13374 # All three cases in each test should be identical.
13377 Image with 'frameless' first.
13379 parsoid=wt2html,wt2wt,html2html
13381 [[File:Foobar.jpg|frameless|caption]]
13383 [[File:Foobar.jpg|frameless|frame|caption]]
13385 [[File:Foobar.jpg|frameless|thumb|caption]]
13387 <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>
13388 </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>
13389 </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>
13392 <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>
13393 <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>
13394 <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>
13398 Image with 'frame' first.
13400 parsoid=wt2html,wt2wt,html2html
13402 [[File:Foobar.jpg|frame|caption]]
13403 [[File:Foobar.jpg|frame|frameless|caption]]
13404 [[File:Foobar.jpg|frame|thumb|caption]]
13406 <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>
13407 <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>
13408 <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>
13411 <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>
13412 <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>
13413 <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>
13417 Image with 'thumb' first.
13419 parsoid=wt2html,wt2wt,html2html
13421 [[File:Foobar.jpg|thumb|caption]]
13422 [[File:Foobar.jpg|thumb|frameless|caption]]
13423 [[File:Foobar.jpg|thumb|frame|caption]]
13425 <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>
13426 <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>
13427 <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>
13430 <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>
13431 <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>
13432 <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>
13435 ###################
13437 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13438 # and https://phabricator.wikimedia.org/T64258
13439 # Foobar has actual size of 1941x220
13440 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13441 # a scalable format.
13442 # 2. Framed images always ignore size options; always render at default size.
13443 # 3. "Unspecified format" and border are the only types which can be
13447 Image: "unspecified format" and border enlarge
13449 parsoid=wt2html,wt2wt,html2html
13451 [[File:Foobar.jpg|2000px]]
13453 [[File:Foobar.jpg|border|2000px]]
13455 <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>
13456 </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>
13459 <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>
13460 <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>
13464 Image: "unspecified format" and border reduce
13466 parsoid=wt2html,wt2wt,html2html
13468 [[File:Foobar.jpg|1000px]]
13470 [[File:Foobar.jpg|border|1000px]]
13472 <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>
13473 </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>
13476 <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>
13477 <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>
13481 Image: thumbs reduce
13483 parsoid=wt2html,wt2wt,html2html
13485 [[File:Foobar.jpg|thumb|50px]]
13487 <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>
13490 <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>
13494 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13496 parsoid=wt2html,wt2wt,html2html
13498 [[File:Foobar.jpg|thumb|2000px]]
13500 [[File:Foobar.svg|thumb|2000px]]
13502 <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>
13503 <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>
13506 <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>
13507 <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>
13511 Image: frameless can reduce in size
13513 parsoid=wt2html,wt2wt,html2html
13515 [[File:Foobar.jpg|frameless|50px]]
13517 <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>
13520 <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>
13524 Image: bitmap frameless can't be enlarged past original size, but vector can
13526 parsoid=wt2html,wt2wt,html2html
13528 [[File:Foobar.jpg|frameless|2000px]]
13530 [[File:Foobar.svg|frameless|2000px]]
13532 <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>
13533 </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>
13536 <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>
13537 <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>
13541 Image: framed images are always unscaled.
13543 parsoid=wt2html,wt2wt,html2html
13545 [[File:Foobar.jpg|frame]]
13547 [[File:Foobar.jpg|frame|50px]]
13549 [[File:Foobar.jpg|frame|50x50px]]
13551 [[File:Foobar.jpg|frame|2000px]]
13553 <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>
13554 <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>
13555 <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>
13556 <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>
13559 <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>
13560 <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>
13561 <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>
13562 <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>
13565 ###################
13568 Link to image page- image page normally doesn't exists, hence edit link
13569 Add test with existing image page
13570 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13574 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13579 bug 18784 Link to non-existent image page with caption should use caption as link text
13581 [[:Image:test|caption]]
13583 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13588 Frameless image caption with a free URL
13590 [[File:Foobar.jpg|http://example.com]]
13592 <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>
13595 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[18,36,0,0]}'>http://example.com</a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13599 Thumbnail image caption with a free URL
13603 [[File:Foobar.jpg|thumb|http://example.com]]
13605 <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>
13608 <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>
13612 Thumbnail image caption with a free URL and explicit alt
13615 parsoid=wt2html,wt2wt,html2html
13617 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13619 <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>
13622 <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>
13626 SVG thumbnails with no language set
13629 [[File:Foobar.svg|thumb|caption]]
13631 <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>
13634 <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>
13638 SVG thumbnails with language de
13640 parsoid=wt2html,wt2wt,html2html
13642 [[File:Foobar.svg|thumb|caption|lang=de]]
13644 <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>
13647 <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>
13651 SVG thumbnails with invalid language code
13653 parsoid=wt2html,wt2wt,html2html
13655 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13657 <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>
13660 <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>
13664 BUG 1887: A ISBN with a thumbnail
13666 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13668 <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>
13671 <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:WikiLink">ISBN 1235467890</a></figcaption></figure>
13675 BUG 1887: A RFC with a thumbnail
13677 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13679 <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>
13682 <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>
13686 BUG 1887: A mailto link with a thumbnail
13688 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13690 <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>
13693 <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>
13696 # Pending resolution to bug 368
13698 BUG 648: Frameless image caption with a link
13700 [[File:Foobar.jpg|text with a [[link]] in it]]
13702 <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>
13705 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,38,2,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13709 BUG 648: Frameless image caption with a link (suffix)
13711 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13713 <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>
13716 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]]foo in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,41,2,5],\"tail\":\"foo\"}'>linkfoo</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13720 BUG 648: Frameless image caption with an interwiki link
13722 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13724 <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>
13727 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}'>MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13731 BUG 648: Frameless image caption with a piped interwiki link
13733 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13735 <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>
13738 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13742 T107474: Frameless image caption with <nowiki>
13744 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13746 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>"}]}' data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[18,75,8,9]}'>text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13750 Escape HTML special chars in image alt text
13752 [[File:Foobar.jpg|& < > "]]
13754 <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>
13757 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13761 BUG 499: Alt text should have Ӓ, not &1234;
13763 [[File:Foobar.jpg|♀]]
13765 <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>
13768 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&#9792;"}]}' data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#9792;\",\"srcContent\":\"♀\",\"dsr\":[18,25,null,null]}'>♀</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13772 Broken image caption with link
13774 parsoid=wt2html,wt2wt,html2html
13776 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13778 <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.
13781 <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>
13785 Image caption containing another image
13787 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13789 <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>
13792 <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>
13796 Image: caption containing a newline
13798 [[File:Foobar.jpg|This
13801 <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>
13804 <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>
13808 Image: caption containing leading space
13809 (The leading space should not trigger nowiki escaping in wt2wt mode)
13811 [[File:Foobar.jpg|thumb| bar]]
13813 <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>
13816 <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>
13820 Image: caption containing a table
13822 parsoid=wt2html,wt2wt,html2html
13824 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13830 and some more text.]]
13832 <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>
13835 <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
13838 <tr><th>Foo </th><th>Bar</th></tr>
13841 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13845 Bug 3090: External links other than http: in image captions
13847 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13849 <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>
13852 <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>
13858 parsoid=wt2html,wt2wt,html2html
13860 [[Image:foobar.jpg|a|class=b]]
13862 <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>
13865 <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>
13869 Localized image handling (1).
13871 parsoid=wt2html,wt2wt,html2html
13874 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13876 <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>
13879 <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>
13883 Localized image handling (2).
13886 parsoid=wt2html,wt2wt,html2html
13889 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13891 <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>
13894 <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>
13898 Localized image handling (3).
13903 <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>
13905 [[File:Foobar.jpg|بندانگشتی]]
13909 "border", "frameless" and "class" attributes on an image.
13912 parsoid=wt2html,wt2wt,html2html
13914 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13916 <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>
13919 <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>
13922 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13924 Invalid image attributes (bug 62500)
13927 parsoid=wt2html,wt2wt,html2html
13929 [[File:Foobar.jpg|thumb|float|left|caption]]
13931 [[File:Foobar.jpg|thumb|righ|caption]]
13933 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13935 <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>
13936 <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>
13937 <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>
13940 <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>
13941 <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>
13942 <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>
13948 #REDIRECT [[File:Barfoo.jpg]]
13951 # FIXME: Parsoid should run this test -- but we'd need to teach the
13952 # mockAPI about the redirected Barfoo.jpg image.
13956 [[Image:Barfoo.jpg]]
13958 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13963 Missing image with uploads disabled
13967 [[File:Foobaz.jpg]]
13969 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13972 <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>
13975 # Parsoid-specific testing for images
13976 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13977 # Currently imperfect due to a flaw in the Parsoid testrunner
13979 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13983 Parsoid-specific image handling - simple image with size and middle alignment
13985 [[File:Foobar.jpg|middle|50px]]
13987 <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>
13991 Parsoid-specific image handling - simple image with size, middle alignment,
13992 non-standard namespace alias
13994 parsoid=wt2wt,wt2html,html2html
13996 [[Image:Foobar.jpg|middle|50px]]
13998 <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>
14002 Parsoid-specific image handling - simple image with size and middle alignment
14005 [[File:Foobar.jpg|50px|middle]]
14007 <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>
14011 Parsoid-specific image handling - simple image with size and middle alignment
14012 and non-standard namespace name
14014 parsoid=wt2html,wt2wt,html2html
14016 [[Image:Foobar.jpg|50px|middle]]
14018 <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>
14022 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14024 [[File:Foobar.jpg|500x10px|baseline|caption]]
14026 <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>
14030 Parsoid-specific image handling - simple image with border and size spec
14032 [[File:Foobar.jpg|50px|border|caption]]
14034 <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>
14038 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14040 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14042 <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>
14046 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14049 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14051 <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>
14055 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14057 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14059 <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>
14063 Parsoid-specific image handling - thumbnail with specific size, halign,
14064 valign, and caption (existing content)
14066 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14068 <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>
14072 Parsoid-specific image handling - framed image with specific size and caption
14075 parsoid=wt2html,wt2wt,html2html
14077 [[File:Foobar.jpg|frame|500x50px|caption]]
14079 <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>
14083 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14086 parsoid=wt2html,wt2wt,html2html
14088 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14090 <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>
14094 Parsoid-specific image handling - frameless image with specific size, border, and caption
14096 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14098 <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>
14102 Parsoid-specific image handling - simple image with a formatted caption
14104 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14106 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}]}' data-mw='{"caption":"<table data-parsoid='{\"stx\":\"html\",\"dsr\":[18,81,7,8]}'><tbody data-parsoid='{\"dsr\":[25,73,0,0]}'><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[25,54,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[29,39,4,5]}'>a</td><td data-parsoid='{\"stx\":\"html\",\"dsr\":[39,49,4,5]}'>b</td></tr><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[54,73,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[58,68,4,5]}'>c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14110 Parsoid-specific image handling - caption with a template in it
14112 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14114 <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>
14118 Parsoid-specific image handling - caption with unbalanced tags in it
14120 parsoid=wt2html,wt2wt,html2html
14123 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14127 <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>
14132 Parsoid-specific image handling - empty caption (1)
14134 parsoid=wt2html,wt2wt
14136 [[File:Foobar.jpg|thumb|]]
14138 <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>
14141 # empty captions don't get serialized unless we're in the "round trip" case
14143 Parsoid-specific image handling - empty caption (2)
14147 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14148 <a href="./File:Foobar.jpg">
14149 <img resource="./File:Foobar.jpg"
14150 src="//example.com/images/3/3a/Foobar.jpg"
14151 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14152 height="25" width="220"/>
14154 <figcaption></figcaption>
14157 [[File:Foobar.jpg|thumb]]
14161 Parsoid-specific image handling - whitespace caption
14163 [[File:Foobar.jpg|thumb| ]]
14165 <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>
14169 Parsoid-specific image handling - lang option
14172 [[File:Foobar.svg|lang=de|caption]]
14176 <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>
14180 ## Edge case bugs in Parsoid from T93580
14182 T93580: 1. Templated <ref> inside block images
14184 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14188 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
14190 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14194 T93580: 2. <ref> inside inline images
14196 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14200 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,78,5,6]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14202 <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" data-parsoid="{}">foo</span></li></ol>
14206 T93580: 3. Templated <ref> inside inline images
14208 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14212 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14214 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14221 Subpage test/subpage
14229 subpage title=[[Subpage test]]
14233 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14238 Subpage noslash link
14240 subpage title=[[Subpage test]]
14244 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14249 Subpage test/1/2/subpage
14255 Relative subpage noslash link
14257 parsoid=wt2wt,wt2html,html2html
14258 subpage title=[[Subpage test/1/2/3/4]]
14264 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14265 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14268 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14269 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14273 Parsoid: dot-slash prefixed wikilinks
14283 </p><p>[[././baz/]]
14288 </p><p>[[././baz/]]
14293 Render invalid page names as plain text (bug 51090)
14306 [[{{echo|./../foo}}|bar]]
14307 [[{{echo|foo/.}}|bar]]
14308 [[{{echo|foo/..}}|bar]]
14309 [[{{echo|foo~~~~bar}}]]
14310 [[{{echo|foo>bar}}]]
14311 [[{{echo|foo././bar}}]]
14312 [[{{echo|foo{bar}}]]
14313 [[{{echo|foo}bar}}]]
14314 [[{{echo|foo[bar}}]]
14315 [[{{echo|foo]bar}}]]
14316 [[{{echo|foo<bar}}]]
14318 <p>[[./../foo|bar]]
14328 </p><p>[[./../foo|bar]]
14341 <p>[[./../foo|bar]]
14352 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14353 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14354 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14355 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14356 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14357 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14358 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14359 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14360 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14361 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14362 [[<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>
14370 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14375 BUG 561: {{/Subpage}}
14377 subpage title=[[Page]]
14381 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14389 Category:MediaWiki User's Guide
14397 [[:Category:MediaWiki User's Guide]]
14399 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14408 [[Category:MediaWiki User's Guide]]
14410 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14414 PAGESINCATEGORY invalid title fatal (r33546 fix)
14416 {{PAGESINCATEGORY:<bogus>}}
14423 Category with different sort key
14427 [[Category:MediaWiki User's Guide|Foo]]
14429 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14433 Category with identical sort key
14437 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14439 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14443 Category with empty sort key
14448 [[Category:MediaWiki User's Guide|]]
14450 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14454 Category with empty sort key and parentheses
14459 [[Category:Foo (bar)|]]
14461 [[Category:Foo (bar)|Foo]]
14464 ## We used to, but no longer wt2wt this test since the default serializer
14465 ## will normalize all categories to serialize on their own line.
14466 ## This wikitext usage is going to be fairly uncommon in production and
14467 ## selser will take care of preserving formatting in those scenarios.
14469 Category with link tail
14475 123[[Category:Foo]]456
14477 123[[Category:Foo]]456
14479 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14483 Category with template
14488 [[Category:{{echo|Foo}}]]
14490 [[Category:{{echo|Foo}}]]
14494 Category with template in sort key
14499 [[Category:Foo|{{echo|Bar}}]]
14501 [[Category:Foo|{{echo|Bar}}]]
14505 Category with template in sort key and title
14510 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14512 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14515 ## We used to, but no longer wt2wt this test since the default serializer
14516 ## will normalize all categories to serialize on their own line.
14517 ## This wikitext usage is going to be fairly uncommon in production and
14518 ## selser will take care of preserving formatting in those scenarios.
14520 Category / paragraph interactions
14524 Foo [[Category:Baz]] Bar
14526 Foo [[Category:Baz]]
14534 [[Category:Baz]] Bar
14547 {{echo|[[Category:Baz]]}}
14560 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14561 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14562 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14563 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14564 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/></p>
14565 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14568 ## We used to, but no longer wt2wt this test since the default serializer
14569 ## will normalize all categories to serialize on their own line.
14570 ## This wikitext usage is going to be fairly uncommon in production and
14571 ## selser will take care of preserving formatting in those scenarios.
14573 ## The whitespace on the empty line is part of the test. Please do not delete
14575 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14581 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14583 {{echo|[[Category:Foo]] and so should this!}}
14585 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14590 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14592 <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>
14595 ## Parsoid will not try to wt2wt this while preserving newlines because
14596 ## it suppresses excess newlines within list items -- and we don't want to
14597 ## introduce a special case just for categories, which is, in reality somewhat
14598 ## odd behavior -- categories are unlikely to be used in list items like this
14599 ## in top-level pages and are only likely to show up in template-generated
14600 ## list items where this RT-ing is a non-issue.
14602 ## The whitespace on the empty line is part of the test. Please do not delete
14604 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14610 [[Category:Foo]] and this should be part of the same list item
14613 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14615 <ul><li>This and this should be part of the same list item</li>
14616 <li>So should this and this should be part of the same list item</li></ul>
14619 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14620 <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>
14624 ## Newlines and categories that follow the last item of a list
14625 ## are treated differently because this (list followed by categories)
14626 ## is an extremely common pattern on wikis.
14628 3. Categories and newlines: newline suppression for last list item should RT properly
14641 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14643 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14644 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14648 4. Categories and newlines: newline suppression for last list item should RT properly
14656 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14658 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14661 ## only wt2html for this to make sure the algo only applies to the rightmost path
14663 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14676 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14678 <ul><li> d</li></ul></li></ul>
14679 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14682 ## We used to, but no longer wt2wt this test since the default serializer
14683 ## will normalize all categories to serialize on their own line.
14684 ## This wikitext usage is going to be fairly uncommon in production and
14685 ## selser will take care of preserving formatting in those scenarios.
14687 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14691 * a [[Category:Foo]]
14693 <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>
14696 # This test also demonstrates because of newline+category tunneling
14697 # through the list hander, template wrapping doesn't expand to the
14698 # containing list when the list item swallows the category.
14700 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14705 <ul><li> <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a
14706 </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>
14710 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14714 {{echo|[[Category:Foo]]
14718 <ul><li> a</li></ul>
14720 <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"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
14721 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14722 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14726 Parsoid: Serialize link to category page with colon escape
14732 [[:Category:Foo|Bar]]
14735 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14736 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14740 # We used to, but no longer wt2wt this test since the default serializer
14741 # will normalize all categories to serialize on their own line.
14742 # This wikitext usage is going to be fairly uncommon in production and
14743 # selser will take care of preventing whitespace insertion if this
14744 # occurs in an article.
14746 # html2html disabled for the same reason (whitespace insertion between
14749 # html2wt disabled because it localizes the "Category" namespace.
14751 Link prefix/suffixes aren't applied to category links
14761 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14765 Parsoid: Serialize link to file page with colon escape
14771 [[:File:Foo.png|Bar]]
14774 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14775 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14780 Parsoid: Serialize a genuine category link without colon escape
14785 [[Category:Foo|Bar]]
14787 <link rel="mw:PageProp/Category" href="./Category:Foo">
14788 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14792 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14796 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14798 [[Category:Toxine bactérienne]]
14802 Parsoid: Defaultsort
14804 {{DEFAULTSORT:Foo}}
14806 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14810 Parsoid: Defaultsort (template-generated)
14812 {{{{echo|DEFAULTSORT}}:Foo}}
14814 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
14818 ### Inter-language links
14821 Interlanguage links
14829 es:Alimento fr:Nourriture zh:食品
14831 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14832 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14833 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14837 Duplicate interlanguage links (bug 24502)
14848 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14849 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14850 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14851 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14858 Basic section headings
14865 ===Smaller headline===
14868 <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>
14871 <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>
14874 <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>
14880 Section headings with TOC
14883 === Subheadline 1 ===
14884 ===== Skipping a level =====
14885 ====== Skipping a level ======
14889 ===Another headline===
14891 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14893 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14895 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14897 <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>
14899 <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>
14906 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14908 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14914 <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>
14915 <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>
14916 <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>
14917 <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>
14918 <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>
14921 <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>
14926 TOC anchors don't collide
14934 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14936 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14937 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14938 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14939 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14943 <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>
14944 <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>
14945 <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>
14946 <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>
14950 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14952 Handling of sections up to level 6 and beyond
14955 == Level 2 Heading==
14956 === Level 3 Heading===
14957 ==== Level 4 Heading====
14958 ===== Level 5 Heading=====
14959 ====== Level 6 Heading======
14960 ======= Level 7 Heading=======
14961 ======== Level 8 Heading========
14962 ========= Level 9 Heading=========
14963 ========== Level 10 Heading==========
14965 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14967 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14969 <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>
14971 <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>
14973 <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>
14975 <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>
14977 <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>
14978 <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>
14979 <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>
14980 <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>
14981 <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>
14995 <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>
14996 <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>
14997 <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>
14998 <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>
14999 <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>
15000 <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>
15001 <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>
15002 <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>
15003 <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>
15004 <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>
15009 TOC regression (T11764)
15013 ==== title 1.1.1 ====
15018 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15020 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15022 <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>
15024 <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>
15027 <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>
15030 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15032 <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>
15038 <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>
15039 <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>
15040 <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>
15041 <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>
15042 <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>
15043 <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>
15048 TOC for heading containing <span id="..."></span> (T96153)
15051 ==<span id="old-anchor"></span>New title==
15053 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15055 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15059 <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>
15064 TOC with wgMaxTocLevel=3 (bug 6204)
15070 ==== title 1.1.1 ====
15075 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15077 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15079 <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>
15080 <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>
15083 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15085 <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>
15091 <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>
15092 <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>
15093 <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>
15094 <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>
15095 <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>
15096 <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>
15101 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15107 ====Section 1.1.1====
15108 ====Section 1.1.1.1====
15111 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15113 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15115 <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>
15118 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15122 <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>
15123 <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>
15124 <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>
15125 <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>
15126 <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>
15132 Resolving duplicate section names
15137 <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>
15138 <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>
15143 Resolving duplicate section names with differing case (bug 10721)
15148 <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>
15149 <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>
15161 Template with sections, __NOTOC__
15168 <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>
15169 <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>
15170 <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>
15171 <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>
15176 __NOEDITSECTION__ keyword
15182 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15183 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15188 Link inside a section heading
15190 ==Section with a [[Main Page|link]] in it==
15192 <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>
15197 TOC regression (T14077)
15204 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15206 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15208 <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>
15211 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15215 <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>
15216 <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>
15217 <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>
15222 BUG 1219 URL next to image (good)
15224 http://example.com [[File:Foobar.jpg]]
15226 <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>
15229 <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>
15233 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15236 The line above must have a trailing space!
15239 But just in case it doesn't...
15241 <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>
15242 <p>The line above must have a trailing space!
15244 <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>
15245 <p>But just in case it doesn't...
15250 Header with special characters (bug 25462)
15252 The tooltips shall not show entities to the user (ie. be double escaped)
15269 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15271 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15273 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15274 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15275 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15276 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15277 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15281 <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>
15284 <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>
15287 <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>
15290 <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>
15293 <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>
15299 Header with space, plus and underscore as entity
15301 Id should not contain + for spaces
15303 == Space between Text ==
15306 == Space-Entity between Text ==
15309 == Plus+between+Text ==
15312 == Plus-Entity+between+Text ==
15315 == Underscore_between_Text ==
15318 == Underscore-Entity_between_Text ==
15321 [[#Space between Text]]
15322 [[#Space-Entity between Text]]
15323 [[#Plus+between+Text]]
15324 [[#Plus-Entity+between+Text]]
15325 [[#Underscore_between_Text]]
15326 [[#Underscore-Entity_between_Text]]
15328 <p>Id should not contain + for spaces
15330 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15332 <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>
15333 <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>
15334 <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>
15335 <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>
15336 <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>
15337 <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>
15341 <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>
15344 <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>
15347 <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>
15350 <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>
15353 <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>
15356 <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>
15358 </p><p><a href="#Space_between_Text">#Space between Text</a>
15359 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15360 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15361 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15362 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15363 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15368 Headers with excess '=' characters
15369 (Are similar tests necessary beyond the 1st level?)
15373 =''italic'' heading==
15374 ==''italic'' heading=
15376 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15378 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15379 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15380 <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>
15381 <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>
15385 <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>
15386 <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>
15387 <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>
15388 <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>
15393 HTML headers vs TOC (bug 23393)
15394 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15406 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15408 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15410 <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>
15411 <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>
15414 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15416 <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>
15417 <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>
15423 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15424 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15425 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15426 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15427 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15428 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15433 Single-line or multiline-comments can follow headings
15435 parsoid=wt2html,wt2wt
15443 <h2><span class="mw-headline" id="foo">foo</span></h2>
15444 <h2><span class="mw-headline" id="bar">bar</span></h2>
15445 <h2><span class="mw-headline" id="baz">baz</span></h2>
15450 BUG 1219 URL next to image (broken)
15452 http://example.com[[File:Foobar.jpg]]
15454 <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>
15457 <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>
15461 Bug 1186 news: in the middle of text
15463 http://en.wikinews.org/wiki/Wikinews:Workplace
15465 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15471 Namespaced link must have a title
15480 Namespaced link must have a title (bad fragment version)
15482 [[Project:#fragment]]
15484 <p>[[Project:#fragment]]
15490 ### HTML tags and HTML attributes
15494 div with no attributes
15496 <div>HTML rocks</div>
15498 <div>HTML rocks</div>
15503 div with double-quoted attribute
15505 <div id="rock">HTML rocks</div>
15507 <div id="rock">HTML rocks</div>
15512 div with single-quoted attribute
15514 <div id='rock'>HTML rocks</div>
15516 <div id="rock">HTML rocks</div>
15521 div with unquoted attribute
15523 <div id=rock>HTML rocks</div>
15525 <div id="rock">HTML rocks</div>
15530 div with illegal double attributes
15532 <div id="a" id="b">HTML rocks</div>
15534 <div id="b">HTML rocks</div>
15539 div with empty attribute value, space before equals
15541 parsoid=wt2html,html2html
15543 <div class =>HTML rocks</div>
15545 <div class="">HTML rocks</div>
15548 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15552 div with multiple empty attribute values
15554 parsoid=wt2html,html2html
15556 <div id= title=>HTML rocks</div>
15558 <div id="title.3D">HTML rocks</div>
15561 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15565 table with multiple empty attribute values
15567 parsoid=wt2html,html2html
15573 <table title="id=">
15579 <table title="id=">
15580 <tbody><tr><td> hi</td></tr>
15585 div with braces in attribute value
15587 <div title="{}">Foo</div>
15589 <div title="{}">Foo</div>
15592 <div title="{}">Foo</div>
15596 div with empty attribute value, no space before equals
15598 parsoid=wt2html,html2html
15600 <div class=>HTML rocks</div>
15602 <div class="">HTML rocks</div>
15605 <div class="">HTML rocks</div>
15609 HTML multiple attributes correction
15611 <p class="error" class="awesome">Awesome!</p>
15613 <p class="awesome">Awesome!</p>
15618 Table multiple attributes correction
15621 !+ class="error" class="awesome"| status
15626 <th class="awesome"> status
15634 <DIV ID="x">HTML ROCKS</DIV>
15636 <div id="x">HTML ROCKS</div>
15641 Non-ASCII pseudo-tags are rendered as text
15650 Pseudo-tag with URL 'name' renders as url link
15652 <http://example.com/>
15654 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15659 text with amp in the middle of nowhere
15663 <p>Remember AT&T?
15668 text with character entity: eacute
15670 I always thought é was a cute letter.
15672 <p>I always thought é was a cute letter.
15675 <p>I always thought é was a cute letter.</p>
15679 text with entity-escaped character entity-like string: eacute
15681 I always thought &eacute; was a cute letter.
15683 <p>I always thought &eacute; was a cute letter.
15688 text with undefined character entity: xacute
15690 I always thought &xacute; was a cute letter.
15692 <p>I always thought &xacute; was a cute letter.
15699 <data value="5">five</data>
15700 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15701 <mark>This highlighted text</mark>
15703 <p><data value="5">five</data>
15704 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15705 <mark>This highlighted text</mark>
15710 HTML tag with leading space is parsed as text
15714 <p>< div>foo< /div>
15719 ### Nesting tests (see bug 41545, 50604, 51081)
15722 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15723 # Note that html2wt is considerably more difficult if we use <b> in
15724 # the test case, instead of <big>
15726 Ensure that HTML adoption agency algorithm is properly implemented.
15728 <big>X<big>Y</big>Z</big>
15730 <p><big>X<big>Y</big>Z</big>
15734 # This was bug 41545 in the PHP parser.
15735 # Note that tidy doesn't handle this correctly.
15739 <kbd>X<kbd>Y</kbd>Z</kbd>
15741 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15745 # The following cases were bug 51081 in the PHP parser.
15746 # Note that there are some other nestable tags (b, i, etc) which are
15747 # not covered; see bug 51081 for discussion.
15749 # Note that tidy doesn't handle this correctly.
15753 <em>X<em>Y</em>Z</em>
15755 <p><em>X<em>Y</em>Z</em>
15759 # Note that tidy doesn't handle this correctly.
15761 Nesting of <strong>
15763 <strong>X<strong>Y</strong>Z</strong>
15765 <p><strong>X<strong>Y</strong>Z</strong>
15774 <p><q>X<q>Y</q>Z</q></p>
15777 # Note that tidy doesn't handle this correctly.
15781 <ruby>X<ruby>Y</ruby>Z</ruby>
15783 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15787 # Note that tidy doesn't handle this correctly.
15791 <bdo>X<bdo>Y</bdo>Z</bdo>
15793 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15805 [[Media:Foobar.jpg]]
15807 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15812 Media link with text
15814 [[Media:Foobar.jpg|A neat file to look at]]
15816 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15820 # FIXME: this is still bad HTML tag nesting
15821 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15823 Media link with nasty text
15825 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15827 <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>
15830 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15831 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15835 Media link to nonexistent file (bug 1702)
15837 [[Media:No such.jpg]]
15839 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15844 Image link to nonexistent file (bug 1850 - good)
15846 [[File:No_such.jpg]]
15848 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15851 <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>
15855 :Image link to nonexistent file (bug 1850 - bad)
15857 [[:Image:No such.jpg]]
15859 <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>
15862 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15868 Character reference normalization in link text (bug 1938)
15870 [[Main Page|this&that]]
15872 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15879 Test for unicode normalization
15881 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15885 (bug 19451) Links should refer to the normalized form.
15893 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15894 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15895 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15896 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15897 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15902 Empty attribute crash test (bug 2067)
15904 <font color="">foo</font>
15906 <p><font color="">foo</font>
15911 Empty attribute crash test single-quotes (bug 2067)
15913 <font color=''>foo</font>
15915 <p><font color="">foo</font>
15920 Attribute test: equals, then nothing
15922 parsoid=wt2html,html2html
15924 <font color=>foo</font>
15926 <p><font color="">foo</font>
15929 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
15933 Attribute test: unquoted value
15935 parsoid=wt2html,html2html
15937 <font color=x>foo</font>
15939 <p><font color="x">foo</font>
15942 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
15946 Attribute test: unquoted but illegal value (hash)
15948 <font color=#x>foo</font>
15950 <p><font color="#x">foo</font>
15954 # Parsoid does not serialize to empty attribute syntax,
15955 # so wt2wt and html2wt cases are skipped
15957 Attribute test: no value (T54330)
15959 parsoid=wt2html,html2html
15961 <font color>foo</font>
15963 <p><font color="">foo</font>
15966 <p><font color="">foo</font></p>
15970 Bug 2095: link with three closing brackets
15974 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15977 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15981 Bug 2095: link with pipe and three closing brackets
15983 [[Main Page|link]]]
15985 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15988 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15992 Bug 2095: link with pipe and three closing brackets, version 2
15994 [[Main Page|[http://example.com/]]]
15996 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15999 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16008 Template:Dangerous attribute
16010 " onmouseover="alert(document.cookie)
16014 Template:Dangerous style attribute
16016 border-size: expression(alert(document.cookie))
16022 <div style="float: right; {{{1}}}">Magic div</div>
16026 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16028 <div title="{{test}}"></div>
16030 <div title="This is a test template"></div>
16034 # Parsoid has enough context to handle this case
16036 Bug 2304: HTML attribute safety (dangerous template; 2309)
16038 <div title="{{dangerous attribute}}"></div>
16040 <div title=""></div>
16043 <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='{\"pi\":[[]],\"dsr\":[12,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}'>\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
16047 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16049 <div style="{{dangerous style attribute}}"></div>
16051 <div style="/* insecure input */"></div>
16056 Bug 2304: HTML attribute safety (safe parameter; 2309)
16058 {{div style|width: 200px}}
16060 <div style="float: right; width: 200px">Magic div</div>
16065 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16067 {{div style|width: expression(alert(document.cookie))}}
16069 <div style="/* insecure input */">Magic div</div>
16074 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16076 {{div style|"><script>alert(document.cookie)</script>}}
16078 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16083 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16085 {{div style|" ><script>alert(document.cookie)</script>}}
16087 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16092 Bug 2304: HTML attribute safety (link)
16094 <div title="[[Main Page]]"></div>
16096 <div title="[[Main Page]]"></div>
16101 Bug 2304: HTML attribute safety (italics)
16103 <div title="''foobar''"></div>
16105 <div title="''foobar''"></div>
16110 Bug 2304: HTML attribute safety (bold)
16112 <div title="'''foobar'''"></div>
16114 <div title="'''foobar'''"></div>
16120 Bug 2304: HTML attribute safety (ISBN)
16122 <div title="ISBN 1234567890"></div>
16124 <div title="ISBN 1234567890"></div>
16129 Bug 2304: HTML attribute safety (RFC)
16131 <div title="RFC 1234"></div>
16133 <div title="RFC 1234"></div>
16138 Bug 2304: HTML attribute safety (PMID)
16140 <div title="PMID 1234567890"></div>
16142 <div title="PMID 1234567890"></div>
16147 Bug 2304: HTML attribute safety (web link)
16149 <div title="http://example.com/"></div>
16151 <div title="http://example.com/"></div>
16156 Bug 2304: HTML attribute safety (named web link)
16158 <div title="[http://example.com/ link]"></div>
16160 <div title="[http://example.com/ link]"></div>
16165 Bug 3244: HTML attribute safety (extension; safe)
16167 <div style="<nowiki>background:blue</nowiki>"></div>
16169 <div style="background:blue"></div>
16174 Bug 3244: HTML attribute safety (extension; unsafe)
16176 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16178 <div style="/* insecure input */"></div>
16182 # More MSIE fun discovered by Tom Gilder
16185 MSIE CSS safety test: spurious slash
16187 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16189 <div style="/* insecure input */">evil</div>
16194 MSIE CSS safety test: hex code
16196 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16198 <div style="/* insecure input */">evil</div>
16203 MSIE CSS safety test: comment in url
16205 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16207 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16212 MSIE CSS safety test: comment in expression
16214 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16216 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16221 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16223 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16225 <p style="/* invalid control char */">A</p>
16230 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16232 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16233 <div style="top:EXPRESSION(alert())">B</div>
16235 <p style="/* insecure input */">A</p>
16236 <div style="/* insecure input */">B</div>
16241 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16243 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16244 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16246 <div style="/* insecure input */">A</div>
16247 <p style="/* insecure input */">B</p>
16252 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16254 <div style="background-image:url⁽javascript:alert())">A</div>
16255 <div style="background-image:url₍javascript:alert())">B</div>
16256 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16258 <div style="/* insecure input */">A</div>
16259 <div style="/* insecure input */">B</div>
16260 <p style="/* insecure input */">C</p>
16264 # FIXME: Parsoid fails to sanitize this! See T58846.
16269 title="data:text/html,<img src=1 onerror=alert(1)>"
16270 style="-o-link:attr(title);-o-link-source:current">X</div>
16272 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16277 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16279 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16280 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16281 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16282 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16283 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16284 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16285 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16287 <p style="/* insecure input */">A</p>
16288 <p style="/* insecure input */">B</p>
16289 <p style="/* insecure input */">C</p>
16290 <p style="/* insecure input */">D</p>
16291 <p style="/* insecure input */">E</p>
16292 <p style="/* insecure input */">F</p>
16293 <p style="/* insecure input */">G</p>
16298 Table attribute legitimate extension
16301 !+ style="<nowiki>color:blue</nowiki>"| status
16306 <th style="color:blue"> status
16312 Table attribute safety
16315 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16320 <th style="/* insecure input */"> status
16326 CSS line continuation 1
16328 <div style="background-image: u\ rl(test.jpg);"></div>
16330 <div style="/* insecure input */"></div>
16335 CSS line continuation 2
16337 <div style="background-image: u\ rl(test.jpg); "></div>
16339 <div style="/* invalid control char */"></div>
16350 Expansion of multi-line templates in attribute values (bug 6255)
16352 <div style="background: {{identity|#00FF00}}">-</div>
16354 <div style="background: #00FF00">-</div>
16360 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16362 <div style="background:
16365 <div style="background: #00FF00">-</div>
16368 <div style="background:
16373 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16375 <div style="background: #00FF00">-</div>
16377 <div style="background: #00FF00">-</div>
16382 evil <math>-wiki-tags without Extension:Math enabled
16384 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16386 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16390 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16393 Parser hook: empty input
16404 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16407 ## Don't expect parsoid to rt this form.
16409 Parser hook: empty input using terminated empty elements
16411 parsoid=wt2html,html2html
16422 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16426 Parser hook: empty input using terminated empty elements (space before)
16437 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16441 Parser hook: basic input
16452 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16455 ## Don't expect parsoid to rt this form.
16457 Parser hook: case insensitive
16459 parsoid=wt2html,html2html
16470 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16473 ## Don't expect parsoid to rt this form.
16475 Parser hook: case insensitive, redux
16477 parsoid=wt2html,html2html
16488 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16492 Parser hook: nested tags
16494 <tag><tag></tag></tag>
16503 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16507 Parser hook: basic arguments
16509 <tag width="200" height="100" depth="50" square=""></tag>
16522 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16525 ## Don't expect parsoid to rt this form.
16527 Parser hook: basic arguments, variations
16529 parsoid=wt2html,html2html
16531 <tag width=200 height = "100" depth = '50' square></tag>
16544 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16548 Parser hook: argument containing a forward slash (bug 5344)
16550 <tag filename="/tmp/bla"></tag>
16555 'filename' => '/tmp/bla',
16560 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16563 ## Don't expect parsoid to rt this form.
16565 Parser hook: empty input using terminated empty elements (bug 2374)
16567 parsoid=wt2html,html2html
16579 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16582 ## </tag> should be output literally since there is no matching tag that begins it
16583 ## Don't expect parsoid to rt this form.
16585 Parser hook: basic arguments using terminated empty elements (bug 2374)
16589 <tag width=200 height = "100" depth = '50' square/>
16606 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":null}' about="#mwt2"></pre><p>other stuff
16610 ## Don't expect parsoid to rt this form.
16612 Parser hook: Don't allow unclosed extension tags
16618 this is a '''test'''
16620 <p>test <tag>123
16621 </p><p>this is a <b>test</b>
16624 <p>test <tag>123</p>
16626 <p>this is a <b>test</b></p>
16630 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16634 Parser hook: static parser hook not inside a comment
16636 <statictag>hello, world</statictag>
16638 <statictag action="flush" />
16644 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16645 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16649 Parser hook: static parser hook inside a comment
16651 <!-- <statictag>hello, world</statictag> -->
16652 <statictag action="flush" />
16657 <!-- <statictag>hello, world</statictag> -->
16658 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16661 # Nested template calls; this case was broken by Parser.php rev 1.506,
16665 Template:One-parameter
16667 (My parameter is: {{{1}}})
16671 Template:Map-one-parameter
16673 {{{{{1}}}|{{{2}}}}}
16677 Nested template calls
16679 {{Map-one-parameter|One-parameter|param}}
16681 <p>(My parameter is: param)
16690 # HTML+Tidy effectively strips out the empty tags completely
16691 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16692 # which Tidy would have done for the PHP parser had there been content inside it.
16694 Sanitizer: Closing of open tags
16696 <s></s><table></table>
16698 <s></s><table></table>
16701 <p><s></s></p><table></table>
16705 Sanitizer: Closing of open but not closed tags
16714 Sanitizer: Closing of closed but not open tags
16724 Sanitizer: Closing of closed but not open table tags
16728 Table not started</td></tr></table>
16730 <p>Table not started</p>
16732 <p>Table not started</p>
16736 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16738 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16740 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16744 # In HTML5, the restrictions are that id must contain at least one character,
16745 # and must not contain any space characters.
16747 Sanitizer: Validating the contents of the id attribute (bug 4515)
16751 <br id="" /><br id="a space" />
16756 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16758 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16762 <br id="foo" /><br id="foo" />
16764 Something need to be done. foo-2 ?
16768 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16771 <meta itemprop="hello" content="world">
16772 <meta http-equiv="refresh" content="5">
16773 <meta itemprop="hello" http-equiv="refresh" content="5">
16774 <link itemprop="hello" href="{{SERVER}}">
16775 <link rel="stylesheet" href="{{SERVER}}">
16776 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16780 <p> <meta itemprop="hello" content="world" />
16781 <meta http-equiv="refresh" content="5">
16782 <meta itemprop="hello" content="5" />
16784 <link itemprop="hello" href="http://example.org" />
16785 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16786 <link itemprop="hello" href="http://example.org" />
16792 Language converter: output gets cut off unexpectedly (bug 5757)
16796 this bit is safe: }-
16798 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16800 then we get cut off here: }-
16802 all additional text is vanished
16804 <p>this bit is safe: }-
16805 </p><p>but if we add a conversion instance: xxx
16806 </p><p>then we get cut off here: }-
16807 </p><p>all additional text is vanished
16812 Self closed html pairs (bug 5487)
16815 <center><font id="bug" />Centered text</center>
16816 <div><font id="bug2" />In div text</div>
16818 <center><font id="bug" />Centered text</center>
16819 <div><font id="bug2" />In div text</div>
16828 Punctuation: nbsp before exclamation
16832 <p>C'est grave !
16837 Punctuation: CSS !important (bug 11874)
16839 <div style="width:50% !important">important</div>
16841 <div style="width:50% !important">important</div>
16846 Punctuation: CSS ! important (bug 11874; with space after)
16848 <div style="width:50% ! important">important</div>
16850 <div style="width:50% ! important">important</div>
16855 HTML bullet list, closed tags (bug 5497)
16868 <ul data-parsoid='{"stx":"html"}'>
16869 <li data-parsoid='{"stx":"html"}'>One</li>
16870 <li data-parsoid='{"stx":"html"}'>Two</li>
16876 HTML bullet list, unclosed tags (bug 5497)
16888 <ul data-parsoid='{"stx":"html"}'>
16889 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16890 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16896 HTML ordered list, closed tags (bug 5497)
16909 <ol data-parsoid='{"stx":"html"}'>
16910 <li data-parsoid='{"stx":"html"}'>One</li>
16911 <li data-parsoid='{"stx":"html"}'>Two</li>
16917 HTML ordered list, unclosed tags (bug 5497)
16930 <ol data-parsoid='{"stx":"html"}'>
16931 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16932 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16938 HTML nested bullet list, closed tags (bug 5497)
16961 <ul data-parsoid='{"stx":"html"}'>
16962 <li data-parsoid='{"stx":"html"}'>One</li>
16963 <li data-parsoid='{"stx":"html"}'>Two:
16964 <ul data-parsoid='{"stx":"html"}'>
16965 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
16966 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
16973 HTML nested bullet list, open tags (bug 5497)
17010 HTML nested ordered list, closed tags (bug 5497)
17035 HTML nested ordered list, open tags (bug 5497)
17072 HTML ordered list item with parameters oddity
17074 <ol><li id="fragment">One</li>
17077 <ol><li id="fragment">One</li>
17082 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17084 bug 5918: autonumbering
17086 [http://first/] [http://second] [ftp://ftp]
17090 [mailto:enclosed@mail.tld With target]
17092 [mailto:enclosed@mail.tld]
17094 mailto:inline@mail.tld
17096 <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>
17097 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17098 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17099 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17100 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17103 <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>
17104 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17105 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17106 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17107 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17112 # Security and HTML correctness
17113 # From Nick Jenkins' fuzz testing
17117 Fuzz testing: Parser13
17132 Fuzz testing: Parser14
17137 <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>
17138 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17140 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17146 <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>
17148 <div id="toc" class="toc">
17149 <div id="toctitle">
17153 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17160 Fuzz testing: Parser14-table
17162 parsoid=wt2html,html2html
17167 <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>
17168 <table style="__TOC__">
17173 <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>
17174 <table style="__TOC__">
17181 <table style="__TOC__"></table>
17184 # Known to produce bogus xml (extra </td>)
17186 Fuzz testing: Parser16
17213 Fuzz testing: Parser21
17216 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17221 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17231 Fuzz testing: Parser22
17233 http://===r:::https://b
17237 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17245 # Known to produce bad XML for now
17247 Fuzz testing: Parser24
17252 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17253 <br style="onmouseover='alert(document.cookie);' " />
17255 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17260 <u class="|">}}}} >
17261 <br style="onmouseover='alert(document.cookie);'" />
17263 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17272 # Note: the current result listed for this is not what the original one was,
17273 # but the original bug was JavaScript injection, which is fixed in any case.
17274 # It's not clear that the original result listed was any more correct than the
17275 # current one. Original result:
17278 # <li class="||">
17279 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17281 Fuzz testing: Parser25 (bug 6055)
17287 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17289 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17294 Fuzz testing: URL adjacent extension (with space, clean)
17296 http://example.com <nowiki>junk</nowiki>
17298 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17301 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17305 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17307 http://example.com<nowiki>junk</nowiki>
17309 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17312 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17316 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17318 http://example.com<pre>junk</pre>
17320 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17323 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17328 <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>
17332 Fuzz testing: image with bogus manual thumbnail
17334 [[Image:foobar.jpg|thumbnail= ]]
17336 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17339 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' 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":{}}'><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>
17343 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17345 <pre dir=" "></pre>
17347 <pre dir=" "></pre>
17352 Parsing optional HTML elements (Bug 6171)
17357 <td> Some tabular data</td>
17358 <td> More tabular data ...
17359 <td> And yet som tabular data</td>
17365 <td> Some tabular data</td>
17366 <td> More tabular data ...
17367 </td><td> And yet som tabular data</td>
17374 Correct handling of <td>, <tr> (Bug 6171)
17379 <td> Some tabular data</td>
17380 <td> More tabular data ...</td>
17381 <td> And yet som tabular data</td>
17387 <td> Some tabular data</td>
17388 <td> More tabular data ...</td>
17389 <td> And yet som tabular data</td>
17397 Parsing crashing regression (fr:JavaScript)
17401 <p></body></x>
17406 Inline wiki vs wiki block nesting
17412 <p><b>Bold paragraph</b>
17413 </p><p>New wiki paragraph
17417 # FIXME: The current php output is documented
17418 # and desired output is the parsoid target.
17420 Inline HTML vs wiki block nesting
17426 <p><b>Bold paragraph
17427 </p><p>New wiki paragraph</b>
17430 <p><b>Bold paragraph</b>
17431 </p><p>New wiki paragraph
17435 # Original result was this:
17436 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17438 # While that might be marginally more intuitive, maybe, the six-apostrophe
17439 # construct is clearly pathological and the result stated here (which is what
17440 # the parser actually does) is about as reasonable as anything.
17442 Mixing markup for italics and bold
17445 '''bold''''''bold''bolditalics'''''
17447 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17455 Article for special page transclusion test
17459 Special page transclusion
17462 {{Special:Prefixindex/Xyzzyx}}
17464 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17470 Special page transclusion twice (bug 5021)
17473 {{Special:Prefixindex/Xyzzyx}}
17474 {{Special:Prefixindex/Xyzzyx}}
17476 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17478 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17484 Transclusion of default MediaWiki message
17486 {{MediaWiki:Mainpage}}
17493 Transclusion of nonexistent MediaWiki message
17495 {{MediaWiki:Mainpagexxx}}
17497 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17502 Transclusion of MediaWiki message with underscore
17504 {{MediaWiki:history_short}}
17511 Transclusion of MediaWiki message with space
17513 {{MediaWiki:history short}}
17520 Invalid header with following text
17530 Section extraction test (section 0)
17550 Section extraction test (section 1)
17572 Section extraction test (section 2)
17593 Section extraction test (section 3)
17613 Section extraction test (section 4)
17637 Section extraction test (section 5)
17657 Section extraction test (section 6)
17678 Section extraction test (section 7)
17698 Section extraction test (section 8)
17718 Section extraction test (section 9)
17739 Section extraction test (section 10)
17759 Section extraction test (nonexistent section 11)
17778 Section extraction test with bogus heading (section 1)
17783 ==bogus== not a legal section
17787 ==bogus== not a legal section
17791 Section extraction test with bogus heading (section 2)
17796 ==bogus== not a legal section
17803 Section extraction test with comment after heading (section 1)
17815 Section extraction test with comment after heading (section 2)
17827 Section extraction test with bogus <nowiki> heading (section 1)
17832 ==bogus== <nowiki>not a legal section</nowiki>
17836 ==bogus== <nowiki>not a legal section</nowiki>
17840 Section extraction test with bogus <nowiki> heading (section 2)
17845 ==bogus== <nowiki>not a legal section</nowiki>
17851 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17852 # instead of respecting commented sections
17854 Section extraction prefixed by comment (section 1)
17865 Section extraction prefixed by comment (section 2)
17875 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17876 # instead of respecting HTML-style headings
17878 Section extraction, mixed wiki and html (section 1)
17894 Section extraction, mixed wiki and html (section 2)
17910 # Formerly testing for bug 3342
17912 Section extraction, heading surrounded by <noinclude>
17916 <noinclude>==unmarked==</noinclude>
17922 # Test behavior of bug 19910
17924 Sectiion with all-equals
17929 The line above must have a trailing space
17932 But just in case it doesn't...
17936 But just in case it doesn't...
17940 Section replacement test (section 0)
17971 Section replacement test (section 1)
18000 Section replacement test (section 2)
18030 Section replacement test (section 3)
18061 Section replacement test (section 4)
18088 Section replacement test (section 5)
18119 Section replacement test (section 6)
18149 Section replacement test (section 7)
18180 Section replacement test (section 8)
18211 Section replacement test (section 9)
18240 Section replacement test (section 10)
18270 Section replacement test with initial whitespace (bug 13728)
18274 Preformatted initial line
18278 Preformatted initial line
18285 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18297 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18310 Section extraction, <pre> around bogus header (bug 10309)
18327 Section replacement, <pre> around bogus header (bug 10309)
18349 Handling of 
 in URLs
18353 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18356 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18358 a</a></li></ul></li></ul>
18362 Handling of %0A in URLs
18366 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18369 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18373 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18375 5 quotes, code coverage +1 line
18382 <p><b><i></i></b></p>
18385 # same html as previous, but wikitext adjusted to match parsoid html2wt
18386 # note that wt2html and html2html will put the <i> before the <b>
18388 5 quotes, code coverage +1 line w/ nowiki (1)
18390 parsoid=wt2wt,html2wt
18392 '''''<nowiki/>'''''
18397 <p><b><i></i></b></p>
18400 # same as previous, just swapping the <i> and <b>
18402 5 quotes, code coverage +1 line w/ nowiki (2)
18404 '''''<nowiki/>'''''
18409 <p><i><b></b></i></p>
18413 Special:Search page linking.
18417 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18422 {{!}} is a magic word
18424 {{!}} is a magic word there and {{!}} is still a magic word here
18425 | is not a magic word here but {{!}} is still a magic word here
18427 <p>| is a magic word there and | is still a magic word here
18428 | is not a magic word here but | is still a magic word here
18431 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
18432 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
18439 title=[[Parser test]]
18444 * {{FULLPAGENAMEE}}
18446 * {{BASEPAGENAMEE}}
18450 * {{ROOTPAGENAMEE}}
18452 * {{TALKPAGENAMEE}}
18453 * {{SUBJECTPAGENAME}}
18454 * {{SUBJECTPAGENAMEE}}
18457 * {{NAMESPACENUMBER}}
18461 * {{SUBJECTSPACEE}}
18462 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18464 <ul><li> Parser test</li>
18465 <li> Parser_test</li>
18466 <li> Parser test</li>
18467 <li> Parser_test</li>
18468 <li> Parser test</li>
18469 <li> Parser_test</li>
18470 <li> Parser test</li>
18471 <li> Parser_test</li>
18472 <li> Parser test</li>
18473 <li> Parser_test</li>
18474 <li> Talk:Parser test</li>
18475 <li> Talk:Parser_test</li>
18476 <li> Parser test</li>
18477 <li> Parser_test</li>
18485 <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>
18488 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18498 image4 |300px| centre
18499 image5.svg| http://///////
18504 <ul class="gallery mw-gallery-traditional">
18505 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18506 <div class="thumb" style="height: 150px;">Image1.png</div>
18507 <div class="gallerytext">
18510 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18511 <div class="thumb" style="height: 150px;">Image2.gif</div>
18512 <div class="gallerytext">
18515 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18516 <div class="thumb" style="height: 150px;">Image3</div>
18517 <div class="gallerytext">
18520 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18521 <div class="thumb" style="height: 150px;">Image4</div>
18522 <div class="gallerytext">
18527 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18528 <div class="thumb" style="height: 150px;">Image5.svg</div>
18529 <div class="gallerytext">
18530 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18534 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18535 <div class="thumb" style="height: 150px;">* image6</div>
18536 <div class="gallerytext">
18544 Gallery (with options)
18546 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18547 File:Nonexistent.jpg|caption
18548 File:Nonexistent.jpg
18549 image:foobar.jpg|some '''caption''' [[Main Page]]
18551 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18554 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18555 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18556 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18557 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18558 <div class="gallerytext">
18563 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18564 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18565 <div class="gallerytext">
18568 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18569 <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>
18570 <div class="gallerytext">
18571 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18575 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18576 <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>
18577 <div class="gallerytext">
18580 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18581 <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>
18582 <div class="gallerytext">
18592 Gallery with link that has fragment
18595 image:foobar.jpg|link=Main_Page
18596 image:foobar.jpg|link=Main_Page#section
18597 image:foobar.jpg|link=Main Page#section|caption
18600 <ul class="gallery mw-gallery-traditional">
18601 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18602 <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>
18603 <div class="gallerytext">
18606 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18607 <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>
18608 <div class="gallerytext">
18611 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18612 <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>
18613 <div class="gallerytext">
18623 Gallery with wikitext inside caption
18626 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18627 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18630 <ul class="gallery mw-gallery-traditional">
18631 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18632 <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>
18633 <div class="gallerytext">
18634 <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>
18638 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18639 <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>
18640 <div class="gallerytext">
18641 <p>This is a test template
18650 gallery (with showfilename option)
18652 <gallery showfilename>
18653 File:Nonexistent.jpg|caption
18654 File:Nonexistent.jpg
18655 image:foobar.jpg|some '''caption''' [[Main Page]]
18659 <ul class="gallery mw-gallery-traditional">
18660 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18661 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18662 <div class="gallerytext">
18663 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18668 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18669 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18670 <div class="gallerytext">
18671 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18675 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18676 <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>
18677 <div class="gallerytext">
18678 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18679 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18683 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18684 <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>
18685 <div class="gallerytext">
18686 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18695 Gallery (with namespace-less filenames)
18698 File:Nonexistent.jpg
18704 <ul class="gallery mw-gallery-traditional">
18705 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18706 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18707 <div class="gallerytext">
18710 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18711 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18712 <div class="gallerytext">
18715 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18716 <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>
18717 <div class="gallerytext">
18720 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18721 <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>
18722 <div class="gallerytext">
18730 HTML Hex character encoding (spells the word "JavaScript")
18732 parsoid=wt2html,wt2wt,html2html
18734 JavaScript
18736 <p>JavaScript
18741 <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>
18745 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18749 <p>&#xsee;&#XSEE;
18752 <p>&#xsee;&#XSEE;</p>
18756 HTML Hex character encoding mixed case
18758 parsoid=wt2html,wt2wt,html2html
18767 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18770 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18771 # Note that U+000C (form feed) is not a valid XML character, so
18772 # it is banned even though allowed in HTML5.
18774 Illegal character references (T106578)
18779 ; Control (low): 
18780 ; Control (high):  Ÿ
18781 ; Surrogate: ��
18782 ; This is an okay astral character: 💩
18791 <dt>Control (low)</dt>
18793 <dt>Control (high)</dt>
18794 <dd>&#x7F; &#x9F;</dd>
18796 <dd>&#xD83D;&#xDCA9;</dd>
18797 <dt>This is an okay astral character</dt>
18803 __FORCETOC__ override
18815 ISBN 978-0-1234-56 789
18817 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18820 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18822 <p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
18826 ISBN followed by 5 spaces
18837 ISBN ISBN 1234567890
18839 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18842 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18845 # Uppercase X and lowercase x as well
18856 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18857 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18858 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18859 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18860 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18861 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18864 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18865 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18866 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18867 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18868 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18869 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18873 ISBN with empty prefix (parsoid test)
18877 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18880 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18884 Bug 22905: <abbr> followed by ISBN followed by </a>
18886 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18888 <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>
18891 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
18899 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18904 Double RFC with a wiki link
18908 <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>
18917 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18920 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18924 Centre-aligned image
18926 [[Image:foobar.jpg|centre]]
18928 <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>
18935 [[Image:foobar.jpg|none]]
18937 <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>
18942 Width + Height sized image (using px) (height is ignored)
18944 [[Image:foobar.jpg|640x480px]]
18946 <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>
18951 Width-sized image (using px, no following whitespace)
18953 [[Image:foobar.jpg|640px]]
18955 <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>
18960 Width-sized image (using px, with following whitespace - test regression from r39467)
18962 [[Image:foobar.jpg|640px ]]
18964 <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>
18969 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18971 [[Image:foobar.jpg| 640px]]
18973 <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>
18978 Image with page parameter
18982 [[File:LoremIpsum.djvu|page=2]]
18984 <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>
18987 <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>
18991 Another italics / bold test
18999 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19005 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19008 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19013 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19015 Images with the "|" character in the comment
19017 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19019 <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>
19022 <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>
19026 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19028 <html><script>alert(1);</script></html>
19030 <p><html><script>alert(1);</script></html>
19035 HTML with raw HTML ($wgRawHtml==true)
19039 <html><script>alert(1);</script></html>
19041 <p><script>alert(1);</script>
19046 Parents of subpages, one level up
19048 subpage title=[[Subpage test/L1/L2/L3]]
19052 <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>
19058 Parents of subpages, one level up, not named
19060 subpage title=[[Subpage test/L1/L2/L3]]
19064 <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>
19071 Parents of subpages, two levels up
19073 subpage title=[[Subpage test/L1/L2/L3]]
19079 <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
19080 </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>
19085 Parents of subpages, two levels up, without trailing slash or name.
19087 subpage title=[[Subpage test/L1/L2/L3]]
19096 Parents of subpages, two levels up, with lots of extra trailing slashes.
19098 subpage title=[[Subpage test/L1/L2/L3]]
19102 <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>
19107 Subpage test/L1/L2/L3Sibling
19113 Transclusion of a sibling page (one level up)
19115 subpage title=[[Subpage test/L1/L2/L3]]
19124 Transclusion of a child page
19126 subpage title=[[Subpage test/L1/L2]]
19135 Non-transclusion because of too many up levels
19137 subpage title=[[Subpage test/L1/L2/L3]]
19139 {{../../../../More than parent}}
19141 <p>{{../../../../More than parent}}
19146 Definition list code coverage
19152 <dl><dt> title  </dt>
19154 <dt> title </dt>
19160 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19161 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19162 <dt>title</dt><dd> def</dd></dl>
19166 Don't fall for the self-closing div
19168 <div>hello world</div/>
19170 <div>hello world</div>
19179 <p>[[:Template:Msg]]
19188 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19192 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19194 Always escape literal '>' in output, not just after '<'
19208 <p>This is a test template
19209 This is a test template
19221 Inclusion of !userCanEdit() content
19225 <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>
19231 Out-of-order TOC heading levels
19240 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19242 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19244 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19245 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19248 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19250 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19251 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19257 <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>
19258 <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>
19259 <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>
19260 <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>
19261 <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>
19262 <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>
19268 ISBN with a dummy number
19278 ISBN with space-delimited number
19282 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19288 ISBN with multiple spaces, no number
19307 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19308 </p><p>ISBN 12345678901
19314 ISBN with trailing year (bug 8110)
19316 ISBN 1-234-56789-0 - 2006
19318 ISBN 1 234 56789 0 - 2006
19320 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19321 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19329 {{anchorencode:foo bar©#%n}}
19331 <p>foo_bar.C2.A9.23.25n
19336 anchorencode trims spaces
19338 {{anchorencode: __pretty__please__}}
19345 anchorencode deals with links
19347 {{anchorencode: [[hello|world]] [[hi]]}}
19354 anchorencode deals with templates
19356 {{anchorencode: {{Foo}} }}
19363 anchorencode encodes like the TOC generator: (bug 18431)
19365 === _ +:.3A%3A&&]] ===
19366 {{anchorencode: _ +:.3A%3A&&]] }}
19369 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19370 <p>.2B:.3A.253A.26.26.5D.5D
19375 Bug 6200: blockquotes and paragraph formatting
19396 Bug 8293: Use of center tag ruins paragraph formatting
19417 Parsing of overlapping (improperly nested) inline html tags
19419 <span><s>x</span></s>
19421 <p><span><s>x</span></s></span>
19424 <p><span><s>x</s></span>
19429 ### Language variants related tests
19432 Self-link in language variants
19434 title=[[Dunav]] language=sr
19436 Both [[Dunav]] and [[Дунав]] are names for this river.
19438 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19449 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19451 title=[[Duna]] language=sr
19453 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19455 <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.
19460 Link to a section of a variant of this title shouldn't be parsed as self-link
19462 title=[[Duna]] language=sr
19464 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19466 <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.
19471 Link to pages in language variants
19475 Main Page can be written as [[Маин Паге]]
19477 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19483 Multiple links to pages in language variants
19487 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19489 <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>.
19495 Simple template in language variants
19501 <p>This is a test template
19507 Template with explicit namespace in language variants
19513 <p>This is a test template
19519 Basic test for template parameter in language variants
19523 {{парамтест|param=foo}}
19525 <p>This is a test template with parameter foo
19531 Simple category in language variants
19535 [[Category:МедиаWики Усер'с Гуиде]]
19537 <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>
19553 ## We used to, but no longer wt2wt this test since the default serializer
19554 ## will normalize all categories to serialize on their own line.
19555 ## This wikitext usage is going to be fairly uncommon in production and
19556 ## selser will take care of preserving formatting in those scenarios.
19558 Don't convert blue categorylinks to another variant (bug 33210)
19564 [[A]][[Category:分类]]
19566 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19568 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19569 <link rel="mw:PageProp/Category" href="Category:分类"/>
19573 Stripping -{}- tags (language variants)
19577 Latin proverb: -{Ne nuntium necare}-
19579 <p>Latin proverb: Ne nuntium necare
19585 Prevent conversion with -{}- tags (language variants)
19587 language=sr variant=sr-ec
19589 Latinski: -{Ne nuntium necare}-
19591 <p>Латински: Ne nuntium necare
19597 Prevent conversion of text with -{}- tags (language variants)
19599 language=sr variant=sr-ec
19601 Latinski: -{Ne nuntium necare}-
19603 <p>Латински: Ne nuntium necare
19609 Prevent conversion of links with -{}- tags (language variants)
19611 language=sr variant=sr-ec
19615 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19621 -{}- tags within headlines (within html for parserConvert())
19623 language=sr variant=sr-ec
19627 <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>
19633 Explicit definition of language variant alternatives
19635 language=zh variant=zh-tw
19637 -{zh:China;zh-tw:Taiwan}-, not China
19639 <p>Taiwan, not China
19645 Conversion around HTML tags
19647 language=sr variant=sr-ec
19649 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19650 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19653 <span title="ЛаCтин">ски</span>
19659 Explicit session-wise language variant mapping (A flag and - flag)
19661 language=zh variant=zh-tw
19663 Taiwan is not China.
19664 But -{A|zh:China;zh-tw:Taiwan}- is China,
19665 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19666 and -{China}- is China.
19668 <p>Taiwan is not China.
19669 But Taiwan is Taiwan,
19670 (This should be stripped!)
19671 and China is China.
19676 Explicit session-wise language variant mapping (H flag for hide)
19678 language=zh variant=zh-tw
19680 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19683 <p>(This should be stripped!)
19689 Adding explicit conversion rule for title (T flag)
19691 language=zh variant=zh-tw showtitle
19693 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19696 <p>Should be stripped!
19701 Testing that changing the language variant here in the tests actually works
19703 language=zh variant=zh showtitle
19705 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19708 <p>Should be stripped!
19713 Recursive conversion of alt and title attrs shouldn't clear converter state
19715 language=zh variant=zh-cn showtitle
19717 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19718 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19722 Should be stripped<span title="Exclamation">!</span>
19727 Bug 24072: more test on conversion rule for title
19729 language=zh variant=zh-tw showtitle
19731 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19732 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19735 <p>This should be stripped!
19736 This won't take interferes with the title rule.
19741 Partly disable title conversion if variant == main language code
19743 language=zh variant=zh title=[[ZH]] showtitle
19745 -{T|zh-cn:CN;zh-tw:TW}-
19753 Partly disable title conversion if variant == main language code, more
19755 language=zh variant=zh title=[[ZH]] showtitle
19765 Raw output of variant escape tags (R flag)
19767 language=zh variant=zh-tw
19769 Raw: -{R|zh:China;zh-tw:Taiwan}-
19771 <p>Raw: zh:China;zh-tw:Taiwan
19776 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19778 language=zh variant=zh-cn
19780 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19787 Conversion rules from [numeric-only string] to [something else] (T48634)
19789 language=zh variant=zh-cn
19791 -{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
19798 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19800 language=zh variant=zh-cn
19802 -{H|zh-cn:foo;zh-tw:;}-foobar
19809 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19811 language=zh variant=zh-cn
19813 -{H|=>zh-cn:foo;}-foobar
19820 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19822 language=zh variant=zh-cn
19831 Nested using of manual convert syntax
19833 language=zh variant=zh-hk
19835 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19837 <p>Nested: Hello Hong Kong!
19842 Proper conversion of text in external links
19844 language=sr variant=sr-ec
19846 http://www.google.com
19847 gopher://www.google.com
19848 [http://www.google.com http://www.google.com]
19849 [gopher://www.google.com gopher://www.google.com]
19850 [https://www.google.com irc://www.google.com]
19851 [ftp://www.google.com www.google.com/ftp://dir]
19852 [//www.google.com www.google.com]
19854 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19855 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19856 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19857 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19858 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19859 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19860 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19865 Do not convert roman numbers to language variants
19867 language=sr variant=sr-ec
19871 <p>Фридрих IV је цар.
19876 Unclosed language converter markup "-{"
19887 Don't convert raw rule "-{R|=>}-" to "=>"
19898 Don't break link parsing if language converter markup is in the caption.
19900 language=sr variant=sr-ec
19902 [[Main Page|-{R|main page}-]]
19904 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19908 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19910 Don't break image parsing if language converter markup is in the caption.
19914 [[File:Foobar.jpg|-{R|caption}-]]
19916 <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>
19920 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19922 Don't break list handling if language converter markup is in the item.
19924 language=zh variant=zh-cn
19926 ;-{zh-cn:AAA;zh-tw:BBB}-
19928 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19935 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19937 Don't break table handling if language converter markup is in the cell.
19939 language=sr variant=sr-ec
19962 Bug 529: Uncovered bullet
19971 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19972 # Templates in Wikipedia rely on this behavior, as tidy has always been
19973 # enabled there. These tests are normally run *without* tidy, so specify the
19974 # full output here.
19975 # To test realistic parsing behavior, apply a tidy-like transformation to both
19976 # the expected output and your parser's output.
19978 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19980 ******* Foo {{bullet}}
19982 <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>
19988 Bug 529: Uncovered table already at line-start
20011 Bug 529: Uncovered bullet in parser function result
20013 * Foo {{lc:{{bullet}} }}
20021 Bug 5678: Double-parsed template argument
20023 {{lc:{{{1}}}|hello}}
20030 Bug 5678: Double-parsed template invocation
20032 {{lc:{{paramtest {{!}} param = hello }} }}
20034 <p>{{paramtest | param = hello }}
20039 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20042 title=[[Main Page]]
20044 {{PRVNÍVELKÉ:ěščř}}
20045 {{prvnívelké:ěščř}}
20065 Morwen/13: Unclosed link followed by heading
20072 <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>
20077 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20084 <h1><span class="mw-headline" id="heading">heading</span></h1>
20089 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20096 <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>
20111 Paragraphs inside divs (no extra line breaks)
20123 Paragraphs inside divs (extra line break on open)
20138 Paragraphs inside divs (extra line break on close)
20153 Paragraphs inside divs (extra line break on open and close)
20170 Nesting tags, paragraphs on lines which begin with <div>
20172 <div></div><strong>A
20175 <p><strong>A</strong></p>
20176 <p><strong>B</strong></p>
20184 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20186 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20188 <blockquote>Line one
20190 Line two</blockquote>
20192 <blockquote>Line one
20193 Line two</blockquote>
20197 <p>Line one Line two</p>
20202 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20207 Line two</blockquote>
20212 Line two</blockquote>
20217 Line two</blockquote>
20221 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20223 <blockquote>Line one
20228 <blockquote>Line one
20241 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20263 Paragraphs inside blockquotes/divs (no extra line breaks)
20265 <blockquote><div>Line one
20267 Line two</div></blockquote>
20269 <blockquote><div>Line one
20270 Line two</div></blockquote>
20275 Paragraphs inside blockquotes/divs (extra line break on open)
20280 Line two</div></blockquote>
20285 Line two</div></blockquote>
20290 Paragraphs inside blockquotes/divs (extra line break on close)
20292 <blockquote><div>Line one
20295 </div></blockquote>
20297 <blockquote><div>Line one
20300 </div></blockquote>
20305 Paragraphs inside blockquotes/divs (extra line break on open and close)
20311 </div></blockquote>
20317 </div></blockquote>
20322 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20324 wgLinkHolderBatchSize=0
20330 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20331 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20332 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20337 Free external link invading image caption
20339 [[Image:Foobar.jpg|thumb|http://x|hello]]
20341 <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>
20346 Bug 15196: localised external link numbers
20350 [http://en.wikipedia.org/]
20352 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20355 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20359 Multibyte character in padleft
20361 {{padleft:-Hello|7|Æ}}
20368 Multibyte character in padright
20370 {{padright:Hello-|7|Æ}}
20377 formatdate parser function
20379 {{#formatdate:2009-03-24}}
20381 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20386 formatdate parser function, with default format
20388 {{#formatdate:2009-03-24|mdy}}
20390 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20395 Spacing of numbers in formatted dates
20397 {{#formatdate:January 15}}
20399 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20404 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
20406 language=nl title=[[MediaWiki:Common.css]]
20408 {{#formatdate:2009-03-24|dmy}}
20410 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20423 Edit comment with link
20427 I like the [[Main Page]] a lot
20429 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20433 Edit comment with link and link text
20437 I like the [[Main Page|best pages]] a lot
20439 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20443 Edit comment with link and link text with suffix
20447 I like the [[Main Page|best page]]s a lot
20449 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20453 Edit comment with section link (non-local, eg in history list)
20455 comment title=[[Main Page]]
20457 /* External links */ removed bogus entries
20459 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20463 Edit comment with section link and text before it (non-local, eg in history list)
20465 comment title=[[Main Page]]
20467 pre-comment text /* External links */ removed bogus entries
20469 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>
20473 Edit comment with section link (local, eg in diff view)
20475 comment local title=[[Main Page]]
20477 /* External links */ removed bogus entries
20479 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20483 Edit comment with subpage link (bug 14080)
20487 title=[[Subpage test]]
20489 Poked at a [[/subpage]] here...
20491 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20495 Edit comment with subpage link and link text (bug 14080)
20499 title=[[Subpage test]]
20501 Poked at a [[/subpage|neat little page]] here...
20503 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20507 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20510 title=[[Subpage test]]
20512 Poked at a [[/subpage]] here...
20514 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20518 Edit comment with bare anchor link (local, as on diff)
20522 title=[[Main Page]]
20526 <a href="#section">#section</a>
20530 Edit comment with bare anchor link (non-local, as on history)
20533 title=[[Main Page]]
20537 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20541 Anchor starting with underscore
20547 <p><a href="#_ref">One</a>
20550 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20554 Id starting with underscore
20556 <div id="_ref"></div>
20558 <div id="_ref"></div>
20563 Space normalisation on autocomment (bug 22784)
20566 title=[[Main Page]]
20568 /* __hello__world__ */
20570 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20574 percent-encoding and + signs in comments (Bug 26410)
20578 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20580 <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>
20583 # Parsoid doesn't support this yet: see bug 73581
20584 # but it *should* omit the 'src' attribute if the image is bad.
20585 # PHP side of tests was disabled in
20586 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20587 # because of issues in the PHP parserTests infrastructure
20588 # (but the output below is indeed what the PHP side emits)
20590 Bad images - basic functionality
20593 !! DISABLED/html/php
20595 <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>
20599 Bad images - bug 16039: text after bad image disappears
20604 !! DISABLED/html/php
20610 <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>
20615 Verify that displaytitle works (bug #22501) no displaytitle
20619 wgAllowDisplayTitle=true
20620 wgRestrictDisplayTitle=false
20622 this is not the the title
20625 <p>this is not the the title
20630 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20635 wgAllowDisplayTitle=true
20636 wgRestrictDisplayTitle=false
20638 this is not the the title
20639 {{DISPLAYTITLE:whatever}}
20642 <p>this is not the the title
20647 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20652 wgAllowDisplayTitle=true
20653 wgRestrictDisplayTitle=true
20655 this is not the the title
20656 {{DISPLAYTITLE:whatever}}
20659 <p>this is not the the title
20660 <span class="error"><strong>Warning:</strong> Display title "whatever" was ignored since it is not equivalent to the page's actual title.</span>
20665 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20670 wgAllowDisplayTitle=true
20671 wgRestrictDisplayTitle=true
20673 this is not the the title
20674 {{DISPLAYTITLE:screen}}
20677 <p>this is not the the title
20682 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20687 wgAllowDisplayTitle=false
20689 this is not the the title
20690 {{DISPLAYTITLE:screen}}
20693 <p>this is not the the title
20694 <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>
20699 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20704 wgAllowDisplayTitle=false
20706 this is not the the title
20709 <p>this is not the the title
20714 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20719 wgAllowDisplayTitle=true
20720 wgRestrictDisplayTitle=true
20722 this is not the the title
20723 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20725 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20726 <p>this is not the the title
20731 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20736 wgAllowDisplayTitle=true
20737 wgRestrictDisplayTitle=true
20739 this is not the the title
20740 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20742 <span style="color: red;">s</span>creen
20743 <p>this is not the the title
20748 Page status indicators: Empty name is invalid
20752 <indicator name=" "></indicator>
20753 <indicator></indicator>
20755 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20756 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20761 Page status indicators: Weird syntaxes that are okay
20765 <indicator name="empty" />
20766 <indicator name="name"></indicator>
20775 Page status indicators: Torture test
20779 <indicator name="01">hello world</indicator>
20780 <indicator name="02">[[Main Page]]</indicator>
20781 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20782 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20783 <indicator name="05">* foo
20785 <indicator name="06"><nowiki>foo</nowiki></indicator>
20786 <indicator name="07"> Preformatted</indicator>
20787 <indicator name="08"><div>Broken tag</indicator>
20788 <indicator name="09">{| class=wikitable
20791 <indicator name="10">Two
20793 paragraphs</indicator>
20796 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20797 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" />
20798 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>
20799 05=<ul><li> foo</li>
20803 07=<pre>Preformatted
20805 08=<div>Broken tag</div>
20807 09=<table class="wikitable">
20824 preload: check <noinclude> and <includeonly>
20828 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20834 preload: check <onlyinclude>
20838 Goodbye <onlyinclude>Hello world</onlyinclude>
20844 preload: can pass tags through if we want to
20848 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20850 <includeonly>Hello world</includeonly>
20854 preload: check that it doesn't try to do tricks
20858 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20860 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20864 Play a bit with r67090 and bug 3158
20866 <div style="width:50% !important"> </div>
20867 <div style="width:50% !important"> </div>
20868 <div style="width:50% !important"> </div>
20869 <div style="border : solid;"> </div>
20871 <div style="width:50% !important"> </div>
20872 <div style="width:50% !important"> </div>
20873 <div style="width:50% !important"> </div>
20874 <div style="border : solid;"> </div>
20877 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20878 <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>
20879 <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>
20880 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20885 HTML5 data attributes
20887 <span data-foo="bar">Baz</span>
20888 <p data-abc-def_hij="">Quuz</p>
20890 <p><span data-foo="bar">Baz</span>
20892 <p data-abc-def_hij="">Quuz</p>
20895 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
20896 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
20900 Strip reserved data attributes
20902 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
20904 <div data-ok="fred">d</div>
20907 <div data-x-data-mw="foo" data-x-data-parsoid="bar" data-x-data-mw-someext="baz" data-ok="fred" data-parsoid='{"stx":"html","a":{"data-ooui":null,"data-bad:ns":null},"sa":{"data-ooui":"xyzzy","data-bad:ns":"ns"}}'>d</div>
20911 percent-encoding and + signs in internal links (Bug 26410)
20913 [[User:+%]] [[Page+title%]]
20914 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20915 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20916 [[%33%45]] [[%33%45+]]
20918 <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>
20919 <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>
20920 <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>
20921 <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>
20924 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%" data-parsoid='{"stx":"simple","a":{"href":"./User:+%25"},"sa":{"href":"User:+%"}}'>User:+%</a> <a rel="mw:WikiLink" href="./Page+title%25" title="Page+title%" data-parsoid='{"stx":"simple","a":{"href":"./Page+title%25"},"sa":{"href":"Page+title%"}}'>Page+title%</a>
20925 <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%+</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"piped","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%20</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+ "}}'>%+ </a> <a rel="mw:WikiLink" href="./%25+r" title="%+r" data-parsoid='{"stx":"simple","a":{"href":"./%25+r"},"sa":{"href":"%+r"}}'>%+r</a>
20926 <a rel="mw:WikiLink" href="./%25" title="%" data-parsoid='{"stx":"simple","a":{"href":"./%25"},"sa":{"href":"%"}}'>%</a> <a rel="mw:WikiLink" href="./+" title="+" data-parsoid='{"stx":"simple","a":{"href":"./+"},"sa":{"href":"+"}}'>+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bar\"},\"sa\":{\"href\":\"bar\"},\"dsr\":[94,101,2,2]}'>bar</a>"}'><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>
20927 <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>
20931 Special characters in embedded file links (bug 27679)
20933 [[File:Contains & ampersand.jpg]]
20934 [[File:Does not exist.jpg|Title with & ampersand]]
20936 <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>
20937 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20940 <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>
20941 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"Title with &amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
20945 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20947 Text's been normalized?
20949 <p>Text's been normalized?
20954 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20956 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20958 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20963 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20965 [http://www.example.org/ ideograms]
20967 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20972 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20974 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20976 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21000 Bug 31098 Template which includes system messages which includes the template
21004 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21005 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21010 Bug31490 Turkish: ucfirst 'blah'
21021 Bug31490 Turkish: ucfirst 'ix'
21032 Bug31490 Turkish: lcfirst 'BLAH'
21043 Bug31490 Turkish: ucfırst (with a dotless i)
21049 <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>
21054 Bug31490 ucfırst (with a dotless i) with English language
21060 <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>
21065 Bug 26375: TOC with italics
21067 title=[[Main Page]]
21070 == ''Lost'' episodes ==
21072 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21074 <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>
21078 <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>
21083 Bug 26375: TOC with bold
21085 title=[[Main Page]]
21088 == '''should be bold''' then normal text ==
21090 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21092 <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>
21096 <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>
21101 Bug 33845: Headings become cursive in TOC when they contain an image
21103 title=[[Main Page]]
21106 == Image [[Image:foobar.jpg]] ==
21108 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21110 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21114 <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>
21119 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21121 title=[[Main Page]]
21124 == <blockquote>Quote</blockquote> ==
21126 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21128 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21132 <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>
21136 <div id="toc" class="toc">
21137 <div id="toctitle">
21141 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21145 <h2><span class="mw-headline" id="Quote"></span></h2>
21147 <p><span class="mw-headline" id="Quote">Quote</span></p>
21149 <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>
21153 Unclosed tags in TOC
21155 title=[[Main Page]]
21159 <small>Hanc marginis exiguitas non caperet.</small>
21162 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21164 <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>
21168 <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>
21169 <p><small>Hanc marginis exiguitas non caperet.</small>
21175 Multiple tags in TOC
21178 == <i>Foo</i> <b>Bar</b> ==
21180 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21182 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21184 <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>
21185 <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>
21189 <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>
21190 <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>
21194 <div id="toc" class="toc">
21195 <div id="toctitle">
21199 <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>
21200 <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>
21204 <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>
21205 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21207 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21209 <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>
21212 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21213 # html5 tag parsing.
21215 Tags with parameters in TOC
21220 == <sup class="in-h2">Hello</sup> ==
21222 == <sup class="a > b">Evilbye</sup> ==
21224 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21226 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21227 <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>
21231 <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>
21232 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup class="a"> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21235 <meta property="mw:PageProp/toc" />
21236 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21238 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21242 span tags with directionality in TOC
21245 == <span dir="ltr">C++</span> ==
21247 == <span dir="rtl">זבנג!</span> ==
21249 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21251 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21253 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21255 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21257 <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>
21258 <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>
21259 <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>
21260 <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>
21261 <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>
21265 <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>
21266 <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>
21267 <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>
21268 <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>
21269 <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>
21274 Bug 72884: bdi element in ToC
21277 == <bdi>test</bdi> ==
21279 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21281 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21285 <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>
21289 # Note that the html output does not have the <p></p>, but the
21290 # html+tidy output *does*. This is because the empty <p></p> is
21291 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21293 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21298 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21300 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21304 <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>
21308 <div id="toc" class="toc">
21309 <div id="toctitle">
21313 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21317 <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>
21323 == {{int:headline_sample}} ==
21327 Bug 32057: Title needed when expanding <h> nodes.
21329 title=[[Main Page]]
21333 <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>
21338 Strip marker in urlencode
21340 {{urlencode:x<nowiki/>y}}
21341 {{urlencode:x<nowiki/>y|wiki}}
21342 {{urlencode:x<nowiki/>y|path}}
21343 {{urlencode:x<pre id="one">two</pre>y}}
21371 Strip marker in formatNum
21373 {{formatnum:1<nowiki/>2}}
21374 {{formatnum:1<nowiki/>2|R}}
21382 Check noCommafy in formatNum
21386 {{formatnum:123456.78}}
21387 {{formatnum:123456.78|NOSEP}}
21395 Wrong option for formatNum (bug 56199)
21397 {{formatnum:1,234.56|Random}}
21398 {{formatnum:1,234.56|EVERYTHING}}
21399 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21408 Strip marker in grammar
21412 {{grammar:elative|foo<nowiki/>bar}}
21419 Strip marker in padleft
21421 {{padleft:|2|x<nowiki/>y}}
21428 Strip marker in padright
21430 {{padright:|2|x<nowiki/>y}}
21437 Strip marker in anchorencode
21439 {{anchorencode:x<nowiki/>y}}
21446 nowiki inside link inside heading (bug 18295)
21448 ==[[foo|x<nowiki>y</nowiki>z]]==
21450 <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>
21455 new support for bdi element (bug 31817)
21457 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21459 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21464 Ignore pipe between table row attributes
21468 |- id=foo | style='color: red'
21476 <tr id="foo" style="color: red">
21483 Gallery override link with WikiLink (bug 34852)
21486 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21489 <ul class="gallery mw-gallery-traditional">
21490 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21491 <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>
21492 <div class="gallerytext">
21502 Gallery override link with absolute external link (bug 34852)
21505 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21508 <ul class="gallery mw-gallery-traditional">
21509 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21510 <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>
21511 <div class="gallerytext">
21521 Gallery override link with malicious javascript (bug 34852)
21524 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21527 <ul class="gallery mw-gallery-traditional">
21528 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21529 <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>
21530 <div class="gallerytext">
21540 Gallery with invalid title as link (bug 43964)
21543 File:foobar.jpg|link=<
21546 <ul class="gallery mw-gallery-traditional">
21547 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21548 <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>
21549 <div class="gallerytext">
21557 Language parser function
21566 Padleft and padright as substr
21568 {{padleft:|3|abcde}}
21569 {{padright:|3|abcde}}
21577 Special parser function
21579 {{#special:RandomPage}}
21580 {{#special:BaDtItLe}}
21581 {{#special:Foobar}}
21590 Bug 34939 - Case insensitive link parsing ([HttP://])
21592 [HttP://MediaWiki.Org/]
21594 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21597 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21601 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21603 [HttP://MediaWiki.Org/ MediaWiki]
21605 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21610 Bug 34939 - Case insensitive link parsing (HttP://)
21612 HttP://MediaWiki.Org/
21614 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21617 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21635 <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>
21636 <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>
21637 <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>
21638 <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>
21639 <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>
21645 ### Parsoid-specific tests
21646 ### Parsoid-PHP parser incompatibilities
21649 1. SOL-sensitive wikitext tokens as template-args
21651 parsoid=wt2html,wt2wt
21657 <span about="#mwt1" typeof="mw:Transclusion">
21658 </span><ul about="#mwt1"><li>a</li>
21660 <span about="#mwt2" typeof="mw:Transclusion">
21661 </span><ol about="#mwt2"><li>a</li>
21663 <span about="#mwt3" typeof="mw:Transclusion">
21664 </span><dl about="#mwt3"><dd>a</dd>
21668 #### -----------------------------------------------------------------
21669 #### Parsoid-specific functionality tests
21670 #### -----------------------------------------------------------------
21672 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21673 # We know wt2wt will fail, but we expect selser to pass.
21674 # Due to the nature of our testing, wt2wt and selser tests will enter the
21675 # blacklist and we'll catch selser regressions based on changes to the
21676 # blacklist entries for selser tests.
21678 1. Bad treebuilder fixup of formatting elt is cleaned up
21680 parsoid=wt2html,wt2wt
21685 [[Image:Foobar.jpg|right|Test]]
21692 <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>
21699 2. Bad treebuilder fixup of formatting elt is cleaned up
21701 parsoid=wt2html,wt2wt
21703 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21705 <small>[[Image:Foobar.jpg|right|300px]]</small>
21709 <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>
21711 <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>
21715 3. Bad treebuilder fixup of formatting elt is cleaned up
21717 parsoid=wt2html,wt2wt
21719 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21721 <p><small><b>foo</b></small></p>
21722 <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>
21723 <p><small><b>bar</b></small></p>
21727 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21729 parsoid=wt2html,wt2wt
21731 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21733 <p><b><small></small></b></p>
21734 <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>
21738 #### ----------------------------------------------------------------
21739 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21740 #### tags. Parsoid's output for these tags differs from that of the
21742 #### ----------------------------------------------------------------
21745 Ref: 1. ref-location should be replaced with an index span
21748 B <ref name="x">foo</ref>
21752 <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>
21753 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>
21754 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>
21755 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21756 <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>
21757 <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>
21758 <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>
21763 Ref: 2. ref-tags with identical names should all get the same index
21765 A <ref name="x">foo</ref>
21769 <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>
21770 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>
21771 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21772 <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>
21777 Ref: 3. spaces in ref-names should be ignored
21779 A <ref name="x">foo</ref>
21780 B <ref name=" x " />
21784 <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>
21785 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>
21786 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>
21787 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21788 <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>
21792 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21794 Ref: 4. 'constructor' should be accepted as a valid ref-name
21796 A <ref name="constructor">foo</ref>
21799 <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>
21800 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21801 <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>
21806 Ref: 5. body should accept generic wikitext
21809 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21814 <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>
21816 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21817 <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>
21823 Ref: 6. indent-pres should not be output in ref-body
21833 <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>
21835 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21836 <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
21844 Ref: 7. No p-wrapping in ref-body
21861 <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>
21863 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21864 <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
21879 Ref: 8. transclusion wikitext has lower precedence
21881 A <ref> foo {{echo|</ref> B C}}
21885 <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>
21886 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21887 <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 {{echo|</span></li>
21892 Ref: 9. unclosed comments should not leak out of ref-body
21894 A <ref> foo <!--</ref> B C
21897 <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>
21898 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21899 <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>
21904 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21906 A <ref> <b> foo </ref> B C
21910 <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>
21913 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21914 <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>
21919 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21925 <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
21926 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>
21927 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21928 <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>
21929 <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>
21934 Ref: 12. ref-tags act as trailing newline migration barrier
21936 <!--the newline at the end of this line moves out of the p tag-->a
21938 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21944 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21947 <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>
21948 <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>
21951 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21952 <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>
21953 <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>
21957 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21964 <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
21965 <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>
21966 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21967 <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>
21968 <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
21974 Ref: 14. A nested ref-tag should be emitted as plain text
21976 <ref>foo <ref>bar</ref> baz</ref>
21980 <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>
21982 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21983 <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>
21988 Ref: 15. ref-tags with identical names should get identical indexes
21990 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21991 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21995 <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>
21996 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>
21998 <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>
22002 ## We don't bother wt2wt-ing non-standard whitespace
22004 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22012 <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>
22013 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22014 <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>
22018 Ref: 17. Generate valid HTML5 id/about attributes
22020 <ref name="a b">foo</ref>
22024 <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>
22027 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22028 <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>
22033 Ref: 18. T58916: Extension attributes should be parsed as plain text
22035 <ref name="{{echo|a}}">foo</ref>
22039 <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>
22042 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22043 <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>
22048 Ref: 19. ref-tags with identical name encodings should get identical indexes
22050 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22054 <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>
22056 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22057 <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>
22062 Ref: 20. ref-tags with identical names but different content should keep it
22064 A <ref name="foo">Foo one</ref>
22065 B <ref name="foo">Foo two</ref>
22066 C <ref name="foo" />
22070 <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>
22071 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>
22072 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>
22074 <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>
22079 References: 1. references tag without any refs should be handled properly
22083 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22087 References: 2. references tag with group only outputs references from that group
22089 A <ref group="a">foo</ref>
22090 B <ref group="b">bar</ref>
22093 <references group="a" />
22095 <references group="b" />
22097 <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>
22098 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>
22099 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>
22101 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22102 <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>
22104 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22105 <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>
22107 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22108 <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>
22113 References: 3. ref list should be cleared after processing references
22123 <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>
22125 <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>
22128 <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>
22130 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22131 <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>
22136 References: 4. only referenced group should be cleared after processing references
22138 A <ref group="a">afoo</ref>
22141 <references group="a" />
22147 <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>
22148 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>
22150 <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>
22153 <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>
22155 <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>
22159 ## Don't expect this to rt since we're dropping content
22161 References: 5. ref tags in references should be processed while ignoring all other content
22163 parsoid=wt2html,html2html
22166 B <ref name="b">bar</ref>
22169 <ref name="a">foo</ref>
22170 This should just get lost.
22173 <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>
22174 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>
22177 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{},"body":{"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;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>\n"}}'><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>
22182 References: 6. <references /> from a transclusion
22184 <ref>Foo</ref> {{echo|<references />}}
22186 <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>
22191 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22193 A <ref>foo bar for a</ref>
22194 B <ref group="X" name="b" />
22198 <references group="X">
22199 <ref name="b">foo</ref>
22202 <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>
22203 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>
22206 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22207 <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>
22210 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","attrs":{"group":"X"},"body":{"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\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[X 1]</span></a></span>\n"}}'>
22211 <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>
22216 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22218 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22221 <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>
22222 <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>
22226 # This test only works in wt2html now as the <references /> are always generated
22227 # unless selser is active. Once T72722 is fixed, we should add a changes test
22228 # here to ensure that unrelated changes don't add the new <references />
22229 # when selser is active.
22231 References: 9. Generate missing references list at the end
22234 B <ref group="inexistent">bar</ref>
22236 <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>
22237 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22238 <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>
22240 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22241 <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>
22246 References: 10. New <references/> shouldn't be added for unrelated edits.
22249 "modes": ["selser"],
22250 "changes": [["#x", "remove"]],
22254 Unrelated text<span id="x"> that's going to disappear</span>.
22262 Entities in ref name
22264 <ref name="test & me">hi</ref>
22267 <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>
22268 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22269 <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>
22273 ## The output here may look funny, but it's what the php parser will do. The
22274 ## unclosed references tag becomes escaped text, and then a new references
22275 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22276 ## nowiki tags, and the auto-generated references tag is only dropped in
22279 Generate references for unclosed references tag
22287 <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" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
22289 <p><references></p>
22290 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'><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>
22294 New reference serializes on its own line
22296 parsoid=wt2wt,html2wt
22301 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22304 #### ----------------------------------------------------------------
22305 #### Parsoid-only testing of Parsoid's impl of LST
22306 #### Not implemented yet, see
22307 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22308 #### ----------------------------------------------------------------
22311 LST Sections: 1. Simple section start and end
22313 parsoid={ "suppressErrors": true }
22315 <section begin="2011-05-16" />
22316 <section end="2014-04-10 (MW 1.23wmf22)" />
22318 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22319 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22322 #--------- Test stripping of empty nodes in template content ----------
22324 Empty LI and TR nodes should be stripped from template content
22329 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22333 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22346 Empty LI and TR nodes should not be stripped from top-level content
22373 Empty TR nodes should not be stripped if they have any attributes set
22375 {{EmptyTRWithHTMLAttrTest}}
22377 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22378 <tr align="center"></tr>
22379 <tr><td>foo</td></tr>
22380 <tr align="center"></tr>
22381 <tr><td>bar</td></tr>
22385 #### ----------------------------------------------------------------
22386 #### The following section of tests are primarily to test
22387 #### wikitext escaping capabilities of Parsoid. Given that
22388 #### escaping can be done any number of ways, the wikitext (input)
22389 #### is always adjusted to reflect how Parsoid adds nowiki
22392 #### We are marking several tests as parsoid-only since the
22393 #### HTML in the result section is different from what the
22394 #### PHP parser generates for it.
22395 #### ----------------------------------------------------------------
22398 #### --------------- Headings ---------------
22400 #### 1. Nested inside html <h1>=foo=</h1>
22401 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22402 #### 3. Nested inside html with wikitext split by html tags
22403 #### 4. No escape needed
22404 #### 5. Empty headings <h1></h1>
22405 #### 6. Heading chars in SOL context
22406 #### ----------------------------------------
22408 Headings: 0. Unnested
22418 <p>=foo<i>a</i>=</p>
22420 <nowiki>=foo=</nowiki>
22422 <nowiki> </nowiki>=foo=
22424 <nowiki>=foo=</nowiki>
22426 =foo''a''<nowiki>=</nowiki>
22429 # New headings and existing headings are handled differently
22431 Headings: 1. Nested inside html
22439 <h1 data-parsoid=''>=foo=</h1>
22440 <h2 data-parsoid=''>=foo=</h2>
22441 <h3 data-parsoid=''>=foo=</h3>
22442 <h4 data-parsoid=''>=foo=</h4>
22443 <h5 data-parsoid=''>=foo=</h5>
22444 <h6 data-parsoid=''>=foo=</h6>
22452 =<nowiki>=foo=</nowiki>=
22453 ==<nowiki>=foo=</nowiki>==
22454 ===<nowiki>=foo=</nowiki>===
22455 ====<nowiki>=foo=</nowiki>====
22456 =====<nowiki>=foo=</nowiki>=====
22457 ======<nowiki>=foo=</nowiki>======
22462 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22471 <nowiki>*</nowiki>bar
22477 <nowiki>=bar=</nowiki>
22481 Headings: 3. Nested inside html with wikitext split by html tags
22485 <h1>=<b>bold</b>foo=</h1>
22487 = ='''bold'''foo= =
22491 Headings: 4a. No escaping needed (testing just h1 and h2)
22502 <h1><i>=</i>foo=</h1>
22522 Headings: 4b. No escaping needed (inside p-tags)
22537 Headings: 5. Empty headings
22541 <h1 data-parsoid='{}'></h1>
22543 <h2 data-parsoid='{}'></h2>
22545 <h3 data-parsoid='{}'></h3>
22547 <h4 data-parsoid='{}'></h4>
22549 <h5 data-parsoid='{}'></h5>
22551 <h6 data-parsoid='{}'></h6>
22561 =====<nowiki/>=====
22563 ======<nowiki/>======
22567 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22577 <nowiki>=a=</nowiki>
22579 <nowiki>=a=</nowiki>
22581 <nowiki>=a=</nowiki>
22585 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22598 <nowiki>=a=</nowiki>
22601 <nowiki>=a=</nowiki>
22604 <nowiki>=a=</nowiki>
22609 Headings: 6c. Heading chars in SOL context (leading newline break)
22617 <nowiki>=b=</nowiki>
22621 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22625 <!--c0--><p>=a=</p>
22627 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22629 <!--c0--><nowiki>=a=</nowiki>
22631 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22635 Headings: 6d. Heading chars in SOL context (No escaping needed)
22645 Headings: 7. Insert a newline between new content and headings
22651 <h2 data-parsoid='{}'>A</h2>
22652 <p data-parsoid='{}'>a</p>
22662 #### --------------- Lists ---------------
22663 #### 0. Outside nests (*foo, etc.)
22664 #### 1. Nested inside html <ul><li>*foo</li></ul>
22665 #### 2. Inside definition lists
22666 #### 3. Only bullets at start should be escaped
22667 #### 4. No escapes needed
22668 #### 5. No unnecessary escapes
22669 #### 6. Escape bullets in SOL position
22670 #### 7. Escape bullets in a multi-line context
22671 #### ----------------------------------------
22674 Lists: 0. Outside nests
22684 <nowiki>*</nowiki>foo
22686 <nowiki>#</nowiki>foo
22688 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22691 ## Making these next 3 tests Parsoid-only since they are html2wt tests
22692 ## to test wikitext escaping, and insignificant whitespace diffs
22693 ## cause PHP parser tests to barf
22695 Lists: 1. Nested inside html (No unnecessary escapes)
22704 <li data-parsoid='{}'>*foo</li>
22705 <li data-parsoid='{}'>#foo</li>
22706 <li data-parsoid='{}'>:foo</li>
22707 <li data-parsoid='{}'>;foo</li>
22715 <li data-parsoid='{}'>*foo</li>
22716 <li data-parsoid='{}'>#foo</li>
22717 <li data-parsoid='{}'>:foo</li>
22718 <li data-parsoid='{}'>;foo</li>
22725 *<nowiki>*foo</nowiki>
22726 *<nowiki>#foo</nowiki>
22727 *<nowiki>:foo</nowiki>
22728 *<nowiki>;foo</nowiki>
22734 #<nowiki>*foo</nowiki>
22735 #<nowiki>#foo</nowiki>
22736 #<nowiki>:foo</nowiki>
22737 #<nowiki>;foo</nowiki>
22741 Lists: 2. Inside definition lists
22745 <dl><dt>;foo</dt></dl>
22746 <dl><dt>:foo</dt></dl>
22749 <dl><dd>:foo</dd></dl>
22753 ; <nowiki>:foo</nowiki>
22755 ; <nowiki>:foo</nowiki>
22762 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
22768 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
22772 *<nowiki>*foo</nowiki>''it''*bar
22776 Lists: 4. No escapes needed
22789 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22793 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22807 Lists: 5. No unnecessary escapes
22811 <ul><li> bar <span>[[foo]]</span></li></ul>
22812 <ul><li> =bar <span>[[foo]]</span></li></ul>
22813 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22814 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22815 <ul><li> =bar <span>foo]]</span>=</li></ul>
22816 <ul><li> <s></s>: a</li></ul>
22817 <ul><li> <i>* foo</i></li></ul>
22820 * bar <span><nowiki>[[foo]]</nowiki></span>
22822 * =bar <span><nowiki>[[foo]]</nowiki></span>
22824 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22826 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22828 * =bar <span>foo]]</span>=
22836 Lists: 6. Escape bullets in SOL position
22840 <p><!--cmt-->*foo</p>
22842 <!--cmt--><nowiki>*</nowiki>foo
22846 Lists: 7. Escape bullets in a multi-line context
22855 <nowiki>*</nowiki>b
22859 Lists: 8. Escape colons only if not present in tags
22863 <dl><dt>a:b<i>c:d</i></dt></dl>
22865 ; <nowiki>a:b</nowiki>''c:d''
22868 #### --------------- HRs ---------------
22869 #### 1. Single line
22870 #### -----------------------------------
22873 HRs: 1. Single line
22881 ----<nowiki>----</nowiki>
22886 #### --------------- Tables ---------------
22887 #### 1a. Simple example
22888 #### 1b. No escaping needed (!foo)
22889 #### 1c. No escaping needed (|foo)
22890 #### 1d. No escaping needed (|}foo)
22892 #### 2a. Nested in td (<td>foo|bar</td>)
22893 #### 2b. Nested in td (<td>foo||bar</td>)
22894 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22896 #### 3a. Nested in th (<th>foo!bar</th>)
22897 #### 3b. Nested in th (<th>foo!!bar</th>)
22898 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22902 #### 4c. No escaping needed
22903 #### --------------------------------------
22906 Tables: 1a. Simple example
22914 <nowiki>{|</nowiki>
22919 Tables: 1b. No escaping needed
22930 Tables: 1c. No escaping needed
22941 Tables: 1d. No escaping needed
22952 Tables: 2a. Nested in td
22957 <td>foo|bar</td></tr>
22958 <tr><td>x<div>a|b</div></td>
22962 |<nowiki>foo|bar</nowiki>
22964 |x<div><nowiki>a|b</nowiki></div>
22980 Tables: 2b. Nested in td
22986 <td>a<i>b||c</i></td>
22987 <td>a<i><div>b||c</div></i></td>
22988 </tr></tbody></table>
22991 |<nowiki>foo||bar</nowiki>
22992 |a''<nowiki>b||c</nowiki>''
22993 |a''<div><nowiki>b||c</nowiki></div>''
23002 <td>a<i><div>b||c</div></i>
23008 Tables: 2c. Nested in td -- no escaping needed
23026 Tables: 3a. Nested in th
23044 Tables: 3b. Nested in th
23049 <tr><th>foo!!bar</th>
23050 <th><i>foo|bar</i></th>
23051 <th><i>foo!!bar</i></th>
23052 <th><i><span>foo!!bar</span></i></th>
23053 </tr></tbody></table>
23056 !<nowiki>foo!!bar</nowiki>
23057 !''<nowiki>foo|bar</nowiki>''
23058 !''<nowiki>foo!!bar</nowiki>''
23059 !''<span><nowiki>foo!!bar</nowiki></span>''
23068 <th><i>foo!!bar</i>
23070 <th><i><span>foo!!bar</span></i>
23076 Tables: 3c. Nested in th
23081 <tr><th>foo||bar</th>
23082 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23083 </tr></tbody></table>
23086 !<nowiki>foo||bar</nowiki>
23087 !<nowiki>foo||bar</nowiki>
23100 Tables: 4a. Escape -
23119 |<nowiki>-bar</nowiki>
23124 Tables: 4b. Escape +
23143 |<nowiki>+bar</nowiki>
23148 Tables: 4c. No escaping needed
23153 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23154 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23160 <div>a|b</div></td>
23205 Tables: 4d. No escaping needed
23210 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23211 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23212 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23223 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23233 T97430: Don't emit empty nowiki pairs around marker meta tags
23237 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23238 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23240 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23241 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23245 Unclosed xmlish element in table line shouldn't eat end delimiters
23250 <tbody><tr><td> <foo</td>
23251 <td> bar></td></tr>
23268 #### --------------- Links ----------------
23269 #### 1. Quote marks in link text
23270 #### 2. Wikilinks: Escapes needed
23271 #### 3. Wikilinks: No escapes needed
23272 #### 4. Extlinks: Escapes needed
23273 #### 5. Extlinks: No escapes needed
23274 #### --------------------------------------
23276 Links 1. WikiLinks: No escapes needed
23280 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23281 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23282 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23286 [[Foo|x [Foobar] x]]
23288 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23289 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23290 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23295 Links 2. WikiLinks: Escapes needed
23299 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23300 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23301 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23302 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23303 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23304 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23305 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23306 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23307 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23308 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23310 [[Foo|<nowiki>Foobar]</nowiki>]]
23311 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23312 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23313 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23314 [[Foo|<nowiki>|Bar</nowiki>]]
23315 [[Foo|<nowiki>]]bar</nowiki>]]
23316 [[Foo|<nowiki>[[bar</nowiki>]]
23317 [[Foo|<nowiki>x [[ y</nowiki>]]
23318 [[Foo|<nowiki>x ]] y</nowiki>]]
23319 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23321 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23322 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23323 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23324 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23325 <a href="/wiki/Foo" title="Foo">|Bar</a>
23326 <a href="/wiki/Foo" title="Foo">]]bar</a>
23327 <a href="/wiki/Foo" title="Foo">[[bar</a>
23328 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23329 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23330 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23335 Links 3. WikiLinks: No escapes needed
23339 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23340 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23345 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23346 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23351 Links 4. ExtLinks: Escapes needed
23355 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23356 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23357 <p>[http://google.com]</p>
23358 <p>[http://google.com google]</p>
23359 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23360 <p>[<a rel="mw:ExtLink" href="http://google.com" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://google.com"}},"i":0}}]}'>http://google.com</a>]</p>
23362 [http://google.com <nowiki>[google]</nowiki>]
23363 [http://google.com <nowiki>google]</nowiki>]
23365 <nowiki>[http://google.com]</nowiki>
23367 <nowiki>[http://google.com google]</nowiki>
23369 [http://google.com<nowiki>]</nowiki>
23371 [{{echo|http://google.com}}<nowiki>]</nowiki>
23373 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23374 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23375 </p><p>[http://google.com]
23376 </p><p>[http://google.com google]
23377 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23378 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23383 Links 5. ExtLinks: No escapes needed
23387 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23388 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23390 [http://google.com [google]
23392 [[http://google.com]]
23394 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23395 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23400 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23404 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23405 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23406 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23407 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23408 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23409 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23410 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23411 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23412 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23413 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23414 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23415 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23416 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23419 x<nowiki/>http://example.com<nowiki/>y
23420 http://example.com<nowiki/>?x
23421 http://example.com<nowiki/>&x
23422 http://example.com<nowiki/>'x
23423 http://example.com<nowiki/>,x
23424 http://example.com<nowiki/>.x
23425 http://example.com<nowiki/>;x
23426 http://example.com<nowiki/>:x
23427 http://example.com<nowiki/>;x
23428 http://example.com<nowiki/>!x
23429 http://example.com<nowiki/>=x
23430 http://example.com<nowiki/>(x)
23431 http://example.com(x<nowiki/>)
23435 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23440 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23442 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23443 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23444 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23445 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23446 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23452 "http://example.com"
23453 (http://example.com)
23454 (http://example.com) foo
23455 http://example.com,
23456 http://example.com, foo
23459 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23461 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23462 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23463 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23464 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23465 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23470 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23474 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23475 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23477 http://example.com.,;:!?\
23478 -http://example.com:
23480 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23481 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23486 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23490 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23491 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23492 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23496 X<nowiki/>RFC 123<nowiki/>y
23500 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23504 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23505 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23506 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23513 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23514 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23515 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23520 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23524 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23525 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23526 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23530 X<nowiki/>PMID 123<nowiki/>y
23534 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23538 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23539 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23540 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23547 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23548 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23549 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23554 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23558 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23559 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23560 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23563 ISBN 1234567890<nowiki/>1
23564 ISBN 1234567890<nowiki/>x
23565 a<nowiki/>ISBN 1234567890<nowiki/>b
23569 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23573 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23577 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23582 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23586 <p>this is not a link: http://example.com
23589 this is not a link: <nowiki>http://example.com</nowiki>
23593 Links 15. Link trails can't become link prefixes.
23598 <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>
23600 [[Söfnuður]]-[[00]]
23602 <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>
23606 #### --------------- Quotes ---------------
23607 #### 1. Quotes inside <b> and <i>
23608 #### 2. Link fragments separated by <i> and <b> tags
23609 #### 3. Link fragments inside <i> and <b>
23610 #### 4. No escaping needed
23611 #### --------------------------------------
23613 1a. Quotes inside <b> and <i>
23624 <b>foo'<i>bar'</i>baz</b>
23633 <i>fools'<span> errand</span></i>
23634 <i><span>fool</span>'s errand</i>
23635 '<i>foo</i> bar '<i>baz</i>
23636 a|!*#-:;+-~[]{}b'<i>x</i>
23640 ''<nowiki>''foo''</nowiki>''
23641 ''<nowiki>'''foo'''</nowiki>''
23643 '''<nowiki/>'foo''''
23644 '''<nowiki>''foo''</nowiki>'''
23645 '''<nowiki>'''foo'''</nowiki>'''
23646 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23647 '''foo'''<nowiki/>'s
23653 '''foo'''<nowiki/>'
23654 ''''foo'''<nowiki/>'
23655 ''fools'<span> errand</span>''
23656 ''<span>fool</span>'s errand''
23657 '<nowiki/>''foo'' bar '''baz''
23658 a|!*#-:;+-~[]{}b'''x''
23662 1b. Quotes inside <b> and <i> with other tags on same line
23666 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23667 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23668 <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>
23669 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23670 '<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>
23671 '<i>foo</i> <div title="name">test</div>
23672 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23673 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23674 <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>
23677 '''a'' foo ''[[bar]]''
23678 ''a''' foo ''[[bar]]''
23679 ''a''' foo '''{{echo|[[bar]]}}'''
23680 [[foo]] x'''[[bar]]''
23681 '''foo'' <ref>test</ref>
23682 '''foo'' <div title="name">test</div>
23683 '''foo'' and <br> bar
23688 2. Link fragments separated by <i> and <b> tags
23692 <p>[[<i>foo</i>hello]]</p>
23693 <p>[[<b>foo</b>hello]]</p>
23695 [[''foo''<nowiki>hello]]</nowiki>
23697 [['''foo'''<nowiki>hello]]</nowiki>
23700 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23701 # this is one of the shortcomings of this format
23703 3. Link fragments inside <i> and <b>
23707 <p><i>[[foo</i>]]</p>
23708 <p><b>[[foo</b>]]</p>
23710 ''[[foo''<nowiki>]]</nowiki>
23712 '''[[foo'''<nowiki>]]</nowiki>
23716 4. No escaping needed
23720 <p>'<span><i>bar</i></span>'
23721 '<span><b>bar</b></span>'
23725 '<span>''bar''</span>'
23726 '<span>'''bar'''</span>'
23730 #### ----------- Paragraphs ---------------
23731 #### 1. No unnecessary escapes
23732 #### --------------------------------------
23735 1. No unnecessary escapes
23739 <p>bar <span>[[foo]]</span>
23740 </p><p>=bar <span>[[foo]]</span>
23741 </p><p>[[bar <span>[[foo]]</span>
23742 </p><p>]]bar <span>[[foo]]</span>
23743 </p><p>=bar <span>foo]]</span>=
23746 bar <span><nowiki>[[foo]]</nowiki></span>
23748 =bar <span><nowiki>[[foo]]</nowiki></span>
23750 [[bar <span><nowiki>[[foo]]</nowiki></span>
23752 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23754 =bar <span>foo]]</span><nowiki>=</nowiki>
23757 #### ----------------------- PRE --------------------------
23758 #### 1. Leading whitespace in SOL context should be escaped
23759 #### ------------------------------------------------------
23761 1. Leading whitespace in SOL context should be escaped
23784 <nowiki> </nowiki>a
23786 <nowiki> </nowiki> a
23790 <nowiki> </nowiki> a
23792 <nowiki> </nowiki>a
23795 <nowiki> </nowiki>b
23818 2. Leading whitespace in non-indent-pre contexts should not be escaped
23822 <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>
23823 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23824 <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>a</i>
23834 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23853 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23857 <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>
23859 [[File:Foobar.jpg|thumb|caption]]
23863 5. Nowiki escaping should account for indent-pres
23873 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23886 #### --------------- Behavior Switches --------------------
23889 1. Valid behavior switches should be escaped
23896 <nowiki>__TOC__</nowiki>
23897 ''<nowiki>__TOC__</nowiki>''
23901 2. Invalid behavior switches should not be escaped
23912 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23914 Behavior switches should be SOL-transparent
23918 <meta property="mw:PageProp/toc" />
23920 <!-- this one's bogus -->
23923 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23925 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23929 <!-- this one's bogus -->
23938 #### --------------- HTML tags ---------------
23941 #### 3. multi-line html tag
23942 #### 4. extension tags
23943 #### -----------------------------------------
23949 <a href="http://google.com">google</a>
23951 <a href="http://google.com">google</a>
23959 <ul><li> <div>foo</div></li>
23960 <li> <div style="color:red">foo</div></li>
23961 <li> <td></li></ul>
23964 * <nowiki><div>foo</div></nowiki>
23965 * <nowiki><div style="color:red">foo</div></nowiki>
23966 * <nowiki><td></nowiki>
23970 3. multi-line html tag
23989 <p><ref>foo</ref>
23990 </p><p><ref>bar
23991 </p><p>baz</ref>
23994 <nowiki><ref>foo</ref></nowiki>
23996 <nowiki><ref>bar</nowiki>
23998 baz<nowiki></ref></nowiki>
24001 #### --------------- Others ---------------
24007 <p><nowiki>foo</nowiki>
24010 <nowiki>foo</nowiki>
24013 ## The quote-char in the input is necessary for triggering the bug
24015 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24024 #----------- End of wikitext escaping tests --------------
24028 Tag-like HTML structures are passed through as text
24050 </p><p>1<d e>f
24055 HTML tag with necessary entities in attributes
24057 <span title="&amp;">foo</span>
24059 <p><span title="&amp;">foo</span>
24064 HTML tag with 'unnecessary' entity encoding in attributes
24066 <span title="&">foo</span>
24068 <p><span title="&">foo</span>
24073 HTML tag with broken attribute value quoting
24075 parsoid=wt2html,html2html
24077 <span title="Hello world>Foo</span>
24079 <p><span title="Hello world">Foo</span>
24082 <p><span title="Hello world">Foo</span></p>
24086 Self-closed tag with broken attribute value quoting
24088 parsoid=wt2html,html2html
24090 <div title="Hello world />Foo
24092 <div title="Hello world"></div>
24095 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24099 Table with broken attribute value quoting
24101 parsoid=wt2html,html2html
24104 | title="Hello world|Foo
24109 <td title="Hello world">Foo
24115 <td title="Hello world">Foo
24121 Table with broken attribute value quoting on consecutive lines
24123 parsoid=wt2html,html2html
24126 | title="Hello world|Foo
24127 | style="color:red|Bar
24132 <td title="Hello world">Foo
24134 <td style="color:red">Bar
24140 <td title="Hello world">Foo
24141 </td><td style="color: red">Bar
24142 </td></tr></tbody></table>
24147 Accept empty td cell attribute
24150 | align="center" | foo || |
24155 <td align="center"> foo </td>
24162 Non-empty attributes in th-cells
24165 ! Foo !! style="color: red" | Bar
24171 <th style="color: red"> Bar
24177 Accept empty attributes in th-cells
24192 Empty table rows go away
24213 ### Parsoid-centric tests for testing RTing of inter-element separators
24214 ### Edge cases not tested by existing parser tests and specific to
24215 ### Parsoid-specific serialization strategies.
24219 RT-ed inter-element separators should be valid separators
24231 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24235 # Parsoid-only since PHP parser relies on Tidy for correct output
24237 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24251 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24252 <p>bar</p></small></td></tr>
24256 <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>
24260 # Note that the "style" attribute is really a template parameter here.
24261 # The = would have to be {{=}} if you wanted the literal.
24263 Empty TD followed by TD with tpl-generated attribute
24268 |{{echo|style='color:red'}}|foo
24282 Indented table with an empty td
24300 ## We have some newline diffs RT-ing this edge case
24301 ## and it is not important enough -- we seem to be emitting
24302 ## at most 2 newlines after a </tr> and this is unrelated to
24303 ## the issue from T85627 that this is testing.
24305 Indented table with blank lines in between (T85627)
24324 Indented block & table
24338 <div data-parsoid='{"stx":"html"}'>foo</div>
24340 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24345 Indent and comment before table row
24360 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24361 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24365 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24367 Empty TR followed by a template-generated TR
24373 {{echo|<tr><td>foo</td></tr>}}
24379 <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}}]}'>
24384 ## PHP and parsoid output differ for this, and since this is primarily
24385 ## for testing Parsoid's serializer, marking this Parsoid only
24387 Empty TR followed by mixed-ws-comment line should RT correctly
24403 <!--c--> </tr><!--d-->
24409 Multi-line image caption generated by templates with/without trailing newlines
24411 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24412 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24414 <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>
24415 <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>
24419 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24423 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24425 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24427 <includeonly>foo</includeonly>
24435 ## PHP emits broken html for this, and since this is primarily
24436 ## a Parsoid serializer test, marking this Parsoid only
24438 Improperly nested inline or quotes tags with whitespace in between
24440 <span> <s>x</span> </s>
24443 <p><span> <s>x</s></span><s> </s>
24444 <b> <i>x</i></b><i> </i>
24449 Encapsulate protected attributes from wt
24451 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24453 <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>
24457 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24458 ## Having nested or stray pre tags results in the attempt to add duplicates,
24459 ## causing an assertion fail. This test tries to prevent that situation.
24461 Ensure ParagraphWrapper can deal with stray closing pre tags
24471 1. Ensure fostered text content is wrapped in element nodes
24475 <table>hi</table><table>ho</table>
24484 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24486 parsoid=wt2html,wt2wt
24495 <tbody><tr><td> a</td></tr>
24500 Encapsulation properly handles null DSR information from foster box
24502 parsoid=wt2html,wt2wt
24504 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24506 <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>
24510 1. Encapsulate foster-parented transclusion content
24512 parsoid=wt2wt,wt2html
24514 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24516 <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>
24526 2. Encapsulate foster-parented transclusion content
24528 parsoid=wt2wt,wt2html
24530 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24532 <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>
24543 3. Encapsulate foster-parented transclusion content
24545 parsoid=wt2wt,wt2html
24547 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24549 <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>"]}">
24562 4. Encapsulate foster-parented transclusion content
24564 parsoid=wt2wt,wt2html
24566 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24568 <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>"]}">
24581 5. Encapsulate foster-parented transclusion content
24583 parsoid=wt2wt,wt2html
24585 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24587 <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>
24602 6. Encapsulate foster-parented transclusion content
24604 parsoid=wt2wt,wt2html
24606 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24608 <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>
24624 7. Encapsulate foster-parented transclusion content
24626 parsoid=wt2wt,wt2html
24628 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24630 <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>
24640 # Note that the wt is broken on purpose: the = should be {{=}} if you
24641 # don't want it to be a template parameter key.
24643 8. Encapsulate foster-parented transclusion content
24645 parsoid=wt2wt,wt2html
24648 }}{|{{echo|style='color:red'}}
24653 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24655 <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>
24666 9. Encapsulate foster-parented transclusion content
24668 parsoid=wt2wt,wt2html
24670 <table>{{echo|hi</table>hello}}
24672 <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"}]]}'>hi</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
24676 Table in fosterable position
24687 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>\n"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
24689 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24695 # Parsoid only for bug 64747
24697 Properly encapsulate empty-content transclusions in fosterable positions
24705 <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"}]]}'>
24711 Always encapsulate foster box when template range is expanded to table
24724 T115289: Unclosed table
24726 {{echo|<table>}}<!--c-->[[Category:Two]]
24728 <link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><table about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><!--c--></table>
24732 T115289: Don't migrate newlines out of tables with fostered content
24734 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
24736 <link rel="mw:PageProp/Category" href="./Category:One" about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:One"},"sa":{"href":"Category:One"},"fostered":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><td></td>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>[[Category:One]]"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt2"/><table about="#mwt2" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr><td></td></tr><tr><!--c--></tr></tbody></table>
24740 T73074: More fostering fun
24742 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
24744 <link rel="mw:PageProp/Category" href="./Category:Two" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"fostered":true}'/><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"stx":"html"}'></td></tr><tr about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'><!--c--></tr></tbody></table>
24748 Support <object> element with .data attribute
24752 <object data="test.swf"></object>
24754 <object data="test.swf"></object>
24758 Don't block XML namespace declaration
24760 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24762 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24765 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24768 # -----------------------------------------------------------------
24769 # The following section of tests are primarily to spec requirements
24770 # around serialization of new/edited content.
24772 # All these tests are marked Parsoid html2wt and html2html only
24773 # ----------------------------------------------------------------
24775 # 'mi' is a localinterwiki prefix as well as a language
24777 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24781 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24788 New wikilinks should be serialized properly
24792 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24793 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24800 New wiki links (href variations)
24804 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24805 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24806 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24807 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24812 [[Toxine bactérienne]]
24816 New wiki links (content string variations)
24820 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24821 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24822 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24826 [[Foo_bar|./Foo_bar]]
24830 New category links (href variations)
24834 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24835 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24836 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24838 [[Category:Toxine bactérienne]]
24839 [[Category:Toxine bactérienne]]
24840 [[Category:Toxine bactérienne]]
24844 New sol transparent links don't need indent-pre nowiki protection
24849 <link rel="mw:PageProp/redirect" href="./Main_Page">
24850 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24851 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24853 #WEITERLEITUNG [[Main Page]]
24854 <!-- this is good --> [[Category:Good]]
24855 <!-- this is great --> [[Kategorie:Great]]
24859 New interlanguage links (href variations)
24863 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24864 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24865 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24867 [[es:Toxine bactérienne]]
24868 [[es:Toxine_bactérienne]]
24869 [[es:Toxine_bactérienne]]
24873 Image: Modifying size of an image (1)
24876 "modes": ["wt2wt"],
24878 ["img[height]", "attr", "height", "22"],
24879 ["img[width]", "attr", "width", "200"]
24883 [[Image:Foobar.jpg|230x230px]]
24885 [[Image:Foobar.jpg|200x200px]]
24889 Image: Modifying size of an image (2)
24892 "modes": ["wt2wt"],
24894 ["img[height]", "attr", "height", "100"],
24895 ["img[width]", "attr", "width", "500"]
24899 [[Image:Foobar.jpg|230x230px]]
24901 [[Image:Foobar.jpg|500x500px]]
24904 # Change in size is ignored so long as class='mw-default-size'
24906 Image: Modifying size of an image (3)
24909 "modes": ["wt2wt"],
24911 ["figure[class]", "removeClass", "mw-default-size"],
24912 ["figure img", "attr", "height", "19"],
24913 ["figure img", "attr", "width", "170"]
24917 [[Image:Foobar.jpg|thumb]]
24919 [[Image:Foobar.jpg|thumb|170x170px]]
24923 Image: Modifying alignment of an image (bug 48665)
24926 "modes": ["wt2wt"],
24928 ["figure[class]", "removeClass", "mw-halign-right"],
24929 ["figure[class]", "addClass", "mw-halign-left"]
24933 [[Image:Foobar.jpg|thumb|caption|right]]
24935 [[Image:Foobar.jpg|thumb|caption|left]]
24939 Image: Modifying mw-default-size of an frameless image (bug 62805)
24942 "modes": ["wt2wt"],
24944 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24948 [[Image:Foobar.jpg|frameless|right]]
24950 [[Image:Foobar.jpg|frameless|right|220x220px]]
24954 Image: Modifying valign of an image (bug 49221)
24957 "modes": ["wt2wt"],
24959 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24960 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24964 [[File:Foobar.jpg|20px|middle]]
24966 [[File:Foobar.jpg|20px|text-top]]
24970 Image: Modifying alt attribute of an image (bug 56400)
24973 "modes": ["wt2wt"],
24975 ["img[alt]", "attr", "alt", "some alternate edited text"]
24979 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24981 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24985 Image: Modifying caption of an image
24988 "modes": ["wt2wt"],
24990 ["figcaption", "text", "new caption"]
24994 [[Image:Foobar.jpg|thumb|original caption]]
24996 [[Image:Foobar.jpg|thumb|new caption]]
25000 Image: empty alt attribute (bug 48924)
25004 [[File:Foobar.jpg|thumb|alt=|bar]]
25006 <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>
25010 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25016 <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>
25018 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25022 Image: Block level image should have \n before and after
25025 [[File:Foobar.jpg|right|thumb|150x150px]]
25029 <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>
25034 Image: New block level image should have \n before and after (existing content)
25037 [[File:Foobar.jpg|right|thumb|150x150px]]
25041 <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>
25046 Image: upright option (parsoid)
25048 [[File:Foobar.jpg|thumb|upright|caption]]
25049 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25050 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25052 <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>
25053 <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>
25054 <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>
25058 Image: upright option is ignored on inline and frame images (parsoid)
25060 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25062 <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>
25066 Image: from basic HTML (1)
25070 <span typeof="mw:Image">
25071 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25074 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25078 Image: from basic HTML (2)
25082 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25084 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25088 Image: from basic HTML (3)
25092 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25094 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25098 Image: from basic HTML (4)
25102 <img src="./File:Foobar.jpg">
25104 [[File:Foobar.jpg|link=]]
25108 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25113 <li><p>foo</p></li>
25120 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25124 <ul> <li>foo</li></ul>
25130 Don't strip leading whitespace when handling indent-pre suppressing tags
25135 <tr><td> indented row</td></tr>
25138 <b>This is very bold of you!</b>
25141 indented cell (no pre-wrapping!)
25151 '''This is very bold of you!'''
25155 indented cell (no pre-wrapping!)
25163 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25185 <nowiki> </nowiki></span>bar2
25188 <nowiki> </nowiki><span>bar</span>
25191 <nowiki> </nowiki><span>foo</span>
25196 Lists: Dont insert newlines in a serialized list item.
25200 <ul><li>a<br>b</li><li>c</li></ul>
25207 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25210 "modes": ["html2wt"],
25211 "scrubWikitext": false
25214 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25215 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25217 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25218 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25220 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25222 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25224 == hello there [[Category:A1]] ==
25226 == [[Category:A2]] hi pal ==
25228 == <!--foo--> [[Category:A3]] how goes it ==
25230 == it goes well [[Category:A4]] <!--bar--> ==
25232 ==howdy [[Category:A5]]==
25238 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25241 "modes": ["html2wt"],
25242 "scrubWikitext": true
25245 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25246 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25248 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25249 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25251 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25259 <!--foo--> [[Category:A3]]
25264 [[Category:A4]] <!--bar-->
25272 Headings: Don't hoist metas that come from templates
25275 "modes": ["html2wt"],
25276 "scrubWikitext": true
25279 <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>
25281 == {{echo|foo [[Category:Foo]]}} ==
25285 Headings: Category in ref isn't hoisted
25288 "modes": ["html2wt"],
25289 "scrubWikitext": true
25292 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
25294 <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>
25297 [[Category:Baz]] </ref> ==
25303 Parsoid: Serialize positional parameters with = in them as named parameter
25307 <p about="#mwt1" typeof="mw:Transclusion"
25308 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25310 <p about="#mwt1" typeof="mw:Transclusion"
25311 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25313 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25314 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25315 <p data-parsoid='{"pi":[[{"k":"1"},{"k":"2"}]]}' 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>
25319 {{echo|1=f=oo|2=bar}}
25321 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25322 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25323 {{echo|<nowiki>f=oo</nowiki>|bar}}
25327 Parsoid: Serialize positional parameters with = in extlink as named parameter
25331 <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>
25333 {{echo|1=http://stuff?is=ok}}
25337 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25341 <div>a<p>b</p></div>
25362 Substrings resembling wikitext in hrefs should not get nowiki escapes
25366 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25372 Enforce single-line context in the serializer
25379 <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">
25380 </span><span about="#mwt1">you</span> </h2>
25382 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
25384 <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
25385 there</span></li></ol>
25397 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25404 </tbody></table></dd></dl>
25408 == hi {{bogus|there
25419 * foo '''bar''' baz
25431 Serialize new placeholder space without spans
25435 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25437 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25439 <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>
25445 <ref>foo : bar</ref>ok
25449 #-----------------------
25450 # Tag minimization tests
25451 #-----------------------
25454 1. I/B quote minimization: wikitext-only tags should be combined
25458 <p><i>A</i><i>B</i></p>
25459 <p><b>A</b><b>B</b></p>
25460 <p><i>A</i><b><i>B</i></b></p>
25461 <p><b>A</b><i><b>B</b></i></p>
25462 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25463 <p><i><b>A</b></i><i><b>B</b></i></p>
25464 <p><i><b>A</b></i><b><i>B</i></b></p>
25465 <p><b><i>A</i></b><i><b>B</b></i></p>
25485 2. I/B quote minimization: wikitext and html tags should not be combined
25489 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25490 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25494 ''A''<nowiki/>'''<i>B</i>'''
25498 3. I/B quote minimization: templated content stops minimization
25502 <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>
25503 <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>
25505 ''A''{{echo|''B''}}
25507 ''A''{{echo|'''''B'''''}}
25511 4. I/B quote minimization: new content should be mimimized with adjacent old content
25515 <p><i>A</i><i>B</i></p>
25516 <p><b>A</b><b>B</b></p>
25517 <p><i>A</i><b><i>B</i></b></p>
25527 5a. Merge adjacent quote nodes if they've been edited
25530 "modes": ["wt2wt", "selser"],
25532 ["p", "contents", "remove", ":contains('b')"]
25542 5b. Merge adjacent quote nodes if they've been edited
25545 "modes": ["wt2wt", "selser"],
25551 ''a''<span id="x">b</span>''c''
25557 1. Merge adjacent link nodes as long as at least one element is new
25560 "modes": ["html2wt"],
25561 "scrubWikitext": true
25564 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25565 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25566 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25570 [[Football|Foot]][[Football|ball]]
25574 2. Merge adjacent link nodes and enable additional normalizations
25577 "modes": ["html2wt"],
25578 "scrubWikitext": true
25581 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25583 [[Football|''Football'']]
25587 3. Don't merge adjacent link nodes if scrubWikitext is false
25590 "modes": ["html2wt"],
25591 "scrubWikitext": false
25594 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25596 [[Football|Foot]][[Football|ball]]
25599 #------------------------------
25600 # End of tag minimization tests
25601 #------------------------------
25604 Bug 54262: New entities
25608 <span typeof="mw:Entity"> </span>
25613 ## Note that there is no wikitext output for 'unknownproperty' ##
25614 ## Unknown magic words are silently dropped ##
25621 <meta property='mw:PageProp/toc' />
25622 <meta property='mw:PageProp/notoc' />
25623 <meta property='mw:PageProp/forcetoc' />
25624 <meta property='mw:PageProp/index' />
25625 <meta property='mw:PageProp/noindex' />
25626 <meta property='mw:PageProp/nogallery' />
25627 <meta property='mw:PageProp/noeditsection' />
25628 <meta property='mw:PageProp/notitleconvert' />
25629 <meta property='mw:PageProp/nocontentconvert' />
25630 <meta property='mw:PageProp/unknownproperty' />
25640 __NOCONTENTCONVERT__
25644 Consecutive <pre>s should not get merged
25646 parsoid=html2wt,html2html
25648 <pre>a</pre><pre>b</pre>
25676 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25680 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25682 [[Special:BookSources/1234567890|ISBN 1234567895]]
25686 Edited RFC links not serializable as RFC links should serialize as extlinks
25690 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25692 [//tools.ietf.org/html/rfc123 New RFC]
25696 Edited PMID links not serializable as PMID links should serialize as extlinks
25700 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25702 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25706 WTS of autolinks with trailing/surrounding context
25710 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25711 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25712 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25713 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25714 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25715 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25717 http://cscott.net'''foo'''
25719 http://cscott.net<b>foo</b>
25721 '''http://cscott.net'''
25723 '''http://cscott.net '''
25725 '''http://cscott.net<nowiki/>x'''
25727 http://cscott.net<nowiki/>x
25731 WTS of autolinks with nowikis (round-trip)
25733 x<nowiki/>http://cscott.net<nowiki/>x
25735 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25738 # this is the "easy" test because it leaves in place all the
25739 # data-parsoid information indicating this is an autolink
25741 WTS of autolinks with escapes (editing)
25744 "modes": ["wt2wt"],
25746 [ "meta", "remove" ]
25750 x<nowiki/>http://cscott.net<nowiki/>x
25752 x<nowiki/>http://cscott.net<nowiki/>x
25756 WTS of edited autolink-like text (T103364)
25759 "modes": ["wt2wt"],
25761 [ "span[typeof]", "removeAttr", "typeof" ]
25765 Not a link: <nowiki>http://example.com</nowiki>.
25767 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25771 WTS of newly-authored autolink-like text (T103364)
25775 <p>http://example.com is not a link.</p>
25777 <nowiki>http://example.com</nowiki> is not a link.
25781 WTS of autolink-like text after an autolink (T108563)
25785 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25787 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25791 Magic links inside links (not autolinked)
25793 [[Foo|http://example.com]]
25796 [[Foo|ISBN 123456789x]]
25798 [http://foo.com http://example.com]
25799 [http://foo.com RFC 1234]
25800 [http://foo.com PMID 1234]
25801 [http://foo.com ISBN 123456789x]
25803 <p><a href="/wiki/Foo" title="Foo">http://example.com</a> <a href="/wiki/Foo" title="Foo">RFC 1234</a> <a href="/wiki/Foo" title="Foo">PMID 1234</a> <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a></p>
25804 <p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a> <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
25806 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25807 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25808 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25809 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25811 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25812 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25813 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25814 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25818 Magic links inside image captions (autolinked)
25820 [[File:Foobar.jpg|thumb|http://example.com]]
25821 [[File:Foobar.jpg|thumb|RFC 1234]]
25822 [[File:Foobar.jpg|thumb|PMID 1234]]
25823 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25825 <div class="thumb tright">
25826 <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>
25827 <div class="thumbcaption">
25828 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25829 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25832 <div class="thumb tright">
25833 <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>
25834 <div class="thumbcaption">
25835 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25836 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25839 <div class="thumb tright">
25840 <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>
25841 <div class="thumbcaption">
25842 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25843 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25846 <div class="thumb tright">
25847 <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>
25848 <div class="thumbcaption">
25849 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25850 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25854 <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>
25855 <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="//tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
25856 <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="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></figcaption></figure>
25857 <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/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
25861 WTS of magic word text (T109371)
25866 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25867 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25869 <nowiki>RFC 1234</nowiki>
25871 [http://foo.com RFC 1234]
25877 Edited Redirect link should emit a non-piped wikitext link
25881 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25887 T75121: Infer extension name from typeOf if data-mw is not present
25889 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25891 <div typeOf="mw:Extension/foo"></div>
25896 # Note that the <p> wrapping isn't present in PHP parser output
25897 # The important thing for this test is that P-wrapping doesn't
25898 # interfere with the <nowiki> protection for leading - in <td>
25899 # (which isn't necessary for <th>).
25901 T88318: p-wrapped dash in table.
25903 parsoid=html2wt,wt2wt
25906 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25907 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25908 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25915 |<nowiki>-</nowiki>
25916 |<nowiki>- </nowiki>
25935 <td><small>-</small></td>
25947 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25952 <td id='mwAc'>foo</td>
25953 <td id='serialize-this'>bar</td>
25958 | id="serialize-this" |bar
25963 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25967 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25969 <div id="hello">ok</div>
25976 "modes": ["wt2wt"],
25978 [ "#xyz", "before", "<b>before</b> stuff " ],
25979 [ "#xyz", "after", " stuff <i>after</i>" ],
25980 [ "#xyz", "html", "x <b>y</b> z" ]
25984 <span id="xyz">hello</span>
25986 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25990 Never serialize a-tag as html, regardless of what data-parsoid has to say
25992 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25994 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25999 ## SSS FIXME: This is broken output nevertheless.
26000 ## What might be a reasonable non-broken output for this?
26001 ## This is an edge case unlikely to be seen in production
26002 ## that I am not wasting more time on this right now.
26004 Never serialize a-tag as html, no matter what attributes it has
26006 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26008 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26010 [http://boo.org http://boohoo.org]
26013 # Misnested is an indication that selser can reuse the source but these have
26014 # shown to sneak through on occasion. See T101768.
26015 # The original wikitext here is: [http://test.com [[one]] two three]
26017 Strip span tags added to mark misnested links
26021 <p data-parsoid='{}'><a rel="mw:ExtLink" href="http://test.com" data-parsoid='{"targetOff":17,"contentOffsets":[17,34]}'></a><a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"simple","a":{"href":"./One"},"sa":{"href":"one"},"misnested":true}'>one</a><span data-parsoid='{"misnested":true}'> two three</span></p>
26023 [http://test.com][[one]] two three
26027 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26031 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span><table about="#mwt2" typeof="mw:Transclusion mw:ExpandedAttrs" data-parsoid='{"a":{"{{echo|c\n{{!}}d\n}}":null},"sa":{"{{echo|c\n{{!}}d\n}}":""},"firstWikitextNode":"table","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c\n{{!}}d\n"}},"i":0}},"\n|}"]}'>
26043 ## This test verifies the presence and computation of this attribute indirectly
26044 ## by making an edit and ensuring that the serialization is correct (which it would be
26045 ## only if firstWikitextNode is properly set).
26047 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26050 "modes": ["wt2wt"],
26052 [ "div#x", "remove" ],
26053 [ "div", "before", "<div>new</div>" ]
26057 <div id="x">foo</div>
26059 {{echo|<div>boo</div>
26067 {{echo|<div>boo</div>
26073 # --------------------------------------------
26074 # Tests spec'ing wikitext serialization norms |
26075 # --------------------------------------------
26078 1. Categories should always be serialized on their own line
26082 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26090 2. Categories that are part of templates should not introduce a line break
26092 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26094 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span>bar</span> [[Category:baz]]"}},"i":0}}]}'>bar</span><span about="#mwt1"> </span><link rel="mw:PageProp/Category" href="./Category:Baz" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:baz"}}'/> bar</p>
26097 # Careful while editing these next 2 tests. There are \u200f characters
26098 # before and after the <link> tags in the HTML and following some
26099 # of the categories in wikitext
26100 # Do not remove these characters in edits.
26102 # As part of the serialization, these bidi characters will get stripped.
26104 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26107 "modes": ["html2wt"],
26108 "scrubWikitext": true
26111 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26112 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26115 [[קטגוריה: שיטות משפט]]
26119 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26122 "modes": ["html2wt"],
26123 "scrubWikitext": true
26126 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26133 Lists: Add space after bullets
26140 <li><span> baz</span></li>
26145 * <span> baz</span>
26149 1. Headings: Add space before/after == (T53744)
26156 <h2><span> baz</span></h2>
26164 == <span> baz</span> ==
26168 2. Headings: Add space before/after == even after hoisted content
26171 "modes": ["html2wt"],
26172 "scrubWikitext": true
26175 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26183 1. Headings: suppress newly created empty headings
26186 "modes": ["html2wt"],
26187 "scrubWikitext": true
26195 2. Headings: don't suppress empty headings if scrubWikitext is false
26205 3. Headings: suppress empty headings on edits
26208 "modes": ["selser"],
26209 "scrubWikitext": true,
26215 ==<span id="x">foo</span>==
26220 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26223 "modes": ["html2wt"],
26224 "scrubWikitext": true
26227 <h2>foo<br/>bar</h2>
26228 <h2>foo <span><br/>bar</span> baz</h2>
26232 == foo <span> bar</span> baz ==
26236 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26239 "modes": ["html2wt"],
26240 "scrubWikitext": false
26243 <h2>foo<br/>bar</h2>
26249 1. WT Quote Tags: suppress newly created empty style tags
26252 "modes": ["html2wt"],
26253 "scrubWikitext": true
26261 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26267 ''<nowiki/>'''''<nowiki/>'''
26271 3. WT Quote Tags: suppress empty style tags on edits
26274 "modes": ["selser"],
26275 "scrubWikitext": true,
26281 '''<span id="x">foo</span>'''
26286 1. Anchors: suppress newly created empty anchors
26289 "modes": ["html2wt"],
26290 "scrubWikitext": true
26293 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26298 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26301 "modes": ["html2wt"],
26302 "scrubWikitext": false
26305 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26311 3. Anchors: suppress empty anchors on edits
26314 "modes": ["selser"],
26315 "scrubWikitext": true,
26321 [[Test|<span id="x">foo</span>]]
26326 3a. Anchors: do not suppress numbered extlinks
26329 "modes": ["wt2wt"],
26330 "scrubWikitext": true
26335 <a rel="mw:ExtLink" href="http://foo.com"></a>
26339 3b. Anchors: do not suppress numbered extlinks
26342 "modes": ["wt2wt"],
26343 "scrubWikitext": true,
26349 [http://foo.com <span id="x">foo</span>]
26355 Normalizations should be restricted to edited content
26358 "modes": ["selser"],
26359 "scrubWikitext": true,
26361 [ "h1", "before", "<i></i>"]
26375 1. Multiple normalizations (html2wt)
26378 "modes": ["html2wt"],
26379 "scrubWikitext": true
26383 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26384 </a><b><i></i></b>x</p>
26393 2. Multiple normalizations (selser)
26396 "modes": ["selser"],
26397 "scrubWikitext": true,
26399 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26403 <span id="x">foo</span>
26405 <span id="x">foo</span>
26411 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26414 "modes": ["html2wt"],
26415 "scrubWikitext": true
26427 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26434 <nowiki> </nowiki>hi
26436 <nowiki> </nowiki> hello
26440 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26443 "modes": ["html2wt"],
26444 "scrubWikitext": true
26453 baz bang</td></tr></table>
26459 bar<span>boo</span></p>
26475 bar<span>boo</span>
26479 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26482 "modes": ["selser"],
26483 "scrubWikitext": true,
26485 [ "p", "html", " a\n b" ]
26496 1. New links that end in spaces
26499 "modes": ["html2wt"],
26500 "scrubWikitext": false
26503 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26504 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26505 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26507 [[Berlin ]]<nowiki/>is the capital of Germany.
26511 [[Boston ]] is a city.
26515 2. New links that end in spaces
26518 "modes": ["html2wt"],
26519 "scrubWikitext": true
26522 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26523 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26524 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26526 [[Berlin]] is the capital of Germany.
26530 [[Boston]] is a city.
26534 1. Table cells with escapable prefixes
26537 "modes": ["html2wt"],
26538 "scrubWikitext": false
26542 <tr><td>a</td></tr>
26543 <tr><td>-</td></tr>
26544 <tr><td>+</td></tr>
26550 |<nowiki>-</nowiki>
26552 |<nowiki>+</nowiki>
26557 2. Table cells with escapable prefixes
26560 "modes": ["html2wt"],
26561 "scrubWikitext": true
26565 <tr><td>a</td></tr>
26566 <tr><td>-</td></tr>
26567 <tr><td>+</td></tr>
26580 3a. Table cells with escapable prefixes after edits
26583 "modes": ["selser"],
26584 "scrubWikitext": true,
26586 [ "table tbody tr:first-child td:first-child", "remove"]
26600 3b. Table cells with escapable prefixes after edits
26603 "modes": ["selser"],
26604 "scrubWikitext": true,
26606 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26613 |<span id="x">foo</span>+
26622 # FIXME: This test will fail because
26623 # normalization doesn't realize that the id attribute
26624 # will eliminate the escapable scenario
26626 4a. Table cells without escapable prefixes after edits
26629 "modes": ["selser"],
26630 "scrubWikitext": true,
26632 [ "#x", "html", "-" ]
26645 ## This tests normalizer's ability to discriminate between
26646 ## cells having identical content.
26648 4b. Table cells without escapable prefixes after edits
26651 "modes": ["selser"],
26652 "scrubWikitext": true,
26654 [ "td", "html", "-" ]
26667 ## This tests normalizer's ability to not be tripped by
26668 ## comments (and whitespace)
26670 4c. Table cells without escapable prefixes after edits
26673 "modes": ["selser"],
26674 "scrubWikitext": true,
26676 [ "table tbody tr td:first-child", "remove" ]
26691 ## This tests normalizer's ability to handle HTML cells
26693 4d. Table cells without escapable prefixes after edits
26696 "modes": ["selser"],
26697 "scrubWikitext": true,
26699 [ "td", "html", "-" ]
26704 <tr><td>a</td></tr>
26708 <tr><td>-</td></tr>
26712 ## T111151 Remove font elements without attributes
26714 5a. font tags without attributes should be dropped in scrubWikitext mode
26717 "modes": ["html2wt"],
26718 "scrubWikitext": true
26722 <font><font>bar</font></font>
26723 <font class="x">boo</font>
26727 <font class="x">boo</font>
26731 5b. font tags should not be dropped without scrubWikitext being enabled
26734 "modes": ["html2wt"],
26735 "scrubWikitext": false
26744 Escape nowiki DOM elements
26748 <nowiki><i>foo</i></nowiki>
26750 <nowiki>''foo''</nowiki>
26753 # This is meant to be an interim fix while we go about figuring out
26754 # how to not introduce these trailing <nowiki/>s in the first place.
26756 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
26760 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
26762 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
26763 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
26776 # ---------------------------------------------------
26777 # End of tests spec'ing wikitext serialization norms |
26778 # ---------------------------------------------------
26782 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
26790 <td><b>c</b><p>d</p></td>
26808 # -----------------------------------------------------------------
26809 # End of section for Parsoid-only html2wt tests for serialization
26811 # -----------------------------------------------------------------
26813 # -----------------------------------------------------------------
26814 # The following section of tests are primarily to spec behavior of
26815 # the selective serializer. All these tests have manual selser
26816 # changes. The automated selser changes for all tests handle the
26817 # wide variation of changes, but these tests here capture specs
26818 # deterministically.
26819 # ----------------------------------------------------------------
26823 Selser: New comments should not be lost
26826 "modes": ["selser"],
26828 [ "#a", "after", "<!--c1-->" ],
26829 [ "#b", "before", "<!--c2-->" ]
26833 <span id="a">a</span>
26835 <span id="b">b</span>
26837 <span id="a">a</span><!--c1-->
26839 <!--c2--><span id="b">b</span>
26844 Selser: Check for validity of DSR before using it
26847 "modes": ["selser"],
26849 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26853 <span id="a">a</span>
26855 {{DISPLAYTITLE:foo}}
26856 <span id="a">a</span>
26860 1. DOMDiff: Changes to <ref> content should be looked up using id
26863 "modes": ["selser"],
26865 ["#X", "after", "bar"],
26866 ["#Y", "after", "baz"]
26870 X <ref><span id="X">foo</span></ref>
26873 <ref name="a"><span id="Y">foo</span></ref>
26876 X <ref><span id="X">foo</span>bar</ref>
26879 <ref name="a"><span id="Y">foo</span>baz</ref>
26884 2. DOMDiff: Changes to <ref> content should be looked up using id
26887 "modes": ["selser"],
26889 ["#Z", "after", "bar"]
26893 A <ref>foo bar for a</ref>
26894 B <ref group="X" name="b" />
26898 <references group="X">
26899 <ref name="b"><span id="Z">foo</span></ref>
26902 A <ref>foo bar for a</ref>
26903 B <ref group="X" name="b" />
26907 <references group="X">
26908 <ref name="b"><span id="Z">foo</span>bar</ref>
26922 <li class="mw-empty-li"></li>
26923 <li class="mw-empty-li"></li>