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|a <nowiki>}}</nowiki> b}}
1544 {{echo|<nowiki>a [[ b</nowiki>}}
1545 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1546 {{echo|a <nowiki>}</nowiki>}}
1550 Cases where "!!" needs nowiki protection
1555 <tr><th>this needs protection !! here</th></tr>
1559 <tr><th>this does not need
1560 protection !! here</th></tr>
1564 !<nowiki>this needs protection !! here</nowiki>
1577 Comments and Indent-Pre
1579 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 -->xyz
1587 <!-- comment 1 --> asdf
1588 <!-- comment 2 --> xyz
1644 asdf<!-- comment 1 -->jkl
1654 <!-- foo --> b <!-- bar -->
1668 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1674 Comment semantics and delimiters
1676 <!-- --><!----><!-----><!------>
1680 <!-- --><!----><!-----><!------>
1684 Comment semantics and delimiters, redux
1686 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1687 -- foo -- funky huh? ... -->
1691 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1692 -- foo -- funky huh? ... -->
1696 Comment semantics and delimiters: directors cut
1698 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1699 everything starting with < followed by !-- until the first -- and > we see,
1700 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1706 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1707 everything starting with < followed by !-- until the first -- and > we see,
1708 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1713 Comment semantics: nesting
1715 <!--<!-- no, we're not going to do anything fancy here -->-->
1720 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1723 # Parsoid closes the unclosed comment, even if it means a slight
1726 Comment semantics: unclosed comment at end
1728 parsoid=wt2html,html2html
1730 <!--This comment will run out to the end of the document
1734 <!--This comment will run out to the end of the document-->
1738 Comment semantics: normalize comments to play nice with XML and browsers
1740 <!-- Browsers --!> think this is closed -->
1741 <!--> This would normally be text -->
1742 <!---> As would this -->
1743 <!-- XML doesn't like trailing dashes -------->
1744 <!-- Nor doubled hyphens -- anywhere in the data -->
1745 But this is not a comment.
1747 <p>But this is not a comment.
1750 <!-- Browsers --!> think this is closed -->
1751 <!--> This would normally be text -->
1752 <!---> As would this -->
1753 <!-- XML doesn't like trailing dashes -------->
1754 <!-- Nor doubled hyphens -- anywhere in the data -->
1755 <p>But this is not a comment.</p>
1759 Comment semantics: round-trip even text which contains encoded -->
1761 <!-- hello & goodbye - > --> --&gt; --&xx -->
1763 <!-- hello & goodbye - > --> --&gt; --&xx -->
1767 Comment in template title
1776 Comment on its own line post-expand
1788 Comment on its own line post-expand with non-significant whitespace
1800 Multiple comments should still parse as SOL-transparent
1802 parsoid=wt2html,wt2wt
1805 <!--c2--><!--c3--><!--c4-->*b
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> and <pre> preference (first one wins)
2298 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2300 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2303 <p><span typeof="mw:Nowiki">
2312 </pre> inside nowiki
2314 <nowiki></pre></nowiki>
2320 # Parsoid doesn't strip empty tags, like Tidy does.
2322 Empty pre; pre inside other HTML tags (bug 54946)
2324 parsoid=wt2html,wt2wt
2355 HTML pre followed by indent-pre
2365 # Note that tidy removes the empty <p> tags from the start and end.
2366 # Parsoid does not, by design.
2370 <p><pre>foo</pre></p>
2376 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2380 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2388 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2398 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2410 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2431 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2435 {{echo| foo}}{{echo| bar}}
2440 {{echo|<!--cmt--> foo}}
2442 <!--cmt-->{{echo| foo}}
2444 {{echo|{{echo| }}bar}}
2462 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2499 Pres with newline attributes
2504 <pre class="one two">hi</pre>
2508 two" data-parsoid='{"stx":"html"}'>hi</pre>
2512 Things that look like <pre> tags aren't treated as such
2514 Barack Obama <President> of the United States
2515 <President></President>
2517 <p>Barack Obama <President> of the United States
2518 <President></President>
2522 ## PHP parser discards the "<pre " string
2524 Handle broken pre-like tags (bug 64025)
2528 {{echo|<pre <pre>x</pre>}}
2530 <table><pre </table>
2533 <table><pre></pre></table>
2536 <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>
2545 Parsoid: handle pre with space after attribute
2549 <pre style="width:50%;" >{{echo|foo}}</pre>
2551 <pre style="width:50%;">{{echo|foo}}</pre>
2554 <pre style="width:50%;">{{echo|foo}}</pre>
2557 # TODO / maybe: fix wt2wt for this
2559 Parsoid: Don't paragraph-wrap fosterable content
2585 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2613 #--------------------------------------------------------------------
2614 # Transclusion parameter whitespace stripping tests
2615 # Behavior is different for positional and named parameters
2616 #--------------------------------------------------------------------
2618 Templates: Strip leading and trailing whitespace from named-param values
2622 {{echo|1= {{echo|b}} }}
2635 <ul><li> d</li></ul>
2640 Templates: Don't strip whitespace from positional-param values
2644 {{echo|{{echo|b}} }}
2676 <ul><li> f</li></ul>
2684 Templates: Handle empty comment-and-ws-only lines correctly
2687 <!--should be ignored-->
2688 <!--should be ignored as well-->
2697 Templates: Handle comments in the target
2700 <!-- should be ignored -->
2703 {{echo<!-- should be ignored -->
2706 {{echo<!-- should be ignored -->|foo}}
2708 {{<!-- should be ignored -->echo|foo}}
2710 <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>
2712 <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>
2714 <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>
2716 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2720 Templates: Handle comments in parameter names (bug 67657)
2723 <!-- should be ignored -->
2727 <!-- should be ignored -->
2730 {{echo|1<!-- should be ignored -->=foo}}
2732 {{echo|<!-- should be ignored -->1=foo}}
2734 <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>
2736 <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>
2738 <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>
2740 <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>
2744 Templates: Other wikitext in parameter names (bug 67657)
2748 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2754 #--------------------------------------------------------------------
2755 # Transclusion parameter escaping tests
2756 #--------------------------------------------------------------------
2758 Templates: Parsoid parameter escaping test 1
2760 {{echo|[foo]|{{echo|[bar]}}}}
2764 <p about="#mwt1" typeof="mw:Transclusion"
2765 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2769 Parsoid: Pipes in external links in template parameter
2771 {{echo|[{{echo|http://example.com}} link]}}
2773 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2775 <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>
2779 Parsoid: pipe in transclusion parameter
2781 {{echo|http://foo.com/a|b}}
2783 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2785 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2786 typeof="mw:Transclusion"
2787 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>
2791 Parsoid: Pipe in external link target and content in template parameter
2793 parsoid=html2wt,wt2wt
2795 {{echo|[http://foo.com/a|b a|b]}}
2797 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2799 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2800 typeof="mw:Transclusion"
2801 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2802 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2806 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2810 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2812 <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>
2816 Templates: Don't escape already nowiki-escaped text in template parameters
2818 parsoid=html2wt,wt2wt
2820 {{echo|foo<nowiki>|</nowiki>bar}}
2821 {{echo|<nowiki><div></nowiki>}}
2822 {{echo|<nowiki></nowiki>}}
2824 <p>foo|bar <div></p>
2826 <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>
2827 <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>
2828 <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>
2834 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2836 parsoid=html2wt,wt2wt
2838 {{echo|{{echo|1=bar}}}}
2842 <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>
2847 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2853 <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>
2858 Templates: Preserve blank parameter names
2864 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2868 Templates: Preserve blank parameter names in other positions
2870 {{blank_param|bar|=foo}}
2874 <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
2879 ### Parsoid-centric tests for testing RT edge cases for pre
2883 1a. Indent-Pre and Comments
2896 1b. Indent-Pre and Comments
2909 1c. Indent-Pre and Comments
2922 1d. Indent-Pre and Comments
2923 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2936 2a. Indent-Pre and tables
2957 2b. Indent-Pre and tables
2973 2c. Indent-Pre and tables (bug 42252)
2990 2d. Indent-Pre and tables
3007 <tbody><tr><td> b</td></tr>
3012 2e. Indent-Pre and table-line syntax
3025 2f. Indent-pre started by table-line syntax
3044 3a. Indent-Pre and block tags (single-line html)
3048 c <blockquote> foo </blockquote>
3053 c <blockquote> foo </blockquote>
3054 <pre><span> foo </span>
3057 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3058 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3059 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3060 <pre><span> foo </span>
3077 3b. Indent-Pre and block tags (multi-line html)
3082 <pre>a <span>foo</span>
3087 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3088 b <div data-parsoid='{"stx":"html"}'> foo </div>
3098 3c. Indent-Pre and block tags (pre-content on separate line)
3162 4. Indent-Pre and extension tags
3168 a <ul class="gallery mw-gallery-traditional">
3169 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3170 <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>
3171 <div class="gallerytext">
3178 <ul class="gallery mw-gallery-traditional">
3179 <li class="gallerybox" style="width: 155px">
3180 <div style="width: 155px">
3181 <div class="thumb" style="width: 150px;">
3182 <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>
3184 <div class="gallerytext"></div>
3191 Table wikitext syntax outside wiki-tables
3194 ! not a table heading
3197 | class="foo bar" | baz
3204 ! not a table heading
3207 | class="foo bar" | baz
3216 Render paragraphs when indent-pre is suppressed in blocklevels
3233 4. Multiple spaces at start-of-line
3251 ## NOTE: the leading white-space chars on empty line are significant
3253 5a. White-space in indent-pre
3265 ## NOTE: the leading white-space chars on empty line are significant
3267 5b. White-space in indent-pre
3286 5c. White-space in indent-pre
3299 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3322 7a. Indent-pre and category links
3324 parsoid=wt2html,wt2wt
3326 [[Category:foo]] <!-- No pre-wrapping -->
3327 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3330 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3331 <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 -->
3334 ## We used to, but no longer wt2wt this test since the default serializer
3335 ## will normalize all categories to serialize on their own line.
3336 ## This wikitext usage is going to be fairly uncommon in production and
3337 ## selser will take care of preserving formatting in those scenarios.
3339 7b. Indent-pre and category links
3344 [[Category:foo]] {{echo|b}}
3346 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3347 <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>
3351 Indent-Pre: Newlines in comments shouldn't affect sol state
3365 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3369 HTML-pre: 1. embedded newlines
3404 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3406 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3410 <pre data-parsoid='{"stx":"html"}'>
3415 <pre data-parsoid='{"stx":"html"}'>
3423 HTML-pre: big spaces
3459 <pre data-parsoid='{"stx":"html"}'>
3478 HTML-pre: 2: indented text
3491 HTML-pre: 3: other wikitext
3510 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3519 ### Definition lists
3526 <dl><dt> name </dt>
3527 <dd> Definition</dd></dl>
3532 Definition list for indentation only
3536 <dl><dd> Indented text</dd></dl>
3541 Definition list with no space
3546 <dd>Definition</dd></dl>
3551 Definition list with URL link
3553 ; http://example.com/ : definition
3555 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3556 <dd> definition</dd></dl>
3561 Definition list with bracketed URL link
3563 ;[http://www.example.com/ Example]:Something about it
3565 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3566 <dd>Something about it</dd></dl>
3571 Definition list with wikilink containing colon
3573 ; [[Help:FAQ]]: The least-read page on Wikipedia
3575 <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>
3576 <dd> The least-read page on Wikipedia</dd></dl>
3580 # At Brion's and JeLuF's insistence... :)
3582 Definition list with news link containing colon
3584 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3586 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3587 <dd> This isn't even a real newsgroup!</dd></dl>
3590 <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>
3594 Malformed definition list with colon
3596 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3598 <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>
3603 Definition lists: colon in external link text
3605 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3607 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3608 <dd> OK, I made that up</dd></dl>
3613 Definition lists: colon in HTML attribute
3615 ;<b style="display: inline">bold</b>
3617 <dl><dt><b style="display: inline">bold</b></dt></dl>
3622 Definition lists: self-closed tag
3624 ;one<br/>two : two-line fun
3626 <dl><dt>one<br />two </dt>
3627 <dd> two-line fun</dd></dl>
3632 Bug 11748: Literal closing tags
3636 <dd>test test test test test</dd>
3638 <dd>test test test test test</dd>
3643 <dd>test test test test test</dd>
3645 <dd>test test test test test</dd>
3651 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3654 ; term : description
3659 <dl><dt> term </dt>
3660 <dd> description</dd></dl>
3661 <ul><li> unordered</li></ul>
3668 Definition list with empty definition and following paragraph
3680 Nested definition lists using html syntax
3689 Definition Lists: No nesting: Multiple dd's
3702 Definition Lists: Indentation: Regular
3710 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3715 Definition Lists: Indentation: Missing 1st level
3721 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3726 Definition Lists: Indentation: Multi-level indent
3730 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3735 Definition Lists: Hacky use to indent tables
3742 should be left alone
3744 <dl><dd><dl><dd><table>
3749 </td></tr></table></dd></dl></dd></dl>
3751 should be left alone
3756 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3764 should be left alone
3767 <dl><dd><dl><dd><table><tr>
3770 </tr></table><!-- bar --></dd></dl></dd></dl>
3772 should be left alone</p>
3776 Definition Lists: Hacky use to indent tables, with comment before table
3782 <dl><dd><dl><dd><!-- foo --><table><tr>
3784 </tr></table></dd></dl></dd></dl>
3787 # The trailing whitespace in this test is to catch a regression in
3788 # Parsoid after T54473.
3790 Definition Lists: Hacky use to indent tables (WS-insensitive)
3799 </td></tr></table></dd></dl>
3803 <tbody><tr><td>a</td></tr>
3804 </tbody></table> </dd></dl>
3807 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3808 ## as an empty dt item. It also ignores all but the last ";" when followed
3809 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3810 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3813 ## Ex: ";;t2 ::d2" is transformed into:
3825 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3826 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3837 ## All Parsoid only definition list tests have this difference.
3839 ## See also: https://phabricator.wikimedia.org/T8569
3840 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3843 Table / list interaction: indented table with lists in table contents
3858 <ul><li> b</li></ul>
3862 <ul><li> d</li></ul>
3863 </td></tr></table></dd></dl>
3868 Table / list interaction: lists nested in tables nested in indented lists
3891 </td></tr></table></dd></dl>
3898 Definition Lists: Nesting: Multi-level (Parsoid only)
3928 Definition Lists: Nesting: Test 2 (Parsoid only)
3955 Definition Lists: Nesting: Test 3 (Parsoid only)
3998 Definition Lists: Nesting: Test 4
4003 <dl><dd><dl><dd><dl><dt>t3</dt>
4004 <dd>d3</dd></dl></dd></dl></dd></dl>
4009 ## The Parsoid team believes the following three test exposes a
4010 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4011 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4012 ## It also exposes a "misfeature" in tidy, which doesn't like
4013 ## <dl> tags with a single <dt> child; it converts the <dt> into
4014 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4016 Definition Lists: Mixed Lists: Test 1
4022 <dl><dd><dl><dt><ul><li> foo</li>
4023 <li> bar</li></ul></dt></dl>
4024 <dl><dt> baz</dt></dl></dd></dl>
4059 Definition Lists: Mixed Lists: Test 2
4064 <ul><li><dl><dd> d1</dd>
4065 <dd> d2</dd></dl></li></ul>
4071 Definition Lists: Mixed Lists: Test 3
4076 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4077 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4083 Definition Lists: Mixed Lists: Test 4
4088 <ul><li><dl><dt>d1 </dt>
4091 <dd>d4</dd></dl></li></ul>
4097 Definition Lists: Mixed Lists: Test 5
4103 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4109 Definition Lists: Mixed Lists: Test 6
4114 <ol><li><ul><li><dl><dd>d1
4115 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4121 Definition Lists: Mixed Lists: Test 7
4126 <dl><dd><ul><li> d1</li>
4127 <li> d2</li></ul></dd></dl>
4133 Definition Lists: Mixed Lists: Test 8
4138 <dl><dd><ul><li> d1</li></ul>
4139 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4145 Definition Lists: Mixed Lists: Test 9
4149 <ul><li><dl><dt>foo </dt>
4150 <dd>bar</dd></dl></li></ul>
4156 Definition Lists: Mixed Lists: Test 10
4160 <ul><li><ol><li><dl><dt>foo </dt>
4161 <dd>bar</dd></dl></li></ol></li></ul>
4165 # The Parsoid team disagrees with the PHP parser's seemingly-random
4166 # rules regarding dd/dt on the next two tests. Parsoid is more
4167 # consistent, and recognizes the shared nesting and keeps the
4168 # still-open tags around until the nesting is complete.
4169 # (And tidy again converts <dt> to <dd> before 'bar'.)
4172 Definition Lists: Mixed Lists: Test 11
4177 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4178 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4179 <dl><dt>boo </dt>
4180 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4235 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4236 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4240 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4241 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4250 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4252 # * The test is wrong, there are two colons where there should be :;
4253 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4255 Definition Lists: Weird Ones: Test 1
4257 *#;*::;; foo : bar (who uses this?)
4259 <ul><li><ol><li><dl><dt> foo </dt>
4260 <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>
4279 <dt>bar (who uses this?)</dt>
4311 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4312 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4324 Definition Lists: colons occurring in tags
4342 <dt><span>a:b</span></dt>
4369 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4371 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4372 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4373 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4374 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4376 <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>
4377 <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>
4378 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4382 Definition Lists: colons and tables 1
4394 </td></tr></table></dd></dl>
4398 </td></tr></table></dd></dl>
4402 # Parsoid's output (as documented below) differs from php's in this case.
4403 # This is probably a bug. If we fixup parsoid to match php's output, the
4404 # above test should pass and the below test case can be removed. It is
4405 # unclear which output is more desirable.
4408 Definition Lists: colons and tables 2
4420 </td></tr></table></dd>
4424 </td></tr></table></dd></dl>
4428 Definition Lists: template interaction
4430 ::{{definition_list}}
4433 ::{{definition_list}}
4438 <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">
4439 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4441 <dl><dd data-parsoid='{}'>one
4442 <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">
4443 </span><dd about="#mwt2">two
4445 <dd>three</dd></dl></dd>
4446 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4454 External links: non-bracketed
4456 Non-bracketed: http://example.com
4458 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4462 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4464 External links: numbered
4466 Numbered: [http://example.com]
4467 Numbered: [http://example.net]
4468 Numbered: [http://example.com]
4470 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4471 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4472 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4475 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4476 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4477 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4481 External links: specified text
4483 Specified text: [http://example.com link]
4485 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4490 External links: trail
4492 Linktrails should not work for external links: [http://example.com link]s
4494 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4499 External links: dollar sign in URL
4501 http://example.com/1$2345
4503 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4507 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4509 External links: dollar sign in URL (autonumber)
4511 [http://example.com/1$2345]
4513 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4516 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4520 External links: open square bracket forbidden in URL (bug 4377)
4522 parsoid=wt2html,wt2wt,html2html
4524 http://example.com/1[2345
4526 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4529 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4533 External links: open square bracket forbidden in URL (named) (bug 4377)
4535 parsoid=wt2html,html2html
4537 [http://example.com/1[2345]
4539 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4542 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4545 # parsoid adds a space before the link name
4547 External links: open square bracket forbidden in URL (named) (bug 4377)
4550 [http://example.com/1 [2345]
4552 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4557 External links: nowiki in URL link text (bug 6230)
4559 [http://example.com/ <nowiki>''example site''</nowiki>]
4561 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4566 External links: newline forbidden in text (bug 6230 regression check)
4568 [http://example.com/ first
4571 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4577 External links: Pipe char between url and text
4579 [http://example.com | link]
4581 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4586 External links: protocol-relative URL in brackets
4588 [//example.com/ Test]
4590 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4594 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4596 External links: protocol-relative URL in brackets without text
4600 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4603 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4607 External links: protocol-relative URL in free text is left alone
4611 <p>//example.com/Foo
4616 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4618 foo//example.com/Foo
4620 <p>foo//example.com/Foo
4625 External links: with no contents
4627 [http://en.wikipedia.org/wiki/Foo]
4629 [[wikipedia:Foo|Bar]]
4631 [[wikipedia:Foo|<span>Bar</span>]]
4633 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4634 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4635 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4638 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4639 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4640 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4644 External links: Free with trailing punctuation
4654 http://example.com/url_with_(brackets)
4655 (http://example.com/url_without_brackets)
4656 http://example.com/url_with_entity&
4657 http://example.com/url_with_entity&
4658 http://example.com/url_with_entity&
4659 http://example.com/url_with_entity
4660 http://example.com/url_with_entity 
4661 http://example.com/url_with_entity 
4662 http://example.com/url_with_entity<
4663 http://example.com/url_with_entity<
4664 http://example.com/url_with_entity<
4666 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4667 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4668 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4669 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4670 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4671 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4672 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4673 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4674 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4675 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4676 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4677 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4678 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4679 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4680 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4681 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4682 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4683 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4684 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4687 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4688 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4689 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4690 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4691 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4692 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4693 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4694 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4695 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4696 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4697 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4698 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4699 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4700 <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>
4701 <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>
4702 <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>
4703 <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>
4704 <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>
4705 <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>
4709 External links: tricky Parsoid html2html case
4711 parsoid=wt2html,wt2wt,html2html
4713 http://example.com/url_with_entity&amp;
4715 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4718 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4722 External links: Free with trailing quotes (T113666)
4724 '''News:''' Stuff here
4728 <p><b>News:</b> Stuff here
4729 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4732 <p><b>News:</b> Stuff here</p>
4733 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4737 External links: Lone protocols are never linked (T105697)
4756 External links: No preceding word characters allowed (bug 65278)
4758 NOPEhttp://example.com
4759 N0http://example.com
4760 ok:http://example.com
4761 ok-http://example.com
4763 <p>NOPEhttp://example.com
4764 N0http://example.com
4765 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4766 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4773 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4775 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4780 External image from https
4782 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4784 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4789 External image (when not allowed)
4791 wgAllowExternalImages=0
4793 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4795 <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>
4800 Link to non-http image, no img tag
4802 Link to non-http image, no img tag: ftp://example.com/test.jpg
4804 <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>
4809 External links: terminating separator
4811 Terminating separator: http://example.com/thing,
4813 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4818 External links: intervening separator
4820 Intervening separator: http://example.com/1,2,3
4822 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4827 External links: old bug with URL in query
4829 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4831 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4836 External links: old URL-in-URL bug, mixed protocols
4838 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4840 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4845 External links: URL in text
4847 URL in text: [http://example.com http://example.com]
4849 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4854 External links: Clickable images
4856 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4858 <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>
4861 <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>
4865 External links: raw ampersand
4867 Old & use: http://x&y
4869 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4874 External links: encoded ampersand
4876 Old & use: http://x&y
4878 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4881 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4885 External links: encoded equals (bug 6102)
4887 http://example.com/?foo=bar
4889 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4892 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4896 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4897 ## does it number them. As discussed in bug 53505, we can identify
4898 ## autonumbered links via CSS.
4902 External links: [raw ampersand]
4904 Old & use: [http://x&y]
4906 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4909 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4912 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4913 # mode will return the [raw ampersand] wikitext
4915 External links: [encoded ampersand]
4917 parsoid=wt2html,wt2wt,html2html
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>
4928 External links: [raw equals]
4930 [http://example.com/?foo=bar]
4932 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4935 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4938 # note that parsoid html is identical to [raw equals] case; so html2wt
4939 # mode will return the [raw equals] wikitext
4941 External links: [encoded equals] (bug 6102)
4943 parsoid=wt2html,wt2wt,html2html
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 # xxx parsoid strips the IDN character, so the round-trip tests will
4954 # obviously fail and are disabled. --cscott
4956 External links: [IDN ignored character reference in hostname; strip it right off]
4958 parsoid=wt2html,wt2wt,html2html
4960 [http://e‌xample.com/]
4962 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4965 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4968 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4969 # Where an external link could easily circumvent the sanitization of the text of
4970 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4971 # test demands a higher standard. That's a bit strange.
4975 # http://example.com -> [http://example.com|http://example.com]
4976 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4978 # The first example is sanitized, but the second is not. Any security benefits
4979 # from this production are trivial to circumvent. Either remove this test and
4980 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4981 # the test accordingly.
4985 # xxx parsoid strips the IDN character, so the round-trip tests will
4986 # obviously fail and are disabled. --cscott
4988 External links: IDN ignored character reference in hostname; strip it right off
4990 parsoid=wt2html,html2html
4992 http://e‌xample.com/
4994 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4997 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5001 External links: www.jpeg.org (bug 554)
5005 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5009 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5011 External links: URL within URL (original bug 2)
5013 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5015 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5018 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5022 BUG 361: URL inside bracketed URL
5024 [http://www.example.com/foo http://www.example.com/bar]
5026 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5031 BUG 361: URL within URL, not bracketed
5033 http://www.example.com/foo?=http://www.example.com/bar
5035 <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>
5040 BUG 289: ">"-token in URL-tail
5042 http://www.example.com/<hello>
5044 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5049 BUG 289: literal ">"-token in URL-tail
5051 http://www.example.com/<b>html</b>
5053 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5056 <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>
5060 BUG 289: ">"-token in bracketed URL
5062 [http://www.example.com/<hello> stuff]
5064 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5069 BUG 289: literal ">"-token in bracketed URL
5071 [http://www.example.com/<b>html</b> stuff]
5073 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5078 BUG 289: literal double quote at end of URL
5080 http://www.example.com/"hello"
5082 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5087 BUG 289: literal double quote in bracketed URL
5089 [http://www.example.com/"hello" stuff]
5091 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5096 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5098 [http://www.example.com test]
5100 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5105 External links: link text with spaces
5107 [http://www.example.com a b c]
5108 [http://www.example.com ''a'' ''b'']
5110 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5111 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5116 External links: wiki links within external link (Bug 3695)
5118 parsoid=wt2html,html2html
5120 [http://example.com [[wikilink]] embedded in ext link]
5122 <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>
5125 <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>
5129 BUG 787: Links with one slash after the url protocol are invalid
5133 [http:/example.com title]
5135 <p>http:/example.com
5136 </p><p>[http:/example.com title]
5141 Bracketed external links with template-generated invalid target
5143 [{{echo|http:/example.com}} title]
5145 <p>[http:/example.com title]
5150 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5152 ''[http://example.com text'']
5153 [http://example.com '''text]'''
5154 ''Something [http://example.com in italic'']
5155 ''Something [http://example.com mixed''''', even bold]'''
5156 '''''Now [http://example.com both''''']
5158 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5159 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5160 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5161 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5162 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5168 Bug 4781: %26 in URL
5170 http://www.example.com/?title=AT%26T
5172 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5175 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5178 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5179 # % is actually legal in HTML5. Any change in output would need testing though.
5181 Bug 4781, 5267: %25 in URL
5183 http://www.example.com/?title=100%25_Bran
5185 <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>
5188 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5192 Bug 4781, 5267: %28, %29 in URL
5194 http://www.example.com/?title=Ben-Hur_%281959_film%29
5196 <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>
5199 <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>
5204 Bug 4781: %26 in autonumber URL
5206 [http://www.example.com/?title=AT%26T]
5208 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5211 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5215 Bug 4781, 5267: %26 in autonumber URL
5217 [http://www.example.com/?title=100%25_Bran]
5219 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5222 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5226 Bug 4781, 5267: %28, %29 in autonumber URL
5228 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5230 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5233 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5238 Bug 4781: %26 in bracketed URL
5240 [http://www.example.com/?title=AT%26T link]
5242 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5245 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5249 Bug 4781, 5267: %25 in bracketed URL
5251 [http://www.example.com/?title=100%25_Bran link]
5253 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5258 Bug 4781, 5267: %28, %29 in bracketed URL
5260 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5262 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5265 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5269 External link containing a period in the anchor. (bug 63947)
5271 [//foo.org/bar#baz. bang]
5273 [//foo.org/bar. bang]
5275 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5276 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5279 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5280 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5284 External link containing a single quote. (bug 63947)
5288 [//foo.org/bar'baz bang]
5290 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5291 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5294 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5295 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5299 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5301 Some [http://example.com/ pretty ''italics'' and stuff]!
5303 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5308 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5310 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5312 <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>
5317 External link containing double-single-quotes with no space separating the url from text in italics
5319 [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]].]
5321 <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>
5324 <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>
5326 <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>
5330 External link with comments in link text
5332 [http://www.google.com Google <!-- comment -->]
5334 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5337 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5341 External link to bare IPv4 address
5343 [http://192.168.0.1 Link]
5345 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5348 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5352 URL-encoding in URL functions (single parameter)
5354 {{localurl:Some page|amp=&}}
5356 <p>/index.php?title=Some_page&amp=&
5361 URL-encoding in URL functions (multiple parameters)
5363 {{localurl:Some page|q=?&=&}}
5365 <p>/index.php?title=Some_page&q=?&amp=&
5372 http://example.com/index.php?foozoid%5B%5D=bar
5374 http://example.com/index.php?foozoid[]=bar
5376 <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>
5377 </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>
5380 <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>
5382 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5386 IPv6 urls, autolink format (T23261)
5388 http://[2404:130:0:1000::187:2]/index.php
5390 Examples from RFC 2373, section 2.2:
5391 * http://[1080::8:800:200C:417A]/unicast
5392 * http://[FF01::101]/multicast
5393 * http://[::1]/loopback
5394 * http://[::]/unspecified
5395 * http://[::13.1.68.3]/ipv4compat
5396 * http://[::FFFF:129.144.52.38]/ipv4compat
5398 Examples from RFC 2732, section 2:
5399 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5400 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5401 * http://[3ffe:2a00:100:7031::1]
5402 * http://[1080::8:800:200C:417A]/foo
5403 * http://[::192.9.5.5]/ipng
5404 * http://[::FFFF:129.144.52.38]:80/index.html
5405 * http://[2010:836B:4179::836B:4179]
5408 <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>
5409 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5411 <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>
5412 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5413 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5414 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5415 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5416 <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>
5417 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5419 <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>
5420 <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>
5421 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5422 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5423 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5424 <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>
5425 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5428 <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>
5430 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5431 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5432 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5433 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5434 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5435 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5436 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5438 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5439 <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>
5440 <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>
5441 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5442 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5443 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5444 <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>
5445 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5449 IPv6 urls, bracketed format (T23261)
5451 [http://[2404:130:0:1000::187:2]/index.php test]
5453 Examples from RFC 2373, section 2.2:
5454 * [http://[1080::8:800:200C:417A] unicast]
5455 * [http://[FF01::101] multicast]
5456 * [http://[::1]/ loopback]
5457 * [http://[::] unspecified]
5458 * [http://[::13.1.68.3] ipv4compat]
5459 * [http://[::FFFF:129.144.52.38] ipv4compat]
5461 Examples from RFC 2732, section 2:
5462 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5463 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5464 * [http://[3ffe:2a00:100:7031::1] 3]
5465 * [http://[1080::8:800:200C:417A]/foo 4]
5466 * [http://[::192.9.5.5]/ipng 5]
5467 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5468 * [http://[2010:836B:4179::836B:4179] 7]
5471 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5472 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5474 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5475 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5476 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5477 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5478 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5479 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5480 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5482 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5483 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5484 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5485 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5486 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5487 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5488 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5491 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5493 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5494 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5495 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5496 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5497 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5498 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5499 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5501 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5502 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5503 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5504 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5505 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5506 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5507 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5508 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5512 Non-extlinks in brackets
5521 [{{echo|foo}} ''bar'']
5522 [{{echo|foo}}l's] errand
5523 [{{echo|foo}}l's errand]
5525 [url=http://example.com]
5526 [http:// bare protocols don't count]
5539 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5540 [http:// bare protocols don't count]
5548 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5549 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5550 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5551 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5552 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5553 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5554 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5555 [http:// bare protocols don't count]</p>
5559 Percent encoding in external links
5561 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5563 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5566 <p><a rel="mw:ExtLink"
5567 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5571 Use url link syntax for links where the content is equal the link target
5575 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5578 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5582 Parenthesis in external links, especially URL links
5586 http://example.com/test)
5588 http://example.com/(test)
5590 http://example.com/((test)
5592 (http://example.com/(test))
5594 (http://example.com/(test)))))
5596 http://example.com/a)b
5598 [http://example.com) foo]
5600 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5601 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5602 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5603 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5604 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5605 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5606 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5607 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5610 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5611 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5612 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5613 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5614 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5615 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5616 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5617 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5621 Parenthesis in external links, w/ transclusion or comment
5623 (http://example.com/{{echo|hi}})
5625 (http://example.com<!-- hi -->)
5627 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5628 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5631 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]],&quot;dsr&quot;:[20,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;hi&quot;}},&quot;i&quot;:0}}]}\">hi</span>"}]]}'>http://example.com/hi</a>)</p>
5633 <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>
5637 Serialize <a> tags with invalid link targets as plain text
5639 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5641 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5642 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5643 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5644 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5647 <nowiki>*</nowiki>text
5648 <nowiki>[[foo]]</nowiki>
5649 <nowiki>*a [[foo]]</nowiki>
5653 mw:ExtLink -vs- mw:WikiLink (T94723)
5657 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"},"dsr":[0,11,6,2]}'>Bar</a>
5658 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5659 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5660 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5662 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5663 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5668 [[wikipedia:Foo|Bar]]
5669 [[wikipedia:Foo|Bar]]
5671 [[wikipedia:European_Robin|European Robin]]
5672 [[wikipedia:European_Robin|European Robin]]
5676 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5680 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5682 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5693 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5695 Normal text. '''''Bold italic text.''''' Normal text.
5697 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5698 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5703 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5704 # parser strips. The wikitext contains just the first half of the bold
5707 Unclosed and unmatched quotes
5709 '''''Bold italic text '''with bold deactivated''' in between.'''''
5711 '''''Bold italic text ''with italic deactivated'' in between.'''''
5715 ..spanning two paragraphs (should not work).'''
5717 '''Bold tag left open
5719 ''Italic tag left open
5723 <!-- Unmatching number of opening, closing tags: -->
5724 '''This year''''s election ''should'' beat '''last year''''s.
5726 ''Tom'''s car is bigger than ''Susan'''s.
5728 Plain ''italic'''s plain
5730 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5731 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5732 </p><p><b>Bold text..</b>
5733 </p><p>..spanning two paragraphs (should not work).
5734 </p><p><b>Bold tag left open</b>
5735 </p><p><i>Italic tag left open</i>
5737 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5738 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5739 </p><p>Plain <i>italic'</i>s plain
5742 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5743 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5744 </p><p><b>Bold text..</b>
5745 </p><p>..spanning two paragraphs (should not work).<b></b>
5746 </p><p><b>Bold tag left open</b>
5747 </p><p><i>Italic tag left open</i>
5750 <!-- Unmatching number of opening, closing tags: -->
5751 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5752 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5753 </p><p>Plain <i>italic'</i>s plain
5760 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5763 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5764 # is the bare minimum required by the spec, see:
5765 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5766 # Parsoid team replies: empty table tags are legal in HTML5
5768 A table with no data.
5781 A table with stray table end tags on start tag line (wt2html)
5785 {|style="color: red;"|}
5787 {|style="color: red;" |}
5791 {|style="color: red;"|} id="foo"
5795 {|style="color: red;" |} id="foo"
5799 <table style="color: red;"></table>
5801 <table style="color: red;">
5807 <table style="color: red;" id="foo">
5813 <table style="color: red;" id="foo">
5822 A table with no data (take 2)
5830 # A table with nothing but a caption is invalid XHTML, we might want to render
5831 # this as <p>caption</p>
5832 # Parsoid team replies: table with only a caption is legal in HTML5
5834 A table with nothing but a caption
5842 </caption><tr><td></td></tr></table>
5845 <table><caption> caption</caption></table>
5849 A table with caption with default-spaced attributes and a table row
5852 |+ style="color: red;" | caption1
5858 <caption style="color: red;"> caption1
5867 A table with captions with non-default spaced attributes and a table row
5870 |+style="color: red;"|caption2
5871 |+ style="color: red;"| caption3
5877 <caption style="color: red;">caption2
5879 <caption style="color: red;"> caption3
5888 Table td-cell syntax variations
5892 | foo bar foo || baz
5893 | style='color:red;' | baz
5894 | style='color:red;' || baz
5901 <td> foo bar foo </td>
5904 <td style="color:red;"> baz
5906 <td> style='color:red;' </td>
5934 Simple table but with multiple dashes for row wikitext
5953 Multiplication table
5955 {| border="1" cellpadding="2"
5956 |+Multiplication table
5958 ! × !! 1 !! 2 !! 3
5976 <table border="1" cellpadding="2">
5977 <caption>Multiplication table
6024 Accept "||" in table headings
6039 Accept "!!" in table data
6053 <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>
6058 Accept "||" in indented table headings
6068 </th></tr></table></dd></dl>
6073 Accept "!!" in templates
6087 <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>
6091 Accept "!!" in table headings after newline
6108 <p>b!!c</p></th></tr>
6113 Accept "!!" in table data of mixed wikitext / html syntax
6117 <tr><td>b!!c</td></tr>
6130 <tbody><tr><th>a</th></tr>
6131 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6136 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6153 Accept "| !" at start of line in tables (ignore !-attribute)
6157 | !style="color:red" | bar
6169 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 +/-
6173 |style='color:red;'|+1
6174 |style='color:blue;'|-1
6186 <td style="color:red;">+1
6188 <td style="color:blue;">-1
6212 |rowspan=2| Cell 2, row 1 (and 2)
6223 <td rowspan="2"> Cell 2, row 1 (and 2)
6241 {| bgcolor=#ABCDEF border=2
6246 |the original table again
6254 <table bgcolor="#ABCDEF" border="2">
6262 <td>the original table again
6268 Invalid attributes in table cell (bug 1830)
6282 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6286 | title="foo<nowiki>|</nowiki>" |bar
6287 | title="foo<nowiki>|</nowiki>" bar
6294 <td title="foo|">bar
6296 <td> title="foo|" bar
6301 <tbody><tr><td title="foo">bar</td>
6302 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6303 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6307 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6308 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6309 # *2wt modes will fail.
6311 Table security: embedded pipes
6313 parsoid=wt2html,html2html
6316 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6320 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6321 <td>]" onmouseover="alert(document.cookie)">test
6329 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6333 ! and || in element attributes should not be parsed as <th>/<td>
6336 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6341 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6346 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6350 # FIXME: The output seems broken. Filed as T110268.
6352 ! and || in td attributes should not be parsed as <th>/<td>
6357 | style="color: red !important;" data-contrived="put this here ||" | foo
6362 <td> style="color: red !important;" data-contrived="put this here </td>
6368 <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>
6373 Break on | in element attribute in template
6375 parsoid=wt2html,html2html
6377 {{echo|1=<div class="hi|ho">ha</div>}}
6379 <p>ho">ha</div>
6382 <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>
6386 Indented table markup mixed with indented pre content (proposed in bug 6200)
6391 Text that should be rendered preformatted
6399 <pre>Text that should be rendered preformatted
6408 1. Template-generated table cell attributes and cell content
6413 || {{table_attribs_5}}
6414 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6415 |align=center {{table_attribs}}
6416 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6421 <td style="color:red;">Foo
6423 <td style="color:red;">Foo
6425 <td> style="color:red;"</td>
6428 <td style="color:red;">Foo
6430 <td align="center" style="color:red;">Foo
6432 <td align="center" style="color:red;">Foo
6438 2. Template-generated table cell attributes and cell content
6441 |{{table_attribs_2}}
6446 <td style="color:red;">Foo
6454 <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>
6455 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6460 3. Template-generated table cell attributes and cell content
6463 !align=center {{table_header_cells}}
6465 |align=center {{table_cells}}
6470 <th align="center" style="color:red;">Foo</th>
6471 <th style="color:red;"><i>Bar</i></th>
6472 <th style="color:brown;"><i>Foo</i> and Baz
6475 <td align="center" style="color:red;">Foo</td>
6476 <td style="color:red;"><i>Bar</i></td>
6477 <td style="color:brown;"><i>Foo</i> and Baz
6482 <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>
6483 <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>
6488 4. Template-generated table cell attributes and cell content inside a templated table
6491 !align=center {{table_header_cells}}
6493 |align=center {{table_cells}}
6498 <th align="center" style="color:red;">Foo</th>
6499 <th style="color:red;"><i>Bar</i></th>
6500 <th style="color:brown;"><i>Foo</i> and Baz
6503 <td align="center" style="color:red;">Foo</td>
6504 <td style="color:red;"><i>Bar</i></td>
6505 <td style="color:brown;"><i>Foo</i> and Baz
6509 <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}}]}'>
6510 <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>
6512 <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>
6516 ## Edge case fix to prevent future regressions
6518 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6521 |{{table_attribs_7}}
6526 <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>
6528 <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>
6532 Table with row followed by newlines and table heading
6550 Table with empty line following the start tag
6568 Table attributes with empty value
6584 </td></tr></tbody></table>
6589 Wikitext table with a lot of comments
6612 Wikitext table comments represented in parsoid dom
6614 {|<!--c1--><!--c2-->
6625 <table><!--c1--><!--c2-->
6626 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6627 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6632 Wikitext table with double-line table cell
6649 Table cell with a single comment
6666 Table-cell after a comment-only-empty-line
6683 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6685 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6691 Build table with {{!}}
6693 {{{!}} class="wikitable"
6696 {{!}}- style="color:red;"
6697 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6700 <table class="wikitable">
6706 <tr style="color:red;">
6708 <td style="color:red;"> second data
6714 Build table with pipe as data
6716 {| class="wikitable"
6719 |- style="color:red;"
6720 | data || style="color:red;" | second data
6722 | style="color:red;" | data with | || style="color:red;" | second data with |
6724 || data with | ||| second data with |
6727 <table class="wikitable">
6733 <tr style="color:red;">
6735 <td style="color:red;"> second data
6738 <td style="color:red;"> data with | </td>
6739 <td style="color:red;"> second data with |
6742 <td> data with | </td>
6743 <td> second data with |
6749 Build table with wikilink
6751 {| class="wikitable"
6752 ! header || second header
6753 |- style="color:red;"
6754 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6756 | data || second data [[Main Page|link|text with pipe]]
6759 <table class="wikitable">
6764 <tr style="color:red;">
6765 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6766 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6770 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6775 # The expected HTML structure in this test is debatable. The PHP parser does
6776 # not parse this kind of table at all. The main focus for Parsoid is on
6777 # round-tripping, so this output is ok for now. TODO: revisit!
6779 Wikitext table with html-syntax row
6789 <td>foo</td></tr></tbody></table>
6792 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6793 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6794 ## PHP parser, which tidy then compounds by fostering the content
6795 ## entirely out of the table. Parsoid recognizes the table context
6796 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6797 ## depends on PHP's treatment of broken table markup!
6799 Implicit <td> after a |-
6801 parsoid=wt2html,html2html
6821 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6823 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6825 parsoid=wt2html,html2html
6858 <tr><td><pre>a</pre></td></tr>
6859 <tr><td> b</td></tr>
6864 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6865 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6867 Lists should be recognized in an implicit <td> context
6869 parsoid=wt2html,html2html
6896 Table cells not properly parsed in an implicit-td context
6900 {{table_attribs_4}} || a || b
6905 <td style="background-color:#DC241f;" width="10px"></td>
6912 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6913 <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>
6918 Parsoid: Round-trip tables directly followed by content (bug 51219)
6920 parsoid=wt2html,wt2wt
6945 Parsoid: Default to a newline after tables in new content (bug 51219)
6950 <tr><td>foo</td></tr></tbody></table> bar
6952 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6957 <nowiki> </nowiki>bar
6965 Parsoid: newline inducing block nodes don't suppress <nowiki>
6977 Parsoid: Row-syntax table headings followed by comment & table cells
6979 parsoid=wt2html,wt2wt
6983 <!-- foo --> || baz || quux
6997 <tbody><tr><th> foo </th><th> bar
6998 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7003 Parsoid: Recover better from broken table attributes
7023 <p>foo</p></td></tr>
7028 Tables: Digest broken attributes on table and tr tag
7045 Strip unsupported table tags
7093 Testing serialization after deletion of table cells
7096 "modes": ["wt2wt", "selser"],
7104 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7117 Plain link, capitalized
7121 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7126 Plain link, uncapitalized
7130 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7137 [[Main Page|The Main Page]]
7139 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7144 Piped link with comment in link text
7146 [[Main Page|The Main<!--front--> Page]]
7148 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7153 Piped link with multiple pipe characters in link text
7155 [[Main Page||The|Main|Page|]]
7157 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7160 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7164 Piped link with no link text
7166 [[Thomas Bek (bishop of St David's)|]]
7168 <p>[[Thomas Bek (bishop of St David's)|]]
7171 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7179 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7184 Broken link with fragment
7186 [[Zigzagzogzagzig#zug]]
7188 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7193 Special page link with fragment
7195 [[Special:Version#anchor]]
7197 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7202 Nonexistent special page link with fragment
7204 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7206 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7213 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7215 <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>
7222 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7224 <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>!!!
7235 Bug 43661: Piped links with identical prefixes
7237 [[prefixed article|prefixed articles with spaces]]
7239 [[prefixed article|prefixed articlesaoeu]]
7241 [[Main Page|Main Page test]]
7243 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7244 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7245 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7251 Link with HTML entity in suffix / tail
7253 [[Main Page]]", [[Main Page]]a
7255 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7258 <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>
7262 Link with 3 brackets
7273 Link with 4 brackets
7277 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7282 Piped link with 3 brackets
7284 [[[main page|the main page]]]
7286 <p>[[[main page|the main page]]]
7291 Piped link with extlink-like text
7294 [[Main Page|This is a [bar]]]
7296 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7297 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7300 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7301 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7305 Link with multiple pipes
7307 [[Main Page|The|Main|Page]]
7309 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7313 # Note that parsoid does not munge anchor text; all non-space
7314 # characters are valid in HTML5 ids.
7316 Anchor containing a #. (bug 63430)
7318 [[Main Page#And#Link]]
7320 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7323 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7329 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7331 <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>
7336 Link with space in namespace
7338 [[User talk:Foo bar]]
7340 <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>
7345 MemoryAlpha:AlphaTest
7347 This is an article in the MemoryAlpha namespace
7348 (which shadows the memoryalpha interwiki link).
7352 Namespace takes precedence over interwiki link (bug 51680)
7354 [[MemoryAlpha:AlphaTest]]
7356 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7360 # The previous test doesn't work correctly in html2*, due to not recognizing the
7361 # link as an internal one. This one checks for the correct behavior.
7363 Link to namespace preferred over interwiki with correct rel attribute
7365 parsoid=html2wt,html2html
7367 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7369 [[MemoryAlpha:AlphaTest]]
7373 Piped link to namespace
7375 [[Meta:Disclaimers|The disclaimers]]
7377 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7384 [[Usually caused by a typo (oops}]]
7386 <p>[[Usually caused by a typo (oops}]]
7393 Just a test of an article title containing a percent.
7397 Link containing % (not as a hex sequence)
7401 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7404 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7407 # note that the parsoid HTML is identical to the previous test output,
7408 # so the previous test ensures that the html2wt mode will generate the
7409 # "not as a hex sequence" wikitext.
7411 Link containing % as a single hex sequence interpreted to char
7413 parsoid=wt2wt,wt2html,html2html
7417 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7420 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7424 Link containing % as a double hex sequence interpreted to hex sequence
7428 <p>[[7%2525 Solution]]
7432 # note that parsoid does not munge anchor text; all non-space
7433 # characters are valid in HTML5 anchors.
7435 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7436 Example for such a section: == < ==
7438 [[%23%3c]][[%23%3e]]
7440 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7443 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E" title="Main Page">#></a></p>
7447 Link containing "<#" and ">#" as a hex sequences
7449 [[%3c%23]][[%3e%23]]
7451 <p>[[%3c%23]][[%3e%23]]
7456 Link containing an equals sign
7458 [[Special:BookSources/isbn=4-00-026157-6]]
7460 <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>
7463 <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>
7469 Just a test of an article title containing a tilde.
7472 # note that links containing signatures, like [[Foo~~~~]], are
7473 # massaged by the pre-save transform (PST) and so the tildes are never
7474 # seen by the parser.
7476 Link containing a tilde
7480 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7483 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7487 Link containing double-single-quotes '' (bug 4598)
7489 [[Lista d''e paise d''o munno]]
7491 <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>
7494 <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>
7498 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7500 Some [[Link|pretty ''italics'' and stuff]]!
7502 <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>!
7505 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7509 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7511 ''Some [[Link|pretty ''italics'' and stuff]]!''
7513 <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>
7518 Link with double quotes in title part (literal) and alternate part (interpreted)
7520 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7524 [[''Pentecoste''|Pentecoste]]
7526 [[''Pentecoste''|''Pentecoste'']]
7528 <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>
7529 </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>
7530 </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>
7531 </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>
7534 <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>
7535 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7536 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7537 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7541 Broken image links with HTML captions (bug 39700)
7543 [[File:Nonexistent|<script></script>]]
7544 [[File:Nonexistent|100x100px|<script></script>]]
7545 [[File:Nonexistent|<]]
7546 [[File:Nonexistent|a<i>b</i>c]]
7548 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7549 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7550 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7551 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7554 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script&gt;&lt;/script&gt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7555 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script&gt;&lt;/script&gt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
7556 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;lt;&quot;,&quot;srcContent&quot;:&quot;<&quot;,&quot;dsr&quot;:[107,111,null,null]}\">&lt;</span>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7557 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[134,142,3,4]}\">b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
7563 [[http://www.example.com]]
7565 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7568 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7572 Plain link to URL with link text
7574 [[http://www.example.com Link text]]
7576 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7581 Plain link to protocol-relative URL
7583 [[//www.example.com]]
7585 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7588 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7592 Plain link to protocol-relative URL with link text
7594 [[//www.example.com Link text]]
7596 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7601 Plain link to page with question mark in title
7607 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7608 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7613 # I'm fairly sure the expected result here is wrong.
7614 # We want these to be URL links, not pseudo-pages with URLs for titles....
7615 # However the current output is also pretty screwy.
7618 # I'm changing it to match the current output--it arguably makes more
7619 # sense in the light of the test above. Old expected result was:
7620 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7622 # But I think this test is bordering on "garbage in, garbage out" anyway.
7627 Piped link to URL: [[http://www.example.com|an example URL]]
7629 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7632 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7636 BUG 2: [[page|http://url/]] should link to page, not http://url/
7638 [[Main Page|http://url/]]
7640 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7643 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7646 # Parsoid does not mark self-links, by design.
7648 BUG 337: Escaped self-links should be bold
7652 [[Bug462]] [[Bug462]]
7654 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7657 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7659 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7663 Self-link to section should not be bold
7667 [[Main Page#section]]
7669 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7680 Self-link to numeric title
7686 <p><strong class="selflink">0</strong>
7691 Link to numeric-equivalent title
7697 <p><a href="/wiki/00" title="00">00</a>
7702 <nowiki> inside a link
7704 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7706 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7711 Non-breaking spaces in title
7713 [[ Main Page ]]
7715 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7720 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7726 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7731 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7737 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7742 Internal link with en linktrail: no apostrophes (bug 27473)
7748 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7753 Internal link with ca linktrail with apostrophes (bug 27473)
7759 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7764 Internal link with kaa linktrail with apostrophes (bug 27473)
7770 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7775 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7777 [[User:Foo/Test/63636:Bar|Test]]
7779 <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>
7782 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7786 Purely hash wikilink
7788 title=[[User:test/123]]
7792 <p><a href="#a">b</a>
7795 <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>
7799 1. Interaction of linktrail and template encapsulation
7805 <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>
7809 2. Interaction of linktrail and template encapsulation
7813 {{echo|Some [[Fool]]}}s
7815 <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>
7819 3. Interaction of linktrail and template encapsulation
7823 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7825 <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>
7835 Internal link with is link prefix
7839 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7841 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7852 Internal link with is link trail and link prefix
7856 [[mótmælendatrú|xxx]]ar
7858 mótmælenda[[söfnuður]]
7859 mótmælenda[[söfnuður|söfnuðir]]
7860 mótmælenda[[söfnuður|söfnuðir]]xxx
7862 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7863 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7864 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7865 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7866 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7871 Parsoid link trail escaping
7873 parsoid=html2wt,html2html
7875 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7881 Parsoid link prefix escaping
7884 parsoid=html2wt,html2html
7886 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7888 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7892 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7900 [http://wp.org ''foo'']
7902 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7903 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7904 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7905 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7910 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7914 [[Foo|{{echo|a}} b {{echo|c}}]]
7916 <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>
7920 Link with angle bracket after anchor
7924 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7927 <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>
7931 ### Interwiki links (see maintenance/interwiki.sql)
7935 Inline interwiki link
7937 parsoid=wt2html,wt2wt,html2html
7939 [[MeatBall:SoftSecurity]]
7941 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7944 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7948 Inline interwiki link with empty title (bug 2372)
7950 parsoid=wt2html,wt2wt,html2html
7954 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7957 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7961 Interwiki link encoding conversion (bug 1636)
7963 *[[Wikipedia:ro:Olteniţa]]
7964 *[[Wikipedia:ro:Olteniţa]]
7966 <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>
7967 <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>
7971 <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>
7972 <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>
7977 Interwiki link with fragment (bug 2130)
7979 [[MeatBall:SoftSecurity#foo]]
7981 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7985 # Ideally the wikipedia: prefix here should be proto-relative too
7986 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7987 # define the 'en' prefix, and originally the test used 'wikipedia',
7988 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7991 Different interwiki prefixes mapping to the same URL
7999 [[:wikipedia:Foo|Foo]]
8001 [[wikipedia:en:Foo]]
8003 [[:wikipedia:en:Foo]]
8007 <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>
8009 <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>
8011 <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>
8013 <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>
8015 <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>
8017 <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>
8019 <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>
8023 Interwiki links that cannot be represented in wiki syntax
8026 [[meatball:ok#foo|ok with fragment]]
8027 [[meatball:ok_as_well?|ok ending with ? mark]]
8028 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8029 [http://de.wikipedia.org/wiki/#foo is just fragment]
8032 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8033 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8034 <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>
8035 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8036 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8039 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8040 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8041 <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>
8042 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8043 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8047 Interwiki links: trail
8049 [[wikipedia:Foo|Ba]]r
8051 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8054 <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>
8058 Local interwiki link
8060 parsoid=wt2html,wt2wt,html2html
8062 [[local:Template:Foo]]
8064 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8067 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8070 # Parsoid does not mark self-links, by design.
8072 Local interwiki link: self-link to current page
8075 parsoid=wt2html,wt2wt,html2html
8079 <p><strong class="selflink">local:Main Page</strong>
8082 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8086 Local interwiki link: prefix only (bug 64167)
8088 parsoid=wt2html,wt2wt,html2html
8092 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8095 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8099 Local interwiki link: with additional interwiki prefix (bug 61357)
8101 parsoid=wt2html,wt2wt,html2html
8103 [[local:meatball:Hello]]
8105 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8108 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8112 Multiple local interwiki link prefixes
8114 [[local:local:local:local:mi:local:Foo]]
8116 parsoid=wt2html,wt2wt,html2html
8118 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8121 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8125 ### Interlanguage links
8126 ### Language links (so that searching for '### language' matches..)
8132 parsoid=wt2html,wt2wt,html2html
8140 <p>Blah blah blah</p>
8141 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8145 Interlanguage link with spacing
8147 parsoid=wt2html,wt2wt,html2html
8155 <p>Blah blah blah</p>
8156 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8160 Double interlanguage link
8162 parsoid=wt2html,wt2wt,html2html
8171 <p>Blah blah blah</p>
8172 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8173 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8177 Interlanguage link variations
8179 parsoid=wt2html,wt2wt,html2html
8189 <p>Blah blah blah</p>
8190 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8191 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8192 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8196 Space and question mark encoding in interlanguage links (T95473)
8198 parsoid=wt2html,wt2wt,html2html
8206 <p>Blah blah blah</p>
8207 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8211 Interlanguage link, with prefix links
8221 <p>Blah blah blah</p>
8222 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8226 Double interlanguage link, with prefix links (bug 8897)
8237 <p>Blah blah blah</p>
8238 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8239 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8243 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8251 <p>Blah blah blah</p>
8252 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8256 Parsoid-specific test: Wikilinks with should RT properly
8262 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8267 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8271 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8272 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8274 He&nbsp;llo [[Foo|He&nbsp;llo]]
8276 He&nbsp;llo [[He&nbsp;llo]]
8280 Parsoid: handle constructor well
8286 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8287 </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>
8290 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8292 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8301 # Note that `ko` isn't a known interlanguage prefix
8303 Parsoid: recognize interlanguage links without a target page
8313 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8315 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8318 # Note that `ko` isn't a known interwiki prefix
8320 Parsoid: recognize interwiki links without a target page
8322 parsoid=wt2html,wt2wt,html2html
8328 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8329 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8332 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8333 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8337 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8341 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8344 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8348 Interlanguage link with preceding local interwiki link (bug 68085)
8350 parsoid=wt2html,wt2wt,html2html
8353 [[local:es:Spanish]]
8356 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8360 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8364 Looks like an interlanguage link, but is actually a local interwiki
8366 parsoid=wt2html,wt2wt,html2html
8372 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8376 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8380 ### Redirects, Parsoid-only
8384 1. Simple redirect to page
8386 #REDIRECT [[Main Page]]
8388 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8392 2. Other redirect variants
8394 #REDIRECT [[Main_Page]]
8396 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8399 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8400 # This tests the Parsoid bail-out code.
8402 3. Other redirect variants
8404 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8406 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8410 4. Redirect to a templated destination
8412 #REDIRECT [[{{echo|Foo}}bar]]
8414 <link typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]],&quot;dsr&quot;:[12,24,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;Foo&quot;}},&quot;i&quot;:0}}]}\">Foo</span>bar"}]]}'/>
8420 parsoid=wt2html,wt2wt
8425 <li>REDIRECT [[]]</li></ol>
8429 Optional colon in #REDIRECT
8431 # the colon is archaic syntax. we support it for wt2html, but we
8432 # don't care that it roundtrips back to the modern syntax.
8433 parsoid=wt2html,html2html
8435 #REDIRECT:[[Main Page]]
8437 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8441 Whitespace in #REDIRECT with optional colon
8443 # the colon and gratuitous whitespace is archaic syntax. we support
8444 # it for wt2html, but we don't care that it roundtrips back to the
8445 # modern syntax (without extra whitespace)
8446 parsoid=wt2html,html2html
8453 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8457 Piped link in #REDIRECT
8459 # content after piped link is ignored. we support this syntax,
8460 # but don't care that the piped link is lost when we roundtrip this.
8463 #REDIRECT [[Main Page|bar]]
8465 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8469 Redirect to category (T104502)
8471 parsoid=wt2html,wt2wt
8473 #REDIRECT [[Category:Foo]]
8475 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8479 Redirect to category with URL encoding (T104502)
8483 #REDIRECT [[Category%3AFoo]]
8485 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8489 Redirect to category page
8491 #REDIRECT [[:Category:Foo]]
8493 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8497 Redirect to image page (1)
8499 #REDIRECT [[File:Wiki.png]]
8501 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8505 Redirect to image page (2)
8507 #REDIRECT [[Image:Wiki.png]]
8509 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8512 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8513 # Next test confirms this.
8515 Redirect to language (1) (T104918)
8517 parsoid=wt2html,wt2wt,html2html
8519 #REDIRECT [[en:File:Wiki.png]]
8521 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8525 Redirect to language (2) (T104918)
8527 #REDIRECT [[:en:File:Wiki.png]]
8529 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8533 Redirect to interwiki (T104918)
8535 #REDIRECT [[meatball:File:Wiki.png]]
8537 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8541 Non-English #REDIRECT
8545 #TILVÍSUN [[Main Page]]
8547 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8551 Redirect syntax under text isn't considered a redirect
8554 #redirect [[Main Page]]
8557 <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>
8560 # FIXME: Should hoist the redirect to the top of the page and ensure there
8567 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8587 Broken br tag sanitization
8595 # TODO: Fix html2html mode (bug 51055)!
8597 Parsoid: Broken br tag recognition
8610 Incorrecly removing closing slashes from correctly formed XHTML
8612 <br style="clear:both;" />
8614 <p><br style="clear:both;" />
8619 Failing to transform badly formed HTML into correct XHTML
8621 <br style="clear: left;">
8622 <br style="clear: right;">
8623 <br style="clear: both;">
8625 <p><br style="clear: left;" />
8626 <br style="clear: right;" />
8627 <br style="clear: both;" />
8631 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8632 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8634 Handling html with a div self-closing tag
8643 <p><div title />
8647 <p><div title=bar />
8648 <div title=bar/>
8650 <div title="bar/"></div>
8654 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8655 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8656 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8657 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8658 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8659 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8663 Handling html with a br self-closing tag
8690 Horizontal ruler (should it add that extra space?)
8705 Horizontal ruler -- 4+ dashes render hr
8714 Horizontal ruler -- eats additional dashes on the same line
8723 Horizontal ruler -- does not collapse dashes on consecutive lines
8734 Horizontal ruler -- <4 dashes render as plain text
8743 Horizontal ruler -- Supports content following dashes on same line
8755 ### Block-level elements
8764 <ul><li>Common list</li>
8766 <li>item 3</li></ul>
8777 <ol><li>Numbered list</li>
8779 <li> item 3</li></ol>
8793 ***#Number on level 4
8795 **#Number on level 3
8796 **#Number on level 3
8800 #** Level 3, but ordered
8803 <ol><li> with numbers</li></ol>
8804 <ul><li> and bullets</li></ul>
8805 <ol><li> and numbers</li></ol></li>
8807 <ul><li>bullet level 2
8808 <ul><li>bullet level 3
8809 <ol><li>Number on level 4</li></ol></li></ul></li>
8811 <ol><li>Number on level 3</li>
8812 <li>Number on level 3</li></ol></li></ul>
8813 <ol><li>number level 2</li></ol></li>
8815 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8816 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8821 1. Nested mixed wikitext and html list
8824 * <ul><li>ho</li></ul>
8829 <li> <ul><li>ho</li></ul></li>
8831 <ul><li> ho</li></ul></li></ul>
8835 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
8837 <ul><li> ho</li></ul></li></ul>
8841 2. Nested mixed wikitext and html list (incompatible)
8844 : {{echo|<li>ho</li>}}
8847 <dd> <li>ho</li></dd></dl>
8851 <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>
8861 <ul><li>bar</li></ul></li></ul>
8871 <ul><li><ul><li>foo</li></ul></li>
8877 Nested lists 3 (first element empty)
8883 <ul><li>bar</li></ul></li></ul>
8888 Nested lists 4 (first element empty)
8893 <ul><li><ul><li></li></ul></li>
8899 Nested lists 5 (both elements empty)
8904 <ul><li><ul><li></li></ul></li>
8910 Nested lists 6 (both elements empty)
8916 <ul><li></li></ul></li></ul>
8921 Nested lists 7 (skip initial nesting levels)
8925 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8930 Nested lists 8 (multiple nesting transitions)
8938 <ul><li><ul><li> bar</li></ul></li>
8939 <li> baz</li></ul></li>
8945 Nested lists 9 (extension interaction)
8951 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8955 1. Lists with start-of-line-transparent tokens before bullets: Comments
8968 2. Lists with start-of-line-transparent tokens before bullets: Template close
8973 <ul><li>foo bar</li>
8979 List items are not parsed correctly following a <pre> block (bug 785)
8985 <ul><li> <pre>foo</pre></li>
8986 <li> <pre>bar</pre></li>
8990 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8991 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8996 List items from template
9007 * notSOL{{inner list}}
9010 <ul><li> item 1</li>
9011 <li> item 2</li></ul>
9012 <ul><li> item 0</li>
9014 <li> item 2</li></ul>
9015 <ul><li> item 0</li>
9018 <li> item 2</li></ul>
9023 List interrupted by empty line or heading
9031 <ul><li> foo</li></ul>
9032 <ul><li><ul><li> bar</li></ul></li></ul>
9033 <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>
9034 <ul><li> Another list item</li></ul>
9039 Multiple list tags generated by templates
9060 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9063 <!--This line will NOT split the list-->
9065 <!--This line will NOT split the list either-->
9067 <!--foo--> <!----> <!--This line NOT split the list either-->
9078 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9081 <!--This line will NOT split the list-->
9083 <!--This line will NOT split the list either-->
9085 <!--foo--> <!----> <!--This line NOT split the list
9098 (The PHP parser relies on Tidy for the hack)
9100 parsoid=wt2html,wt2wt
9104 * {{echo|<li>templated li-hack}}
9105 * <!--foo--> <li> unsupported li-hack with preceding comments
9108 <li><li>not a li-hack
9115 <li>templated li-hack</li>
9116 <li>unsupported li-hack with preceding comments</li>
9119 <li>not a li-hack</li>
9124 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9151 Parsoid: Test of whitespace serialization with Templated bullets
9158 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9162 # ------------------------------------------------------------------------
9163 # The next set of tests are about Parsoid's ability to handle badly nested
9164 # tags (parse, minimize scope of fixup, and roundtrip back)
9165 # ------------------------------------------------------------------------
9168 Unbalanced closing block tags break a list
9169 (php parser relies on Tidy to fix up)
9187 # Parsoid fails this test, but it might be tricky to support properly.
9190 Unbalanced closing non-block tags don't break a list
9191 (php parser relies on Tidy to fix up)
9198 <li><span>a</span></li>
9199 <li><span>b</span></li>
9213 Unclosed formatting tags that straddle lists are closed and reopened
9214 (php parser relies on Tidy to fix up)
9216 parsoid=wt2html,wt2wt,html2html
9226 <ol><li> <s> a</s></li>
9227 <li><s> b </s></li></ol>
9232 1. List embedded in a formatting tag
9239 <li><small>foo</small></li>
9249 ## Ugly Parsoid output here
9250 ## Not sure what the right output is.
9252 2. List embedded in a formatting tag
9259 <li><small>a</small></li>
9260 <li><small>b</small></li>
9267 <li><small>b</small></li>
9271 # Ugly Parsoid and PHP parser output here
9272 # Not sure if we want to make this a test!
9275 ## 3. Unclosed formatting tags in list elements
9281 ## <li><small>a</small></li>
9282 ## <li><small><small>b</small></small></li>
9286 ## <li><small>a</small></li>
9288 ## <li><small>b</small></li>
9292 # This is a bug in the PHP parser + tidy combination.
9293 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9294 # and then fostered out of the table by tidy.)
9295 # We believe the Parsoid output to be correct.
9297 Table with missing opening <tr> tag
9299 parsoid=wt2html,wt2wt
9317 # Note that the current date is hard-coded as
9318 # 1970-01-01T00:02:03Z (a Thursday)
9319 # when running parser tests. The timezone is also fixed to GMT, so
9320 # local date will be identical to current date.
9323 Magic Word: {{CURRENTDAY}}
9332 Magic Word: {{CURRENTDAY2}}
9341 Magic Word: {{CURRENTDAYNAME}}
9350 Magic Word: {{CURRENTDOW}}
9359 Magic Word: {{CURRENTMONTH}}
9368 Magic Word: {{CURRENTMONTH1}}
9377 Magic Word: {{CURRENTMONTHABBREV}}
9379 {{CURRENTMONTHABBREV}}
9386 Magic Word: {{CURRENTMONTHNAME}}
9388 {{CURRENTMONTHNAME}}
9395 Magic Word: {{CURRENTMONTHNAMEGEN}}
9397 {{CURRENTMONTHNAMEGEN}}
9404 Magic Word: {{CURRENTTIME}}
9413 Magic Word: {{CURRENTHOUR}}
9422 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9431 Magic Word: {{CURRENTYEAR}}
9440 Magic Word: {{CURRENTTIMESTAMP}}
9442 {{CURRENTTIMESTAMP}}
9449 Magic Words LOCAL (UTC)
9453 * {{LOCALMONTHNAME}}
9454 * {{LOCALMONTHNAMEGEN}}
9455 * {{LOCALMONTHABBREV}}
9464 * {{LOCALTIMESTAMP}}
9479 <li> 19700101000203</li></ul>
9484 Magic Word: {{FULLPAGENAME}}
9486 title=[[User:Ævar Arnfjörð Bjarmason]]
9490 <p>User:Ævar Arnfjörð Bjarmason
9495 Magic Word: {{FULLPAGENAMEE}}
9497 title=[[User:Ævar Arnfjörð Bjarmason]]
9501 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9506 Magic Word: {{TALKSPACE}}
9508 title=[[User:Ævar Arnfjörð Bjarmason]]
9517 Magic Word: {{TALKSPACE}}, same namespace
9519 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9528 Magic Word: {{TALKSPACE}}, main namespace
9530 title=[[Parser Test]]
9539 Magic Word: {{TALKSPACEE}}
9541 title=[[User:Ævar Arnfjörð Bjarmason]]
9550 Magic Word: {{SUBJECTSPACE}}
9552 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9561 Magic Word: {{SUBJECTSPACE}}, same namespace
9563 title=[[User:Ævar Arnfjörð Bjarmason]]
9572 Magic Word: {{SUBJECTSPACE}}, main namespace
9574 title=[[Parser Test]]
9582 Magic Word: {{SUBJECTSPACEE}}
9584 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9593 Magic Word: {{NAMESPACE}}
9595 title=[[User:Ævar Arnfjörð Bjarmason]]
9604 Magic Word: {{NAMESPACEE}}
9606 title=[[User:Ævar Arnfjörð Bjarmason]]
9615 Magic Word: {{NAMESPACENUMBER}}
9617 title=[[User:Ævar Arnfjörð Bjarmason]]
9626 Magic Word: {{SUBPAGENAME}}
9628 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9637 Magic Word: {{SUBPAGENAMEE}}
9639 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9648 Magic Word: {{ROOTPAGENAME}}
9650 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9654 <p>Ævar Arnfjörð Bjarmason
9659 Magic Word: {{ROOTPAGENAMEE}}
9661 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9665 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9670 Magic Word: {{BASEPAGENAME}}
9672 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9676 <p>Ævar Arnfjörð Bjarmason
9681 Magic Word: {{BASEPAGENAMEE}}
9683 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9687 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9692 Magic Word: {{TALKPAGENAME}}
9694 title=[[User:Ævar Arnfjörð Bjarmason]]
9698 <p>User talk:Ævar Arnfjörð Bjarmason
9703 Magic Word: {{TALKPAGENAMEE}}
9705 title=[[User:Ævar Arnfjörð Bjarmason]]
9709 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9714 Magic Word: {{SUBJECTPAGENAME}}
9716 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9720 <p>User:Ævar Arnfjörð Bjarmason
9725 Magic Word: {{SUBJECTPAGENAMEE}}
9727 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9729 {{SUBJECTPAGENAMEE}}
9731 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9736 Magic Word: {{NUMBEROFFILES}}
9745 Magic Word: {{PAGENAME}}
9747 title=[[User:Ævar Arnfjörð Bjarmason]]
9751 <p>Ævar Arnfjörð Bjarmason
9756 Magic Word: {{PAGENAME}} with metacharacters
9758 title=[['foo & bar = baz']]
9762 <p><i>'foo & bar = baz'</i>
9765 <p><i>'foo & bar = baz'</i></p>
9769 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9771 title=[[*RFC 1234 http://example.com/]]
9775 <p>*RFC 1234 http://example.com/
9778 <p>*RFC 1234 http://example.com/</p>
9782 Magic Word: {{PAGENAMEE}}
9784 title=[[User:Ævar Arnfjörð Bjarmason]]
9788 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9793 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9795 title=[[*RFC 1234 http://example.com/]]
9799 <p>*RFC_1234_http://example.com/
9802 <p>*RFC_1234_http://example.com/</p>
9806 Magic Word: {{REVISIONID}}
9815 Magic Word: {{SCRIPTPATH}}
9823 Magic Word: {{STYLEPATH}}
9832 Magic Word: {{SERVER}}
9836 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9841 Magic Word: {{SERVERNAME}}
9850 Magic Word: {{SITENAME}}
9859 Case-sensitive magic words, when cased differently, should just be template transclusions
9866 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9867 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9868 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9869 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9874 Case-insensitive magic words should still work with weird casing.
9884 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9888 # From plwiki:PLOS_ONE
9890 Parsoid: Page property magic word with magic word contents
9892 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9894 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid=\"{&quot;dsr&quot;:[15,31,2,2]}\"><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[17,29,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;PAGENAME&quot;,&quot;function&quot;:&quot;pagename&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">Main Page</span></i>"}]]}'/>
9898 Parsoid: Template-generated DISPLAYTITLE
9900 {{{{echo|DISPLAYTITLE}}:Foo}}
9902 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,29,null,null],"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
9906 Namespace 1 {{ns:1}}
9915 Namespace 1 {{ns:01}}
9924 Namespace 0 {{ns:0}} (bug 4783)
9932 Namespace 0 {{ns:00}} (bug 4783)
9940 Namespace -1 {{ns:-1}}
9949 Namespace User {{ns:User}}
9958 Namespace User talk {{ns:User_talk}}
9967 Namespace User talk {{ns:uSeR tAlK}}
9976 Namespace File {{ns:File}}
9985 Namespace File {{ns:Image}}
9994 Namespace (lang=de) Benutzer {{ns:User}}
10005 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10011 <p>Benutzer Diskussion
10019 {{urlencode:hi world?!}}
10020 {{urlencode:hi world?!|WIKI}}
10021 {{urlencode:hi world?!|PATH}}
10022 {{urlencode:hi world?!|QUERY}}
10032 Magic Word: prioritize type info over data-parsoid
10036 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10042 Magic Word: serialize on separate line (parsoid)
10044 parsoid=wt2wt,html2wt
10050 foo<meta property="mw:PageProp/notoc"/>bar
10054 Magic Word: rt non-english wikis
10061 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10065 __proto__ is treated as normal wikitext (T105997)
10077 Magic links: internal link to RFC (bug 479)
10081 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10084 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10088 Magic links: RFC (bug 479)
10092 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10095 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10099 Magic links: RFC (bug 65278)
10101 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10103 <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.
10106 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10110 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10112 RFC      822
10116 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10121 <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>
10127 Magic links: ISBN (bug 1937)
10131 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10134 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10138 Magic links: ISBN (bug 65278)
10140 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10142 <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.
10145 <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>
10149 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10151 ISBN      978 0 316 09811 3
10157 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10164 <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>
10172 Magic links: PMID incorrectly converts space to underscore
10176 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10179 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10183 Magic links: PMID (bug 65278)
10185 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10187 <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.
10190 <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>
10194 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10196 PMID      1234
10200 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10205 <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>
10210 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10211 # since these are ExtLinkText, not MagicLinkText
10213 Magic links: use appropriate serialization for "almost" magic links.
10215 X[[Special:BookSources/0978739256|foo]]
10217 X[//tools.ietf.org/html/rfc1234 foo]
10219 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10220 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10223 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10224 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10232 Nonexistent template
10234 {{thistemplatedoesnotexist}}
10236 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10241 Template with invalid target containing tags
10243 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10245 <p>{{a<b>b</b>|foo|a=b|a = b}}
10250 Template with invalid target containing unclosed tag
10252 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10254 <p>{{a<b>|foo|a=b|a = b}}</b>
10259 Template with invalid target containing wikilink
10263 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10266 <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>
10270 Template with just whitespace in it, bug #68421
10274 <p><span typeof="mw:Transclusion mw:Nowiki" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</span></p>
10280 This is a test template
10288 <p>This is a test template
10293 Template with explicit namespace
10297 <p>This is a test template
10305 This is a test template with parameter {{{param}}}
10311 {{paramtest|param=foo}}
10313 <p>This is a test template with parameter foo
10318 Template:paramtestnum
10320 [[{{{1}}}|{{{2}}}]]
10324 Template unnamed parameter
10326 {{paramtestnum|Main Page|the main page}}
10328 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10333 Template:templatesimple
10339 Template:templateredirect
10341 #redirect [[Template:templatesimple]]
10345 Template:templateasargtestnum
10351 Template:templateasargtest
10353 {{template{{{templ}}}}}
10357 Template:templateasargtest2
10363 Template with template name as unnamed argument
10365 {{templateasargtestnum|templatesimple}}
10372 Template with template name as argument
10374 {{templateasargtest|templ=simple}}
10381 Template with template name as argument (2)
10383 {{templateasargtest2|templ=templatesimple}}
10390 Template:templateasargtestdefault
10392 {{{{{templ|templatesimple}}}}}
10402 Template with default value
10404 {{templateasargtestdefault}}
10411 Template with default value (value set)
10413 {{templateasargtestdefault|templ=templa}}
10422 {{templateredirect}}
10427 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10431 Template with argument in separate line
10433 {{ templateasargtest |
10441 Template with complex template as argument
10444 param ={{ templateasargtest |
10445 templ = simple }}}}
10447 <p>This is a test template with parameter (test)
10452 Template with thumb image (with link in description)
10454 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10456 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>
10459 <p>This is a test template with parameter</p>
10460 <div class="thumb tright">
10461 <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>
10462 <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>
10466 <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>
10470 Template:complextemplate
10472 {{{1}}} {{paramtest|
10473 param ={{{param}}}}}
10477 Template with complex arguments
10480 param ={{ templateasargtest |
10481 templ = simple }}|[[Template:complextemplate|link]]}}
10483 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10488 BUG 553: link with two variables in a piped link
10491 |[[{{{1}}}|{{{2}}}]]
10496 <td>[[{{{1}}}|{{{2}}}]]
10501 <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>
10506 Abort table cell attribute parsing on wikilink
10509 | testing [[one|two]] | three || four
10510 | testing one two | three || four
10515 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10524 <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>
10525 <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></tr>
10530 Don't abort table cell attribute parsing if wikilink is found in template arg
10533 | Test {{#tag:ref|One two "[[three]]" four}}
10537 <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>
10542 Magic variable as template parameter
10544 {{paramtest|param={{SITENAME}}}}
10546 <p>This is a test template with parameter MediaWiki
10553 [[{{{param}}}|link]]
10557 Template parameter as link source
10559 {{linktest|param=Main Page}}
10561 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10566 Template:paramtest2
10568 including another template, {{paramtest|param={{{arg}}}}}
10572 Template passing argument to another template
10574 {{paramtest2|arg='hmm'}}
10576 <p>including another template, This is a test template with parameter 'hmm'
10587 Template as link source
10591 [[{{linktest2}}|Main Page]]
10593 [[{{linktest2}}]]Page
10595 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10596 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10597 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10615 Template infinite loop
10619 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10624 Template from main namespace
10643 BUG 529: Template with table, not included at beginning of line
10662 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10682 BUG 41: Template parameters shown as broken links
10691 Template with targets containing wikilinks
10695 {{[[{{echo|foo}}]]}}
10697 {{{{echo|[[foo}}]]}}
10699 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10700 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10712 Templates: Double quotes as template target
10719 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10723 ## This test is about making sure Parsoid's data-mw is well formed in the
10724 ## face of multiple templates with intersecting and overlapping ranges. The
10725 ## wikitext itself is wretched.
10727 Templates with intersecting and overlapping ranges
10752 <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":""}]]}'>
10754 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
10756 <tbody><tr><td>hi</td></tr>
10761 Template:MSGNW test
10763 ''None'' of '''this''' should be
10765 but rather passed unmodified
10773 # hmm, fix this or just deprecate msgnw and document its behavior?
10777 {{msgnw:MSGNW test}}
10779 <p>''None'' of '''this''' should be
10781  but rather passed unmodified
10782 {{test}}
10786 <!-- comment -->
10793 {{int:youhavenewmessages|lots of money|not!}}
10795 <p>You have lots of money (not!).
10800 int keyword - non-existing message
10811 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10815 <includeonly> and <noinclude> being included
10826 <onlyinclude>Foo</onlyinclude>bar
10830 <onlyinclude> being included
10842 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10846 <onlyinclude> and <includeonly> being included
10855 <includeonly> and <noinclude> on a page
10857 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10864 Un-closed <noinclude>
10871 <onlyinclude> on a page
10873 <onlyinclude>Foo</onlyinclude>bar
10880 Un-closed <onlyinclude>
10887 Self-closed noinclude, includeonly, onlyinclude tags
10898 Unbalanced includeonly and noinclude tags
10902 |b</noinclude></noinclude>
10903 |c</noinclude></includeonly>
10904 |d</includeonly></includeonly>
10913 <td>c</includeonly>
10915 <td>d</includeonly></includeonly>
10921 Template:Includeonly section
10924 ==Includeonly section==
10930 Bug 6563: Edit link generation for section shown by <includeonly>
10932 {{includeonly section}}
10934 <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>
10935 <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>
10939 # Uses same input as the contents of [[Template:Includeonly section]]
10941 Bug 6563: Section extraction for section shown by <includeonly>
10946 ==Includeonly section==
10954 Bug 6563: Edit link generation for section suppressed by <includeonly>
10957 ==Includeonly section==
10961 <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>
10966 Bug 6563: Section extraction for section suppressed by <includeonly>
10971 ==Includeonly section==
10979 Un-closed <includeonly>
10984 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
10987 ## We used to, but no longer wt2wt this test since the default serializer
10988 ## will normalize the include directives to serialize on their own line.
10989 ## Selser will take care of preserving formatting in scenarios where they
10990 ## intermingled with other wikitext.
10992 Includes and comments at SOL
10994 parsoid=wt2html,html2html
10996 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11000 </noinclude>* stuff
11003 <includeonly>can have stuff</includeonly>=== here ===
11006 <h2><span class="mw-headline" id="hu">hu</span></h2>
11009 <ul><li> stuff</li>
11010 <li> here</li></ul>
11011 <h3><span class="mw-headline" id="here">here</span></h3>
11014 <!-- 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>
11016 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11018 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11019 <li> here</li></ul>
11021 <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>
11025 # TODO: test with DOM fragment reuse!
11027 Parsoid: DOM fragment reuse
11029 parsoid=wt2wt,wt2html
11031 a{{echo|b<table></table>c}}d
11043 <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>
11045 <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">
11046 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11047 </span><p about="#mwt2">cd</p>
11049 <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">
11051 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11053 </span><p about="#mwt3">b</p>
11057 Parsoid: Merge double tds (T52603)
11062 |{{echo|{{!}} foo}}
11066 <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>
11071 Parsoid: Merge double tds in nested transclusion content (T52603)
11077 |{{echo|{{!}} foo}}
11081 <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}}]}'>
11083 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11089 ### <includeonly> and <noinclude> in attributes
11092 0. includeonly around the entire attribute
11094 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11096 <p><span id="v2">bar</span>
11101 1. includeonly in html attr key
11103 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11105 <p><span id="foo">bar</span>
11110 2. includeonly in html attr value
11112 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11113 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11115 <p><span id="v1">bar</span>
11116 <span id="v1">bar</span>
11121 3. includeonly in part of an attr value
11123 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11125 <p><span style="color:red;">bar</span>
11130 4. includeonly in table attributes
11154 ### Token Stream Patcher tests
11156 ### These tests won't always pass wt2wt and other modes because
11157 ### on serialization, the table will be output on a new line.
11158 ### For now, we are blacklisting them, and using this to test selser.
11162 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11164 parsoid=wt2html,wt2wt
11166 {{echo|}}{| width = '100%'
11170 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11171 <tbody><tr><td>foo</td></tr>
11175 ## We used to, but no longer wt2wt this test since the default serializer
11176 ## will normalize the include directives to serialize on their own line.
11177 ## Selser will take care of preserving formatting in scenarios where they
11178 ## intermingled with other wikitext.
11180 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11184 <includeonly>a</includeonly>{| {{{b}}}
11188 <meta typeof="mw:Includes/IncludeOnly"/><meta typeof="mw:Includes/IncludeOnly/End"/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid=\"{&quot;dsr&quot;:[31,38,null,null],&quot;src&quot;:&quot;{{{b}}}&quot;}\">{{{b}}}</span>"},{"html":""}]]}' data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}'>
11189 <tbody><tr><td>c</td></tr>
11195 ### Testing parsing of templates where a template arg
11196 ### has the same name as the template itself.
11202 {{{quote|{{{1}}}}}}
11206 Templates: Template Name/Arg clash: 1. Use of positional param
11215 Templates: Template Name/Arg clash: 2. Use of named param
11217 {{quote|quote=foo}}
11224 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11233 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11237 Templates: 1. Simple use
11246 Templates: 2. Inside a block tag
11248 <div>{{echo|Foo}}</div>
11249 <blockquote>{{echo|Foo}}</blockquote>
11252 <blockquote>Foo</blockquote>
11262 Templates: P-wrapping: 1a. Templates on consecutive lines
11273 Templates: P-wrapping: 1b. Templates on consecutive lines
11287 Templates: P-wrapping: 1c. Templates on consecutive lines
11290 {{echo|bar}} <div>baz</div>
11303 Templates: P-wrapping: 1d. Template preceded by comment-only line
11312 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11316 Templates: Inline Text: 1. Multiple template uses
11318 {{echo|Foo}}bar{{echo|baz}}
11325 Templates: Inline Text: 2. Back-to-back template uses
11327 {{echo|Foo}}{{echo|bar}}
11334 Templates: Block Tags: 1. Multiple template uses
11336 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11338 <div>Foo</div><div>bar</div><div>baz</div>
11343 Templates: Block Tags: 2. Back-to-back template uses
11345 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11347 <div>Foo</div><div>bar</div>
11351 # This is an edge case relating to paragraph wrapping.
11353 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11358 <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
11363 Templates: Links: 1. Simple example
11365 {{echo|[[Foo|bar]]}}
11367 <p><a href="/wiki/Foo" title="Foo">bar</a>
11372 Templates: Links: 2. Generation of link href
11374 [[{{echo|Foo}}|bar]]
11376 <p><a href="/wiki/Foo" title="Foo">bar</a>
11381 Templates: Links: 3. Generation of part of a link href
11383 [[Fo{{echo|o}}|bar]]
11385 [[Foo{{echo|bar}}]]
11387 [[Foo{{echo|bar}}baz]]
11389 [[Foo{{echo|bar}}|bar]]
11391 [[:Foo{{echo|bar}}]]
11393 [[:Foo{{echo|bar}}|bar]]
11395 <p><a href="/wiki/Foo" title="Foo">bar</a>
11396 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11397 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11398 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11399 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11400 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11405 Templates: Links: 4. Multiple templates generating link href
11407 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11409 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11414 Templates: Links: 5. Generation of link text
11416 [[Foo|{{echo|bar}}]]
11418 <p><a href="/wiki/Foo" title="Foo">bar</a>
11423 Templates: Links: 5. Nested templates (only outermost template should be marked)
11425 {{echo|[[{{echo|Foo}}|bar]]}}
11427 <p><a href="/wiki/Foo" title="Foo">bar</a>
11432 Templates: HTML Tag: 1. Generation of HTML attr. key
11434 <div {{echo|style}}="color:red;">foo</div>
11436 <div style="color:red;">foo</div>
11441 Templates: HTML Tag: 2. Generation of HTML attr. value
11443 <div style={{echo|'color:red;'}}>foo</div>
11445 <div style="color:red;">foo</div>
11450 Templates: HTML Tag: 3. Generation of HTML attr key and value
11452 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11454 <div style="color:red;">foo</div>
11459 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11461 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11463 <div title="This is a long title with just one piece templated">foo</div>
11468 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11470 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11472 <div title="This is a long title with just one piece templated">foo</div>
11477 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11479 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11481 <div title="This is a long title with just one piece templated">foo</div>
11485 # SSS FIXME: While it is great we added support for all this,
11486 # do we want to make this part of the spec? Maybe we want to
11487 # deprecate this kind of usage in the future?
11489 Templates: HTML Tag: 7. Generation of partial attribute key string
11491 <div st{{echo|yle}}="color:red;">foo</div>
11493 <div style="color:red;">foo</div>
11498 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11500 <div {{echo|1=id="v1"}}>bar</div>
11502 <div id="v1">bar</div>
11507 Templates: HTML Tag: 9. Multiple template-generated attributes
11509 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11511 <div id="v1" title="foo">bar</div>
11516 Templates: Support for templates generating attributes and content
11518 {| {{mixed_attr_content_template}}
11523 <table style="color:red;" title="T48811">
11533 <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|}"]}'>
11542 1. Entities and nowikis inside templated attributes should be handled correctly
11544 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11546 <div style="background:#f9f9f9;">foo</div>
11549 <div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]],&quot;dsr&quot;:[5,49,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;style{{=}}\\&quot;background:&amp;#35;f9f9f9;\\&quot;&quot;}},&quot;i&quot;:0}}]}\">style</span><span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=</span><span about=\"#mwt1\" data-parsoid=\"{}\">\"background:</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;#35;&quot;,&quot;srcContent&quot;:&quot;#&quot;}\">#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
11553 2. Entities and nowikis inside templated attributes should be handled correctly
11556 |{{table_attribs_3}}
11561 <td style="background:#f9f9f9;">Foo
11566 <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>
11571 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11574 |{{table_attribs_3}}
11579 <td style="background:#f9f9f9;">Foo
11583 <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}}]}'>
11584 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11590 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11593 | {{table_attribs_6}} hi
11598 <td style="background: red;"> hi
11603 <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>
11608 Templates: HTML Tables: 1. Generating start of a HTML table
11610 {{echo|<table><tr><td>foo</td>}}</tr></table>
11612 <table><tr><td>foo</td></tr></table>
11617 Templates: HTML Tables: 2a. Generating middle of a HTML table
11619 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11621 <table><tr><td>foo</td></tr></table>
11626 Templates: HTML Tables: 2b. Generating middle of a HTML table
11628 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11630 <table><tr><td>foo</td></tr></table>
11635 Templates: HTML Tables: 3. Generating end of a HTML table
11637 <table><tr>{{echo|<td>foo</td></tr></table>}}
11639 <table><tr><td>foo</td></tr></table>
11644 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11646 {{echo|<table>}}<tr><td>foo</td></tr></table>
11648 <table><tr><td>foo</td></tr></table>
11653 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11655 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11657 <table><tr><td>foo</td></tr></table>
11662 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11664 <table><tr>{{echo|<td>}}foo</td></tr></table>
11666 <table><tr><td>foo</td></tr></table>
11671 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11673 <table><tr><td>foo{{echo|</td>}}</tr></table>
11675 <table><tr><td>foo</td></tr></table>
11680 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11682 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11684 <table><tr><td>foo</td></tr></table>
11689 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11691 <table><tr><td>foo</td></tr>{{echo|</table>}}
11693 <table><tr><td>foo</td></tr></table>
11698 Templates: HTML Tables: 5. Proper fostering of categories from inside
11700 parsoid=wt2html,wt2wt
11702 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11703 <!--Two categories (Bug 50330)-->
11704 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11706 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11707 <!--Two categories (Bug 50330)-->
11708 <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>
11712 Templates: Wiki Tables: 1a. Fostering of entire template content
11720 <tr><td></td></tr></table>
11732 Templates: Wiki Tables: 1b. Fostering of entire template content
11745 <tr><td></td></tr></table>
11759 Templates: Wiki Tables: 2. Fostering of partial template content
11769 <tr><td></td></tr></table>
11782 Templates: Wiki Tables: 3. td-content via multiple templates
11785 {{echo|{{pipe}}a}}{{echo|b}}
11796 Templates: Wiki Tables: 4. Templated tags, no content
11802 <tr><td></td></tr></table>
11807 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11821 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11834 ## This test case is very specific to Parsoid's internals
11835 ## and is hence only tested for Parsoid's code. Parsoid uses
11836 ## a <meta> marker tag for <ref> tags and they are expanded
11837 ## much later. We are verifying that this <meta> tag usage
11838 ## doesn't prevent foster parenting.
11840 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11842 {{PartialTable}}<ref>foo</ref>
11847 <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">
11851 <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>
11855 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11865 <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{{!}}}"]}'>
11866 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11870 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11875 Templates: Lists: Multi-line list-items via templates
11877 *{{echo|a {{nonexistent|
11879 *{{echo|b {{nonexistent|
11882 <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>
11883 <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>
11888 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11890 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11892 <p><i>ab</i>c<i>d</i>e
11897 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11898 (PHP parser generates misnested html)
11900 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11902 <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>
11906 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11907 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11909 parsoid=wt2html,wt2wt
11911 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11913 <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>
11914 <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>
11915 <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>
11919 Templates: Ugly nesting: 4. Divs opened/closed across templates
11921 a<div>b{{echo|c</div>d}}e
11932 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11938 |{{echo|foo</table>}}
11942 <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|}"]}'>
11946 <td>foo</td></tr></tbody></table><span about="#mwt1">
11947 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11952 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11962 <td>1. {{echo|foo </table>}}</td>
11964 <td>2. {{echo|baz </table>}}</td>
11977 <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>"]}'>
11982 <td>1. foo </td></tr></tbody></table></td>
11984 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11985 </span><span about="#mwt2">
11986 </span><span about="#mwt2">
11987 </span><span about="#mwt2">abc</span><span about="#mwt2">
11988 </span><span about="#mwt2">
11989 </span><span about="#mwt2">
11990 </span><span about="#mwt2">
11991 </span><span about="#mwt2">
11992 </span><span about="#mwt2">
11993 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11994 </span><span about="#mwt2">
11999 Templates: Ugly templates: 3. newline-only template parameter
12008 # This looks like a bug: a single newline triggers p/br for some reason.
12010 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12019 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12020 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12022 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12028 <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
12029 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12033 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12034 # that are "identical" and generate nesting cycles in the algorithm
12036 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12038 {{echo|<table><tr><td><table>}}
12042 <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"}'>
12043 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12044 </table></td></tr></tbody></table>
12048 Templates: Parameters substituted at the top-level
12050 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12052 <p><i>who</i> me? <b>never!</b>
12055 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12059 Parser Functions: 1. Simple example
12068 Parser Functions: 2. Nested use (only outermost should be marked up)
12077 ### Pre-save transform tests
12080 pre-save transform: subst:
12086 This is a test template
12090 pre-save transform: normal template
12100 pre-save transform: nonexistent template
12104 {{thistemplatedoesnotexist}}
12106 {{thistemplatedoesnotexist}}
12110 pre-save transform: subst magic variables
12119 # This is bug 89, which I fixed. -- wtm
12121 pre-save transform: subst: templates with parameters
12125 {{subst:paramtest|param="something else"}}
12127 This is a test template with parameter "something else"
12131 Template:nowikitest
12133 <nowiki>'''not wiki'''</nowiki>
12137 pre-save transform: nowiki in subst (bug 1188)
12141 {{subst:nowikitest}}
12143 <nowiki>'''not wiki'''</nowiki>
12147 Template:commenttest
12149 This template has <!-- a comment --> in it.
12153 pre-save transform: comment in subst (bug 1936)
12157 {{subst:commenttest}}
12159 This template has <!-- a comment --> in it.
12163 pre-save transform: unclosed tag
12167 <nowiki>'''not wiki'''
12169 <nowiki>'''not wiki'''
12173 pre-save transform: mixed tag case
12177 <NOwiki>'''not wiki'''</noWIKI>
12179 <NOwiki>'''not wiki'''</noWIKI>
12183 pre-save transform: unclosed comment in <nowiki>
12187 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12189 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12192 # Leading @ in this template definition works around a limitation
12193 # in parsoid's parserTests which otherwise strips the <span> from the
12194 # result (confusing it for a template wrapper)
12198 @<span onmouseover="alert('crap')">Oh no</span>
12202 (confirming safety of fix for subst bug 1936)
12204 {{Template:dangerous}}
12206 <p>@<span>Oh no</span>
12211 pre-save transform: comment containing gallery (bug 5024)
12215 <!-- <gallery>data</gallery> -->
12217 <!-- <gallery>data</gallery> -->
12221 pre-save transform: comment containing extension
12225 <!-- <tag>data</tag> -->
12227 <!-- <tag>data</tag> -->
12231 pre-save transform: comment containing nowiki
12235 <!-- <nowiki>data</nowiki> -->
12237 <!-- <nowiki>data</nowiki> -->
12241 pre-save transform: <noinclude> in subst (bug 3298)
12251 pre-save transform: <onlyinclude> in subst (bug 3298)
12255 {{subst:Includes2}}
12263 {{<includeonly>subst:</includeonly>Includes}}
12267 Template:SafeSubstTest
12269 {{<includeonly>safesubst:</includeonly>Includes}}
12273 bug 22297: safesubst: works during PST
12277 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12283 bug 22297: safesubst: works during normal parse
12292 subst: does not work during normal parse
12296 <p>{{subst:Includes}}
12301 pre-save transform: context links ("pipe trick")
12305 [[Article (context)|]]
12308 [[Bar:Article (context)|]]
12309 [[:Bar:Article (context)|]]
12311 [[|Article (context)]]
12315 [[Article (context)|Article]]
12316 [[Bar:Article|Article]]
12317 [[:Bar:Article|Article]]
12318 [[Bar:Article (context)|Article]]
12319 [[:Bar:Article (context)|Article]]
12321 [[Article (context)]]
12322 [[Bar:X (Y) Z|X (Y) Z]]
12323 [[:Bar:X (Y) Z|X (Y) Z]]
12327 pre-save transform: context links ("pipe trick") with interwiki prefix
12331 [[interwiki:Article|]]
12332 [[:interwiki:Article|]]
12333 [[interwiki:Bar:Article|]]
12334 [[:interwiki:Bar:Article|]]
12336 [[interwiki:Article|Article]]
12337 [[:interwiki:Article|Article]]
12338 [[interwiki:Bar:Article|Bar:Article]]
12339 [[:interwiki:Bar:Article|Bar:Article]]
12343 pre-save transform: context links ("pipe trick") with parens in title
12345 pst title=[[Somearticle (context)]]
12349 [[Article (context)|Article]]
12353 pre-save transform: context links ("pipe trick") with comma in title
12355 pst title=[[Someplace, Somewhere]]
12358 [[Otherplace, Elsewhere|]]
12359 [[Otherplace, Elsewhere, Anywhere|]]
12361 [[Otherplace, Somewhere|Otherplace]]
12362 [[Otherplace, Elsewhere|Otherplace]]
12363 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12367 pre-save transform: context links ("pipe trick") with parens and comma
12369 pst title=[[Someplace (IGNORED), Somewhere]]
12372 [[Otherplace (place), Elsewhere|]]
12374 [[Otherplace, Somewhere|Otherplace]]
12375 [[Otherplace (place), Elsewhere|Otherplace]]
12379 pre-save transform: context links ("pipe trick") with comma and parens
12381 pst title=[[Who, me? (context)]]
12384 [[Me, Myself, and I (1937 song)|]]
12386 [[Yes, you. (context)|Yes, you.]]
12387 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12391 pre-save transform: context links ("pipe trick") with namespace
12393 pst title=[[Ns:Somearticle]]
12397 [[Ns:Article|Article]]
12401 pre-save transform: context links ("pipe trick") with namespace and parens
12403 pst title=[[Ns:Somearticle (context)]]
12407 [[Ns:Article (context)|Article]]
12411 pre-save transform: context links ("pipe trick") with namespace and comma
12413 pst title=[[Ns:Somearticle, Context, Whatever]]
12417 [[Ns:Article, Context, Whatever|Article]]
12421 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12423 pst title=[[Ns:Somearticle, Context (context)]]
12427 [[Ns:Article (context)|Article]]
12431 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12433 pst title=[[Ns:Somearticle (IGNORED), Context]]
12437 [[Ns:Article, Context|Article]]
12441 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12445 [[Article(context)|]]
12446 [[Bar:Article(context)|]]
12447 [[:Bar:Article(context)|]]
12448 [[|Article(context)]]
12452 [[Article(context)|Article]]
12453 [[Bar:Article(context)|Article]]
12454 [[:Bar:Article(context)|Article]]
12455 [[Article(context)]]
12456 [[Bar:X(Y)Z|X(Y)Z]]
12457 [[:Bar:X(Y)Z|X(Y)Z]]
12461 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12465 [[Article (context)|]]
12466 [[Bar:Article (context)|]]
12467 [[:Bar:Article (context)|]]
12468 [[|Article (context)]]
12472 [[Article (context)|Article]]
12473 [[Bar:Article (context)|Article]]
12474 [[:Bar:Article (context)|Article]]
12475 [[Article (context)]]
12476 [[Bar:X (Y) Z|X (Y) Z]]
12477 [[:Bar:X (Y) Z|X (Y) Z]]
12481 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12485 [[Article(context)|]]
12486 [[Bar:Article(context)|]]
12487 [[:Bar:Article(context)|]]
12488 [[|Article(context)]]
12492 [[Article(context)|Article]]
12493 [[Bar:Article(context)|Article]]
12494 [[:Bar:Article(context)|Article]]
12495 [[Article(context)]]
12496 [[Bar:X(Y)Z|X(Y)Z]]
12497 [[:Bar:X(Y)Z|X(Y)Z]]
12501 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12505 [[Article (context), context|]]
12506 [[Article (context),context|]]
12507 [[Bar:Article (context), context|]]
12508 [[Bar:Article (context),context|]]
12509 [[:Bar:Article (context), context|]]
12510 [[:Bar:Article (context),context|]]
12512 [[Article (context), context|Article]]
12513 [[Article (context),context|Article]]
12514 [[Bar:Article (context), context|Article]]
12515 [[Bar:Article (context),context|Article]]
12516 [[:Bar:Article (context), context|Article]]
12517 [[:Bar:Article (context),context|Article]]
12521 pre-save transform: trim trailing empty lines
12525 Empty lines are trimmed
12531 Empty lines are trimmed
12535 pre-save transform: Signature expansion
12540 * <noinclude>~~~</noinclude>
12541 * <includeonly>~~~</includeonly>
12542 * <onlyinclude>~~~</onlyinclude>
12544 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12545 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12546 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12547 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12552 pre-save transform: Signature expansion in nowiki tags (bug 93)
12558 <nowiki>~~~~</nowiki>
12560 <includeonly><nowiki>~~~~</nowiki></includeonly>
12562 <noinclude><nowiki>~~~~</nowiki></noinclude>
12564 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12566 {{subst:Foo}} shall be converted to FOO
12568 As well as inside noinclude/onlyinclude
12569 <noinclude>{{subst:Foo}}</noinclude>
12570 <onlyinclude>{{subst:Foo}}</onlyinclude>
12572 But not inside includeonly
12573 <includeonly>{{subst:Foo}}</includeonly>
12577 <nowiki>~~~~</nowiki>
12579 <includeonly><nowiki>~~~~</nowiki></includeonly>
12581 <noinclude><nowiki>~~~~</nowiki></noinclude>
12583 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12585 FOO shall be converted to FOO
12587 As well as inside noinclude/onlyinclude
12588 <noinclude>FOO</noinclude>
12589 <onlyinclude>FOO</onlyinclude>
12591 But not inside includeonly
12592 <includeonly>{{subst:Foo}}</includeonly>
12596 Parsoid: Recognize nowiki with trailing space in tags
12600 <nowiki ><div>[[foo]]</nowiki >
12608 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12615 Parsoid: Recognize nowiki with odd capitalization
12619 <noWikI ><div>[[foo]]</Nowiki >
12621 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12626 Parsoid: Escape nowiki with trailing space in tags
12630 <p><nowiki > foo </nowiki ></p>
12631 <p>a<nowiki />b</p>
12632 <p>c<nowiki/ >d</p>
12634 <nowiki > foo </nowiki >
12642 Parsoid: Escape weird noWikI capitalizations
12646 <p><noWikI > foo </NoWikI ></p>
12648 <noWikI > foo </NoWikI >
12652 ### Message transform tests
12655 message transform: magic variables
12665 message transform: should not transform wiki markup
12675 message transform: <noinclude> in transcluded template (bug 4926)
12685 message transform: <onlyinclude> in transcluded template (bug 4926)
12695 {{#special:}} page name, known
12699 {{#special:Recentchanges}}
12701 Special:RecentChanges
12705 {{#special:}} page name with subpage, known
12709 {{#special:Recentchanges/param}}
12711 Special:RecentChanges/param
12715 {{#special:}} page name, unknown
12719 {{#special:foobar nonexistent}}
12721 Special:Foobar nonexistent
12725 {{#speciale:}} page name, known
12729 {{#speciale:Recentchanges}}
12731 Special:RecentChanges
12735 {{#speciale:}} page name with subpage, known
12739 {{#speciale:Recentchanges/param}}
12741 Special:RecentChanges/param
12745 {{#speciale:}} page name, unknown
12749 {{#speciale:foobar nonexistent}}
12751 Special:Foobar_nonexistent
12757 ### For Parsoid-specific tests, see
12758 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12763 parsoid=wt2html,wt2wt,html2html
12765 [[Image:foobar.jpg]]
12767 <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>
12770 <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>
12774 Simple image (using File: namespace, now canonical)
12776 [[File:Foobar.jpg]]
12778 <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>
12781 <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>
12785 Right-aligned image
12787 [[File:Foobar.jpg|right]]
12789 <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>
12792 <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>
12798 [[File:Foobar.jpg|right|Caption text]]
12800 <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>
12803 <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>
12807 Image with caption, bug 53312 #1
12809 [[File:Foobar.jpg|right|Caption page stuff]]
12811 <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>
12814 <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>
12818 Image with caption, bug 53312 #2
12820 [[File:Foobar.jpg|right|Caption page=]]
12822 <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>
12825 <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>
12829 Image with caption, bug 53312 #3
12831 [[File:Foobar.jpg|right|Caption page=stuff]]
12833 <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>
12836 <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>
12840 Allow empty links in image captions (Bug 60753)
12844 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12849 <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>
12852 <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>
12854 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12855 </figcaption></figure>
12859 Titles in unlinked images (T23454)
12861 [[File:Foobar.jpg|link=|stuff]]
12863 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12868 Link with empty target
12877 Image with link trail
12879 Linktrails should not work for images: [[File:Foobar.jpg]]s
12881 <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
12884 <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>
12888 Image with empty attribute
12890 parsoid=wt2html,wt2wt,html2html
12892 [[File:Foobar.jpg|right||Caption text]]
12894 <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>
12897 <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>
12901 1. Block image with individual attributes from templates
12903 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12905 <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>
12908 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]],&quot;dsr&quot;:[24,38,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
12912 2. Block Image with individual attributes from templates
12914 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12916 <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>
12919 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]],&quot;dsr&quot;:[18,32,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;thumb&quot;}},&quot;i&quot;:0}}]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]],&quot;dsr&quot;:[33,47,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
12923 3. Inline image with individual attributes from templates
12925 [[File:Foobar.jpg|{{echo|50px}}]]
12927 <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>
12930 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]],&quot;dsr&quot;:[18,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;50px&quot;}},&quot;i&quot;:0}}]}\">50px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
12933 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12934 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12936 Image with multiple attributes from the same template
12938 [[File:Foobar.jpg|{{image_attribs}}]]
12940 <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>
12943 <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>
12947 Image with link tails
12951 123[[File:Foobar.jpg]]456
12952 123[[File:Foobar.jpg|right]]456
12953 123[[File:Foobar.jpg|thumb]]456
12955 <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
12957 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
12958 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
12961 <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>
12963 <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>
12965 <div class="thumb tright">
12966 <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>
12967 <div class="thumbcaption">
12968 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12974 <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>
12975 <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>
12976 <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>
12980 Image with multiple captions -- only last one is accepted
12982 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12984 <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>
12987 <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>
12991 Image with multiple widths -- use last
12993 [[File:Foobar.jpg|200px|300px|caption]]
12995 <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>
12998 <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>
13002 Image with multiple alignments -- use first (bug 48664)
13006 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13008 [[File:Foobar.jpg|middle|text-top|caption]]
13010 <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>
13011 <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>
13014 <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>
13015 <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>
13019 Image with width attribute at different positions
13021 [[File:Foobar.jpg|200px|right|Caption]]
13022 [[File:Foobar.jpg|right|200px|Caption]]
13023 [[File:Foobar.jpg|right|Caption|200px]]
13025 <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>
13026 <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>
13027 <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>
13030 <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>
13031 <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>
13032 <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>
13035 # a sad bit of backward-compatibility
13037 Image with size specified with pxpx (bug 13500, 51628)
13039 parsoid=wt2html,wt2wt,html2html
13041 [[File:Foobar.jpg|20pxpx]]
13042 [[File:Foobar.jpg|200x20pxpx]]
13044 <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>
13045 <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>
13048 <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>
13052 Image with link parameter, wiki target
13054 [[File:Foobar.jpg|link=Main Page]]
13056 <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>
13059 <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>
13062 # parsoid bug 49293 (part 1)
13064 Image with link parameter, URL target
13066 [[File:Foobar.jpg|link=http://example.com/]]
13068 <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>
13071 <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>
13074 # parsoid bug 49293 (part 2)
13076 Image with link parameter, protocol-less URL target
13078 [[File:Foobar.jpg|link=//example.com/]]
13080 <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>
13083 <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>
13087 Escaping non-block captions (T107435)
13090 "modes": ["wt2wt"],
13092 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13096 [[Image:Foobar.jpg|caption]]
13098 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13101 # wgExternalLinkTarget not supported by Parsoid
13103 Image with link parameter, wgExternalLinkTarget
13105 [[Image:foobar.jpg|link=http://example.com/]]
13107 wgExternalLinkTarget='foobar'
13109 <p><a href="http://example.com/" target="foobar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13114 Image with link parameter, wgNoFollowLinks set to false
13116 [[Image:foobar.jpg|link=http://example.com/]]
13118 wgNoFollowLinks=false
13120 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13125 Image with link parameter, wgNoFollowDomainExceptions
13127 [[Image:foobar.jpg|link=http://example.com/]]
13129 wgNoFollowDomainExceptions='example.com'
13131 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13135 # wgExternalLinkTarget not supported by Parsoid
13137 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13139 [[Image:foobar.jpg|link=http://example.com/|Title]]
13141 wgExternalLinkTarget='foobar'
13143 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13148 Image with empty link parameter
13150 [[File:Foobar.jpg|link=]]
13152 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13155 <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>
13159 Image with link parameter (wiki target) and unnamed parameter
13161 [[File:Foobar.jpg|link=Main_Page|Title]]
13163 <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>
13166 <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>
13170 Image with link parameter (URL target) and unnamed parameter
13172 [[File:Foobar.jpg|link=http://example.com/|Title]]
13174 <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>
13177 <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>
13181 Thumbnail image with link parameter
13184 parsoid=wt2html,wt2wt,html2html
13186 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13188 <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>
13191 <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>
13195 Manually-specified thumbnail image
13199 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13201 <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>
13204 <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>
13208 Manually-specified thumbnail image with explicit link to wiki page
13211 parsoid=wt2html,wt2wt,html2html
13213 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13215 <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>
13218 <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>
13222 Manually-specified thumbnail image with explicit link to url
13225 parsoid=wt2html,wt2wt,html2html
13227 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13229 <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>
13232 <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>
13236 Manually-specified thumbnail image with explicit no link
13239 parsoid=wt2html,wt2wt,html2html
13241 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13243 <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>
13246 <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>
13250 Manually-specified thumbnail image with explicit link and alt text
13253 parsoid=wt2html,wt2wt,html2html
13255 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13257 <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>
13260 <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>
13264 Image with frame and link
13266 parsoid=wt2html,wt2wt,html2html
13268 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13270 <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>
13273 <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>
13277 Image with frame and link and explicit alt
13279 parsoid=wt2html,wt2wt,html2html
13281 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13283 <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>
13286 <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>
13290 Image with wiki markup in implicit alt
13292 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13294 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13296 <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>
13297 </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>
13300 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"testing <b data-parsoid=\"{&quot;dsr&quot;:[27,37,3,3]}\">bold</b> in alt"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
13301 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></span></p>
13305 Alt image option should handle most kinds of wikitext without barfing
13307 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13309 <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>
13312 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[65,73,2,2]}\">link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;dsr&quot;:[80,106,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;''bold template''&quot;}},&quot;i&quot;:0}}]}\">bold template</i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
13315 ###################
13316 # Conflicting image format options.
13317 # First option specified should 'win'.
13318 # All three cases in each test should be identical.
13321 Image with 'frameless' first.
13323 parsoid=wt2html,wt2wt,html2html
13325 [[File:Foobar.jpg|frameless|caption]]
13327 [[File:Foobar.jpg|frameless|frame|caption]]
13329 [[File:Foobar.jpg|frameless|thumb|caption]]
13331 <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>
13332 </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>
13333 </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>
13336 <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>
13337 <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>
13338 <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>
13342 Image with 'frame' first.
13344 parsoid=wt2html,wt2wt,html2html
13346 [[File:Foobar.jpg|frame|caption]]
13347 [[File:Foobar.jpg|frame|frameless|caption]]
13348 [[File:Foobar.jpg|frame|thumb|caption]]
13350 <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>
13351 <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>
13352 <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>
13355 <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>
13356 <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>
13357 <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>
13361 Image with 'thumb' first.
13363 parsoid=wt2html,wt2wt,html2html
13365 [[File:Foobar.jpg|thumb|caption]]
13366 [[File:Foobar.jpg|thumb|frameless|caption]]
13367 [[File:Foobar.jpg|thumb|frame|caption]]
13369 <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>
13370 <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>
13371 <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>
13374 <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>
13375 <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>
13376 <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>
13379 ###################
13381 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13382 # and https://phabricator.wikimedia.org/T64258
13383 # Foobar has actual size of 1941x220
13384 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13385 # a scalable format.
13386 # 2. Framed images always ignore size options; always render at default size.
13387 # 3. "Unspecified format" and border are the only types which can be
13391 Image: "unspecified format" and border enlarge
13393 parsoid=wt2html,wt2wt,html2html
13395 [[File:Foobar.jpg|2000px]]
13397 [[File:Foobar.jpg|border|2000px]]
13399 <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>
13400 </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>
13403 <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>
13404 <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>
13408 Image: "unspecified format" and border reduce
13410 parsoid=wt2html,wt2wt,html2html
13412 [[File:Foobar.jpg|1000px]]
13414 [[File:Foobar.jpg|border|1000px]]
13416 <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>
13417 </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>
13420 <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>
13421 <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>
13425 Image: thumbs reduce
13427 parsoid=wt2html,wt2wt,html2html
13429 [[File:Foobar.jpg|thumb|50px]]
13431 <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>
13434 <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>
13438 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13440 parsoid=wt2html,wt2wt,html2html
13442 [[File:Foobar.jpg|thumb|2000px]]
13444 [[File:Foobar.svg|thumb|2000px]]
13446 <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>
13447 <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>
13450 <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>
13451 <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>
13455 Image: frameless can reduce in size
13457 parsoid=wt2html,wt2wt,html2html
13459 [[File:Foobar.jpg|frameless|50px]]
13461 <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>
13464 <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>
13468 Image: bitmap frameless can't be enlarged past original size, but vector can
13470 parsoid=wt2html,wt2wt,html2html
13472 [[File:Foobar.jpg|frameless|2000px]]
13474 [[File:Foobar.svg|frameless|2000px]]
13476 <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>
13477 </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>
13480 <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>
13481 <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>
13485 Image: framed images are always unscaled.
13487 parsoid=wt2html,wt2wt,html2html
13489 [[File:Foobar.jpg|frame]]
13491 [[File:Foobar.jpg|frame|50px]]
13493 [[File:Foobar.jpg|frame|50x50px]]
13495 [[File:Foobar.jpg|frame|2000px]]
13497 <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>
13498 <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>
13499 <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>
13500 <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>
13503 <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>
13504 <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>
13505 <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>
13506 <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>
13509 ###################
13512 Link to image page- image page normally doesn't exists, hence edit link
13513 Add test with existing image page
13514 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13518 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13523 bug 18784 Link to non-existent image page with caption should use caption as link text
13525 [[:Image:test|caption]]
13527 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13532 Frameless image caption with a free URL
13534 [[File:Foobar.jpg|http://example.com]]
13536 <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>
13539 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid=\"{&quot;stx&quot;:&quot;url&quot;,&quot;dsr&quot;:[18,36,0,0]}\">http://example.com</a>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13543 Thumbnail image caption with a free URL
13547 [[File:Foobar.jpg|thumb|http://example.com]]
13549 <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>
13552 <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>
13556 Thumbnail image caption with a free URL and explicit alt
13559 parsoid=wt2html,wt2wt,html2html
13561 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13563 <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>
13566 <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>
13570 SVG thumbnails with no language set
13573 [[File:Foobar.svg|thumb|caption]]
13575 <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>
13578 <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>
13582 SVG thumbnails with language de
13584 parsoid=wt2html,wt2wt,html2html
13586 [[File:Foobar.svg|thumb|caption|lang=de]]
13588 <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>
13591 <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>
13595 SVG thumbnails with invalid language code
13597 parsoid=wt2html,wt2wt,html2html
13599 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13601 <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>
13604 <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>
13608 BUG 1887: A ISBN with a thumbnail
13610 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13612 <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>
13615 <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>
13619 BUG 1887: A RFC with a thumbnail
13621 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13623 <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>
13626 <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>
13630 BUG 1887: A mailto link with a thumbnail
13632 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13634 <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>
13637 <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>
13640 # Pending resolution to bug 368
13642 BUG 648: Frameless image caption with a link
13644 [[File:Foobar.jpg|text with a [[link]] in it]]
13646 <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>
13649 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[30,38,2,2]}\">link</a> in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13653 BUG 648: Frameless image caption with a link (suffix)
13655 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13657 <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>
13660 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[30,41,2,5],&quot;tail&quot;:&quot;foo&quot;}\">linkfoo</a> in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13664 BUG 648: Frameless image caption with an interwiki link
13666 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13668 <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>
13671 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;http://www.usemod.com/cgi-bin/mb.pl?Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;MeatBall:Link&quot;},&quot;isIW&quot;:true,&quot;dsr&quot;:[30,47,2,2]}\">MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13675 BUG 648: Frameless image caption with a piped interwiki link
13677 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13679 <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>
13682 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid=\"{&quot;stx&quot;:&quot;piped&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;http://www.usemod.com/cgi-bin/mb.pl?Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;MeatBall:Link&quot;},&quot;isIW&quot;:true,&quot;dsr&quot;:[30,52,16,2]}\">link</a> in it"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13686 T107474: Frameless image caption with <nowiki>
13688 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13690 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid=\"{&quot;dsr&quot;:[18,75,8,9]}\">text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13694 Escape HTML special chars in image alt text
13696 [[File:Foobar.jpg|& < > "]]
13698 <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>
13701 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&amp; &lt; &gt; \""}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13705 BUG 499: Alt text should have Ӓ, not &1234;
13707 [[File:Foobar.jpg|♀]]
13709 <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>
13712 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;#9792;&quot;,&quot;srcContent&quot;:&quot;♀&quot;,&quot;dsr&quot;:[18,25,null,null]}\">♀</span>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13716 Broken image caption with link
13718 parsoid=wt2html,wt2wt,html2html
13720 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13722 <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.
13725 <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>
13729 Image caption containing another image
13731 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13733 <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>
13736 <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>
13740 Image: caption containing a newline
13742 [[File:Foobar.jpg|This
13745 <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>
13748 <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>
13752 Image: caption containing leading space
13753 (The leading space should not trigger nowiki escaping in wt2wt mode)
13755 [[File:Foobar.jpg|thumb| bar]]
13757 <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>
13760 <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>
13764 Image: caption containing a table
13766 parsoid=wt2html,wt2wt,html2html
13768 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13774 and some more text.]]
13776 <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>
13779 <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
13782 <tr><th>Foo </th><th>Bar</th></tr>
13785 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13789 Bug 3090: External links other than http: in image captions
13791 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13793 <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>
13796 <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>
13802 parsoid=wt2html,wt2wt,html2html
13804 [[Image:foobar.jpg|a|class=b]]
13806 <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>
13809 <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>
13813 Localized image handling (1).
13815 parsoid=wt2html,wt2wt,html2html
13818 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13820 <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>
13823 <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>
13827 Localized image handling (2).
13830 parsoid=wt2html,wt2wt,html2html
13833 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13835 <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>
13838 <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>
13842 "border", "frameless" and "class" attributes on an image.
13845 parsoid=wt2html,wt2wt,html2html
13847 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13849 <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>
13852 <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>
13855 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13857 Invalid image attributes (bug 62500)
13860 parsoid=wt2html,wt2wt,html2html
13862 [[File:Foobar.jpg|thumb|float|left|caption]]
13864 [[File:Foobar.jpg|thumb|righ|caption]]
13866 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13868 <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>
13869 <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>
13870 <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>
13873 <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>
13874 <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>
13875 <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>
13881 #REDIRECT [[File:Barfoo.jpg]]
13884 # FIXME: Parsoid should run this test -- but we'd need to teach the
13885 # mockAPI about the redirected Barfoo.jpg image.
13889 [[Image:Barfoo.jpg]]
13891 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13896 Missing image with uploads disabled
13900 [[File:Foobaz.jpg]]
13902 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13905 <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>
13908 # Parsoid-specific testing for images
13909 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13910 # Currently imperfect due to a flaw in the Parsoid testrunner
13912 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13916 Parsoid-specific image handling - simple image with size and middle alignment
13918 [[File:Foobar.jpg|middle|50px]]
13920 <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>
13924 Parsoid-specific image handling - simple image with size, middle alignment,
13925 non-standard namespace alias
13927 parsoid=wt2wt,wt2html,html2html
13929 [[Image:Foobar.jpg|middle|50px]]
13931 <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>
13935 Parsoid-specific image handling - simple image with size and middle alignment
13938 [[File:Foobar.jpg|50px|middle]]
13940 <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>
13944 Parsoid-specific image handling - simple image with size and middle alignment
13945 and non-standard namespace name
13947 parsoid=wt2html,wt2wt,html2html
13949 [[Image:Foobar.jpg|50px|middle]]
13951 <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>
13955 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13957 [[File:Foobar.jpg|500x10px|baseline|caption]]
13959 <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>
13963 Parsoid-specific image handling - simple image with border and size spec
13965 [[File:Foobar.jpg|50px|border|caption]]
13967 <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>
13971 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13973 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13975 <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>
13979 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13982 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13984 <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>
13988 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13990 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13992 <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>
13996 Parsoid-specific image handling - thumbnail with specific size, halign,
13997 valign, and caption (existing content)
13999 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14001 <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>
14005 Parsoid-specific image handling - framed image with specific size and caption
14008 parsoid=wt2html,wt2wt,html2html
14010 [[File:Foobar.jpg|frame|500x50px|caption]]
14012 <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>
14016 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14019 parsoid=wt2html,wt2wt,html2html
14021 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14023 <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>
14027 Parsoid-specific image handling - frameless image with specific size, border, and caption
14029 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14031 <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>
14035 Parsoid-specific image handling - simple image with a formatted caption
14037 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14039 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[18,81,7,8]}\"><tbody data-parsoid=\"{&quot;dsr&quot;:[25,73,0,0]}\"><tr data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[25,54,4,5]}\"><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[29,39,4,5]}\">a</td><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[39,49,4,5]}\">b</td></tr><tr data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[54,73,4,5]}\"><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[58,68,4,5]}\">c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
14043 Parsoid-specific image handling - caption with a template in it
14045 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14047 <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>
14051 Parsoid-specific image handling - caption with unbalanced tags in it
14053 parsoid=wt2html,wt2wt,html2html
14056 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14060 <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>
14065 Parsoid-specific image handling - empty caption (1)
14067 parsoid=wt2html,wt2wt
14069 [[File:Foobar.jpg|thumb|]]
14071 <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>
14074 # empty captions don't get serialized unless we're in the "round trip" case
14076 Parsoid-specific image handling - empty caption (2)
14080 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14081 <a href="./File:Foobar.jpg">
14082 <img resource="./File:Foobar.jpg"
14083 src="//example.com/images/3/3a/Foobar.jpg"
14084 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14085 height="25" width="220"/>
14087 <figcaption></figcaption>
14090 [[File:Foobar.jpg|thumb]]
14094 Parsoid-specific image handling - whitespace caption
14096 [[File:Foobar.jpg|thumb| ]]
14098 <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>
14102 Parsoid-specific image handling - lang option
14105 [[File:Foobar.svg|lang=de|caption]]
14109 <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>
14113 ## Edge case bugs in Parsoid from T93580
14115 T93580: 1. Templated <ref> inside block images
14117 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14121 <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>
14123 <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>
14127 T93580: 2. <ref> inside inline images
14129 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14133 <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=\"{&quot;dsr&quot;:[64,78,5,6]}\" data-mw=\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;id&quot;:&quot;mw-reference-text-cite_note-1&quot;},&quot;attrs&quot;:{}}\"><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid=\"{&quot;group&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;content&quot;:&quot;foo&quot;,&quot;hasRefInRef&quot;:false,&quot;dsr&quot;:[64,78,5,6],&quot;tmp&quot;:{}}\" data-mw=\"{}\">"}'><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>
14135 <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>
14139 T93580: 3. Templated <ref> inside inline images
14141 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14145 <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=\"{&quot;dsr&quot;:[64,96,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;<ref>{{echo|foo}}</ref>&quot;}},&quot;i&quot;:0}}]}\"><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid=\"{&quot;group&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;content&quot;:&quot;foo&quot;,&quot;hasRefInRef&quot;:false,&quot;dsr&quot;:[64,96,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;}]],&quot;tmp&quot;:{}}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;<ref>{{echo|foo}}</ref>&quot;}},&quot;i&quot;: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>
14147 <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>
14154 Subpage test/subpage
14162 subpage title=[[Subpage test]]
14166 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14171 Subpage noslash link
14173 subpage title=[[Subpage test]]
14177 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14182 Subpage test/1/2/subpage
14188 Relative subpage noslash link
14190 parsoid=wt2wt,wt2html,html2html
14191 subpage title=[[Subpage test/1/2/3/4]]
14197 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14198 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14201 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14202 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14206 Parsoid: dot-slash prefixed wikilinks
14216 </p><p>[[././baz/]]
14221 </p><p>[[././baz/]]
14226 Render invalid page names as plain text (bug 51090)
14239 [[{{echo|./../foo}}|bar]]
14240 [[{{echo|foo/.}}|bar]]
14241 [[{{echo|foo/..}}|bar]]
14242 [[{{echo|foo~~~~bar}}]]
14243 [[{{echo|foo>bar}}]]
14244 [[{{echo|foo././bar}}]]
14245 [[{{echo|foo{bar}}]]
14246 [[{{echo|foo}bar}}]]
14247 [[{{echo|foo[bar}}]]
14248 [[{{echo|foo]bar}}]]
14249 [[{{echo|foo<bar}}]]
14251 <p>[[./../foo|bar]]
14261 </p><p>[[./../foo|bar]]
14274 <p>[[./../foo|bar]]
14285 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14286 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14287 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14288 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14289 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14290 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14291 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14292 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14293 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14294 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14295 [[<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>
14303 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14308 BUG 561: {{/Subpage}}
14310 subpage title=[[Page]]
14314 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14322 Category:MediaWiki User's Guide
14330 [[:Category:MediaWiki User's Guide]]
14332 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14341 [[Category:MediaWiki User's Guide]]
14343 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14347 PAGESINCATEGORY invalid title fatal (r33546 fix)
14349 {{PAGESINCATEGORY:<bogus>}}
14356 Category with different sort key
14360 [[Category:MediaWiki User's Guide|Foo]]
14362 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14366 Category with identical sort key
14370 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14372 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14376 Category with empty sort key
14381 [[Category:MediaWiki User's Guide|]]
14383 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14387 Category with empty sort key and parentheses
14392 [[Category:Foo (bar)|]]
14394 [[Category:Foo (bar)|Foo]]
14397 ## We used to, but no longer wt2wt this test since the default serializer
14398 ## will normalize all categories to serialize on their own line.
14399 ## This wikitext usage is going to be fairly uncommon in production and
14400 ## selser will take care of preserving formatting in those scenarios.
14402 Category with link tail
14408 123[[Category:Foo]]456
14410 123[[Category:Foo]]456
14412 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14416 Category with template
14421 [[Category:{{echo|Foo}}]]
14423 [[Category:{{echo|Foo}}]]
14427 Category with template in sort key
14432 [[Category:Foo|{{echo|Bar}}]]
14434 [[Category:Foo|{{echo|Bar}}]]
14438 Category with template in sort key and title
14443 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14445 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14448 ## We used to, but no longer wt2wt this test since the default serializer
14449 ## will normalize all categories to serialize on their own line.
14450 ## This wikitext usage is going to be fairly uncommon in production and
14451 ## selser will take care of preserving formatting in those scenarios.
14453 Category / paragraph interactions
14457 Foo [[Category:Baz]] Bar
14459 Foo [[Category:Baz]]
14467 [[Category:Baz]] Bar
14480 {{echo|[[Category:Baz]]}}
14493 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14494 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14495 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14496 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14497 <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>
14498 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14501 ## We used to, but no longer wt2wt this test since the default serializer
14502 ## will normalize all categories to serialize on their own line.
14503 ## This wikitext usage is going to be fairly uncommon in production and
14504 ## selser will take care of preserving formatting in those scenarios.
14506 ## The whitespace on the empty line is part of the test. Please do not delete
14508 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14514 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14516 {{echo|[[Category:Foo]] and so should this!}}
14518 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14523 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14525 <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>
14528 ## Parsoid will not try to wt2wt this while preserving newlines because
14529 ## it suppresses excess newlines within list items -- and we don't want to
14530 ## introduce a special case just for categories, which is, in reality somewhat
14531 ## odd behavior -- categories are unlikely to be used in list items like this
14532 ## in top-level pages and are only likely to show up in template-generated
14533 ## list items where this RT-ing is a non-issue.
14535 ## The whitespace on the empty line is part of the test. Please do not delete
14537 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14543 [[Category:Foo]] and this should be part of the same list item
14546 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14548 <ul><li>This and this should be part of the same list item</li>
14549 <li>So should this and this should be part of the same list item</li></ul>
14552 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14553 <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>
14557 ## Newlines and categories that follow the last item of a list
14558 ## are treated differently because this (list followed by categories)
14559 ## is an extremely common pattern on wikis.
14561 3. Categories and newlines: newline suppression for last list item should RT properly
14574 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14576 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14577 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14581 4. Categories and newlines: newline suppression for last list item should RT properly
14589 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14591 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14594 ## only wt2html for this to make sure the algo only applies to the rightmost path
14596 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14609 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14611 <ul><li> d</li></ul></li></ul>
14612 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14615 ## We used to, but no longer wt2wt this test since the default serializer
14616 ## will normalize all categories to serialize on their own line.
14617 ## This wikitext usage is going to be fairly uncommon in production and
14618 ## selser will take care of preserving formatting in those scenarios.
14620 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14624 * a [[Category:Foo]]
14626 <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>
14629 # This test also demonstrates because of newline+category tunneling
14630 # through the list hander, template wrapping doesn't expand to the
14631 # containing list when the list item swallows the category.
14633 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14638 <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
14639 </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>
14643 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14647 {{echo|[[Category:Foo]]
14651 <ul><li> a</li></ul>
14653 <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">
14654 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14655 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14659 Parsoid: Serialize link to category page with colon escape
14665 [[:Category:Foo|Bar]]
14668 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14669 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14673 # We used to, but no longer wt2wt this test since the default serializer
14674 # will normalize all categories to serialize on their own line.
14675 # This wikitext usage is going to be fairly uncommon in production and
14676 # selser will take care of preventing whitespace insertion if this
14677 # occurs in an article.
14679 # html2html disabled for the same reason (whitespace insertion between
14682 # html2wt disabled because it localizes the "Category" namespace.
14684 Link prefix/suffixes aren't applied to category links
14694 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14698 Parsoid: Serialize link to file page with colon escape
14704 [[:File:Foo.png|Bar]]
14707 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14708 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14713 Parsoid: Serialize a genuine category link without colon escape
14718 [[Category:Foo|Bar]]
14720 <link rel="mw:PageProp/Category" href="./Category:Foo">
14721 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14725 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14729 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14731 [[Category:Toxine bactérienne]]
14735 Parsoid: Defaultsort
14737 {{DEFAULTSORT:Foo}}
14739 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14743 Parsoid: Defaultsort (template-generated)
14745 {{{{echo|DEFAULTSORT}}:Foo}}
14747 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,28,null,null],"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
14751 ### Inter-language links
14754 Interlanguage links
14762 es:Alimento fr:Nourriture zh:食品
14764 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14765 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14766 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14770 Duplicate interlanguage links (bug 24502)
14781 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14782 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14783 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14784 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14791 Basic section headings
14798 ===Smaller headline===
14801 <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>
14804 <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>
14807 <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>
14813 Section headings with TOC
14816 === Subheadline 1 ===
14817 ===== Skipping a level =====
14818 ====== Skipping a level ======
14822 ===Another headline===
14824 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14826 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14828 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14830 <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>
14832 <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>
14839 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14841 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14847 <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>
14848 <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>
14849 <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>
14850 <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>
14851 <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>
14854 <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>
14859 TOC anchors don't collide
14867 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14869 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14870 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14871 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14872 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14876 <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>
14877 <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>
14878 <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>
14879 <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>
14883 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14885 Handling of sections up to level 6 and beyond
14888 == Level 2 Heading==
14889 === Level 3 Heading===
14890 ==== Level 4 Heading====
14891 ===== Level 5 Heading=====
14892 ====== Level 6 Heading======
14893 ======= Level 7 Heading=======
14894 ======== Level 8 Heading========
14895 ========= Level 9 Heading=========
14896 ========== Level 10 Heading==========
14898 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14900 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14902 <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>
14904 <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>
14906 <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>
14908 <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>
14910 <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>
14911 <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>
14912 <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>
14913 <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>
14914 <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>
14928 <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>
14929 <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>
14930 <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>
14931 <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>
14932 <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>
14933 <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>
14934 <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>
14935 <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>
14936 <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>
14937 <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>
14942 TOC regression (T11764)
14946 ==== title 1.1.1 ====
14951 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14953 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14955 <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>
14957 <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>
14960 <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>
14963 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14965 <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>
14971 <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>
14972 <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>
14973 <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>
14974 <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>
14975 <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>
14976 <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>
14981 TOC for heading containing <span id="..."></span> (T96153)
14984 ==<span id="old-anchor"></span>New title==
14986 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14988 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14992 <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>
14997 TOC with wgMaxTocLevel=3 (bug 6204)
15003 ==== title 1.1.1 ====
15008 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15010 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15012 <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>
15013 <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>
15016 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15018 <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>
15024 <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>
15025 <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>
15026 <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>
15027 <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>
15028 <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>
15029 <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>
15034 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15040 ====Section 1.1.1====
15041 ====Section 1.1.1.1====
15044 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15046 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15048 <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>
15051 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15055 <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>
15056 <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>
15057 <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>
15058 <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>
15059 <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>
15065 Resolving duplicate section names
15070 <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>
15071 <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>
15076 Resolving duplicate section names with differing case (bug 10721)
15081 <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>
15082 <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>
15094 Template with sections, __NOTOC__
15101 <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>
15102 <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>
15103 <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>
15104 <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>
15109 __NOEDITSECTION__ keyword
15115 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15116 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15121 Link inside a section heading
15123 ==Section with a [[Main Page|link]] in it==
15125 <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>
15130 TOC regression (T14077)
15137 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15139 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15141 <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>
15144 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15148 <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>
15149 <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>
15150 <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>
15155 BUG 1219 URL next to image (good)
15157 http://example.com [[File:Foobar.jpg]]
15159 <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>
15162 <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>
15166 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15169 The line above must have a trailing space!
15172 But just in case it doesn't...
15174 <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>
15175 <p>The line above must have a trailing space!
15177 <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>
15178 <p>But just in case it doesn't...
15183 Header with special characters (bug 25462)
15185 The tooltips shall not show entities to the user (ie. be double escaped)
15202 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15204 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15206 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15207 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15208 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15209 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15210 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15214 <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>
15217 <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>
15220 <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>
15223 <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>
15226 <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>
15232 Header with space, plus and underscore as entity
15234 Id should not contain + for spaces
15236 == Space between Text ==
15239 == Space-Entity between Text ==
15242 == Plus+between+Text ==
15245 == Plus-Entity+between+Text ==
15248 == Underscore_between_Text ==
15251 == Underscore-Entity_between_Text ==
15254 [[#Space between Text]]
15255 [[#Space-Entity between Text]]
15256 [[#Plus+between+Text]]
15257 [[#Plus-Entity+between+Text]]
15258 [[#Underscore_between_Text]]
15259 [[#Underscore-Entity_between_Text]]
15261 <p>Id should not contain + for spaces
15263 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15265 <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>
15266 <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>
15267 <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>
15268 <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>
15269 <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>
15270 <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>
15274 <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>
15277 <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>
15280 <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>
15283 <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>
15286 <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>
15289 <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>
15291 </p><p><a href="#Space_between_Text">#Space between Text</a>
15292 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15293 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15294 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15295 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15296 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15301 Headers with excess '=' characters
15302 (Are similar tests necessary beyond the 1st level?)
15306 =''italic'' heading==
15307 ==''italic'' heading=
15309 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15311 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15312 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15313 <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>
15314 <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>
15318 <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>
15319 <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>
15320 <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>
15321 <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>
15326 HTML headers vs TOC (bug 23393)
15327 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15339 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15341 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15343 <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>
15344 <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>
15347 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15349 <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>
15350 <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>
15356 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15357 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15358 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15359 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15360 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15361 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15366 Single-line or multiline-comments can follow headings
15368 parsoid=wt2html,wt2wt
15376 <h2><span class="mw-headline" id="foo">foo</span></h2>
15377 <h2><span class="mw-headline" id="bar">bar</span></h2>
15378 <h2><span class="mw-headline" id="baz">baz</span></h2>
15383 BUG 1219 URL next to image (broken)
15385 http://example.com[[File:Foobar.jpg]]
15387 <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>
15390 <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>
15394 Bug 1186 news: in the middle of text
15396 http://en.wikinews.org/wiki/Wikinews:Workplace
15398 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15404 Namespaced link must have a title
15413 Namespaced link must have a title (bad fragment version)
15415 [[Project:#fragment]]
15417 <p>[[Project:#fragment]]
15423 ### HTML tags and HTML attributes
15427 div with no attributes
15429 <div>HTML rocks</div>
15431 <div>HTML rocks</div>
15436 div with double-quoted attribute
15438 <div id="rock">HTML rocks</div>
15440 <div id="rock">HTML rocks</div>
15445 div with single-quoted attribute
15447 <div id='rock'>HTML rocks</div>
15449 <div id="rock">HTML rocks</div>
15454 div with unquoted attribute
15456 <div id=rock>HTML rocks</div>
15458 <div id="rock">HTML rocks</div>
15463 div with illegal double attributes
15465 <div id="a" id="b">HTML rocks</div>
15467 <div id="b">HTML rocks</div>
15472 div with empty attribute value, space before equals
15474 <div class =>HTML rocks</div>
15476 <div class="">HTML rocks</div>
15480 # FIXME: Parsoid doesn't match the html5 spec
15482 div with multiple empty attribute values
15484 parsoid=wt2html,html2html
15486 <div id= title=>HTML rocks</div>
15488 <div id="title.3D">HTML rocks</div>
15491 <div id="" title="">HTML rocks</div>
15494 # FIXME: Parsoid doesn't match the html5 spec
15496 table with multiple empty attribute values
15498 parsoid=wt2html,html2html
15504 <table title="id=">
15510 <table title="" id="">
15511 <tbody><tr><td> hi</td></tr>
15516 div with braces in attribute value
15518 <div title="{}">Foo</div>
15520 <div title="{}">Foo</div>
15523 <div title="{}">Foo</div>
15527 div with empty attribute value, no space before equals
15529 parsoid=wt2html,html2html
15531 <div class=>HTML rocks</div>
15533 <div class="">HTML rocks</div>
15536 <div class="">HTML rocks</div>
15540 HTML multiple attributes correction
15542 <p class="error" class="awesome">Awesome!</p>
15544 <p class="awesome">Awesome!</p>
15549 Table multiple attributes correction
15552 !+ class="error" class="awesome"| status
15557 <th class="awesome"> status
15565 <DIV ID="x">HTML ROCKS</DIV>
15567 <div id="x">HTML ROCKS</div>
15572 Non-ASCII pseudo-tags are rendered as text
15581 Pseudo-tag with URL 'name' renders as url link
15583 <http://example.com/>
15585 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15590 text with amp in the middle of nowhere
15594 <p>Remember AT&T?
15599 text with character entity: eacute
15601 I always thought é was a cute letter.
15603 <p>I always thought é was a cute letter.
15606 <p>I always thought é was a cute letter.</p>
15610 text with entity-escaped character entity-like string: eacute
15612 I always thought &eacute; was a cute letter.
15614 <p>I always thought &eacute; was a cute letter.
15619 text with undefined character entity: xacute
15621 I always thought &xacute; was a cute letter.
15623 <p>I always thought &xacute; was a cute letter.
15630 <data value="5">five</data>
15631 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15632 <mark>This highlighted text</mark>
15634 <p><data value="5">five</data>
15635 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15636 <mark>This highlighted text</mark>
15641 HTML tag with leading space is parsed as text
15645 <p>< div>foo< /div>
15650 ### Nesting tests (see bug 41545, 50604, 51081)
15653 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15654 # Note that html2wt is considerably more difficult if we use <b> in
15655 # the test case, instead of <big>
15657 Ensure that HTML adoption agency algorithm is properly implemented.
15659 <big>X<big>Y</big>Z</big>
15661 <p><big>X<big>Y</big>Z</big>
15665 # This was bug 41545 in the PHP parser.
15666 # Note that tidy doesn't handle this correctly.
15670 <kbd>X<kbd>Y</kbd>Z</kbd>
15672 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15676 # The following cases were bug 51081 in the PHP parser.
15677 # Note that there are some other nestable tags (b, i, etc) which are
15678 # not covered; see bug 51081 for discussion.
15680 # Note that tidy doesn't handle this correctly.
15684 <em>X<em>Y</em>Z</em>
15686 <p><em>X<em>Y</em>Z</em>
15690 # Note that tidy doesn't handle this correctly.
15692 Nesting of <strong>
15694 <strong>X<strong>Y</strong>Z</strong>
15696 <p><strong>X<strong>Y</strong>Z</strong>
15705 <p><q>X<q>Y</q>Z</q></p>
15708 # Note that tidy doesn't handle this correctly.
15712 <ruby>X<ruby>Y</ruby>Z</ruby>
15714 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15718 # Note that tidy doesn't handle this correctly.
15722 <bdo>X<bdo>Y</bdo>Z</bdo>
15724 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15736 [[Media:Foobar.jpg]]
15738 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15743 Media link with text
15745 [[Media:Foobar.jpg|A neat file to look at]]
15747 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15751 # FIXME: this is still bad HTML tag nesting
15752 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15754 Media link with nasty text
15756 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15758 <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>
15761 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15762 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15766 Media link to nonexistent file (bug 1702)
15768 [[Media:No such.jpg]]
15770 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15775 Image link to nonexistent file (bug 1850 - good)
15777 [[File:No_such.jpg]]
15779 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15782 <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>
15786 :Image link to nonexistent file (bug 1850 - bad)
15788 [[:Image:No such.jpg]]
15790 <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>
15793 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15799 Character reference normalization in link text (bug 1938)
15801 [[Main Page|this&that]]
15803 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15810 Test for unicode normalization
15812 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15816 (bug 19451) Links should refer to the normalized form.
15824 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15825 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15826 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15827 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15828 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15833 Empty attribute crash test (bug 2067)
15835 <font color="">foo</font>
15837 <p><font color="">foo</font>
15842 Empty attribute crash test single-quotes (bug 2067)
15844 <font color=''>foo</font>
15846 <p><font color="">foo</font>
15851 Attribute test: equals, then nothing
15853 <font color=>foo</font>
15855 <p><font color="">foo</font>
15860 Attribute test: unquoted value
15862 <font color=x>foo</font>
15864 <p><font color="x">foo</font>
15869 Attribute test: unquoted but illegal value (hash)
15871 <font color=#x>foo</font>
15873 <p><font color="#x">foo</font>
15877 # Parsoid does not serialize to empty attribute syntax,
15878 # so wt2wt and html2wt cases are skipped
15880 Attribute test: no value (T54330)
15882 parsoid=wt2html,html2html
15884 <font color>foo</font>
15886 <p><font color="">foo</font>
15889 <p><font color="">foo</font></p>
15893 Bug 2095: link with three closing brackets
15897 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15900 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15904 Bug 2095: link with pipe and three closing brackets
15906 [[Main Page|link]]]
15908 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15911 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15915 Bug 2095: link with pipe and three closing brackets, version 2
15917 [[Main Page|[http://example.com/]]]
15919 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15922 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15931 Template:Dangerous attribute
15933 " onmouseover="alert(document.cookie)
15937 Template:Dangerous style attribute
15939 border-size: expression(alert(document.cookie))
15945 <div style="float: right; {{{1}}}">Magic div</div>
15949 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15951 <div title="{{test}}"></div>
15953 <div title="This is a test template"></div>
15957 # Parsoid has enough context to handle this case
15959 Bug 2304: HTML attribute safety (dangerous template; 2309)
15961 <div title="{{dangerous attribute}}"></div>
15963 <div title=""></div>
15966 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[12,35,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;dangerous attribute&quot;,&quot;href&quot;:&quot;./Template:Dangerous_attribute&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
15970 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15972 <div style="{{dangerous style attribute}}"></div>
15974 <div style="/* insecure input */"></div>
15979 Bug 2304: HTML attribute safety (safe parameter; 2309)
15981 {{div style|width: 200px}}
15983 <div style="float: right; width: 200px">Magic div</div>
15988 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15990 {{div style|width: expression(alert(document.cookie))}}
15992 <div style="/* insecure input */">Magic div</div>
15997 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15999 {{div style|"><script>alert(document.cookie)</script>}}
16001 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16006 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16008 {{div style|" ><script>alert(document.cookie)</script>}}
16010 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16015 Bug 2304: HTML attribute safety (link)
16017 <div title="[[Main Page]]"></div>
16019 <div title="[[Main Page]]"></div>
16024 Bug 2304: HTML attribute safety (italics)
16026 <div title="''foobar''"></div>
16028 <div title="''foobar''"></div>
16033 Bug 2304: HTML attribute safety (bold)
16035 <div title="'''foobar'''"></div>
16037 <div title="'''foobar'''"></div>
16043 Bug 2304: HTML attribute safety (ISBN)
16045 <div title="ISBN 1234567890"></div>
16047 <div title="ISBN 1234567890"></div>
16052 Bug 2304: HTML attribute safety (RFC)
16054 <div title="RFC 1234"></div>
16056 <div title="RFC 1234"></div>
16061 Bug 2304: HTML attribute safety (PMID)
16063 <div title="PMID 1234567890"></div>
16065 <div title="PMID 1234567890"></div>
16070 Bug 2304: HTML attribute safety (web link)
16072 <div title="http://example.com/"></div>
16074 <div title="http://example.com/"></div>
16079 Bug 2304: HTML attribute safety (named web link)
16081 <div title="[http://example.com/ link]"></div>
16083 <div title="[http://example.com/ link]"></div>
16088 Bug 3244: HTML attribute safety (extension; safe)
16090 <div style="<nowiki>background:blue</nowiki>"></div>
16092 <div style="background:blue"></div>
16097 Bug 3244: HTML attribute safety (extension; unsafe)
16099 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16101 <div style="/* insecure input */"></div>
16105 # More MSIE fun discovered by Tom Gilder
16108 MSIE CSS safety test: spurious slash
16110 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16112 <div style="/* insecure input */">evil</div>
16117 MSIE CSS safety test: hex code
16119 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16121 <div style="/* insecure input */">evil</div>
16126 MSIE CSS safety test: comment in url
16128 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16130 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16135 MSIE CSS safety test: comment in expression
16137 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16139 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16144 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16146 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16148 <p style="/* invalid control char */">A</p>
16153 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16155 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16156 <div style="top:EXPRESSION(alert())">B</div>
16158 <p style="/* insecure input */">A</p>
16159 <div style="/* insecure input */">B</div>
16164 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16166 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16167 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16169 <div style="/* insecure input */">A</div>
16170 <p style="/* insecure input */">B</p>
16175 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16177 <div style="background-image:url⁽javascript:alert())">A</div>
16178 <div style="background-image:url₍javascript:alert())">B</div>
16179 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16181 <div style="/* insecure input */">A</div>
16182 <div style="/* insecure input */">B</div>
16183 <p style="/* insecure input */">C</p>
16187 # FIXME: Parsoid fails to sanitize this! See T58846.
16192 title="data:text/html,<img src=1 onerror=alert(1)>"
16193 style="-o-link:attr(title);-o-link-source:current">X</div>
16195 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16200 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16202 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16203 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16204 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16205 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16206 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16207 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16208 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16210 <p style="/* insecure input */">A</p>
16211 <p style="/* insecure input */">B</p>
16212 <p style="/* insecure input */">C</p>
16213 <p style="/* insecure input */">D</p>
16214 <p style="/* insecure input */">E</p>
16215 <p style="/* insecure input */">F</p>
16216 <p style="/* insecure input */">G</p>
16221 Table attribute legitimate extension
16224 !+ style="<nowiki>color:blue</nowiki>"| status
16229 <th style="color:blue"> status
16235 Table attribute safety
16238 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16243 <th style="/* insecure input */"> status
16249 CSS line continuation 1
16251 <div style="background-image: u\ rl(test.jpg);"></div>
16253 <div style="/* insecure input */"></div>
16258 CSS line continuation 2
16260 <div style="background-image: u\ rl(test.jpg); "></div>
16262 <div style="/* invalid control char */"></div>
16273 Expansion of multi-line templates in attribute values (bug 6255)
16275 <div style="background: {{identity|#00FF00}}">-</div>
16277 <div style="background: #00FF00">-</div>
16283 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16285 <div style="background:
16288 <div style="background: #00FF00">-</div>
16291 <div style="background:
16296 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16298 <div style="background: #00FF00">-</div>
16300 <div style="background: #00FF00">-</div>
16305 evil <math>-wiki-tags without Extension:Math enabled
16307 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16309 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16313 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16316 Parser hook: empty input
16327 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16330 ## Don't expect parsoid to rt this form.
16332 Parser hook: empty input using terminated empty elements
16334 parsoid=wt2html,html2html
16345 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16349 Parser hook: empty input using terminated empty elements (space before)
16360 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16364 Parser hook: basic input
16375 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16378 ## Don't expect parsoid to rt this form.
16380 Parser hook: case insensitive
16382 parsoid=wt2html,html2html
16393 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16396 ## Don't expect parsoid to rt this form.
16398 Parser hook: case insensitive, redux
16400 parsoid=wt2html,html2html
16411 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16415 Parser hook: nested tags
16417 <tag><tag></tag></tag>
16426 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16430 Parser hook: basic arguments
16432 <tag width="200" height="100" depth="50" square=""></tag>
16445 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16448 ## Don't expect parsoid to rt this form.
16450 Parser hook: basic arguments, variations
16452 parsoid=wt2html,html2html
16454 <tag width=200 height = "100" depth = '50' square></tag>
16467 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16471 Parser hook: argument containing a forward slash (bug 5344)
16473 <tag filename="/tmp/bla"></tag>
16478 'filename' => '/tmp/bla',
16483 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16486 ## Don't expect parsoid to rt this form.
16488 Parser hook: empty input using terminated empty elements (bug 2374)
16490 parsoid=wt2html,html2html
16502 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16505 # </tag> should be output literally since there is no matching tag that begins it
16507 Parser hook: basic arguments using terminated empty elements (bug 2374)
16509 <tag width=200 height = "100" depth = '50' square/>
16528 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16532 Parser hook: static parser hook not inside a comment
16534 <statictag>hello, world</statictag>
16536 <statictag action="flush" />
16542 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16543 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16547 Parser hook: static parser hook inside a comment
16549 <!-- <statictag>hello, world</statictag> -->
16550 <statictag action="flush" />
16555 <!-- <statictag>hello, world</statictag> -->
16556 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16559 # Nested template calls; this case was broken by Parser.php rev 1.506,
16563 Template:One-parameter
16565 (My parameter is: {{{1}}})
16569 Template:Map-one-parameter
16571 {{{{{1}}}|{{{2}}}}}
16575 Nested template calls
16577 {{Map-one-parameter|One-parameter|param}}
16579 <p>(My parameter is: param)
16588 # HTML+Tidy effectively strips out the empty tags completely
16589 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16590 # which Tidy would have done for the PHP parser had there been content inside it.
16592 Sanitizer: Closing of open tags
16594 <s></s><table></table>
16596 <s></s><table></table>
16599 <p><s></s></p><table></table>
16603 Sanitizer: Closing of open but not closed tags
16612 Sanitizer: Closing of closed but not open tags
16622 Sanitizer: Closing of closed but not open table tags
16626 Table not started</td></tr></table>
16628 <p>Table not started</p>
16630 <p>Table not started</p>
16634 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16636 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16638 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16642 # In HTML5, the restrictions are that id must contain at least one character,
16643 # and must not contain any space characters.
16645 Sanitizer: Validating the contents of the id attribute (bug 4515)
16649 <br id="" /><br id="a space" />
16654 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16656 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16660 <br id="foo" /><br id="foo" />
16662 Something need to be done. foo-2 ?
16666 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16669 <meta itemprop="hello" content="world">
16670 <meta http-equiv="refresh" content="5">
16671 <meta itemprop="hello" http-equiv="refresh" content="5">
16672 <link itemprop="hello" href="{{SERVER}}">
16673 <link rel="stylesheet" href="{{SERVER}}">
16674 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16678 <p> <meta itemprop="hello" content="world" />
16679 <meta http-equiv="refresh" content="5">
16680 <meta itemprop="hello" content="5" />
16682 <link itemprop="hello" href="http://example.org" />
16683 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16684 <link itemprop="hello" href="http://example.org" />
16690 Language converter: output gets cut off unexpectedly (bug 5757)
16694 this bit is safe: }-
16696 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16698 then we get cut off here: }-
16700 all additional text is vanished
16702 <p>this bit is safe: }-
16703 </p><p>but if we add a conversion instance: xxx
16704 </p><p>then we get cut off here: }-
16705 </p><p>all additional text is vanished
16710 Self closed html pairs (bug 5487)
16713 <center><font id="bug" />Centered text</center>
16714 <div><font id="bug2" />In div text</div>
16716 <center><font id="bug" />Centered text</center>
16717 <div><font id="bug2" />In div text</div>
16726 Punctuation: nbsp before exclamation
16730 <p>C'est grave !
16735 Punctuation: CSS !important (bug 11874)
16737 <div style="width:50% !important">important</div>
16739 <div style="width:50% !important">important</div>
16744 Punctuation: CSS ! important (bug 11874; with space after)
16746 <div style="width:50% ! important">important</div>
16748 <div style="width:50% ! important">important</div>
16753 HTML bullet list, closed tags (bug 5497)
16766 <ul data-parsoid='{"stx":"html"}'>
16767 <li data-parsoid='{"stx":"html"}'>One</li>
16768 <li data-parsoid='{"stx":"html"}'>Two</li>
16774 HTML bullet list, unclosed tags (bug 5497)
16786 <ul data-parsoid='{"stx":"html"}'>
16787 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16788 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16794 HTML ordered list, closed tags (bug 5497)
16807 <ol data-parsoid='{"stx":"html"}'>
16808 <li data-parsoid='{"stx":"html"}'>One</li>
16809 <li data-parsoid='{"stx":"html"}'>Two</li>
16815 HTML ordered list, unclosed tags (bug 5497)
16828 <ol data-parsoid='{"stx":"html"}'>
16829 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16830 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16836 HTML nested bullet list, closed tags (bug 5497)
16861 HTML nested bullet list, open tags (bug 5497)
16898 HTML nested ordered list, closed tags (bug 5497)
16923 HTML nested ordered list, open tags (bug 5497)
16960 HTML ordered list item with parameters oddity
16962 <ol><li id="fragment">One</li>
16965 <ol><li id="fragment">One</li>
16970 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16972 bug 5918: autonumbering
16974 [http://first/] [http://second] [ftp://ftp]
16978 [mailto:enclosed@mail.tld With target]
16980 [mailto:enclosed@mail.tld]
16982 mailto:inline@mail.tld
16984 <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>
16985 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16986 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16987 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16988 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16991 <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>
16992 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16993 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16994 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16995 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17000 # Security and HTML correctness
17001 # From Nick Jenkins' fuzz testing
17005 Fuzz testing: Parser13
17020 Fuzz testing: Parser14
17025 <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>
17026 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17028 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17034 <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>
17036 <div id="toc" class="toc">
17037 <div id="toctitle">
17041 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17048 Fuzz testing: Parser14-table
17053 <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>
17054 <table style="__TOC__">
17059 <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>
17060 <table style="__TOC__">
17067 # Known to produce bogus xml (extra </td>)
17069 Fuzz testing: Parser16
17096 Fuzz testing: Parser21
17099 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17104 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17114 Fuzz testing: Parser22
17116 http://===r:::https://b
17120 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17128 # Known to produce bad XML for now
17130 Fuzz testing: Parser24
17135 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17136 <br style="onmouseover='alert(document.cookie);' " />
17138 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17143 <u class="|">}}}} >
17144 <br style="onmouseover='alert(document.cookie);'" />
17146 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17155 # Note: the current result listed for this is not what the original one was,
17156 # but the original bug was JavaScript injection, which is fixed in any case.
17157 # It's not clear that the original result listed was any more correct than the
17158 # current one. Original result:
17161 # <li class="||">
17162 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17164 Fuzz testing: Parser25 (bug 6055)
17170 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17172 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17177 Fuzz testing: URL adjacent extension (with space, clean)
17179 http://example.com <nowiki>junk</nowiki>
17181 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17184 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17188 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17190 http://example.com<nowiki>junk</nowiki>
17192 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17195 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17199 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17201 http://example.com<pre>junk</pre>
17203 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17206 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17211 <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>
17215 Fuzz testing: image with bogus manual thumbnail
17217 [[Image:foobar.jpg|thumbnail= ]]
17219 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17222 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,2,2]}' data-mw='{"errors":[{"key":"missing-thumbnail","message":"This thumbnail does not exist.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{},"dsr":[2,30,null,null]}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
17226 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17228 <pre dir=" "></pre>
17230 <pre dir=" "></pre>
17235 Parsing optional HTML elements (Bug 6171)
17240 <td> Some tabular data</td>
17241 <td> More tabular data ...
17242 <td> And yet som tabular data</td>
17248 <td> Some tabular data</td>
17249 <td> More tabular data ...
17250 </td><td> And yet som tabular data</td>
17257 Correct handling of <td>, <tr> (Bug 6171)
17262 <td> Some tabular data</td>
17263 <td> More tabular data ...</td>
17264 <td> And yet som tabular data</td>
17270 <td> Some tabular data</td>
17271 <td> More tabular data ...</td>
17272 <td> And yet som tabular data</td>
17280 Parsing crashing regression (fr:JavaScript)
17284 <p></body></x>
17289 Inline wiki vs wiki block nesting
17295 <p><b>Bold paragraph</b>
17296 </p><p>New wiki paragraph
17300 # FIXME: The current php output is documented
17301 # and desired output is the parsoid target.
17303 Inline HTML vs wiki block nesting
17309 <p><b>Bold paragraph
17310 </p><p>New wiki paragraph</b>
17313 <p><b>Bold paragraph</b>
17314 </p><p>New wiki paragraph
17318 # Original result was this:
17319 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17321 # While that might be marginally more intuitive, maybe, the six-apostrophe
17322 # construct is clearly pathological and the result stated here (which is what
17323 # the parser actually does) is about as reasonable as anything.
17325 Mixing markup for italics and bold
17328 '''bold''''''bold''bolditalics'''''
17330 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17338 Article for special page transclusion test
17342 Special page transclusion
17345 {{Special:Prefixindex/Xyzzyx}}
17347 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17353 Special page transclusion twice (bug 5021)
17356 {{Special:Prefixindex/Xyzzyx}}
17357 {{Special:Prefixindex/Xyzzyx}}
17359 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17361 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17367 Transclusion of default MediaWiki message
17369 {{MediaWiki:Mainpage}}
17376 Transclusion of nonexistent MediaWiki message
17378 {{MediaWiki:Mainpagexxx}}
17380 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17385 Transclusion of MediaWiki message with underscore
17387 {{MediaWiki:history_short}}
17394 Transclusion of MediaWiki message with space
17396 {{MediaWiki:history short}}
17403 Invalid header with following text
17413 Section extraction test (section 0)
17433 Section extraction test (section 1)
17455 Section extraction test (section 2)
17476 Section extraction test (section 3)
17496 Section extraction test (section 4)
17520 Section extraction test (section 5)
17540 Section extraction test (section 6)
17561 Section extraction test (section 7)
17581 Section extraction test (section 8)
17601 Section extraction test (section 9)
17622 Section extraction test (section 10)
17642 Section extraction test (nonexistent section 11)
17661 Section extraction test with bogus heading (section 1)
17666 ==bogus== not a legal section
17670 ==bogus== not a legal section
17674 Section extraction test with bogus heading (section 2)
17679 ==bogus== not a legal section
17686 Section extraction test with comment after heading (section 1)
17698 Section extraction test with comment after heading (section 2)
17710 Section extraction test with bogus <nowiki> heading (section 1)
17715 ==bogus== <nowiki>not a legal section</nowiki>
17719 ==bogus== <nowiki>not a legal section</nowiki>
17723 Section extraction test with bogus <nowiki> heading (section 2)
17728 ==bogus== <nowiki>not a legal section</nowiki>
17734 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17735 # instead of respecting commented sections
17737 Section extraction prefixed by comment (section 1)
17748 Section extraction prefixed by comment (section 2)
17758 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17759 # instead of respecting HTML-style headings
17761 Section extraction, mixed wiki and html (section 1)
17777 Section extraction, mixed wiki and html (section 2)
17793 # Formerly testing for bug 3342
17795 Section extraction, heading surrounded by <noinclude>
17799 <noinclude>==unmarked==</noinclude>
17805 # Test behavior of bug 19910
17807 Sectiion with all-equals
17812 The line above must have a trailing space
17815 But just in case it doesn't...
17819 But just in case it doesn't...
17823 Section replacement test (section 0)
17854 Section replacement test (section 1)
17883 Section replacement test (section 2)
17913 Section replacement test (section 3)
17944 Section replacement test (section 4)
17971 Section replacement test (section 5)
18002 Section replacement test (section 6)
18032 Section replacement test (section 7)
18063 Section replacement test (section 8)
18094 Section replacement test (section 9)
18123 Section replacement test (section 10)
18153 Section replacement test with initial whitespace (bug 13728)
18157 Preformatted initial line
18161 Preformatted initial line
18168 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18180 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18193 Section extraction, <pre> around bogus header (bug 10309)
18210 Section replacement, <pre> around bogus header (bug 10309)
18232 Handling of 
 in URLs
18236 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18239 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18241 a</a></li></ul></li></ul>
18245 Handling of %0A in URLs
18249 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18252 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18256 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18258 5 quotes, code coverage +1 line
18265 <p><b><i></i></b></p>
18268 # same html as previous, but wikitext adjusted to match parsoid html2wt
18269 # note that wt2html and html2html will put the <i> before the <b>
18271 5 quotes, code coverage +1 line w/ nowiki (1)
18273 parsoid=wt2wt,html2wt
18275 '''''<nowiki/>'''''
18280 <p><b><i></i></b></p>
18283 # same as previous, just swapping the <i> and <b>
18285 5 quotes, code coverage +1 line w/ nowiki (2)
18287 '''''<nowiki/>'''''
18292 <p><i><b></b></i></p>
18296 Special:Search page linking.
18300 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18305 {{!}} is a magic word
18307 {{!}} is a magic word there and {{!}} is still a magic word here
18308 | is not a magic word here but {{!}} is still a magic word here
18310 <p>| is a magic word there and | is still a magic word here
18311 | is not a magic word here but | is still a magic word here
18314 <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
18315 | 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>
18322 title=[[Parser test]]
18327 * {{FULLPAGENAMEE}}
18329 * {{BASEPAGENAMEE}}
18333 * {{ROOTPAGENAMEE}}
18335 * {{TALKPAGENAMEE}}
18336 * {{SUBJECTPAGENAME}}
18337 * {{SUBJECTPAGENAMEE}}
18340 * {{NAMESPACENUMBER}}
18344 * {{SUBJECTSPACEE}}
18345 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18347 <ul><li> Parser test</li>
18348 <li> Parser_test</li>
18349 <li> Parser test</li>
18350 <li> Parser_test</li>
18351 <li> Parser test</li>
18352 <li> Parser_test</li>
18353 <li> Parser test</li>
18354 <li> Parser_test</li>
18355 <li> Parser test</li>
18356 <li> Parser_test</li>
18357 <li> Talk:Parser test</li>
18358 <li> Talk:Parser_test</li>
18359 <li> Parser test</li>
18360 <li> Parser_test</li>
18368 <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>
18371 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18381 image4 |300px| centre
18382 image5.svg| http://///////
18387 <ul class="gallery mw-gallery-traditional">
18388 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18389 <div class="thumb" style="height: 150px;">Image1.png</div>
18390 <div class="gallerytext">
18393 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18394 <div class="thumb" style="height: 150px;">Image2.gif</div>
18395 <div class="gallerytext">
18398 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18399 <div class="thumb" style="height: 150px;">Image3</div>
18400 <div class="gallerytext">
18403 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18404 <div class="thumb" style="height: 150px;">Image4</div>
18405 <div class="gallerytext">
18410 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18411 <div class="thumb" style="height: 150px;">Image5.svg</div>
18412 <div class="gallerytext">
18413 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18417 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18418 <div class="thumb" style="height: 150px;">* image6</div>
18419 <div class="gallerytext">
18427 Gallery (with options)
18429 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18430 File:Nonexistent.jpg|caption
18431 File:Nonexistent.jpg
18432 image:foobar.jpg|some '''caption''' [[Main Page]]
18434 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18437 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18438 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18439 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18440 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18441 <div class="gallerytext">
18446 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18447 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18448 <div class="gallerytext">
18451 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18452 <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>
18453 <div class="gallerytext">
18454 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18458 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18459 <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>
18460 <div class="gallerytext">
18463 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18464 <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>
18465 <div class="gallerytext">
18475 Gallery with link that has fragment
18478 image:foobar.jpg|link=Main_Page
18479 image:foobar.jpg|link=Main_Page#section
18480 image:foobar.jpg|link=Main Page#section|caption
18483 <ul class="gallery mw-gallery-traditional">
18484 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18485 <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>
18486 <div class="gallerytext">
18489 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18490 <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>
18491 <div class="gallerytext">
18494 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18495 <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>
18496 <div class="gallerytext">
18506 Gallery with wikitext inside caption
18509 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18510 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18513 <ul class="gallery mw-gallery-traditional">
18514 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18515 <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>
18516 <div class="gallerytext">
18517 <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>
18521 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18522 <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>
18523 <div class="gallerytext">
18524 <p>This is a test template
18533 gallery (with showfilename option)
18535 <gallery showfilename>
18536 File:Nonexistent.jpg|caption
18537 File:Nonexistent.jpg
18538 image:foobar.jpg|some '''caption''' [[Main Page]]
18542 <ul class="gallery mw-gallery-traditional">
18543 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18544 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18545 <div class="gallerytext">
18546 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18551 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18552 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18553 <div class="gallerytext">
18554 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18558 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18559 <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>
18560 <div class="gallerytext">
18561 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18562 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18566 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18567 <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>
18568 <div class="gallerytext">
18569 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18578 Gallery (with namespace-less filenames)
18581 File:Nonexistent.jpg
18587 <ul class="gallery mw-gallery-traditional">
18588 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18589 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18590 <div class="gallerytext">
18593 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18594 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18595 <div class="gallerytext">
18598 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18599 <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>
18600 <div class="gallerytext">
18603 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18604 <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>
18605 <div class="gallerytext">
18613 HTML Hex character encoding (spells the word "JavaScript")
18615 parsoid=wt2html,wt2wt,html2html
18617 JavaScript
18619 <p>JavaScript
18624 <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>
18628 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18632 <p>&#xsee;&#XSEE;
18635 <p>&#xsee;&#XSEE;</p>
18639 HTML Hex character encoding mixed case
18641 parsoid=wt2html,wt2wt,html2html
18650 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18653 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18654 # Note that U+000C (form feed) is not a valid XML character, so
18655 # it is banned even though allowed in HTML5.
18657 Illegal character references (T106578)
18662 ; Control (low): 
18663 ; Control (high):  Ÿ
18664 ; Surrogate: ��
18665 ; This is an okay astral character: 💩
18674 <dt>Control (low)</dt>
18676 <dt>Control (high)</dt>
18677 <dd>&#x7F; &#x9F;</dd>
18679 <dd>&#xD83D;&#xDCA9;</dd>
18680 <dt>This is an okay astral character</dt>
18686 __FORCETOC__ override
18698 ISBN 978-0-1234-56 789
18700 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18703 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18705 <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>
18709 ISBN followed by 5 spaces
18720 ISBN ISBN 1234567890
18722 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18725 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18728 # Uppercase X and lowercase x as well
18739 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18740 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18741 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18742 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18743 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18744 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18747 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18748 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18749 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18750 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18751 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18752 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18756 ISBN with empty prefix (parsoid test)
18760 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18763 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18767 Bug 22905: <abbr> followed by ISBN followed by </a>
18769 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18771 <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>
18774 <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>
18782 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18787 Double RFC with a wiki link
18791 <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>
18800 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18803 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18807 Centre-aligned image
18809 [[Image:foobar.jpg|centre]]
18811 <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>
18818 [[Image:foobar.jpg|none]]
18820 <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>
18825 Width + Height sized image (using px) (height is ignored)
18827 [[Image:foobar.jpg|640x480px]]
18829 <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>
18834 Width-sized image (using px, no following whitespace)
18836 [[Image:foobar.jpg|640px]]
18838 <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>
18843 Width-sized image (using px, with following whitespace - test regression from r39467)
18845 [[Image:foobar.jpg|640px ]]
18847 <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>
18852 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18854 [[Image:foobar.jpg| 640px]]
18856 <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>
18861 Image with page parameter
18865 [[File:LoremIpsum.djvu|page=2]]
18867 <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>
18870 <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>
18874 Another italics / bold test
18882 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18888 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18891 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18896 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18898 Images with the "|" character in the comment
18900 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18902 <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>
18905 <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>
18909 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18911 <html><script>alert(1);</script></html>
18913 <p><html><script>alert(1);</script></html>
18918 HTML with raw HTML ($wgRawHtml==true)
18922 <html><script>alert(1);</script></html>
18924 <p><script>alert(1);</script>
18929 Parents of subpages, one level up
18931 subpage title=[[Subpage test/L1/L2/L3]]
18935 <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>
18941 Parents of subpages, one level up, not named
18943 subpage title=[[Subpage test/L1/L2/L3]]
18947 <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>
18954 Parents of subpages, two levels up
18956 subpage title=[[Subpage test/L1/L2/L3]]
18962 <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
18963 </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>
18968 Parents of subpages, two levels up, without trailing slash or name.
18970 subpage title=[[Subpage test/L1/L2/L3]]
18979 Parents of subpages, two levels up, with lots of extra trailing slashes.
18981 subpage title=[[Subpage test/L1/L2/L3]]
18985 <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>
18990 Subpage test/L1/L2/L3Sibling
18996 Transclusion of a sibling page (one level up)
18998 subpage title=[[Subpage test/L1/L2/L3]]
19007 Transclusion of a child page
19009 subpage title=[[Subpage test/L1/L2]]
19018 Non-transclusion because of too many up levels
19020 subpage title=[[Subpage test/L1/L2/L3]]
19022 {{../../../../More than parent}}
19024 <p>{{../../../../More than parent}}
19029 Definition list code coverage
19035 <dl><dt> title  </dt>
19037 <dt> title </dt>
19043 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19044 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19045 <dt>title</dt><dd> def</dd></dl>
19049 Don't fall for the self-closing div
19051 <div>hello world</div/>
19053 <div>hello world</div>
19062 <p>[[:Template:Msg]]
19071 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19075 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19077 Always escape literal '>' in output, not just after '<'
19091 <p>This is a test template
19092 This is a test template
19104 Inclusion of !userCanEdit() content
19108 <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>
19114 Out-of-order TOC heading levels
19123 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19125 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19127 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19128 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19131 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19133 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19134 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19140 <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>
19141 <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>
19142 <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>
19143 <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>
19144 <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>
19145 <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>
19151 ISBN with a dummy number
19161 ISBN with space-delimited number
19165 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19171 ISBN with multiple spaces, no number
19190 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19191 </p><p>ISBN 12345678901
19197 ISBN with trailing year (bug 8110)
19199 ISBN 1-234-56789-0 - 2006
19201 ISBN 1 234 56789 0 - 2006
19203 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19204 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19212 {{anchorencode:foo bar©#%n}}
19214 <p>foo_bar.C2.A9.23.25n
19219 anchorencode trims spaces
19221 {{anchorencode: __pretty__please__}}
19228 anchorencode deals with links
19230 {{anchorencode: [[hello|world]] [[hi]]}}
19237 anchorencode deals with templates
19239 {{anchorencode: {{Foo}} }}
19246 anchorencode encodes like the TOC generator: (bug 18431)
19248 === _ +:.3A%3A&&]] ===
19249 {{anchorencode: _ +:.3A%3A&&]] }}
19252 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19253 <p>.2B:.3A.253A.26.26.5D.5D
19258 Bug 6200: blockquotes and paragraph formatting
19279 Bug 8293: Use of center tag ruins paragraph formatting
19300 Parsing of overlapping (improperly nested) inline html tags
19302 <span><s>x</span></s>
19304 <p><span><s>x</span></s></span>
19307 <p><span><s>x</s></span>
19312 ### Language variants related tests
19315 Self-link in language variants
19317 title=[[Dunav]] language=sr
19319 Both [[Dunav]] and [[Дунав]] are names for this river.
19321 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19332 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19334 title=[[Duna]] language=sr
19336 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19338 <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.
19343 Link to a section of a variant of this title shouldn't be parsed as self-link
19345 title=[[Duna]] language=sr
19347 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19349 <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.
19354 Link to pages in language variants
19358 Main Page can be written as [[Маин Паге]]
19360 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19366 Multiple links to pages in language variants
19370 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19372 <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>.
19378 Simple template in language variants
19384 <p>This is a test template
19390 Template with explicit namespace in language variants
19396 <p>This is a test template
19402 Basic test for template parameter in language variants
19406 {{парамтест|param=foo}}
19408 <p>This is a test template with parameter foo
19414 Simple category in language variants
19418 [[Category:МедиаWики Усер'с Гуиде]]
19420 <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>
19436 ## We used to, but no longer wt2wt this test since the default serializer
19437 ## will normalize all categories to serialize on their own line.
19438 ## This wikitext usage is going to be fairly uncommon in production and
19439 ## selser will take care of preserving formatting in those scenarios.
19441 Don't convert blue categorylinks to another variant (bug 33210)
19447 [[A]][[Category:分类]]
19449 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19451 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19452 <link rel="mw:PageProp/Category" href="Category:分类"/>
19456 Stripping -{}- tags (language variants)
19460 Latin proverb: -{Ne nuntium necare}-
19462 <p>Latin proverb: Ne nuntium necare
19468 Prevent conversion with -{}- tags (language variants)
19470 language=sr variant=sr-ec
19472 Latinski: -{Ne nuntium necare}-
19474 <p>Латински: Ne nuntium necare
19480 Prevent conversion of text with -{}- tags (language variants)
19482 language=sr variant=sr-ec
19484 Latinski: -{Ne nuntium necare}-
19486 <p>Латински: Ne nuntium necare
19492 Prevent conversion of links with -{}- tags (language variants)
19494 language=sr variant=sr-ec
19498 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19504 -{}- tags within headlines (within html for parserConvert())
19506 language=sr variant=sr-ec
19510 <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>
19516 Explicit definition of language variant alternatives
19518 language=zh variant=zh-tw
19520 -{zh:China;zh-tw:Taiwan}-, not China
19522 <p>Taiwan, not China
19528 Conversion around HTML tags
19530 language=sr variant=sr-ec
19532 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19533 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19536 <span title="ЛаCтин">ски</span>
19542 Explicit session-wise language variant mapping (A flag and - flag)
19544 language=zh variant=zh-tw
19546 Taiwan is not China.
19547 But -{A|zh:China;zh-tw:Taiwan}- is China,
19548 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19549 and -{China}- is China.
19551 <p>Taiwan is not China.
19552 But Taiwan is Taiwan,
19553 (This should be stripped!)
19554 and China is China.
19559 Explicit session-wise language variant mapping (H flag for hide)
19561 language=zh variant=zh-tw
19563 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19566 <p>(This should be stripped!)
19572 Adding explicit conversion rule for title (T flag)
19574 language=zh variant=zh-tw showtitle
19576 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19579 <p>Should be stripped!
19584 Testing that changing the language variant here in the tests actually works
19586 language=zh variant=zh showtitle
19588 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19591 <p>Should be stripped!
19596 Recursive conversion of alt and title attrs shouldn't clear converter state
19598 language=zh variant=zh-cn showtitle
19600 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19601 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19605 Should be stripped<span title="Exclamation">!</span>
19610 Bug 24072: more test on conversion rule for title
19612 language=zh variant=zh-tw showtitle
19614 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19615 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19618 <p>This should be stripped!
19619 This won't take interferes with the title rule.
19624 Partly disable title conversion if variant == main language code
19626 language=zh variant=zh title=[[ZH]] showtitle
19628 -{T|zh-cn:CN;zh-tw:TW}-
19636 Partly disable title conversion if variant == main language code, more
19638 language=zh variant=zh title=[[ZH]] showtitle
19648 Raw output of variant escape tags (R flag)
19650 language=zh variant=zh-tw
19652 Raw: -{R|zh:China;zh-tw:Taiwan}-
19654 <p>Raw: zh:China;zh-tw:Taiwan
19659 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19661 language=zh variant=zh-cn
19663 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19670 Conversion rules from [numeric-only string] to [something else] (T48634)
19672 language=zh variant=zh-cn
19674 -{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
19681 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19683 language=zh variant=zh-cn
19685 -{H|zh-cn:foo;zh-tw:;}-foobar
19692 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19694 language=zh variant=zh-cn
19696 -{H|=>zh-cn:foo;}-foobar
19703 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19705 language=zh variant=zh-cn
19714 Nested using of manual convert syntax
19716 language=zh variant=zh-hk
19718 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19720 <p>Nested: Hello Hong Kong!
19725 Proper conversion of text in external links
19727 language=sr variant=sr-ec
19729 http://www.google.com
19730 gopher://www.google.com
19731 [http://www.google.com http://www.google.com]
19732 [gopher://www.google.com gopher://www.google.com]
19733 [https://www.google.com irc://www.google.com]
19734 [ftp://www.google.com www.google.com/ftp://dir]
19735 [//www.google.com www.google.com]
19737 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19738 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19739 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19740 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19741 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19742 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19743 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19748 Do not convert roman numbers to language variants
19750 language=sr variant=sr-ec
19754 <p>Фридрих IV је цар.
19759 Unclosed language converter markup "-{"
19770 Don't convert raw rule "-{R|=>}-" to "=>"
19781 Don't break link parsing if language converter markup is in the caption.
19783 language=sr variant=sr-ec
19785 [[Main Page|-{R|main page}-]]
19787 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19791 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19793 Don't break image parsing if language converter markup is in the caption.
19797 [[File:Foobar.jpg|-{R|caption}-]]
19799 <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>
19803 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19805 Don't break list handling if language converter markup is in the item.
19807 language=zh variant=zh-cn
19809 ;-{zh-cn:AAA;zh-tw:BBB}-
19811 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19818 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19820 Don't break table handling if language converter markup is in the cell.
19822 language=sr variant=sr-ec
19845 Bug 529: Uncovered bullet
19854 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19855 # Templates in Wikipedia rely on this behavior, as tidy has always been
19856 # enabled there. These tests are normally run *without* tidy, so specify the
19857 # full output here.
19858 # To test realistic parsing behavior, apply a tidy-like transformation to both
19859 # the expected output and your parser's output.
19861 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19863 ******* Foo {{bullet}}
19865 <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>
19871 Bug 529: Uncovered table already at line-start
19894 Bug 529: Uncovered bullet in parser function result
19896 * Foo {{lc:{{bullet}} }}
19904 Bug 5678: Double-parsed template argument
19906 {{lc:{{{1}}}|hello}}
19913 Bug 5678: Double-parsed template invocation
19915 {{lc:{{paramtest {{!}} param = hello }} }}
19917 <p>{{paramtest | param = hello }}
19922 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19925 title=[[Main Page]]
19927 {{PRVNÍVELKÉ:ěščř}}
19928 {{prvnívelké:ěščř}}
19948 Morwen/13: Unclosed link followed by heading
19955 <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>
19960 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19967 <h1><span class="mw-headline" id="heading">heading</span></h1>
19972 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19979 <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>
19994 Paragraphs inside divs (no extra line breaks)
20006 Paragraphs inside divs (extra line break on open)
20021 Paragraphs inside divs (extra line break on close)
20036 Paragraphs inside divs (extra line break on open and close)
20053 Nesting tags, paragraphs on lines which begin with <div>
20055 <div></div><strong>A
20058 <p><strong>A</strong></p>
20059 <p><strong>B</strong></p>
20067 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20069 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20071 <blockquote>Line one
20073 Line two</blockquote>
20075 <blockquote>Line one
20076 Line two</blockquote>
20080 <p>Line one Line two</p>
20085 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20090 Line two</blockquote>
20095 Line two</blockquote>
20100 Line two</blockquote>
20104 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20106 <blockquote>Line one
20111 <blockquote>Line one
20124 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20146 Paragraphs inside blockquotes/divs (no extra line breaks)
20148 <blockquote><div>Line one
20150 Line two</div></blockquote>
20152 <blockquote><div>Line one
20153 Line two</div></blockquote>
20158 Paragraphs inside blockquotes/divs (extra line break on open)
20163 Line two</div></blockquote>
20168 Line two</div></blockquote>
20173 Paragraphs inside blockquotes/divs (extra line break on close)
20175 <blockquote><div>Line one
20178 </div></blockquote>
20180 <blockquote><div>Line one
20183 </div></blockquote>
20188 Paragraphs inside blockquotes/divs (extra line break on open and close)
20194 </div></blockquote>
20200 </div></blockquote>
20205 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20207 wgLinkHolderBatchSize=0
20213 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20214 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20215 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20220 Free external link invading image caption
20222 [[Image:Foobar.jpg|thumb|http://x|hello]]
20224 <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>
20229 Bug 15196: localised external link numbers
20233 [http://en.wikipedia.org/]
20235 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20238 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20242 Multibyte character in padleft
20244 {{padleft:-Hello|7|Æ}}
20251 Multibyte character in padright
20253 {{padright:Hello-|7|Æ}}
20260 formatdate parser function
20262 {{#formatdate:2009-03-24}}
20264 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20269 formatdate parser function, with default format
20271 {{#formatdate:2009-03-24|mdy}}
20273 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20278 Spacing of numbers in formatted dates
20280 {{#formatdate:January 15}}
20282 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20287 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
20289 language=nl title=[[MediaWiki:Common.css]]
20291 {{#formatdate:2009-03-24|dmy}}
20293 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20306 Edit comment with link
20310 I like the [[Main Page]] a lot
20312 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20316 Edit comment with link and link text
20320 I like the [[Main Page|best pages]] a lot
20322 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20326 Edit comment with link and link text with suffix
20330 I like the [[Main Page|best page]]s a lot
20332 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20336 Edit comment with section link (non-local, eg in history list)
20338 comment title=[[Main Page]]
20340 /* External links */ removed bogus entries
20342 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20346 Edit comment with section link and text before it (non-local, eg in history list)
20348 comment title=[[Main Page]]
20350 pre-comment text /* External links */ removed bogus entries
20352 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>
20356 Edit comment with section link (local, eg in diff view)
20358 comment local title=[[Main Page]]
20360 /* External links */ removed bogus entries
20362 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20366 Edit comment with subpage link (bug 14080)
20370 title=[[Subpage test]]
20372 Poked at a [[/subpage]] here...
20374 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20378 Edit comment with subpage link and link text (bug 14080)
20382 title=[[Subpage test]]
20384 Poked at a [[/subpage|neat little page]] here...
20386 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20390 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20393 title=[[Subpage test]]
20395 Poked at a [[/subpage]] here...
20397 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20401 Edit comment with bare anchor link (local, as on diff)
20405 title=[[Main Page]]
20409 <a href="#section">#section</a>
20413 Edit comment with bare anchor link (non-local, as on history)
20416 title=[[Main Page]]
20420 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20424 Anchor starting with underscore
20430 <p><a href="#_ref">One</a>
20433 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20437 Id starting with underscore
20439 <div id="_ref"></div>
20441 <div id="_ref"></div>
20446 Space normalisation on autocomment (bug 22784)
20449 title=[[Main Page]]
20451 /* __hello__world__ */
20453 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20457 percent-encoding and + signs in comments (Bug 26410)
20461 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20463 <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>
20466 # Parsoid doesn't support this yet: see bug 73581
20467 # but it *should* omit the 'src' attribute if the image is bad.
20468 # PHP side of tests was disabled in
20469 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20470 # because of issues in the PHP parserTests infrastructure
20471 # (but the output below is indeed what the PHP side emits)
20473 Bad images - basic functionality
20476 !! DISABLED/html/php
20478 <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>
20482 Bad images - bug 16039: text after bad image disappears
20487 !! DISABLED/html/php
20493 <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>
20498 Verify that displaytitle works (bug #22501) no displaytitle
20502 wgAllowDisplayTitle=true
20503 wgRestrictDisplayTitle=false
20505 this is not the the title
20508 <p>this is not the the title
20513 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20518 wgAllowDisplayTitle=true
20519 wgRestrictDisplayTitle=false
20521 this is not the the title
20522 {{DISPLAYTITLE:whatever}}
20525 <p>this is not the the title
20530 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20535 wgAllowDisplayTitle=true
20536 wgRestrictDisplayTitle=true
20538 this is not the the title
20539 {{DISPLAYTITLE:whatever}}
20542 <p>this is not the the title
20547 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20552 wgAllowDisplayTitle=true
20553 wgRestrictDisplayTitle=true
20555 this is not the the title
20556 {{DISPLAYTITLE:screen}}
20559 <p>this is not the the title
20564 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20569 wgAllowDisplayTitle=false
20571 this is not the the title
20572 {{DISPLAYTITLE:screen}}
20575 <p>this is not the the title
20576 <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>
20581 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20586 wgAllowDisplayTitle=false
20588 this is not the the title
20591 <p>this is not the the title
20596 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20601 wgAllowDisplayTitle=true
20602 wgRestrictDisplayTitle=true
20604 this is not the the title
20605 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20607 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20608 <p>this is not the the title
20613 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20618 wgAllowDisplayTitle=true
20619 wgRestrictDisplayTitle=true
20621 this is not the the title
20622 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20624 <span style="color: red;">s</span>creen
20625 <p>this is not the the title
20630 Page status indicators: Empty name is invalid
20634 <indicator name=" "></indicator>
20635 <indicator></indicator>
20637 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20638 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20643 Page status indicators: Weird syntaxes that are okay
20647 <indicator name="empty" />
20648 <indicator name="name"></indicator>
20657 Page status indicators: Torture test
20661 <indicator name="01">hello world</indicator>
20662 <indicator name="02">[[Main Page]]</indicator>
20663 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20664 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20665 <indicator name="05">* foo
20667 <indicator name="06"><nowiki>foo</nowiki></indicator>
20668 <indicator name="07"> Preformatted</indicator>
20669 <indicator name="08"><div>Broken tag</indicator>
20670 <indicator name="09">{| class=wikitable
20673 <indicator name="10">Two
20675 paragraphs</indicator>
20678 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20679 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" />
20680 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>
20681 05=<ul><li> foo</li>
20685 07=<pre>Preformatted
20687 08=<div>Broken tag</div>
20689 09=<table class="wikitable">
20706 preload: check <noinclude> and <includeonly>
20710 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20716 preload: check <onlyinclude>
20720 Goodbye <onlyinclude>Hello world</onlyinclude>
20726 preload: can pass tags through if we want to
20730 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20732 <includeonly>Hello world</includeonly>
20736 preload: check that it doesn't try to do tricks
20740 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20742 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20746 Play a bit with r67090 and bug 3158
20748 <div style="width:50% !important"> </div>
20749 <div style="width:50% !important"> </div>
20750 <div style="width:50% !important"> </div>
20751 <div style="border : solid;"> </div>
20753 <div style="width:50% !important"> </div>
20754 <div style="width:50% !important"> </div>
20755 <div style="width:50% !important"> </div>
20756 <div style="border : solid;"> </div>
20759 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20760 <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>
20761 <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>
20762 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20767 HTML5 data attributes
20769 <span data-foo="bar">Baz</span>
20770 <p data-abc-def_hij="">Quuz</p>
20772 <p><span data-foo="bar">Baz</span>
20774 <p data-abc-def_hij="">Quuz</p>
20777 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
20778 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
20782 Strip reserved data attributes
20784 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
20786 <div data-ok="fred">d</div>
20789 <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>
20793 percent-encoding and + signs in internal links (Bug 26410)
20795 [[User:+%]] [[Page+title%]]
20796 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20797 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20798 [[%33%45]] [[%33%45+]]
20800 <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>
20801 <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>
20802 <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>
20803 <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>
20806 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%">User:+%</a> <a rel="mw:WikiLink" href="Page+title%25" title="Page+title%">Page+title%</a>
20807 <a rel="mw:WikiLink" href="%25+" title="%+">%+</a> <a rel="mw:WikiLink" href="%25+" title="%+">%20</a> <a rel="mw:WikiLink" href="%25+" title="%+">%+ </a> <a rel="mw:WikiLink" href="%25+r" title="%+r">%+r</a>
20808 <a rel="mw:WikiLink" href="%25" title="%">%</a> <a rel="mw:WikiLink" href="+" title="+">+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Bar&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;bar&quot;},&quot;dsr&quot;:[94,101,2,2]}\">bar</a>"}'><a href="./File:%25+abc9"><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
20809 <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>
20813 Special characters in embedded file links (bug 27679)
20815 [[File:Contains & ampersand.jpg]]
20816 [[File:Does not exist.jpg|Title with & ampersand]]
20818 <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>
20819 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20822 <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>
20823 <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>
20827 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20829 Text's been normalized?
20831 <p>Text's been normalized?
20836 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20838 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20840 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20845 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20847 [http://www.example.org/ ideograms]
20849 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20854 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20856 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20858 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20882 Bug 31098 Template which includes system messages which includes the template
20886 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20887 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20892 Bug31490 Turkish: ucfirst 'blah'
20903 Bug31490 Turkish: ucfirst 'ix'
20914 Bug31490 Turkish: lcfirst 'BLAH'
20925 Bug31490 Turkish: ucfırst (with a dotless i)
20931 <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>
20936 Bug31490 ucfırst (with a dotless i) with English language
20942 <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>
20947 Bug 26375: TOC with italics
20949 title=[[Main Page]]
20952 == ''Lost'' episodes ==
20954 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20956 <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>
20960 <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>
20965 Bug 26375: TOC with bold
20967 title=[[Main Page]]
20970 == '''should be bold''' then normal text ==
20972 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20974 <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>
20978 <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>
20983 Bug 33845: Headings become cursive in TOC when they contain an image
20985 title=[[Main Page]]
20988 == Image [[Image:foobar.jpg]] ==
20990 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20992 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20996 <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>
21001 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21003 title=[[Main Page]]
21006 == <blockquote>Quote</blockquote> ==
21008 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21010 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21014 <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>
21018 <div id="toc" class="toc">
21019 <div id="toctitle">
21023 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21027 <h2><span class="mw-headline" id="Quote"></span></h2>
21029 <p><span class="mw-headline" id="Quote">Quote</span></p>
21031 <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>
21035 Unclosed tags in TOC
21037 title=[[Main Page]]
21041 <small>Hanc marginis exiguitas non caperet.</small>
21044 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21046 <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>
21050 <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>
21051 <p><small>Hanc marginis exiguitas non caperet.</small>
21057 Multiple tags in TOC
21060 == <i>Foo</i> <b>Bar</b> ==
21062 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21064 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21066 <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>
21067 <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>
21071 <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>
21072 <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>
21076 <div id="toc" class="toc">
21077 <div id="toctitle">
21081 <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>
21082 <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>
21086 <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>
21087 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21089 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21091 <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>
21094 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21095 # html5 tag parsing.
21097 Tags with parameters in TOC
21102 == <sup class="in-h2">Hello</sup> ==
21104 == <sup class="a > b">Evilbye</sup> ==
21106 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21108 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21109 <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>
21113 <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>
21114 <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>
21117 <meta property="mw:PageProp/toc" />
21118 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21120 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21124 span tags with directionality in TOC
21127 == <span dir="ltr">C++</span> ==
21129 == <span dir="rtl">זבנג!</span> ==
21131 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21133 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21135 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21137 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21139 <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>
21140 <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>
21141 <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>
21142 <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>
21143 <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>
21147 <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>
21148 <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>
21149 <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>
21150 <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>
21151 <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>
21156 Bug 72884: bdi element in ToC
21159 == <bdi>test</bdi> ==
21161 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21163 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21167 <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>
21171 # Note that the html output does not have the <p></p>, but the
21172 # html+tidy output *does*. This is because the empty <p></p> is
21173 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21175 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21180 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21182 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21186 <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>
21190 <div id="toc" class="toc">
21191 <div id="toctitle">
21195 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21199 <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>
21205 == {{int:headline_sample}} ==
21209 Bug 32057: Title needed when expanding <h> nodes.
21211 title=[[Main Page]]
21215 <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>
21220 Strip marker in urlencode
21222 {{urlencode:x<nowiki/>y}}
21223 {{urlencode:x<nowiki/>y|wiki}}
21224 {{urlencode:x<nowiki/>y|path}}
21225 {{urlencode:x<pre id="one">two</pre>y}}
21253 Strip marker in formatNum
21255 {{formatnum:1<nowiki/>2}}
21256 {{formatnum:1<nowiki/>2|R}}
21264 Check noCommafy in formatNum
21268 {{formatnum:123456.78}}
21269 {{formatnum:123456.78|NOSEP}}
21277 Wrong option for formatNum (bug 56199)
21279 {{formatnum:1,234.56|Random}}
21280 {{formatnum:1,234.56|EVERYTHING}}
21281 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21290 Strip marker in grammar
21294 {{grammar:elative|foo<nowiki/>bar}}
21301 Strip marker in padleft
21303 {{padleft:|2|x<nowiki/>y}}
21310 Strip marker in padright
21312 {{padright:|2|x<nowiki/>y}}
21319 Strip marker in anchorencode
21321 {{anchorencode:x<nowiki/>y}}
21328 nowiki inside link inside heading (bug 18295)
21330 ==[[foo|x<nowiki>y</nowiki>z]]==
21332 <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>
21337 new support for bdi element (bug 31817)
21339 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21341 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21346 Ignore pipe between table row attributes
21350 |- id=foo | style='color: red'
21358 <tr id="foo" style="color: red">
21365 Gallery override link with WikiLink (bug 34852)
21368 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21371 <ul class="gallery mw-gallery-traditional">
21372 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21373 <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>
21374 <div class="gallerytext">
21384 Gallery override link with absolute external link (bug 34852)
21387 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21390 <ul class="gallery mw-gallery-traditional">
21391 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21392 <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>
21393 <div class="gallerytext">
21403 Gallery override link with malicious javascript (bug 34852)
21406 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21409 <ul class="gallery mw-gallery-traditional">
21410 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21411 <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>
21412 <div class="gallerytext">
21422 Gallery with invalid title as link (bug 43964)
21425 File:foobar.jpg|link=<
21428 <ul class="gallery mw-gallery-traditional">
21429 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21430 <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>
21431 <div class="gallerytext">
21439 Language parser function
21448 Padleft and padright as substr
21450 {{padleft:|3|abcde}}
21451 {{padright:|3|abcde}}
21459 Special parser function
21461 {{#special:RandomPage}}
21462 {{#special:BaDtItLe}}
21463 {{#special:Foobar}}
21472 Bug 34939 - Case insensitive link parsing ([HttP://])
21474 [HttP://MediaWiki.Org/]
21476 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21479 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21483 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21485 [HttP://MediaWiki.Org/ MediaWiki]
21487 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21492 Bug 34939 - Case insensitive link parsing (HttP://)
21494 HttP://MediaWiki.Org/
21496 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21499 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21517 <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>
21518 <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>
21519 <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>
21520 <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>
21521 <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>
21527 ### Parsoid-specific tests
21528 ### Parsoid-PHP parser incompatibilities
21531 1. SOL-sensitive wikitext tokens as template-args
21533 parsoid=wt2html,wt2wt
21539 <span about="#mwt1" typeof="mw:Transclusion">
21540 </span><ul about="#mwt1"><li>a</li>
21542 <span about="#mwt2" typeof="mw:Transclusion">
21543 </span><ol about="#mwt2"><li>a</li>
21545 <span about="#mwt3" typeof="mw:Transclusion">
21546 </span><dl about="#mwt3"><dd>a</dd>
21550 #### -----------------------------------------------------------------
21551 #### Parsoid-specific functionality tests
21552 #### -----------------------------------------------------------------
21554 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21555 # We know wt2wt will fail, but we expect selser to pass.
21556 # Due to the nature of our testing, wt2wt and selser tests will enter the
21557 # blacklist and we'll catch selser regressions based on changes to the
21558 # blacklist entries for selser tests.
21560 1. Bad treebuilder fixup of formatting elt is cleaned up
21562 parsoid=wt2html,wt2wt
21567 [[Image:Foobar.jpg|right|Test]]
21574 <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>
21581 2. Bad treebuilder fixup of formatting elt is cleaned up
21583 parsoid=wt2html,wt2wt
21585 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21587 <small>[[Image:Foobar.jpg|right|300px]]</small>
21591 <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>
21593 <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>
21597 3. Bad treebuilder fixup of formatting elt is cleaned up
21599 parsoid=wt2html,wt2wt
21601 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21603 <p><small><b>foo</b></small></p>
21604 <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>
21605 <p><small><b>bar</b></small></p>
21609 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21611 parsoid=wt2html,wt2wt
21613 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21615 <p><b><small></small></b></p>
21616 <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>
21620 #### ----------------------------------------------------------------
21621 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21622 #### tags. Parsoid's output for these tags differs from that of the
21624 #### ----------------------------------------------------------------
21627 Ref: 1. ref-location should be replaced with an index span
21630 B <ref name="x">foo</ref>
21634 <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>
21635 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>
21636 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>
21637 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21638 <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>
21639 <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>
21640 <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>
21645 Ref: 2. ref-tags with identical names should all get the same index
21647 A <ref name="x">foo</ref>
21651 <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>
21652 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>
21653 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21654 <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>
21659 Ref: 3. spaces in ref-names should be ignored
21661 A <ref name="x">foo</ref>
21662 B <ref name=" x " />
21666 <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>
21667 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>
21668 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>
21669 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21670 <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>
21674 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21676 Ref: 4. 'constructor' should be accepted as a valid ref-name
21678 A <ref name="constructor">foo</ref>
21681 <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>
21682 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21683 <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>
21688 Ref: 5. body should accept generic wikitext
21691 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21696 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
21698 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21699 <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>
21705 Ref: 6. indent-pres should not be output in ref-body
21715 <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>
21717 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21718 <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
21726 Ref: 7. No p-wrapping in ref-body
21743 <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>
21745 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21746 <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
21761 Ref: 8. transclusion wikitext has lower precedence
21763 A <ref> foo {{echo|</ref> B C}}
21767 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C<span typeof="mw:Nowiki">}}</span></p>
21768 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21769 <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>
21774 Ref: 9. unclosed comments should not leak out of ref-body
21776 A <ref> foo <!--</ref> B C
21779 <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>
21780 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21781 <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>
21786 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21788 A <ref> <b> foo </ref> B C
21792 <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>
21795 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21796 <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>
21801 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21807 <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
21808 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>
21809 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21810 <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>
21811 <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>
21816 Ref: 12. ref-tags act as trailing newline migration barrier
21818 <!--the newline at the end of this line moves out of the p tag-->a
21820 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21826 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21829 <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>
21830 <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>
21833 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21834 <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>
21835 <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>
21839 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21846 <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
21847 <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>
21848 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21849 <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>
21850 <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
21856 Ref: 14. A nested ref-tag should be emitted as plain text
21858 <ref>foo <ref>bar</ref> baz</ref>
21862 <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>
21864 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21865 <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>
21870 Ref: 15. ref-tags with identical names should get identical indexes
21872 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21873 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21877 <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>
21878 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>
21880 <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>
21884 ## We don't bother wt2wt-ing non-standard whitespace
21886 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21894 <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>
21895 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21896 <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>
21900 Ref: 17. Generate valid HTML5 id/about attributes
21902 <ref name="a b">foo</ref>
21906 <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>
21909 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21910 <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>
21915 Ref: 18. T58916: Extension attributes should be parsed as plain text
21917 <ref name="{{echo|a}}">foo</ref>
21921 <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>
21924 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21925 <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>
21930 Ref: 19. ref-tags with identical name encodings should get identical indexes
21932 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21936 <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>
21938 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21939 <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>
21944 Ref: 20. ref-tags with identical names but different content should keep it
21946 A <ref name="foo">Foo one</ref>
21947 B <ref name="foo">Foo two</ref>
21948 C <ref name="foo" />
21952 <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>
21953 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>
21954 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>
21956 <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>
21961 References: 1. references tag without any refs should be handled properly
21965 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21969 References: 2. references tag with group only outputs references from that group
21971 A <ref group="a">foo</ref>
21972 B <ref group="b">bar</ref>
21975 <references group="a" />
21977 <references group="b" />
21979 <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>
21980 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>
21981 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>
21983 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21984 <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>
21986 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21987 <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>
21989 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21990 <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>
21995 References: 3. ref list should be cleared after processing references
22005 <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>
22007 <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>
22010 <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>
22012 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22013 <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>
22018 References: 4. only referenced group should be cleared after processing references
22020 A <ref group="a">afoo</ref>
22023 <references group="a" />
22029 <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>
22030 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>
22032 <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>
22035 <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>
22037 <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>
22041 ## Don't expect this to rt since we're dropping content
22043 References: 5. ref tags in references should be processed while ignoring all other content
22045 parsoid=wt2html,html2html
22048 B <ref name="b">bar</ref>
22051 <ref name="a">foo</ref>
22052 This should just get lost.
22055 <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>
22056 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>
22059 <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;\"><span class=\"mw-reflink-text\">[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>
22064 References: 6. <references /> from a transclusion
22066 <ref>Foo</ref> {{echo|<references />}}
22068 <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>
22073 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22075 A <ref>foo bar for a</ref>
22076 B <ref group="X" name="b" />
22080 <references group="X">
22081 <ref name="b">foo</ref>
22084 <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>
22085 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>
22088 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22089 <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>
22092 <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\"><span class=\"mw-reflink-text\">[X 1]</span></a></span>\n"}}'>
22093 <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>
22098 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22100 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22103 <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>
22104 <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>
22108 # This test only works in wt2html now as the <references /> are always generated
22109 # unless selser is active. Once T72722 is fixed, we should add a changes test
22110 # here to ensure that unrelated changes don't add the new <references /> in
22113 References: 9. Generate missing references list at the end
22116 B <ref group="inexistent">bar</ref>
22118 <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>
22119 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22120 <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>
22122 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
22123 <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>
22128 References: 10. New <references/> shouldn't be added for unrelated edits.
22131 "modes": ["selser"],
22132 "changes": [["#x", "remove"]],
22136 Unrelated text<span id="x"> that's going to disappear</span>.
22144 Entities in ref name
22146 <ref name="test & me">hi</ref>
22149 <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>
22150 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22151 <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>
22155 # This test is wt2html only because we're permitting the serializer to produce
22156 # dirty diffs, normalizing the unclosed references to the self-closed version.
22158 Generate references for unclosed references tag
22166 <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>
22167 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22168 <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>
22172 New reference serializes on its own line
22174 parsoid=wt2wt,html2wt
22179 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22182 #### ----------------------------------------------------------------
22183 #### Parsoid-only testing of Parsoid's impl of LST
22184 #### Not implemented yet, see
22185 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22186 #### ----------------------------------------------------------------
22189 LST Sections: 1. Simple section start and end
22191 parsoid={ "suppressErrors": true }
22193 <section begin="2011-05-16" />
22194 <section end="2014-04-10 (MW 1.23wmf22)" />
22196 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22197 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22200 #--------- Test stripping of empty nodes in template content ----------
22202 Empty LI and TR nodes should be stripped from template content
22207 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22211 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22224 Empty LI and TR nodes should not be stripped from top-level content
22251 Empty TR nodes should not be stripped if they have any attributes set
22253 {{EmptyTRWithHTMLAttrTest}}
22255 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22256 <tr align="center"></tr>
22257 <tr><td>foo</td></tr>
22258 <tr align="center"></tr>
22259 <tr><td>bar</td></tr>
22263 #### ----------------------------------------------------------------
22264 #### The following section of tests are primarily to test
22265 #### wikitext escaping capabilities of Parsoid. Given that
22266 #### escaping can be done any number of ways, the wikitext (input)
22267 #### is always adjusted to reflect how Parsoid adds nowiki
22270 #### We are marking several tests as parsoid-only since the
22271 #### HTML in the result section is different from what the
22272 #### PHP parser generates for it.
22273 #### ----------------------------------------------------------------
22276 #### --------------- Headings ---------------
22278 #### 1. Nested inside html <h1>=foo=</h1>
22279 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22280 #### 3. Nested inside html with wikitext split by html tags
22281 #### 4. No escape needed
22282 #### 5. Empty headings <h1></h1>
22283 #### 6. Heading chars in SOL context
22284 #### ----------------------------------------
22286 Headings: 0. Unnested
22296 <p>=foo<i>a</i>=</p>
22298 <nowiki>=foo=</nowiki>
22300 <nowiki> </nowiki>=foo=
22302 <nowiki>=foo=</nowiki>
22304 =foo''a''<nowiki>=</nowiki>
22307 # New headings and existing headings are handled differently
22309 Headings: 1. Nested inside html
22317 <h1 data-parsoid=''>=foo=</h1>
22318 <h2 data-parsoid=''>=foo=</h2>
22319 <h3 data-parsoid=''>=foo=</h3>
22320 <h4 data-parsoid=''>=foo=</h4>
22321 <h5 data-parsoid=''>=foo=</h5>
22322 <h6 data-parsoid=''>=foo=</h6>
22330 =<nowiki>=foo=</nowiki>=
22331 ==<nowiki>=foo=</nowiki>==
22332 ===<nowiki>=foo=</nowiki>===
22333 ====<nowiki>=foo=</nowiki>====
22334 =====<nowiki>=foo=</nowiki>=====
22335 ======<nowiki>=foo=</nowiki>======
22340 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22349 <nowiki>*</nowiki>bar
22355 <nowiki>=bar=</nowiki>
22359 Headings: 3. Nested inside html with wikitext split by html tags
22363 <h1>=<b>bold</b>foo=</h1>
22365 = ='''bold'''foo= =
22369 Headings: 4a. No escaping needed (testing just h1 and h2)
22380 <h1><i>=</i>foo=</h1>
22400 Headings: 4b. No escaping needed (inside p-tags)
22415 Headings: 5. Empty headings
22419 <h1 data-parsoid='{}'></h1>
22421 <h2 data-parsoid='{}'></h2>
22423 <h3 data-parsoid='{}'></h3>
22425 <h4 data-parsoid='{}'></h4>
22427 <h5 data-parsoid='{}'></h5>
22429 <h6 data-parsoid='{}'></h6>
22439 =====<nowiki/>=====
22441 ======<nowiki/>======
22445 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22455 <nowiki>=a=</nowiki>
22457 <nowiki>=a=</nowiki>
22459 <nowiki>=a=</nowiki>
22463 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22476 <nowiki>=a=</nowiki>
22479 <nowiki>=a=</nowiki>
22482 <nowiki>=a=</nowiki>
22487 Headings: 6c. Heading chars in SOL context (leading newline break)
22495 <nowiki>=b=</nowiki>
22499 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22503 <!--c0--><p>=a=</p>
22505 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22507 <!--c0--><nowiki>=a=</nowiki>
22509 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22513 Headings: 6d. Heading chars in SOL context (No escaping needed)
22523 Headings: 7. Insert a newline between new content and headings
22529 <h2 data-parsoid='{}'>A</h2>
22530 <p data-parsoid='{}'>a</p>
22540 #### --------------- Lists ---------------
22541 #### 0. Outside nests (*foo, etc.)
22542 #### 1. Nested inside html <ul><li>*foo</li></ul>
22543 #### 2. Inside definition lists
22544 #### 3. Only bullets at start should be escaped
22545 #### 4. No escapes needed
22546 #### 5. No unnecessary escapes
22547 #### 6. Escape bullets in SOL position
22548 #### 7. Escape bullets in a multi-line context
22549 #### ----------------------------------------
22552 Lists: 0. Outside nests
22562 <nowiki>*</nowiki>foo
22564 <nowiki>#</nowiki>foo
22566 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22569 ## Making these next 3 tests Parsoid-only since they are html2wt tests
22570 ## to test wikitext escaping, and insignificant whitespace diffs
22571 ## cause PHP parser tests to barf
22573 Lists: 1. Nested inside html (No unnecessary escapes)
22582 <li data-parsoid='{}'>*foo</li>
22583 <li data-parsoid='{}'>#foo</li>
22584 <li data-parsoid='{}'>:foo</li>
22585 <li data-parsoid='{}'>;foo</li>
22593 <li data-parsoid='{}'>*foo</li>
22594 <li data-parsoid='{}'>#foo</li>
22595 <li data-parsoid='{}'>:foo</li>
22596 <li data-parsoid='{}'>;foo</li>
22603 *<nowiki>*foo</nowiki>
22604 *<nowiki>#foo</nowiki>
22605 *<nowiki>:foo</nowiki>
22606 *<nowiki>;foo</nowiki>
22612 #<nowiki>*foo</nowiki>
22613 #<nowiki>#foo</nowiki>
22614 #<nowiki>:foo</nowiki>
22615 #<nowiki>;foo</nowiki>
22619 Lists: 2. Inside definition lists
22623 <dl><dt>;foo</dt></dl>
22624 <dl><dt>:foo</dt></dl>
22627 <dl><dd>:foo</dd></dl>
22631 ; <nowiki>:foo</nowiki>
22633 ; <nowiki>:foo</nowiki>
22640 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
22646 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
22650 *<nowiki>*foo</nowiki>''it''*bar
22654 Lists: 4. No escapes needed
22667 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22671 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22685 Lists: 5. No unnecessary escapes
22689 <ul><li> bar <span>[[foo]]</span></li></ul>
22690 <ul><li> =bar <span>[[foo]]</span></li></ul>
22691 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22692 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22693 <ul><li> =bar <span>foo]]</span>=</li></ul>
22694 <ul><li> <s></s>: a</li></ul>
22695 <ul><li> <i>* foo</i></li></ul>
22698 * bar <span><nowiki>[[foo]]</nowiki></span>
22700 * =bar <span><nowiki>[[foo]]</nowiki></span>
22702 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22704 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22706 * =bar <span>foo]]</span>=
22714 Lists: 6. Escape bullets in SOL position
22718 <p><!--cmt-->*foo</p>
22720 <!--cmt--><nowiki>*</nowiki>foo
22724 Lists: 7. Escape bullets in a multi-line context
22733 <nowiki>*</nowiki>b
22737 Lists: 8. Escape colons only if not present in tags
22741 <dl><dt>a:b<i>c:d</i></dt></dl>
22743 ; <nowiki>a:b</nowiki>''c:d''
22746 #### --------------- HRs ---------------
22747 #### 1. Single line
22748 #### -----------------------------------
22751 HRs: 1. Single line
22759 ----<nowiki>----</nowiki>
22764 #### --------------- Tables ---------------
22765 #### 1a. Simple example
22766 #### 1b. No escaping needed (!foo)
22767 #### 1c. No escaping needed (|foo)
22768 #### 1d. No escaping needed (|}foo)
22770 #### 2a. Nested in td (<td>foo|bar</td>)
22771 #### 2b. Nested in td (<td>foo||bar</td>)
22772 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22774 #### 3a. Nested in th (<th>foo!bar</th>)
22775 #### 3b. Nested in th (<th>foo!!bar</th>)
22776 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22780 #### 4c. No escaping needed
22781 #### --------------------------------------
22784 Tables: 1a. Simple example
22792 <nowiki>{|</nowiki>
22797 Tables: 1b. No escaping needed
22808 Tables: 1c. No escaping needed
22819 Tables: 1d. No escaping needed
22830 Tables: 2a. Nested in td
22835 <td>foo|bar</td></tr>
22836 <tr><td>x<div>a|b</div></td>
22840 |<nowiki>foo|bar</nowiki>
22842 |x<div><nowiki>a|b</nowiki></div>
22858 Tables: 2b. Nested in td
22864 <td>a<i>b||c</i></td>
22865 <td>a<i><div>b||c</div></i></td>
22866 </tr></tbody></table>
22869 |<nowiki>foo||bar</nowiki>
22870 |a''<nowiki>b||c</nowiki>''
22871 |a''<div><nowiki>b||c</nowiki></div>''
22880 <td>a<i><div>b||c</div></i>
22886 Tables: 2c. Nested in td -- no escaping needed
22904 Tables: 3a. Nested in th
22922 Tables: 3b. Nested in th
22927 <tr><th>foo!!bar</th>
22928 <th><i>foo|bar</i></th>
22929 <th><i>foo!!bar</i></th>
22930 <th><i><span>foo!!bar</span></i></th>
22931 </tr></tbody></table>
22934 !<nowiki>foo!!bar</nowiki>
22935 !''<nowiki>foo|bar</nowiki>''
22936 !''<nowiki>foo!!bar</nowiki>''
22937 !''<span><nowiki>foo!!bar</nowiki></span>''
22946 <th><i>foo!!bar</i>
22948 <th><i><span>foo!!bar</span></i>
22954 Tables: 3c. Nested in th
22959 <tr><th>foo||bar</th>
22960 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22961 </tr></tbody></table>
22964 !<nowiki>foo||bar</nowiki>
22965 !<nowiki>foo||bar</nowiki>
22978 Tables: 4a. Escape -
22997 |<nowiki>-bar</nowiki>
23002 Tables: 4b. Escape +
23021 |<nowiki>+bar</nowiki>
23026 Tables: 4c. No escaping needed
23031 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23032 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23038 <div>a|b</div></td>
23083 Tables: 4d. No escaping needed
23088 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23089 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23090 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23101 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23111 T97430: Don't emit empty nowiki pairs around marker meta tags
23115 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23116 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23118 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23119 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23123 Unclosed xmlish element in table line shouldn't eat end delimiters
23128 <tbody><tr><td> <foo</td>
23129 <td> bar></td></tr>
23146 #### --------------- Links ----------------
23147 #### 1. Quote marks in link text
23148 #### 2. Wikilinks: Escapes needed
23149 #### 3. Wikilinks: No escapes needed
23150 #### 4. Extlinks: Escapes needed
23151 #### 5. Extlinks: No escapes needed
23152 #### --------------------------------------
23154 Links 1. WikiLinks: No escapes needed
23158 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23159 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23160 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23164 [[Foo|x [Foobar] x]]
23166 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23167 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23168 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23173 Links 2. WikiLinks: Escapes needed
23177 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23178 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23179 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23180 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23181 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23182 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23183 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23184 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23185 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23186 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23188 [[Foo|<nowiki>Foobar]</nowiki>]]
23189 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23190 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23191 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23192 [[Foo|<nowiki>|Bar</nowiki>]]
23193 [[Foo|<nowiki>]]bar</nowiki>]]
23194 [[Foo|<nowiki>[[bar</nowiki>]]
23195 [[Foo|<nowiki>x [[ y</nowiki>]]
23196 [[Foo|<nowiki>x ]] y</nowiki>]]
23197 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23199 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23200 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23201 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23202 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23203 <a href="/wiki/Foo" title="Foo">|Bar</a>
23204 <a href="/wiki/Foo" title="Foo">]]bar</a>
23205 <a href="/wiki/Foo" title="Foo">[[bar</a>
23206 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23207 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23208 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23213 Links 3. WikiLinks: No escapes needed
23217 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23218 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23223 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23224 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23229 Links 4. ExtLinks: Escapes needed
23233 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23234 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23235 <p>[http://google.com]</p>
23236 <p>[http://google.com google]</p>
23237 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23238 <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>
23240 [http://google.com <nowiki>[google]</nowiki>]
23241 [http://google.com <nowiki>google]</nowiki>]
23243 <nowiki>[http://google.com]</nowiki>
23245 <nowiki>[http://google.com google]</nowiki>
23247 [http://google.com<nowiki>]</nowiki>
23249 [{{echo|http://google.com}}<nowiki>]</nowiki>
23251 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23252 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23253 </p><p>[http://google.com]
23254 </p><p>[http://google.com google]
23255 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23256 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23261 Links 5. ExtLinks: No escapes needed
23265 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23266 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23268 [http://google.com [google]
23270 [[http://google.com]]
23272 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23273 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23278 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23282 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23283 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23284 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23285 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23286 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23287 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23288 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23289 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23290 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23291 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23292 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23293 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23294 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23297 x<nowiki/>http://example.com<nowiki/>y
23298 http://example.com<nowiki/>?x
23299 http://example.com<nowiki/>&x
23300 http://example.com<nowiki/>'x
23301 http://example.com<nowiki/>,x
23302 http://example.com<nowiki/>.x
23303 http://example.com<nowiki/>;x
23304 http://example.com<nowiki/>:x
23305 http://example.com<nowiki/>;x
23306 http://example.com<nowiki/>!x
23307 http://example.com<nowiki/>=x
23308 http://example.com<nowiki/>(x)
23309 http://example.com(x<nowiki/>)
23313 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23318 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23320 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23321 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23322 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23323 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23324 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23330 "http://example.com"
23331 (http://example.com)
23332 (http://example.com) foo
23333 http://example.com,
23334 http://example.com, foo
23337 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23339 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23340 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23341 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23342 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23343 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23348 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23352 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23353 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23355 http://example.com.,;:!?\
23356 -http://example.com:
23358 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23359 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23364 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23368 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23369 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23370 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23374 X<nowiki/>RFC 123<nowiki/>y
23378 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23382 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23383 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23384 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23391 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23392 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23393 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23398 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23402 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23403 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23404 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23408 X<nowiki/>PMID 123<nowiki/>y
23412 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23416 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23417 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23418 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23425 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23426 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23427 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23432 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23436 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23437 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23438 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23441 ISBN 1234567890<nowiki/>1
23442 ISBN 1234567890<nowiki/>x
23443 a<nowiki/>ISBN 1234567890<nowiki/>b
23447 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23451 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23455 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23460 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23464 <p>this is not a link: http://example.com
23467 this is not a link: <nowiki>http://example.com</nowiki>
23471 Links 15. Link trails can't become link prefixes.
23476 <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>
23478 [[Söfnuður]]-[[00]]
23480 <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>
23484 #### --------------- Quotes ---------------
23485 #### 1. Quotes inside <b> and <i>
23486 #### 2. Link fragments separated by <i> and <b> tags
23487 #### 3. Link fragments inside <i> and <b>
23488 #### 4. No escaping needed
23489 #### --------------------------------------
23491 1a. Quotes inside <b> and <i>
23502 <b>foo'<i>bar'</i>baz</b>
23511 <i>fools'<span> errand</span></i>
23512 <i><span>fool</span>'s errand</i>
23513 '<i>foo</i> bar '<i>baz</i>
23514 a|!*#-:;+-~[]{}b'<i>x</i>
23518 ''<nowiki>''foo''</nowiki>''
23519 ''<nowiki>'''foo'''</nowiki>''
23521 '''<nowiki/>'foo''''
23522 '''<nowiki>''foo''</nowiki>'''
23523 '''<nowiki>'''foo'''</nowiki>'''
23524 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23525 '''foo'''<nowiki/>'s
23531 '''foo'''<nowiki/>'
23532 ''''foo'''<nowiki/>'
23533 ''fools'<span> errand</span>''
23534 ''<span>fool</span>'s errand''
23535 '<nowiki/>''foo'' bar '''baz''
23536 a|!*#-:;+-~[]{}b'''x''
23540 1b. Quotes inside <b> and <i> with other tags on same line
23544 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23545 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23546 <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>
23547 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23548 '<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>
23549 '<i>foo</i> <div title="name">test</div>
23550 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23551 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23552 <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>
23555 '''a'' foo ''[[bar]]''
23556 ''a''' foo ''[[bar]]''
23557 ''a''' foo '''{{echo|[[bar]]}}'''
23558 [[foo]] x'''[[bar]]''
23559 '''foo'' <ref>test</ref>
23560 '''foo'' <div title="name">test</div>
23561 '''foo'' and <br> bar
23566 2. Link fragments separated by <i> and <b> tags
23570 <p>[[<i>foo</i>hello]]</p>
23571 <p>[[<b>foo</b>hello]]</p>
23573 [[''foo''<nowiki>hello]]</nowiki>
23575 [['''foo'''<nowiki>hello]]</nowiki>
23578 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23579 # this is one of the shortcomings of this format
23581 3. Link fragments inside <i> and <b>
23585 <p><i>[[foo</i>]]</p>
23586 <p><b>[[foo</b>]]</p>
23588 ''[[foo''<nowiki>]]</nowiki>
23590 '''[[foo'''<nowiki>]]</nowiki>
23594 4. No escaping needed
23598 <p>'<span><i>bar</i></span>'
23599 '<span><b>bar</b></span>'
23603 '<span>''bar''</span>'
23604 '<span>'''bar'''</span>'
23608 #### ----------- Paragraphs ---------------
23609 #### 1. No unnecessary escapes
23610 #### --------------------------------------
23613 1. No unnecessary escapes
23617 <p>bar <span>[[foo]]</span>
23618 </p><p>=bar <span>[[foo]]</span>
23619 </p><p>[[bar <span>[[foo]]</span>
23620 </p><p>]]bar <span>[[foo]]</span>
23621 </p><p>=bar <span>foo]]</span>=
23624 bar <span><nowiki>[[foo]]</nowiki></span>
23626 =bar <span><nowiki>[[foo]]</nowiki></span>
23628 [[bar <span><nowiki>[[foo]]</nowiki></span>
23630 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23632 =bar <span>foo]]</span><nowiki>=</nowiki>
23635 #### ----------------------- PRE --------------------------
23636 #### 1. Leading whitespace in SOL context should be escaped
23637 #### ------------------------------------------------------
23639 1. Leading whitespace in SOL context should be escaped
23662 <nowiki> </nowiki>a
23664 <nowiki> </nowiki> a
23668 <nowiki> </nowiki> a
23670 <nowiki> </nowiki>a
23673 <nowiki> </nowiki>b
23696 2. Leading whitespace in non-indent-pre contexts should not be escaped
23700 <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>
23701 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23702 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><i data-parsoid='{"dsr":[9,14,2,2]}'>a</i>
23712 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23731 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23735 <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>
23737 [[File:Foobar.jpg|thumb|caption]]
23741 5. Nowiki escaping should account for indent-pres
23751 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23764 #### --------------- Behavior Switches --------------------
23767 1. Valid behavior switches should be escaped
23774 <nowiki>__TOC__</nowiki>
23775 ''<nowiki>__TOC__</nowiki>''
23779 2. Invalid behavior switches should not be escaped
23790 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23792 Behavior switches should be SOL-transparent
23796 <meta property="mw:PageProp/toc" />
23798 <!-- this one's bogus -->
23801 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23803 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23807 <!-- this one's bogus -->
23816 #### --------------- HTML tags ---------------
23819 #### 3. multi-line html tag
23820 #### 4. extension tags
23821 #### -----------------------------------------
23827 <a href="http://google.com">google</a>
23829 <a href="http://google.com">google</a>
23837 <ul><li> <div>foo</div></li>
23838 <li> <div style="color:red">foo</div></li>
23839 <li> <td></li></ul>
23842 * <nowiki><div>foo</div></nowiki>
23843 * <nowiki><div style="color:red">foo</div></nowiki>
23844 * <nowiki><td></nowiki>
23848 3. multi-line html tag
23867 <p><ref>foo</ref>
23868 </p><p><ref>bar
23869 </p><p>baz</ref>
23872 <nowiki><ref>foo</ref></nowiki>
23874 <nowiki><ref>bar</nowiki>
23876 baz<nowiki></ref></nowiki>
23879 #### --------------- Others ---------------
23885 <p><nowiki>foo</nowiki>
23888 <nowiki>foo</nowiki>
23891 ## The quote-char in the input is necessary for triggering the bug
23893 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23902 #----------- End of wikitext escaping tests --------------
23906 Tag-like HTML structures are passed through as text
23928 </p><p>1<d e>f
23933 HTML tag with necessary entities in attributes
23935 <span title="&amp;">foo</span>
23937 <p><span title="&amp;">foo</span>
23942 HTML tag with 'unnecessary' entity encoding in attributes
23944 <span title="&">foo</span>
23946 <p><span title="&">foo</span>
23951 HTML tag with broken attribute value quoting
23953 parsoid=wt2html,html2html
23955 <span title="Hello world>Foo</span>
23957 <p><span title="Hello world">Foo</span>
23960 <p><span title="Hello world">Foo</span></p>
23964 Self-closed tag with broken attribute value quoting
23966 parsoid=wt2html,html2html
23968 <div title="Hello world />Foo
23970 <div title="Hello world"></div>
23973 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
23977 Table with broken attribute value quoting
23979 parsoid=wt2html,html2html
23982 | title="Hello world|Foo
23987 <td title="Hello world">Foo
23993 <td title="Hello world">Foo
23999 Table with broken attribute value quoting on consecutive lines
24001 parsoid=wt2html,html2html
24004 | title="Hello world|Foo
24005 | style="color:red|Bar
24010 <td title="Hello world">Foo
24012 <td style="color:red">Bar
24018 <td title="Hello world">Foo
24019 </td><td style="color: red">Bar
24020 </td></tr></tbody></table>
24025 2. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
24035 1. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
24045 Accept empty td cell attribute
24048 | align="center" | foo || |
24053 <td align="center"> foo </td>
24060 Non-empty attributes in th-cells
24063 ! Foo !! style="color: red" | Bar
24069 <th style="color: red"> Bar
24075 Accept empty attributes in th-cells
24090 Empty table rows go away
24111 ### Parsoid-centric tests for testing RTing of inter-element separators
24112 ### Edge cases not tested by existing parser tests and specific to
24113 ### Parsoid-specific serialization strategies.
24117 RT-ed inter-element separators should be valid separators
24129 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24133 # Parsoid-only since PHP parser relies on Tidy for correct output
24135 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24149 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24150 <p>bar</p></small></td></tr>
24154 <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>
24158 # Note that the "style" attribute is really a template parameter here.
24159 # The = would have to be {{=}} if you wanted the literal.
24161 Empty TD followed by TD with tpl-generated attribute
24166 |{{echo|style='color:red'}}|foo
24180 Indented table with an empty td
24198 ## We have some newline diffs RT-ing this edge case
24199 ## and it is not important enough -- we seem to be emitting
24200 ## at most 2 newlines after a </tr> and this is unrelated to
24201 ## the issue from T85627 that this is testing.
24203 Indented table with blank lines in between (T85627)
24222 Indented block & table
24236 <div data-parsoid='{"stx":"html"}'>foo</div>
24238 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24243 Indent and comment before table row
24258 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24259 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24263 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24265 Empty TR followed by a template-generated TR
24271 {{echo|<tr><td>foo</td></tr>}}
24277 <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}}]}'>
24282 ## PHP and parsoid output differ for this, and since this is primarily
24283 ## for testing Parsoid's serializer, marking this Parsoid only
24285 Empty TR followed by mixed-ws-comment line should RT correctly
24301 <!--c--> </tr><!--d-->
24307 Multi-line image caption generated by templates with/without trailing newlines
24309 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24310 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24312 <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>
24313 <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>
24317 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24321 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24323 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24325 <includeonly>foo</includeonly>
24333 ## PHP emits broken html for this, and since this is primarily
24334 ## a Parsoid serializer test, marking this Parsoid only
24336 Improperly nested inline or quotes tags with whitespace in between
24338 <span> <s>x</span> </s>
24341 <p><span> <s>x</s></span><s> </s>
24342 <b> <i>x</i></b><i> </i>
24347 Encapsulate protected attributes from wt
24349 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24351 <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>
24355 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24356 ## Having nested or stray pre tags results in the attempt to add duplicates,
24357 ## causing an assertion fail. This test tries to prevent that situation.
24359 Ensure ParagraphWrapper can deal with stray closing pre tags
24369 1. Ensure fostered text content is wrapped in element nodes
24373 <table>hi</table><table>ho</table>
24382 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24384 parsoid=wt2html,wt2wt
24393 <tbody><tr><td> a</td></tr>
24398 Encapsulation properly handles null DSR information from foster box
24400 parsoid=wt2html,wt2wt
24402 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24404 <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>
24408 1. Encapsulate foster-parented transclusion content
24410 parsoid=wt2wt,wt2html
24412 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24414 <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>
24424 2. Encapsulate foster-parented transclusion content
24426 parsoid=wt2wt,wt2html
24428 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24430 <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>
24441 3. Encapsulate foster-parented transclusion content
24443 parsoid=wt2wt,wt2html
24445 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24447 <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>"]}">
24460 4. Encapsulate foster-parented transclusion content
24462 parsoid=wt2wt,wt2html
24464 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24466 <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>"]}">
24479 5. Encapsulate foster-parented transclusion content
24481 parsoid=wt2wt,wt2html
24483 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24485 <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>
24500 6. Encapsulate foster-parented transclusion content
24502 parsoid=wt2wt,wt2html
24504 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24506 <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>
24522 7. Encapsulate foster-parented transclusion content
24524 parsoid=wt2wt,wt2html
24526 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24528 <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>
24538 # Note that the wt is broken on purpose: the = should be {{=}} if you
24539 # don't want it to be a template parameter key.
24541 8. Encapsulate foster-parented transclusion content
24543 parsoid=wt2wt,wt2html
24546 }}{|{{echo|style='color:red'}}
24551 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24553 <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>
24564 9. Encapsulate foster-parented transclusion content
24566 parsoid=wt2wt,wt2html
24568 <table>{{echo|hi</table>hello}}
24570 <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>
24574 Table in fosterable position
24585 <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">
24587 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24593 # Parsoid only for bug 64747
24595 Properly encapsulate empty-content transclusions in fosterable positions
24603 <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"}]]}'>
24609 Always encapsulate foster box when template range is expanded to table
24622 T115289: Unclosed table
24624 {{echo|<table>}}<!--c-->[[Category:Two]]
24626 <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>
24630 T115289: Don't migrate newlines out of tables with fostered content
24632 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
24634 <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,"dsr":[0,53,7,0]}'><tbody><tr><td></td></tr><tr><!--c--></tr></tbody></table>
24638 T73074: More fostering fun
24640 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
24642 <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>
24646 Support <object> element with .data attribute
24650 <object data="test.swf"></object>
24652 <object data="test.swf"></object>
24656 Don't block XML namespace declaration
24658 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24660 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24663 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24666 # -----------------------------------------------------------------
24667 # The following section of tests are primarily to spec requirements
24668 # around serialization of new/edited content.
24670 # All these tests are marked Parsoid html2wt and html2html only
24671 # ----------------------------------------------------------------
24673 # 'mi' is a localinterwiki prefix as well as a language
24675 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24679 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24686 New wikilinks should be serialized properly
24690 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24691 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24698 New wiki links (href variations)
24702 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24703 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24704 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24705 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24710 [[Toxine bactérienne]]
24714 New wiki links (content string variations)
24718 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24719 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24720 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24724 [[Foo_bar|./Foo_bar]]
24728 New category links (href variations)
24732 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24733 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24734 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24736 [[Category:Toxine bactérienne]]
24737 [[Category:Toxine bactérienne]]
24738 [[Category:Toxine bactérienne]]
24742 New sol transparent links don't need indent-pre nowiki protection
24747 <link rel="mw:PageProp/redirect" href="./Main_Page">
24748 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24749 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24751 #WEITERLEITUNG [[Main Page]]
24752 <!-- this is good --> [[Category:Good]]
24753 <!-- this is great --> [[Kategorie:Great]]
24757 New interlanguage links (href variations)
24761 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24762 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24763 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24765 [[es:Toxine bactérienne]]
24766 [[es:Toxine_bactérienne]]
24767 [[es:Toxine_bactérienne]]
24771 Image: Modifying size of an image (1)
24774 "modes": ["wt2wt"],
24776 ["img[height]", "attr", "height", "22"],
24777 ["img[width]", "attr", "width", "200"]
24781 [[Image:Foobar.jpg|230x230px]]
24783 [[Image:Foobar.jpg|200x200px]]
24787 Image: Modifying size of an image (2)
24790 "modes": ["wt2wt"],
24792 ["img[height]", "attr", "height", "100"],
24793 ["img[width]", "attr", "width", "500"]
24797 [[Image:Foobar.jpg|230x230px]]
24799 [[Image:Foobar.jpg|500x500px]]
24802 # Change in size is ignored so long as class='mw-default-size'
24804 Image: Modifying size of an image (3)
24807 "modes": ["wt2wt"],
24809 ["figure[class]", "removeClass", "mw-default-size"],
24810 ["figure img", "attr", "height", "19"],
24811 ["figure img", "attr", "width", "170"]
24815 [[Image:Foobar.jpg|thumb]]
24817 [[Image:Foobar.jpg|thumb|170x170px]]
24821 Image: Modifying alignment of an image (bug 48665)
24824 "modes": ["wt2wt"],
24826 ["figure[class]", "removeClass", "mw-halign-right"],
24827 ["figure[class]", "addClass", "mw-halign-left"]
24831 [[Image:Foobar.jpg|thumb|caption|right]]
24833 [[Image:Foobar.jpg|thumb|caption|left]]
24837 Image: Modifying mw-default-size of an frameless image (bug 62805)
24840 "modes": ["wt2wt"],
24842 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24846 [[Image:Foobar.jpg|frameless|right]]
24848 [[Image:Foobar.jpg|frameless|right|220x220px]]
24852 Image: Modifying valign of an image (bug 49221)
24855 "modes": ["wt2wt"],
24857 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24858 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24862 [[File:Foobar.jpg|20px|middle]]
24864 [[File:Foobar.jpg|20px|text-top]]
24868 Image: Modifying alt attribute of an image (bug 56400)
24871 "modes": ["wt2wt"],
24873 ["img[alt]", "attr", "alt", "some alternate edited text"]
24877 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24879 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24883 Image: Modifying caption of an image
24886 "modes": ["wt2wt"],
24888 ["figcaption", "text", "new caption"]
24892 [[Image:Foobar.jpg|thumb|original caption]]
24894 [[Image:Foobar.jpg|thumb|new caption]]
24898 Image: empty alt attribute (bug 48924)
24902 [[File:Foobar.jpg|thumb|alt=|bar]]
24904 <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>
24908 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24914 <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>
24916 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24920 Image: Block level image should have \n before and after
24923 [[File:Foobar.jpg|right|thumb|150x150px]]
24927 <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>
24932 Image: New block level image should have \n before and after (existing content)
24935 [[File:Foobar.jpg|right|thumb|150x150px]]
24939 <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>
24944 Image: upright option (parsoid)
24946 [[File:Foobar.jpg|thumb|upright|caption]]
24947 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24948 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24950 <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>
24951 <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>
24952 <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>
24956 Image: upright option is ignored on inline and frame images (parsoid)
24958 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24960 <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>
24964 Image: from basic HTML (1)
24968 <span typeof="mw:Image">
24969 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24972 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24976 Image: from basic HTML (2)
24980 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24982 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24986 Image: from basic HTML (3)
24990 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24992 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24996 Image: from basic HTML (4)
25000 <img src="./File:Foobar.jpg">
25002 [[File:Foobar.jpg|link=]]
25006 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25011 <li><p>foo</p></li>
25018 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25022 <ul> <li>foo</li></ul>
25028 Don't strip leading whitespace when handling indent-pre suppressing tags
25033 <tr><td> indented row</td></tr>
25036 <b>This is very bold of you!</b>
25039 indented cell (no pre-wrapping!)
25049 '''This is very bold of you!'''
25053 indented cell (no pre-wrapping!)
25061 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25083 <nowiki> </nowiki></span>bar2
25086 <nowiki> </nowiki><span>bar</span>
25089 <nowiki> </nowiki><span>foo</span>
25094 Lists: Dont insert newlines in a serialized list item.
25098 <ul><li>a<br>b</li><li>c</li></ul>
25105 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25108 "modes": ["html2wt"],
25109 "scrubWikitext": false
25112 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25113 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25115 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25116 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25118 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25120 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25122 == hello there [[Category:A1]] ==
25124 == [[Category:A2]] hi pal ==
25126 == <!--foo--> [[Category:A3]] how goes it ==
25128 == it goes well [[Category:A4]] <!--bar--> ==
25130 ==howdy [[Category:A5]]==
25136 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25139 "modes": ["html2wt"],
25140 "scrubWikitext": true
25143 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25144 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25146 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25147 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25149 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25157 <!--foo--> [[Category:A3]]
25162 [[Category:A4]] <!--bar-->
25170 Headings: Don't hoist metas that come from templates
25173 "modes": ["html2wt"],
25174 "scrubWikitext": true
25177 <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>
25179 == {{echo|foo [[Category:Foo]]}} ==
25183 Headings: Category in ref isn't hoisted
25186 "modes": ["html2wt"],
25187 "scrubWikitext": true
25190 <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>
25192 <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>
25195 [[Category:Baz]] </ref> ==
25201 Parsoid: Serialize positional parameters with = in them as named parameter
25205 <p about="#mwt1" typeof="mw:Transclusion"
25206 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25208 <p about="#mwt1" typeof="mw:Transclusion"
25209 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25211 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25212 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25213 <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>
25217 {{echo|1=f=oo|2=bar}}
25219 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25220 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25221 {{echo|<nowiki>f=oo</nowiki>|bar}}
25225 Parsoid: Serialize positional parameters with = in extlink as named parameter
25229 <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>
25231 {{echo|1=http://stuff?is=ok}}
25235 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25239 <div>a<p>b</p></div>
25260 Substrings resembling wikitext in hrefs should not get nowiki escapes
25264 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25270 Enforce single-line context in the serializer
25277 <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">
25278 </span><span about="#mwt1">you</span> </h2>
25280 <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>
25282 <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
25283 there</span></li></ol>
25295 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25302 </tbody></table></dd></dl>
25306 == hi {{bogus|there
25317 * foo '''bar''' baz
25329 Serialize new placeholder space without spans
25333 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25335 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25337 <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>
25343 <ref>foo : bar</ref>ok
25347 #-----------------------
25348 # Tag minimization tests
25349 #-----------------------
25352 1. I/B quote minimization: wikitext-only tags should be combined
25356 <p><i>A</i><i>B</i></p>
25357 <p><b>A</b><b>B</b></p>
25358 <p><i>A</i><b><i>B</i></b></p>
25359 <p><b>A</b><i><b>B</b></i></p>
25360 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25361 <p><i><b>A</b></i><i><b>B</b></i></p>
25362 <p><i><b>A</b></i><b><i>B</i></b></p>
25363 <p><b><i>A</i></b><i><b>B</b></i></p>
25383 2. I/B quote minimization: wikitext and html tags should not be combined
25387 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25388 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25392 ''A''<nowiki/>'''<i>B</i>'''
25396 3. I/B quote minimization: templated content stops minimization
25400 <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>
25401 <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>
25403 ''A''{{echo|''B''}}
25405 ''A''{{echo|'''''B'''''}}
25409 4. I/B quote minimization: new content should be mimimized with adjacent old content
25413 <p><i>A</i><i>B</i></p>
25414 <p><b>A</b><b>B</b></p>
25415 <p><i>A</i><b><i>B</i></b></p>
25425 5a. Merge adjacent quote nodes if they've been edited
25428 "modes": ["wt2wt", "selser"],
25430 ["p", "contents", "remove", ":contains('b')"]
25440 5b. Merge adjacent quote nodes if they've been edited
25443 "modes": ["wt2wt", "selser"],
25449 ''a''<span id="x">b</span>''c''
25455 1. Merge adjacent link nodes as long as at least one element is new
25458 "modes": ["html2wt"],
25459 "scrubWikitext": true
25462 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25463 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25464 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25468 [[Football|Foot]][[Football|ball]]
25472 2. Merge adjacent link nodes and enable additional normalizations
25475 "modes": ["html2wt"],
25476 "scrubWikitext": true
25479 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25481 [[Football|''Football'']]
25485 3. Don't merge adjacent link nodes if scrubWikitext is false
25488 "modes": ["html2wt"],
25489 "scrubWikitext": false
25492 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25494 [[Football|Foot]][[Football|ball]]
25497 #------------------------------
25498 # End of tag minimization tests
25499 #------------------------------
25502 Bug 54262: New entities
25506 <span typeof="mw:Entity"> </span>
25511 ## Note that there is no wikitext output for 'unknownproperty' ##
25512 ## Unknown magic words are silently dropped ##
25519 <meta property='mw:PageProp/toc' />
25520 <meta property='mw:PageProp/notoc' />
25521 <meta property='mw:PageProp/forcetoc' />
25522 <meta property='mw:PageProp/index' />
25523 <meta property='mw:PageProp/noindex' />
25524 <meta property='mw:PageProp/nogallery' />
25525 <meta property='mw:PageProp/noeditsection' />
25526 <meta property='mw:PageProp/notitleconvert' />
25527 <meta property='mw:PageProp/nocontentconvert' />
25528 <meta property='mw:PageProp/unknownproperty' />
25538 __NOCONTENTCONVERT__
25542 Consecutive <pre>s should not get merged
25544 parsoid=html2wt,html2html
25546 <pre>a</pre><pre>b</pre>
25574 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25578 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25580 [[Special:BookSources/1234567890|ISBN 1234567895]]
25584 Edited RFC links not serializable as RFC links should serialize as extlinks
25588 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25590 [//tools.ietf.org/html/rfc123 New RFC]
25594 Edited PMID links not serializable as PMID links should serialize as extlinks
25598 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25600 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25604 WTS of autolinks with trailing/surrounding context
25608 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25609 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25610 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25611 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25612 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25613 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25615 http://cscott.net'''foo'''
25617 http://cscott.net<b>foo</b>
25619 '''http://cscott.net'''
25621 '''http://cscott.net '''
25623 '''http://cscott.net<nowiki/>x'''
25625 http://cscott.net<nowiki/>x
25629 WTS of autolinks with nowikis (round-trip)
25631 x<nowiki/>http://cscott.net<nowiki/>x
25633 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25636 # this is the "easy" test because it leaves in place all the
25637 # data-parsoid information indicating this is an autolink
25639 WTS of autolinks with escapes (editing)
25642 "modes": ["wt2wt"],
25644 [ "meta", "remove" ]
25648 x<nowiki/>http://cscott.net<nowiki/>x
25650 x<nowiki/>http://cscott.net<nowiki/>x
25654 WTS of edited autolink-like text (T103364)
25657 "modes": ["wt2wt"],
25659 [ "span[typeof]", "removeAttr", "typeof" ]
25663 Not a link: <nowiki>http://example.com</nowiki>.
25665 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25669 WTS of newly-authored autolink-like text (T103364)
25673 <p>http://example.com is not a link.</p>
25675 <nowiki>http://example.com</nowiki> is not a link.
25679 WTS of autolink-like text after an autolink (T108563)
25683 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25685 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25689 Magic links inside links (not autolinked)
25691 [[Foo|http://example.com]]
25694 [[Foo|ISBN 123456789x]]
25696 [http://foo.com http://example.com]
25697 [http://foo.com RFC 1234]
25698 [http://foo.com PMID 1234]
25699 [http://foo.com ISBN 123456789x]
25701 <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>
25702 <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>
25704 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25705 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25706 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25707 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25709 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25710 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25711 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25712 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25716 Magic links inside image captions (autolinked)
25718 [[File:Foobar.jpg|thumb|http://example.com]]
25719 [[File:Foobar.jpg|thumb|RFC 1234]]
25720 [[File:Foobar.jpg|thumb|PMID 1234]]
25721 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25723 <div class="thumb tright">
25724 <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>
25725 <div class="thumbcaption">
25726 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25727 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25730 <div class="thumb tright">
25731 <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>
25732 <div class="thumbcaption">
25733 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25734 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25737 <div class="thumb tright">
25738 <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>
25739 <div class="thumbcaption">
25740 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25741 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25744 <div class="thumb tright">
25745 <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>
25746 <div class="thumbcaption">
25747 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25748 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25752 <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>
25753 <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>
25754 <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>
25755 <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>
25759 WTS of magic word text (T109371)
25764 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25765 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25767 <nowiki>RFC 1234</nowiki>
25769 [http://foo.com RFC 1234]
25775 Edited Redirect link should emit a non-piped wikitext link
25779 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25785 T75121: Infer extension name from typeOf if data-mw is not present
25787 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25789 <div typeOf="mw:Extension/foo"></div>
25794 # Note that the <p> wrapping isn't present in PHP parser output
25795 # The important thing for this test is that P-wrapping doesn't
25796 # interfere with the <nowiki> protection for leading - in <td>
25797 # (which isn't necessary for <th>).
25799 T88318: p-wrapped dash in table.
25801 parsoid=html2wt,wt2wt
25804 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25805 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25806 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25813 |<nowiki>-</nowiki>
25814 |<nowiki>- </nowiki>
25833 <td><small>-</small></td>
25845 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25850 <td id='mwAc'>foo</td>
25851 <td id='serialize-this'>bar</td>
25856 | id="serialize-this" |bar
25861 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25865 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25867 <div id="hello">ok</div>
25874 "modes": ["wt2wt"],
25876 [ "#xyz", "before", "<b>before</b> stuff " ],
25877 [ "#xyz", "after", " stuff <i>after</i>" ],
25878 [ "#xyz", "html", "x <b>y</b> z" ]
25882 <span id="xyz">hello</span>
25884 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25888 Never serialize a-tag as html, regardless of what data-parsoid has to say
25890 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25892 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25897 ## SSS FIXME: This is broken output nevertheless.
25898 ## What might be a reasonable non-broken output for this?
25899 ## This is an edge case unlikely to be seen in production
25900 ## that I am not wasting more time on this right now.
25902 Never serialize a-tag as html, no matter what attributes it has
25904 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25906 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25908 [http://boo.org http://boohoo.org]
25911 # Misnested is an indication that selser can reuse the source but these have
25912 # shown to sneak through on occasion. See T101768.
25913 # The original wikitext here is: [http://test.com [[one]] two three]
25915 Strip span tags added to mark misnested links
25919 <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>
25921 [http://test.com][[one]] two three
25925 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
25929 <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|}"]}'>
25941 ## This test verifies the presence and computation of this attribute indirectly
25942 ## by making an edit and ensuring that the serialization is correct (which it would be
25943 ## only if firstWikitextNode is properly set).
25945 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
25948 "modes": ["wt2wt"],
25950 [ "div#x", "remove" ],
25951 [ "div", "before", "<div>new</div>" ]
25955 <div id="x">foo</div>
25957 {{echo|<div>boo</div>
25965 {{echo|<div>boo</div>
25971 # --------------------------------------------
25972 # Tests spec'ing wikitext serialization norms |
25973 # --------------------------------------------
25976 1. Categories should always be serialized on their own line
25980 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
25988 2. Categories that are part of templates should not introduce a line break
25990 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
25992 <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>
25995 # Careful while editing these next 2 tests. There are \u200f characters
25996 # before and after the <link> tags in the HTML and following some
25997 # of the categories in wikitext
25998 # Do not remove these characters in edits.
26000 # As part of the serialization, these bidi characters will get stripped.
26002 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26005 "modes": ["html2wt"],
26006 "scrubWikitext": true
26009 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26010 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26013 [[קטגוריה: שיטות משפט]]
26017 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26020 "modes": ["html2wt"],
26021 "scrubWikitext": true
26024 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26031 Lists: Add space after bullets
26038 <li><span> baz</span></li>
26043 * <span> baz</span>
26047 1. Headings: Add space before/after == (T53744)
26054 <h2><span> baz</span></h2>
26062 == <span> baz</span> ==
26066 2. Headings: Add space before/after == even after hoisted content
26069 "modes": ["html2wt"],
26070 "scrubWikitext": true
26073 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26081 1. Headings: suppress newly created empty headings
26084 "modes": ["html2wt"],
26085 "scrubWikitext": true
26093 2. Headings: don't suppress empty headings if scrubWikitext is false
26103 3. Headings: suppress empty headings on edits
26106 "modes": ["selser"],
26107 "scrubWikitext": true,
26113 ==<span id="x">foo</span>==
26118 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26121 "modes": ["html2wt"],
26122 "scrubWikitext": true
26125 <h2>foo<br/>bar</h2>
26126 <h2>foo <span><br/>bar</span> baz</h2>
26130 == foo <span> bar</span> baz ==
26134 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26137 "modes": ["html2wt"],
26138 "scrubWikitext": false
26141 <h2>foo<br/>bar</h2>
26147 1. WT Quote Tags: suppress newly created empty style tags
26150 "modes": ["html2wt"],
26151 "scrubWikitext": true
26159 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26165 ''<nowiki/>'''''<nowiki/>'''
26169 3. WT Quote Tags: suppress empty style tags on edits
26172 "modes": ["selser"],
26173 "scrubWikitext": true,
26179 '''<span id="x">foo</span>'''
26184 1. Anchors: suppress newly created empty anchors
26187 "modes": ["html2wt"],
26188 "scrubWikitext": true
26191 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26196 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26199 "modes": ["html2wt"],
26200 "scrubWikitext": false
26203 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26209 3. Anchors: suppress empty anchors on edits
26212 "modes": ["selser"],
26213 "scrubWikitext": true,
26219 [[Test|<span id="x">foo</span>]]
26224 3a. Anchors: do not suppress numbered extlinks
26227 "modes": ["wt2wt"],
26228 "scrubWikitext": true
26233 <a rel="mw:ExtLink" href="http://foo.com"></a>
26237 3b. Anchors: do not suppress numbered extlinks
26240 "modes": ["wt2wt"],
26241 "scrubWikitext": true,
26247 [http://foo.com <span id="x">foo</span>]
26253 Normalizations should be restricted to edited content
26256 "modes": ["selser"],
26257 "scrubWikitext": true,
26259 [ "h1", "before", "<i></i>"]
26273 1. Multiple normalizations (html2wt)
26276 "modes": ["html2wt"],
26277 "scrubWikitext": true
26281 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26282 </a><b><i></i></b>x</p>
26291 2. Multiple normalizations (selser)
26294 "modes": ["selser"],
26295 "scrubWikitext": true,
26297 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26301 <span id="x">foo</span>
26303 <span id="x">foo</span>
26309 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26312 "modes": ["html2wt"],
26313 "scrubWikitext": true
26325 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26332 <nowiki> </nowiki>hi
26334 <nowiki> </nowiki> hello
26338 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26341 "modes": ["html2wt"],
26342 "scrubWikitext": true
26351 baz bang</td></tr></table>
26357 bar<span>boo</span></p>
26373 bar<span>boo</span>
26377 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26380 "modes": ["selser"],
26381 "scrubWikitext": true,
26383 [ "p", "html", " a\n b" ]
26394 1. New links that end in spaces
26397 "modes": ["html2wt"],
26398 "scrubWikitext": false
26401 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26402 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26403 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26405 [[Berlin ]]<nowiki/>is the capital of Germany.
26409 [[Boston ]] is a city.
26413 2. New links that end in spaces
26416 "modes": ["html2wt"],
26417 "scrubWikitext": true
26420 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26421 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26422 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26424 [[Berlin]] is the capital of Germany.
26428 [[Boston]] is a city.
26432 1. Table cells with escapable prefixes
26435 "modes": ["html2wt"],
26436 "scrubWikitext": false
26440 <tr><td>a</td></tr>
26441 <tr><td>-</td></tr>
26442 <tr><td>+</td></tr>
26448 |<nowiki>-</nowiki>
26450 |<nowiki>+</nowiki>
26455 2. Table cells with escapable prefixes
26458 "modes": ["html2wt"],
26459 "scrubWikitext": true
26463 <tr><td>a</td></tr>
26464 <tr><td>-</td></tr>
26465 <tr><td>+</td></tr>
26478 3a. Table cells with escapable prefixes after edits
26481 "modes": ["selser"],
26482 "scrubWikitext": true,
26484 [ "table tbody tr:first-child td:first-child", "remove"]
26498 3b. Table cells with escapable prefixes after edits
26501 "modes": ["selser"],
26502 "scrubWikitext": true,
26504 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26511 |<span id="x">foo</span>+
26520 # FIXME: This test will fail because
26521 # normalization doesn't realize that the id attribute
26522 # will eliminate the escapable scenario
26524 4a. Table cells without escapable prefixes after edits
26527 "modes": ["selser"],
26528 "scrubWikitext": true,
26530 [ "#x", "html", "-" ]
26543 ## This tests normalizer's ability to discriminate between
26544 ## cells having identical content.
26546 4b. Table cells without escapable prefixes after edits
26549 "modes": ["selser"],
26550 "scrubWikitext": true,
26552 [ "td", "html", "-" ]
26565 ## This tests normalizer's ability to not be tripped by
26566 ## comments (and whitespace)
26568 4c. Table cells without escapable prefixes after edits
26571 "modes": ["selser"],
26572 "scrubWikitext": true,
26574 [ "table tbody tr td:first-child", "remove" ]
26589 ## This tests normalizer's ability to handle HTML cells
26591 4d. Table cells without escapable prefixes after edits
26594 "modes": ["selser"],
26595 "scrubWikitext": true,
26597 [ "td", "html", "-" ]
26602 <tr><td>a</td></tr>
26606 <tr><td>-</td></tr>
26610 ## T111151 Remove font elements without attributes
26612 5a. font tags without attributes should be dropped in scrubWikitext mode
26615 "modes": ["html2wt"],
26616 "scrubWikitext": true
26620 <font><font>bar</font></font>
26621 <font class="x">boo</font>
26625 <font class="x">boo</font>
26629 5b. font tags should not be dropped without scrubWikitext being enabled
26632 "modes": ["html2wt"],
26633 "scrubWikitext": false
26642 Escape nowiki DOM elements
26646 <nowiki><i>foo</i></nowiki>
26648 <nowiki>''foo''</nowiki>
26651 # This is meant to be an interim fix while we go about figuring out
26652 # how to not introduce these trailing <nowiki/>s in the first place.
26654 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
26658 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
26660 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,23,null,null],"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>
26661 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,24,null,null],"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>
26674 # ---------------------------------------------------
26675 # End of tests spec'ing wikitext serialization norms |
26676 # ---------------------------------------------------
26680 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
26688 <td><b>c</b><p>d</p></td>
26706 # -----------------------------------------------------------------
26707 # End of section for Parsoid-only html2wt tests for serialization
26709 # -----------------------------------------------------------------
26711 # -----------------------------------------------------------------
26712 # The following section of tests are primarily to spec behavior of
26713 # the selective serializer. All these tests have manual selser
26714 # changes. The automated selser changes for all tests handle the
26715 # wide variation of changes, but these tests here capture specs
26716 # deterministically.
26717 # ----------------------------------------------------------------
26721 Selser: New comments should not be lost
26724 "modes": ["selser"],
26726 [ "#a", "after", "<!--c1-->" ],
26727 [ "#b", "before", "<!--c2-->" ]
26731 <span id="a">a</span>
26733 <span id="b">b</span>
26735 <span id="a">a</span><!--c1-->
26737 <!--c2--><span id="b">b</span>
26742 Selser: Check for validity of DSR before using it
26745 "modes": ["selser"],
26747 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26751 <span id="a">a</span>
26753 {{DISPLAYTITLE:foo}}
26754 <span id="a">a</span>
26758 1. DOMDiff: Changes to <ref> content should be looked up using id
26761 "modes": ["selser"],
26763 ["#X", "after", "bar"],
26764 ["#Y", "after", "baz"]
26768 X <ref><span id="X">foo</span></ref>
26771 <ref name="a"><span id="Y">foo</span></ref>
26774 X <ref><span id="X">foo</span>bar</ref>
26777 <ref name="a"><span id="Y">foo</span>baz</ref>
26782 2. DOMDiff: Changes to <ref> content should be looked up using id
26785 "modes": ["selser"],
26787 ["#Z", "after", "bar"]
26791 A <ref>foo bar for a</ref>
26792 B <ref group="X" name="b" />
26796 <references group="X">
26797 <ref name="b"><span id="Z">foo</span></ref>
26800 A <ref>foo bar for a</ref>
26801 B <ref group="X" name="b" />
26805 <references group="X">
26806 <ref name="b"><span id="Z">foo</span>bar</ref>
26820 <li class="mw-empty-li"></li>
26821 <li class="mw-empty-li"></li>