1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml
40 # For testing purposes, temporary articles can created:
41 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
42 # where '/' denotes a newline.
44 # This is the standard article assumed to exist.
81 MediaWiki:bad image list
83 * [[File:Bad.jpg]] except [[Nasty page]]
111 Template:echo_with_span
117 Template:echo_with_div
130 Template:table_attribs
133 |</noinclude>style="color:red;"|Foo
137 Template:table_attribs_2
140 |</noinclude>style="color:red;"|Foo
145 Template:table_attribs_3
148 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
152 Template:table_attribs_4
154 | style="background-color:#DC241f;" width="10px" |
158 Template:table_attribs_5
161 |</noinclude>style="color:red;"||Bar
165 Template:table_attribs_6
167 style="background: <nowiki>
174 Template:table_attribs_7
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
181 Template:table_header_cells
183 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
189 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
193 Template:PartialTable
200 Template:image_attribs
203 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
206 ## See T48811 for details
208 Template:mixed_attr_content_template
210 style="color:red;" title="T48811"
216 Template:definition_list
263 Template:EmptyTRWithHTMLAttrTest
266 <tr align="center"></tr>
267 <tr><td>foo</td></tr>
268 <tr align="center"></tr>
269 <tr><td>bar</td></tr>
286 This is a simple paragraph.
288 <p>This is a simple paragraph.
293 Paragraphs with extra newline spacing
316 Paragraphs with newline spacing with comment lines in between
324 <!--foo--><!--More than 1 comment, still stripped-->
328 <!--foo--> <!----> <!-- bar -->
389 Paragraphs with newline spacing with non-empty white-space lines in between
416 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
424 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
463 Extra newlines: More paragraphs with indented comment
478 Extra newlines followed by heading
493 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
494 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
497 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
502 Extra newlines between heading and content are swallowed
510 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
511 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
518 http://fr.wikipedia.org/wiki/🍺
519 <!-- EasterEgg we love beer, better be able be able to link to it -->
521 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
525 # Note that the html+tidy output removes the spaces after the <li>,
526 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
527 # This is an issue for all tests with lists. We intentionally do
528 # *not* add html+tidy clauses for these, as we don't want to
529 # document/test the broken behavior. (Parsoid matches the non-tidy
530 # output in these cases.)
539 <li> Item 2</li></ul>
547 * plain''italic''plain
548 * plain''italic''plain''italic''plain
549 * plain'''bold'''plain
550 * plain'''bold'''plain'''bold'''plain
551 * plain''italic''plain'''bold'''plain
552 * plain'''bold'''plain''italic''plain
553 * plain''italic'''bold-italic'''italic''plain
554 * plain'''bold''bold-italic''bold'''plain
555 * plain'''''bold-italic'''italic''plain
556 * plain'''''bold-italic''bold'''plain
557 * plain''italic'''bold-italic'''''plain
558 * plain'''bold''bold-italic'''''plain
559 * plain l'''italic''plain
560 * plain l''''bold''' plain
563 <li> plain<i>italic</i>plain</li>
564 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
565 <li> plain<b>bold</b>plain</li>
566 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
567 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
568 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
569 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
570 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
571 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
572 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
573 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
574 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
575 <li> plain l'<i>italic</i>plain</li>
576 <li> plain l'<b>bold</b> plain</li></ul>
580 # this example taken from the [[simple:Moon]] article (bug 47326)
582 Italics and possessives (1)
584 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
586 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
590 # this example taken from [[en:Flaming Pie]] (bug 49926)
592 Italics and possessives (2)
594 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
596 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
600 # this example taken from [[en:Dictionary]] (bug 49926)
602 Italics and possessives (3)
604 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
606 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
612 ### 2-quote opening sequence tests
615 Italics and bold: 2-quote opening sequence: (2,2)
624 Italics and bold: 2-quote opening sequence: (2,3)
633 Italics and bold: 2-quote opening sequence: (2,4)
643 # same html as previous, but wikitext adjusted to match parsoid html2wt
645 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
647 ''foo<nowiki>''</nowiki>''
653 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
655 Italics and bold: 2-quote opening sequence: (2,5)
668 # same html as previous, but wikitext adjusted to match parsoid html2wt
670 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
672 ''foo'''''<nowiki/>'''
683 ### 3-quote opening sequence tests
687 Italics and bold: 3-quote opening sequence: (3,2)
696 Italics and bold: 3-quote opening sequence: (3,3)
705 Italics and bold: 3-quote opening sequence: (3,4)
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 3-quote opening sequence: (3,5)
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
732 '''foo'''''<nowiki/>''
743 ### 4-quote opening sequence tests
747 Italics and bold: 4-quote opening sequence: (4,2)
757 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
761 <nowiki>''</nowiki>''foo''
768 Italics and bold: 4-quote opening sequence: (4,3)
777 Italics and bold: 4-quote opening sequence: (4,4)
787 # same html as previous, but wikitext adjusted to match parsoid html2wt
789 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
797 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
799 Italics and bold: 4-quote opening sequence: (4,5)
808 <p>'<b>foo</b><i></i>
812 # same html as previous, but wikitext adjusted to match parsoid html2wt
814 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
816 '<nowiki/>'''foo'''''<nowiki/>''
821 <p>'<b>foo</b><i></i>
827 ### 5-quote opening sequence tests
831 Italics and bold: 5-quote opening sequence: (5,2)
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: 5-quote opening sequence: (5,2+3)
852 Italics and bold: 5-quote opening sequence: (5,3)
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: 5-quote opening sequence: (5,3+2)
873 Italics and bold: 5-quote opening sequence: (5,4)
879 <p><i><b>foo'</b></i>
884 Italics and bold: 5-quote opening sequence: (5,5)
893 Italics and bold: 5-quote opening sequence: (5,6)
897 <p><i><b>foo'</b></i>
902 ### multiple quote sequences in a line
905 Italics and bold: multiple quote sequences: (2,4,2)
911 <p><i>foo'<b>bar</b></i>
916 # same html as previous, but wikitext adjusted to match parsoid html2wt
918 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
920 ''foo'<nowiki/>'''bar'''''
922 <p><i>foo'<b>bar</b></i>
928 Italics and bold: multiple quote sequences: (2,4,3)
934 <p><i>foo'<b>bar</b></i>
939 # same html as previous, but wikitext adjusted to match parsoid html2wt
941 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
943 ''foo'<nowiki/>'''bar'''''
945 <p><i>foo'<b>bar</b></i>
951 Italics and bold: multiple quote sequences: (2,4,4)
957 <p><i>foo'<b>bar'</b></i>
962 # same html as previous, but wikitext adjusted to match parsoid html2wt
964 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
966 ''foo'<nowiki/>'''bar'<nowiki/>'''''
968 <p><i>foo'<b>bar'</b></i>
973 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
975 Italics and bold: multiple quote sequences: (3,4,2)
984 <p><b>foo'</b>bar<i></i>
988 # same html as previous, but wikitext adjusted to match parsoid html2wt
990 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
994 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
999 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1004 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1006 Italics and bold: multiple quote sequences: (3,4,3)
1015 <p><b>foo'</b>bar<b></b>
1019 # same html as previous, but wikitext adjusted to match parsoid html2wt
1021 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1023 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1028 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1033 ### other quote tests
1036 Italics and bold: other quote tests: (2,3,5)
1038 ''this is about '''foo's family'''''
1040 <p><i>this is about <b>foo's family</b></i>
1046 Italics and bold: other quote tests: (2,(3,3),2)
1048 ''this is about '''foo's''' family''
1050 <p><i>this is about <b>foo's</b> family</i>
1056 Italics and bold: other quote tests: (3,2,3,2)
1060 '''this is about ''foo'''s family''
1062 <p><b>this is about <i>foo</i></b><i>s family</i>
1067 # same html as previous, but wikitext adjusted to match parsoid html2wt
1069 Italics and bold: other quote tests: (3,2,3+2+2,2)
1071 '''this is about ''foo'''''<nowiki/>''s family''
1073 <p><b>this is about <i>foo</i></b><i>s family</i>
1079 Italics and bold: other quote tests: (3,2,3,3)
1081 '''this is about ''foo'''s family'''
1083 <p>'<i>this is about </i>foo<b>s family</b>
1089 Italics and bold: other quote tests: (3,(2,2),3)
1091 '''this is about ''foo's'' family'''
1093 <p><b>this is about <i>foo's</i> family</b>
1099 Italicized possessive
1101 The ''[[Main Page]]'''s talk page.
1103 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1106 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1110 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1111 (Requires tidy for PHP parser output to be fixed up)
1113 parsoid=wt2html,wt2wt
1130 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1131 <td><i>a</i></td><td><i>b</i></td></tr>
1140 Non-html5 tags should be accepted
1142 <center>''foo''</center>
1144 <font>''foo''</font>
1145 <strike>''foo''</strike>
1148 <center><i>foo</i></center>
1149 <p><big><i>foo</i></big>
1150 <font><i>foo</i></font>
1151 <strike><i>foo</i></strike>
1157 <wbr> is valid wikitext (bug 52468)
1165 # <strike> is HTML4, <s> is HTML4/5.
1167 <s> or <strike> for strikethrough
1169 <strike>strike</strike>
1173 <p><strike>strike</strike>
1181 Text-level semantic html elements in wikitext
1184 <strong>text</strong>
1200 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1207 <strong>text</strong>
1223 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1231 # test cases taken from
1232 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1234 Ruby markup (W3C-style)
1236 ; Mono-ruby for individual base characters
1237 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1239 : <ruby>今日<rt>きょう</rt></ruby>
1241 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1243 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1245 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1247 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1248 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1249 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1252 <dl><dt> Mono-ruby for individual base characters</dt>
1253 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1254 <dt> Group ruby</dt>
1255 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1256 <dt> Jukugo ruby</dt>
1257 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1258 <dt> Inline ruby</dt>
1259 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1260 <dt> Double-sided ruby</dt>
1261 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1270 # The next two test different paths in the sanitizer.
1272 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1274 <blockquote|>a</blockquote>
1276 <b→> doesn't terminate </b→>
1278 <bä> doesn't terminate </bä>
1280 <boo> doesn't terminate </boo>
1282 <s.foo> doesn't terminate </s.foo>
1286 <p><blockquote|>a</blockquote>
1287 </p><p><b→> doesn't terminate </b→>
1288 </p><p><bä> doesn't terminate </bä>
1289 </p><p><boo> doesn't terminate </boo>
1290 </p><p><s.foo> doesn't terminate </s.foo>
1291 </p><p><sub-ID#1>
1295 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1296 # If the non-word-character tag made it through the sanitizer, tidy
1297 # would munge it up.
1299 Non-word characters don't terminate tag names + tidy
1301 <blockquote|>a</blockquote>
1303 <b→> doesn't terminate </b→>
1305 <bä> doesn't terminate </bä>
1307 <boo> doesn't terminate </boo>
1309 <s.foo> doesn't terminate </s.foo>
1313 <p><blockquote|>a</p>
1314 <p><b→> doesn't terminate </b→></p>
1315 <p><bä> doesn't terminate </bä></p>
1316 <p><boo> doesn't terminate </boo></p>
1317 <p><s.foo> doesn't terminate </s.foo></p>
1318 <p><sub-ID#1></p>
1322 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1323 ### This checks that HTML5 tags (with non-word characters in the tag
1324 ### name) make it safely through the parser -- the Sanitizer will
1325 ### munge them later, as it should.
1328 Non-word characters are valid in extension tags (T19663)
1339 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1343 Isolated close tags should be treated as literal text (bug 52760)
1351 <p><s.foo>s</p>
1353 <p><s.foo>s</p>
1357 ### Special characters
1361 Bare pipe character (bug 52363)
1370 Bare pipe character from a template (bug 52363)
1379 ### <nowiki> test cases
1383 <nowiki> unordered list
1385 <nowiki>* This is not an unordered list item.</nowiki>
1387 <p>* This is not an unordered list item.
1390 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1396 <nowiki>Lorem ipsum dolor
1404 <p>Lorem ipsum dolor
1413 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1425 :There is not nowiki.
1426 :There is <nowiki>nowiki</nowiki>.
1428 #There is not nowiki.
1429 #There is <nowiki>nowiki</nowiki>.
1431 *There is not nowiki.
1432 *There is <nowiki>nowiki</nowiki>.
1434 <dl><dd>There is not nowiki.</dd>
1435 <dd>There is nowiki.</dd></dl>
1436 <ol><li>There is not nowiki.</li>
1437 <li>There is nowiki.</li></ol>
1438 <ul><li>There is not nowiki.</li>
1439 <li>There is nowiki.</li></ul>
1442 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1443 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1445 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1446 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1448 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1449 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1453 Entities inside <nowiki>
1455 <nowiki><</nowiki>
1462 Entities inside template parameters
1468 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1472 Properly escape nowiki when combined with other wiki markup
1476 <p>* </nowiki> tag</p>
1478 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1482 T93824: Put escaped HTML tags inside nowiki
1486 <p><h2>foo</h2></p>
1488 <nowiki><h2>foo</h2></nowiki>
1492 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1496 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1497 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1498 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1500 This text: L'[[Foo]]
1501 This text: L<nowiki>''</nowiki>[[Foo]]
1502 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1505 # This test fails because wikitext whitespace is not normalized before comparing.
1507 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1511 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1514 This text : L<nowiki>''</nowiki>[[Foo]]
1517 # This test and the next one are html2wt only as they test that incorrect wikitext
1518 # passed in template arguments gets escaped or wrapped in nowikis where required.
1520 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1524 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1525 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1527 {{echo|foo{{!}}bar}}
1528 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1532 T53961: Output correct nowikis in template arguments
1536 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1540 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1543 {{echo|<nowiki>a }} b</nowiki>}}
1544 {{echo|<nowiki>a [[ b</nowiki>}}
1545 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1546 {{echo|a <nowiki>}</nowiki>}}
1550 Cases where "!!" needs nowiki protection
1555 <tr><th>this needs protection !! here</th></tr>
1559 <tr><th>this does not need
1560 protection !! here</th></tr>
1564 !<nowiki>this needs protection !! here</nowiki>
1577 Comments and Indent-Pre
1579 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 -->xyz
1587 <!-- comment 1 --> asdf
1588 <!-- comment 2 --> xyz
1644 asdf<!-- comment 1 -->jkl
1654 <!-- foo --> b <!-- bar -->
1668 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1674 Comment semantics and delimiters
1676 <!-- --><!----><!-----><!------>
1680 <!-- --><!----><!-----><!------>
1684 Comment semantics and delimiters, redux
1686 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1687 -- foo -- funky huh? ... -->
1691 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1692 -- foo -- funky huh? ... -->
1696 Comment semantics and delimiters: directors cut
1698 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1699 everything starting with < followed by !-- until the first -- and > we see,
1700 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1706 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1707 everything starting with < followed by !-- until the first -- and > we see,
1708 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1713 Comment semantics: nesting
1715 <!--<!-- no, we're not going to do anything fancy here -->-->
1720 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1723 # Parsoid closes the unclosed comment, even if it means a slight
1726 Comment semantics: unclosed comment at end
1728 parsoid=wt2html,html2html
1730 <!--This comment will run out to the end of the document
1734 <!--This comment will run out to the end of the document-->
1738 Comment semantics: normalize comments to play nice with XML and browsers
1740 <!-- Browsers --!> think this is closed -->
1741 <!--> This would normally be text -->
1742 <!---> As would this -->
1743 <!-- XML doesn't like trailing dashes -------->
1744 <!-- Nor doubled hyphens -- anywhere in the data -->
1745 But this is not a comment.
1747 <p>But this is not a comment.
1750 <!-- Browsers --!> think this is closed -->
1751 <!--> This would normally be text -->
1752 <!---> As would this -->
1753 <!-- XML doesn't like trailing dashes -------->
1754 <!-- Nor doubled hyphens -- anywhere in the data -->
1755 <p>But this is not a comment.</p>
1759 Comment semantics: round-trip even text which contains encoded -->
1761 <!-- hello & goodbye - > --> --&gt; --&xx -->
1763 <!-- hello & goodbye - > --> --&gt; --&xx -->
1767 Comment in template title
1776 Comment on its own line post-expand
1788 Comment on its own line post-expand with non-significant whitespace
1800 Multiple comments should still parse as SOL-transparent
1802 parsoid=wt2html,wt2wt
1805 <!--c2--><!--c3--><!--c4-->*b
1814 <!--c2--><!--c3--><!--c4-->
1821 ### paragraph wrapping tests
1836 Block tag on one line (<div>)
1852 Block tag on one line (<blockquote>)
1854 a <blockquote>foo</blockquote>
1858 a <blockquote>foo</blockquote>
1870 Block tag on both lines (<div>)
1887 Block tag on both lines (<blockquote>)
1889 a <blockquote>foo</blockquote>
1891 b <blockquote>foo</blockquote>
1893 a <blockquote>foo</blockquote>
1894 b <blockquote>foo</blockquote>
1908 Multiple lines without block tags
1932 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1933 # So, we have a separate section for Parsoid. We don't want
1934 # to mimic this stripping behavior in Parsoid. It affects
1935 # editing experience and also requires us to maintain additional
1938 Empty lines between lines with block tags
1976 <div data-parsoid='{"stx":"html"}'></div>
1979 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1982 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1984 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1987 <div data-parsoid='{"stx":"html"}'>e</div>
1990 ## PHP parser emits output which is broken
1992 Unclosed HTML p-tags should be handled properly
2005 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2010 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2011 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2014 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2018 a [[Category:A1]] [[Category:A2]]
2023 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2027 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2033 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2037 ### Preformatted text
2046 And a [[Main Page|link]]
2052 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2057 Tabs don't trigger preformatted text
2061 This is preformatted text.
2067 <pre>This is preformatted text.
2072 preformatted text.</p>
2073 <pre>This is preformatted text.
2078 Space before tab needs nowiki pre protection
2084 <nowiki> </nowiki> a
2088 Ident preformatting with inline content
2099 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2116 Regression with preformatted in <center>
2130 Bug 52763: Preformatted in <blockquote>
2136 indented cell (no pre-wrapping!)
2146 <p> indented cell (no pre-wrapping!)
2154 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2171 Bug 15491: <ins>/<del> in blockquote
2174 Foo <del>bar</del> <ins>baz</ins> quux
2178 <p>Foo <del>bar</del> <ins>baz</ins> quux
2184 # Note that the p-wrapping is newline sensitive, which could be
2185 # considered a bug: tidy will wrap only the 'Foo' in the example
2186 # below in a <p> tag. (see comment 23-25 of bug #6200)
2188 Bug 15491: <ins>/<del> in blockquote (2)
2190 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2193 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2199 <del>bar</del> <ins>baz</ins> quux</blockquote>
2203 <pre> with attributes (bug 3202)
2205 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2207 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2212 <pre> with width attribute (bug 3202)
2214 <pre width="8">Narrow screen goodies</pre>
2216 <pre width="8">Narrow screen goodies</pre>
2221 <pre> with forbidden attribute (bug 3202)
2223 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2225 <pre width="8">Narrow screen goodies</pre>
2230 Entities inside <pre>
2239 <pre> with forbidden attribute values (bug 3202)
2241 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2243 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2248 <nowiki> inside <pre> (bug 13238)
2256 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2264 <pre><nowiki>Foo</nowiki></pre>
2269 <nowiki> 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>
2523 Handle broken pre-like tags (bug 64025)
2527 {{echo|<pre <pre>x</pre>}}
2529 <table><pre </table>
2532 <table><pre </table>
2540 <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>
2549 Parsoid: handle pre with space after attribute
2553 <pre style="width:50%;" >{{echo|foo}}</pre>
2555 <pre style="width:50%;">{{echo|foo}}</pre>
2558 <pre style="width:50%;">{{echo|foo}}</pre>
2561 # TODO / maybe: fix wt2wt for this
2563 Parsoid: Don't paragraph-wrap fosterable content
2589 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2617 #--------------------------------------------------------------------
2618 # Transclusion parameter whitespace stripping tests
2619 # Behavior is different for positional and named parameters
2620 #--------------------------------------------------------------------
2622 Templates: Strip leading and trailing whitespace from named-param values
2626 {{echo|1= {{echo|b}} }}
2639 <ul><li> d</li></ul>
2644 Templates: Don't strip whitespace from positional-param values
2648 {{echo|{{echo|b}} }}
2680 <ul><li> f</li></ul>
2688 Templates: Handle empty comment-and-ws-only lines correctly
2691 <!--should be ignored-->
2692 <!--should be ignored as well-->
2701 Templates: Handle comments in the target
2704 <!-- should be ignored -->
2707 {{echo<!-- should be ignored -->
2710 {{echo<!-- should be ignored -->|foo}}
2712 {{<!-- should be ignored -->echo|foo}}
2714 <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>
2716 <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>
2718 <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>
2720 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2724 Templates: Handle comments in parameter names (bug 67657)
2727 <!-- should be ignored -->
2731 <!-- should be ignored -->
2734 {{echo|1<!-- should be ignored -->=foo}}
2736 {{echo|<!-- should be ignored -->1=foo}}
2738 <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>
2740 <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>
2742 <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>
2744 <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>
2748 Templates: Other wikitext in parameter names (bug 67657)
2752 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2758 #--------------------------------------------------------------------
2759 # Transclusion parameter escaping tests
2760 #--------------------------------------------------------------------
2762 Templates: Parsoid parameter escaping test 1
2764 {{echo|[foo]|{{echo|[bar]}}}}
2768 <p about="#mwt1" typeof="mw:Transclusion"
2769 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2773 Parsoid: Pipes in external links in template parameter
2775 {{echo|[{{echo|http://example.com}} link]}}
2777 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2779 <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>
2783 Parsoid: pipe in transclusion parameter
2785 {{echo|http://foo.com/a|b}}
2787 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2789 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2790 typeof="mw:Transclusion"
2791 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>
2795 Parsoid: Pipe in external link target and content in template parameter
2797 parsoid=html2wt,wt2wt
2799 {{echo|[http://foo.com/a|b a|b]}}
2801 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2803 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2804 typeof="mw:Transclusion"
2805 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2806 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2810 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2814 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2816 <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>
2820 Templates: Don't escape already nowiki-escaped text in template parameters
2822 parsoid=html2wt,wt2wt
2824 {{echo|foo<nowiki>|</nowiki>bar}}
2825 {{echo|<nowiki><div></nowiki>}}
2826 {{echo|<nowiki></nowiki>}}
2828 <p>foo|bar <div></p>
2830 <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>
2831 <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>
2832 <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>
2838 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2840 parsoid=html2wt,wt2wt
2842 {{echo|{{echo|1=bar}}}}
2846 <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>
2851 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2857 <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>
2862 Templates: Preserve blank parameter names
2868 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2872 Templates: Preserve blank parameter names in other positions
2874 {{blank_param|bar|=foo}}
2878 <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
2883 ### Parsoid-centric tests for testing RT edge cases for pre
2887 1a. Indent-Pre and Comments
2900 1b. Indent-Pre and Comments
2913 1c. Indent-Pre and Comments
2926 1d. Indent-Pre and Comments
2927 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2940 2a. Indent-Pre and tables
2961 2b. Indent-Pre and tables
2977 2c. Indent-Pre and tables (bug 42252)
2994 2d. Indent-Pre and tables
3011 <tbody><tr><td> b</td></tr>
3016 2e. Indent-Pre and table-line syntax
3029 2f. Indent-pre started by table-line syntax
3048 3a. Indent-Pre and block tags (single-line html)
3052 c <blockquote> foo </blockquote>
3057 c <blockquote> foo </blockquote>
3058 <pre><span> foo </span>
3061 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3062 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3063 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3064 <pre><span> foo </span>
3081 3b. Indent-Pre and block tags (multi-line html)
3086 <pre>a <span>foo</span>
3091 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3092 b <div data-parsoid='{"stx":"html"}'> foo </div>
3102 3c. Indent-Pre and block tags (pre-content on separate line)
3166 4. Indent-Pre and extension tags
3172 a <ul class="gallery mw-gallery-traditional">
3173 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3174 <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>
3175 <div class="gallerytext">
3182 <ul class="gallery mw-gallery-traditional">
3183 <li class="gallerybox" style="width: 155px">
3184 <div style="width: 155px">
3185 <div class="thumb" style="width: 150px;">
3186 <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>
3188 <div class="gallerytext"></div>
3195 Table wikitext syntax outside wiki-tables
3198 ! not a table heading
3201 | class="foo bar" | baz
3208 ! not a table heading
3211 | class="foo bar" | baz
3220 Render paragraphs when indent-pre is suppressed in blocklevels
3237 4. Multiple spaces at start-of-line
3255 ## NOTE: the leading white-space chars on empty line are significant
3257 5a. White-space in indent-pre
3269 ## NOTE: the leading white-space chars on empty line are significant
3271 5b. White-space in indent-pre
3290 5c. White-space in indent-pre
3303 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3326 7a. Indent-pre and category links
3328 parsoid=wt2html,wt2wt
3330 [[Category:foo]] <!-- No pre-wrapping -->
3331 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3334 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3335 <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 -->
3338 ## We used to, but no longer wt2wt this test since the default serializer
3339 ## will normalize all categories to serialize on their own line.
3340 ## This wikitext usage is going to be fairly uncommon in production and
3341 ## selser will take care of preserving formatting in those scenarios.
3343 7b. Indent-pre and category links
3348 [[Category:foo]] {{echo|b}}
3350 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3351 <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>
3355 Indent-Pre: Newlines in comments shouldn't affect sol state
3369 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3373 HTML-pre: 1. embedded newlines
3408 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3410 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3414 <pre data-parsoid='{"stx":"html"}'>
3419 <pre data-parsoid='{"stx":"html"}'>
3427 HTML-pre: big spaces
3463 <pre data-parsoid='{"stx":"html"}'>
3482 HTML-pre: 2: indented text
3495 HTML-pre: 3: other wikitext
3514 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3523 ### Definition lists
3530 <dl><dt> name </dt>
3531 <dd> Definition</dd></dl>
3536 Definition list for indentation only
3540 <dl><dd> Indented text</dd></dl>
3545 Definition list with no space
3550 <dd>Definition</dd></dl>
3555 Definition list with URL link
3557 ; http://example.com/ : definition
3559 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3560 <dd> definition</dd></dl>
3565 Definition list with bracketed URL link
3567 ;[http://www.example.com/ Example]:Something about it
3569 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3570 <dd>Something about it</dd></dl>
3575 Definition list with wikilink containing colon
3577 ; [[Help:FAQ]]: The least-read page on Wikipedia
3579 <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>
3580 <dd> The least-read page on Wikipedia</dd></dl>
3584 # At Brion's and JeLuF's insistence... :)
3586 Definition list with news link containing colon
3588 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3590 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3591 <dd> This isn't even a real newsgroup!</dd></dl>
3594 <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>
3598 Malformed definition list with colon
3600 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3602 <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>
3607 Definition lists: colon in external link text
3609 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3611 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3612 <dd> OK, I made that up</dd></dl>
3617 Definition lists: colon in HTML attribute
3619 ;<b style="display: inline">bold</b>
3621 <dl><dt><b style="display: inline">bold</b></dt></dl>
3626 Definition lists: self-closed tag
3628 ;one<br/>two : two-line fun
3630 <dl><dt>one<br />two </dt>
3631 <dd> two-line fun</dd></dl>
3636 Bug 11748: Literal closing tags
3640 <dd>test test test test test</dd>
3642 <dd>test test test test test</dd>
3647 <dd>test test test test test</dd>
3649 <dd>test test test test test</dd>
3655 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3658 ; term : description
3663 <dl><dt> term </dt>
3664 <dd> description</dd></dl>
3665 <ul><li> unordered</li></ul>
3672 Definition list with empty definition and following paragraph
3684 Nested definition lists using html syntax
3693 Definition Lists: No nesting: Multiple dd's
3706 Definition Lists: Indentation: Regular
3714 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3719 Definition Lists: Indentation: Missing 1st level
3725 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3730 Definition Lists: Indentation: Multi-level indent
3734 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3739 Definition Lists: Hacky use to indent tables
3746 should be left alone
3748 <dl><dd><dl><dd><table>
3753 </td></tr></table></dd></dl></dd></dl>
3755 should be left alone
3760 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3768 should be left alone
3771 <dl><dd><dl><dd><table><tr>
3774 </tr></table><!-- bar --></dd></dl></dd></dl>
3776 should be left alone</p>
3780 Definition Lists: Hacky use to indent tables, with comment before table
3786 <dl><dd><dl><dd><!-- foo --><table><tr>
3788 </tr></table></dd></dl></dd></dl>
3791 # The trailing whitespace in this test is to catch a regression in
3792 # Parsoid after T54473.
3794 Definition Lists: Hacky use to indent tables (WS-insensitive)
3803 </td></tr></table></dd></dl>
3807 <tbody><tr><td>a</td></tr>
3808 </tbody></table> </dd></dl>
3811 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3812 ## as an empty dt item. It also ignores all but the last ";" when followed
3813 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3814 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3817 ## Ex: ";;t2 ::d2" is transformed into:
3829 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3830 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3841 ## All Parsoid only definition list tests have this difference.
3843 ## See also: https://phabricator.wikimedia.org/T8569
3844 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3847 Table / list interaction: indented table with lists in table contents
3862 <ul><li> b</li></ul>
3866 <ul><li> d</li></ul>
3867 </td></tr></table></dd></dl>
3872 Table / list interaction: lists nested in tables nested in indented lists
3895 </td></tr></table></dd></dl>
3902 Definition Lists: Nesting: Multi-level (Parsoid only)
3932 Definition Lists: Nesting: Test 2 (Parsoid only)
3959 Definition Lists: Nesting: Test 3 (Parsoid only)
4002 Definition Lists: Nesting: Test 4
4007 <dl><dd><dl><dd><dl><dt>t3</dt>
4008 <dd>d3</dd></dl></dd></dl></dd></dl>
4013 ## The Parsoid team believes the following three test exposes a
4014 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4015 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4016 ## It also exposes a "misfeature" in tidy, which doesn't like
4017 ## <dl> tags with a single <dt> child; it converts the <dt> into
4018 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4020 Definition Lists: Mixed Lists: Test 1
4026 <dl><dd><dl><dt><ul><li> foo</li>
4027 <li> bar</li></ul></dt></dl>
4028 <dl><dt> baz</dt></dl></dd></dl>
4063 Definition Lists: Mixed Lists: Test 2
4068 <ul><li><dl><dd> d1</dd>
4069 <dd> d2</dd></dl></li></ul>
4075 Definition Lists: Mixed Lists: Test 3
4080 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4081 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4087 Definition Lists: Mixed Lists: Test 4
4092 <ul><li><dl><dt>d1 </dt>
4095 <dd>d4</dd></dl></li></ul>
4101 Definition Lists: Mixed Lists: Test 5
4107 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4113 Definition Lists: Mixed Lists: Test 6
4118 <ol><li><ul><li><dl><dd>d1
4119 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4125 Definition Lists: Mixed Lists: Test 7
4130 <dl><dd><ul><li> d1</li>
4131 <li> d2</li></ul></dd></dl>
4137 Definition Lists: Mixed Lists: Test 8
4142 <dl><dd><ul><li> d1</li></ul>
4143 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4149 Definition Lists: Mixed Lists: Test 9
4153 <ul><li><dl><dt>foo </dt>
4154 <dd>bar</dd></dl></li></ul>
4160 Definition Lists: Mixed Lists: Test 10
4164 <ul><li><ol><li><dl><dt>foo </dt>
4165 <dd>bar</dd></dl></li></ol></li></ul>
4169 # The Parsoid team disagrees with the PHP parser's seemingly-random
4170 # rules regarding dd/dt on the next two tests. Parsoid is more
4171 # consistent, and recognizes the shared nesting and keeps the
4172 # still-open tags around until the nesting is complete.
4173 # (And tidy again converts <dt> to <dd> before 'bar'.)
4176 Definition Lists: Mixed Lists: Test 11
4181 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4182 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4183 <dl><dt>boo </dt>
4184 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4239 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4240 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4244 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4245 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4254 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4256 # * The test is wrong, there are two colons where there should be :;
4257 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4259 Definition Lists: Weird Ones: Test 1
4261 *#;*::;; foo : bar (who uses this?)
4263 <ul><li><ol><li><dl><dt> foo </dt>
4264 <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>
4283 <dt>bar (who uses this?)</dt>
4315 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4316 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4328 Definition Lists: colons occurring in tags
4346 <dt><span>a:b</span></dt>
4373 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4375 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4376 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4377 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4378 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4380 <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>
4381 <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>
4382 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4386 Definition Lists: colons and tables 1
4398 </td></tr></table></dd></dl>
4402 </td></tr></table></dd></dl>
4406 # Parsoid's output (as documented below) differs from php's in this case.
4407 # This is probably a bug. If we fixup parsoid to match php's output, the
4408 # above test should pass and the below test case can be removed. It is
4409 # unclear which output is more desirable.
4412 Definition Lists: colons and tables 2
4424 </td></tr></table></dd>
4428 </td></tr></table></dd></dl>
4432 Definition Lists: template interaction
4434 ::{{definition_list}}
4437 ::{{definition_list}}
4442 <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">
4443 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4445 <dl><dd data-parsoid='{}'>one
4446 <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">
4447 </span><dd about="#mwt2">two
4449 <dd>three</dd></dl></dd>
4450 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4458 External links: non-bracketed
4460 Non-bracketed: http://example.com
4462 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4466 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4468 External links: numbered
4470 Numbered: [http://example.com]
4471 Numbered: [http://example.net]
4472 Numbered: [http://example.com]
4474 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4475 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4476 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4479 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4480 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4481 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4485 External links: specified text
4487 Specified text: [http://example.com link]
4489 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4494 External links: trail
4496 Linktrails should not work for external links: [http://example.com link]s
4498 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4503 External links: dollar sign in URL
4505 http://example.com/1$2345
4507 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4511 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4513 External links: dollar sign in URL (autonumber)
4515 [http://example.com/1$2345]
4517 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4520 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4524 External links: open square bracket forbidden in URL (bug 4377)
4526 parsoid=wt2html,wt2wt,html2html
4528 http://example.com/1[2345
4530 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4533 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4537 External links: open square bracket forbidden in URL (named) (bug 4377)
4539 parsoid=wt2html,html2html
4541 [http://example.com/1[2345]
4543 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4546 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4549 # parsoid adds a space before the link name
4551 External links: open square bracket forbidden in URL (named) (bug 4377)
4554 [http://example.com/1 [2345]
4556 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4561 External links: nowiki in URL link text (bug 6230)
4563 [http://example.com/ <nowiki>''example site''</nowiki>]
4565 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4570 External links: newline forbidden in text (bug 6230 regression check)
4572 [http://example.com/ first
4575 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4581 External links: Pipe char between url and text
4583 [http://example.com | link]
4585 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4590 External links: protocol-relative URL in brackets
4592 [//example.com/ Test]
4594 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4598 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4600 External links: protocol-relative URL in brackets without text
4604 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4607 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4611 External links: protocol-relative URL in free text is left alone
4615 <p>//example.com/Foo
4620 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4622 foo//example.com/Foo
4624 <p>foo//example.com/Foo
4629 External links: with no contents
4631 [http://en.wikipedia.org/wiki/Foo]
4633 [[wikipedia:Foo|Bar]]
4635 [[wikipedia:Foo|<span>Bar</span>]]
4637 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4638 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4639 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4642 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4643 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4644 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4648 External links: Free with trailing punctuation
4658 http://example.com/url_with_(brackets)
4659 (http://example.com/url_without_brackets)
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 
4665 http://example.com/url_with_entity 
4666 http://example.com/url_with_entity<
4667 http://example.com/url_with_entity<
4668 http://example.com/url_with_entity<
4670 <p><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">http://example.com</a>:
4675 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4676 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4677 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4678 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4679 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</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> 
4685 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4686 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4687 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4688 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4691 <p><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">http://example.com</a>:
4696 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4697 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4698 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4699 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4700 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4701 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4702 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4703 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
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":"&nbsp;","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":"&#xA0;","srcContent":" "}'> </span>
4706 <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>
4707 <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>
4708 <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>
4709 <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>
4713 External links: tricky Parsoid html2html case
4715 parsoid=wt2html,wt2wt,html2html
4717 http://example.com/url_with_entity&amp;
4719 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4722 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4726 External links: Free with trailing quotes (T113666)
4728 '''News:''' Stuff here
4732 <p><b>News:</b> Stuff here
4733 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4736 <p><b>News:</b> Stuff here</p>
4737 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4741 External links: Lone protocols are never linked (T105697)
4760 External links: No preceding word characters allowed (bug 65278)
4762 NOPEhttp://example.com
4763 N0http://example.com
4764 ok:http://example.com
4765 ok-http://example.com
4767 <p>NOPEhttp://example.com
4768 N0http://example.com
4769 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4770 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4777 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4779 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4784 External image from https
4786 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4788 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4793 External image (when not allowed)
4795 wgAllowExternalImages=0
4797 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4799 <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>
4804 Link to non-http image, no img tag
4806 Link to non-http image, no img tag: ftp://example.com/test.jpg
4808 <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>
4813 External links: terminating separator
4815 Terminating separator: http://example.com/thing,
4817 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4822 External links: intervening separator
4824 Intervening separator: http://example.com/1,2,3
4826 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4831 External links: old bug with URL in query
4833 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4835 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4840 External links: old URL-in-URL bug, mixed protocols
4842 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4844 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4849 External links: URL in text
4851 URL in text: [http://example.com http://example.com]
4853 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4858 External links: Clickable images
4860 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4862 <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>
4865 <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>
4869 External links: raw ampersand
4871 Old & use: http://x&y
4873 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4878 External links: encoded ampersand
4880 Old & use: http://x&y
4882 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4885 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4889 External links: encoded equals (bug 6102)
4891 http://example.com/?foo=bar
4893 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4896 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4900 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4901 ## does it number them. As discussed in bug 53505, we can identify
4902 ## autonumbered links via CSS.
4906 External links: [raw ampersand]
4908 Old & use: [http://x&y]
4910 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4913 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4916 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4917 # mode will return the [raw ampersand] wikitext
4919 External links: [encoded ampersand]
4921 parsoid=wt2html,wt2wt,html2html
4923 Old & use: [http://x&y]
4925 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4928 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4932 External links: [raw equals]
4934 [http://example.com/?foo=bar]
4936 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4939 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4942 # note that parsoid html is identical to [raw equals] case; so html2wt
4943 # mode will return the [raw equals] wikitext
4945 External links: [encoded equals] (bug 6102)
4947 parsoid=wt2html,wt2wt,html2html
4949 [http://example.com/?foo=bar]
4951 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4954 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4957 # xxx parsoid strips the IDN character, so the round-trip tests will
4958 # obviously fail and are disabled. --cscott
4960 External links: [IDN ignored character reference in hostname; strip it right off]
4962 parsoid=wt2html,wt2wt,html2html
4964 [http://e‌xample.com/]
4966 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4969 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4972 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4973 # Where an external link could easily circumvent the sanitization of the text of
4974 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4975 # test demands a higher standard. That's a bit strange.
4979 # http://example.com -> [http://example.com|http://example.com]
4980 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4982 # The first example is sanitized, but the second is not. Any security benefits
4983 # from this production are trivial to circumvent. Either remove this test and
4984 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4985 # the test accordingly.
4989 # xxx parsoid strips the IDN character, so the round-trip tests will
4990 # obviously fail and are disabled. --cscott
4992 External links: IDN ignored character reference in hostname; strip it right off
4994 parsoid=wt2html,html2html
4996 http://e‌xample.com/
4998 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5001 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5005 External links: www.jpeg.org (bug 554)
5009 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5013 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5015 External links: URL within URL (original bug 2)
5017 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5019 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5022 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5026 BUG 361: URL inside bracketed URL
5028 [http://www.example.com/foo http://www.example.com/bar]
5030 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5035 BUG 361: URL within URL, not bracketed
5037 http://www.example.com/foo?=http://www.example.com/bar
5039 <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>
5044 BUG 289: ">"-token in URL-tail
5046 http://www.example.com/<hello>
5048 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5053 BUG 289: literal ">"-token in URL-tail
5055 http://www.example.com/<b>html</b>
5057 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5060 <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>
5064 BUG 289: ">"-token in bracketed URL
5066 [http://www.example.com/<hello> stuff]
5068 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5073 BUG 289: literal ">"-token in bracketed URL
5075 [http://www.example.com/<b>html</b> stuff]
5077 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5082 BUG 289: literal double quote at end of URL
5084 http://www.example.com/"hello"
5086 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5091 BUG 289: literal double quote in bracketed URL
5093 [http://www.example.com/"hello" stuff]
5095 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5100 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5102 [http://www.example.com test]
5104 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5109 External links: link text with spaces
5111 [http://www.example.com a b c]
5112 [http://www.example.com ''a'' ''b'']
5114 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5115 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5120 External links: wiki links within external link (Bug 3695)
5122 parsoid=wt2html,html2html
5124 [http://example.com [[wikilink]] embedded in ext link]
5126 <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>
5129 <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>
5133 BUG 787: Links with one slash after the url protocol are invalid
5137 [http:/example.com title]
5139 <p>http:/example.com
5140 </p><p>[http:/example.com title]
5145 Bracketed external links with template-generated invalid target
5147 [{{echo|http:/example.com}} title]
5149 <p>[http:/example.com title]
5154 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5156 ''[http://example.com text'']
5157 [http://example.com '''text]'''
5158 ''Something [http://example.com in italic'']
5159 ''Something [http://example.com mixed''''', even bold]'''
5160 '''''Now [http://example.com both''''']
5162 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5163 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5164 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5165 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5166 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5172 Bug 4781: %26 in URL
5174 http://www.example.com/?title=AT%26T
5176 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5179 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5182 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5183 # % is actually legal in HTML5. Any change in output would need testing though.
5185 Bug 4781, 5267: %25 in URL
5187 http://www.example.com/?title=100%25_Bran
5189 <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>
5192 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5196 Bug 4781, 5267: %28, %29 in URL
5198 http://www.example.com/?title=Ben-Hur_%281959_film%29
5200 <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>
5203 <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>
5208 Bug 4781: %26 in autonumber URL
5210 [http://www.example.com/?title=AT%26T]
5212 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5215 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5219 Bug 4781, 5267: %26 in autonumber URL
5221 [http://www.example.com/?title=100%25_Bran]
5223 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5226 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5230 Bug 4781, 5267: %28, %29 in autonumber URL
5232 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5234 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5237 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5242 Bug 4781: %26 in bracketed URL
5244 [http://www.example.com/?title=AT%26T link]
5246 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5249 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5253 Bug 4781, 5267: %25 in bracketed URL
5255 [http://www.example.com/?title=100%25_Bran link]
5257 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5262 Bug 4781, 5267: %28, %29 in bracketed URL
5264 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5266 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5269 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5273 External link containing a period in the anchor. (bug 63947)
5275 [//foo.org/bar#baz. bang]
5277 [//foo.org/bar. bang]
5279 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5280 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5283 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5284 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5288 External link containing a single quote. (bug 63947)
5292 [//foo.org/bar'baz bang]
5294 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5295 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5298 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5299 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5303 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5305 Some [http://example.com/ pretty ''italics'' and stuff]!
5307 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5312 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5314 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5316 <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>
5321 External link containing double-single-quotes with no space separating the url from text in italics
5323 [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]].]
5325 <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>
5328 <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>
5330 <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>
5334 External link with comments in link text
5336 [http://www.google.com Google <!-- comment -->]
5338 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5341 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5345 External link to bare IPv4 address
5347 [http://192.168.0.1 Link]
5349 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5352 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5356 URL-encoding in URL functions (single parameter)
5358 {{localurl:Some page|amp=&}}
5360 <p>/index.php?title=Some_page&amp=&
5365 URL-encoding in URL functions (multiple parameters)
5367 {{localurl:Some page|q=?&=&}}
5369 <p>/index.php?title=Some_page&q=?&amp=&
5376 http://example.com/index.php?foozoid%5B%5D=bar
5378 http://example.com/index.php?foozoid[]=bar
5380 <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>
5381 </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>
5384 <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>
5386 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5390 IPv6 urls, autolink format (T23261)
5392 http://[2404:130:0:1000::187:2]/index.php
5394 Examples from RFC 2373, section 2.2:
5395 * http://[1080::8:800:200C:417A]/unicast
5396 * http://[FF01::101]/multicast
5397 * http://[::1]/loopback
5398 * http://[::]/unspecified
5399 * http://[::13.1.68.3]/ipv4compat
5400 * http://[::FFFF:129.144.52.38]/ipv4compat
5402 Examples from RFC 2732, section 2:
5403 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5404 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5405 * http://[3ffe:2a00:100:7031::1]
5406 * http://[1080::8:800:200C:417A]/foo
5407 * http://[::192.9.5.5]/ipng
5408 * http://[::FFFF:129.144.52.38]:80/index.html
5409 * http://[2010:836B:4179::836B:4179]
5412 <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>
5413 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5415 <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>
5416 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5417 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5418 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5419 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5420 <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>
5421 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5423 <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>
5424 <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>
5425 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5426 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5427 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5428 <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>
5429 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5432 <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>
5434 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5435 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5436 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5437 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5438 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5439 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5440 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5442 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5443 <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>
5444 <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>
5445 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5446 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5447 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5448 <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>
5449 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5453 IPv6 urls, bracketed format (T23261)
5455 [http://[2404:130:0:1000::187:2]/index.php test]
5457 Examples from RFC 2373, section 2.2:
5458 * [http://[1080::8:800:200C:417A] unicast]
5459 * [http://[FF01::101] multicast]
5460 * [http://[::1]/ loopback]
5461 * [http://[::] unspecified]
5462 * [http://[::13.1.68.3] ipv4compat]
5463 * [http://[::FFFF:129.144.52.38] ipv4compat]
5465 Examples from RFC 2732, section 2:
5466 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5467 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5468 * [http://[3ffe:2a00:100:7031::1] 3]
5469 * [http://[1080::8:800:200C:417A]/foo 4]
5470 * [http://[::192.9.5.5]/ipng 5]
5471 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5472 * [http://[2010:836B:4179::836B:4179] 7]
5475 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5476 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5478 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5479 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5480 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5481 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5482 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5483 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5484 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5486 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5487 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5488 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5489 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5490 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5491 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5492 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5495 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5497 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5498 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5499 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5500 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5501 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5502 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5503 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5505 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5506 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5507 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5508 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5509 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5510 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5511 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5512 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5516 Non-extlinks in brackets
5525 [{{echo|foo}} ''bar'']
5526 [{{echo|foo}}l's] errand
5527 [{{echo|foo}}l's errand]
5529 [url=http://example.com]
5530 [http:// bare protocols don't count]
5543 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5544 [http:// bare protocols don't count]
5552 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5553 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5554 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5555 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5556 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5557 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5558 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5559 [http:// bare protocols don't count]</p>
5563 Percent encoding in external links
5565 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5567 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5570 <p><a rel="mw:ExtLink"
5571 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5575 Use url link syntax for links where the content is equal the link target
5579 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5582 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5586 Parenthesis in external links, especially URL links
5590 http://example.com/test)
5592 http://example.com/(test)
5594 http://example.com/((test)
5596 (http://example.com/(test))
5598 (http://example.com/(test)))))
5600 http://example.com/a)b
5602 [http://example.com) foo]
5604 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</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/(test)">http://example.com/(test)</a>
5607 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5608 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5609 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5610 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5611 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5614 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</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/(test)">http://example.com/(test)</a></p>
5617 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5618 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5619 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5620 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5621 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5625 Parenthesis in external links, w/ transclusion or comment
5627 (http://example.com/{{echo|hi}})
5629 (http://example.com<!-- hi -->)
5631 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5632 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5635 <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>
5637 <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>
5641 Serialize <a> tags with invalid link targets as plain text
5643 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5645 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5646 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5647 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5648 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5651 <nowiki>*</nowiki>text
5652 <nowiki>[[foo]]</nowiki>
5653 <nowiki>*a [[foo]]</nowiki>
5657 mw:ExtLink -vs- mw:WikiLink (T94723)
5661 <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>
5662 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5663 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5664 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5666 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5667 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5672 [[wikipedia:Foo|Bar]]
5673 [[wikipedia:Foo|Bar]]
5675 [[wikipedia:European_Robin|European Robin]]
5676 [[wikipedia:European_Robin|European Robin]]
5680 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5684 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5686 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5697 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5699 Normal text. '''''Bold italic text.''''' Normal text.
5701 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5702 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5707 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5708 # parser strips. The wikitext contains just the first half of the bold
5711 Unclosed and unmatched quotes
5713 '''''Bold italic text '''with bold deactivated''' in between.'''''
5715 '''''Bold italic text ''with italic deactivated'' in between.'''''
5719 ..spanning two paragraphs (should not work).'''
5721 '''Bold tag left open
5723 ''Italic tag left open
5727 <!-- Unmatching number of opening, closing tags: -->
5728 '''This year''''s election ''should'' beat '''last year''''s.
5730 ''Tom'''s car is bigger than ''Susan'''s.
5732 Plain ''italic'''s plain
5734 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5735 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5736 </p><p><b>Bold text..</b>
5737 </p><p>..spanning two paragraphs (should not work).
5738 </p><p><b>Bold tag left open</b>
5739 </p><p><i>Italic tag left open</i>
5741 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5742 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5743 </p><p>Plain <i>italic'</i>s plain
5746 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5747 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5748 </p><p><b>Bold text..</b>
5749 </p><p>..spanning two paragraphs (should not work).<b></b>
5750 </p><p><b>Bold tag left open</b>
5751 </p><p><i>Italic tag left open</i>
5754 <!-- Unmatching number of opening, closing tags: -->
5755 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5756 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5757 </p><p>Plain <i>italic'</i>s plain
5764 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5767 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5768 # is the bare minimum required by the spec, see:
5769 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5770 # Parsoid team replies: empty table tags are legal in HTML5
5772 A table with no data.
5785 A table with stray table end tags on start tag line (wt2html)
5789 {|style="color: red;"|}
5791 {|style="color: red;" |}
5795 {|style="color: red;"|} id="foo"
5799 {|style="color: red;" |} id="foo"
5803 <table style="color: red;"></table>
5805 <table style="color: red;">
5811 <table style="color: red;" id="foo">
5817 <table style="color: red;" id="foo">
5826 A table with no data (take 2)
5834 # A table with nothing but a caption is invalid XHTML, we might want to render
5835 # this as <p>caption</p>
5836 # Parsoid team replies: table with only a caption is legal in HTML5
5838 A table with nothing but a caption
5846 </caption><tr><td></td></tr></table>
5849 <table><caption> caption</caption></table>
5853 A table with caption with default-spaced attributes and a table row
5856 |+ style="color: red;" | caption1
5862 <caption style="color: red;"> caption1
5871 A table with captions with non-default spaced attributes and a table row
5874 |+style="color: red;"|caption2
5875 |+ style="color: red;"| caption3
5881 <caption style="color: red;">caption2
5883 <caption style="color: red;"> caption3
5892 Table td-cell syntax variations
5896 | foo bar foo || baz
5897 | style='color:red;' | baz
5898 | style='color:red;' || baz
5905 <td> foo bar foo </td>
5908 <td style="color:red;"> baz
5910 <td> style='color:red;' </td>
5938 Simple table but with multiple dashes for row wikitext
5957 Multiplication table
5959 {| border="1" cellpadding="2"
5960 |+Multiplication table
5962 ! × !! 1 !! 2 !! 3
5980 <table border="1" cellpadding="2">
5981 <caption>Multiplication table
6028 Accept "||" in table headings
6043 Accept "!!" in table data
6057 <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>
6062 Accept "||" in indented table headings
6072 </th></tr></table></dd></dl>
6077 Accept "!!" in templates
6091 <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>
6095 Accept "!!" in table headings after newline
6112 <p>b!!c</p></th></tr>
6117 Accept "!!" in table data of mixed wikitext / html syntax
6121 <tr><td>b!!c</td></tr>
6134 <tbody><tr><th>a</th></tr>
6135 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6140 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6157 Accept "| !" at start of line in tables (ignore !-attribute)
6161 | !style="color:red" | bar
6173 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 +/-
6177 |style='color:red;'|+1
6178 |style='color:blue;'|-1
6190 <td style="color:red;">+1
6192 <td style="color:blue;">-1
6216 |rowspan=2| Cell 2, row 1 (and 2)
6227 <td rowspan="2"> Cell 2, row 1 (and 2)
6245 {| bgcolor=#ABCDEF border=2
6250 |the original table again
6258 <table bgcolor="#ABCDEF" border="2">
6266 <td>the original table again
6272 Invalid attributes in table cell (bug 1830)
6286 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6290 | title="foo<nowiki>|</nowiki>" |bar
6291 | title="foo<nowiki>|</nowiki>" bar
6298 <td title="foo|">bar
6300 <td> title="foo|" bar
6305 <tbody><tr><td title="foo">bar</td>
6306 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6307 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6311 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6312 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6313 # *2wt modes will fail.
6315 Table security: embedded pipes
6317 parsoid=wt2html,html2html
6320 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6324 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6325 <td>]" onmouseover="alert(document.cookie)">test
6333 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6337 Element attributes with double ! should not be broken up by <th>
6340 ! hi <div class="!!">ha</div> ho
6345 <th> hi <div class="!!">ha</div> ho
6350 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6355 ! and || in element attributes should not be parsed as <th>/<td>
6358 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6363 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6368 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6372 # FIXME: The output seems broken. Filed as T110268.
6374 ! and || in td attributes should not be parsed as <th>/<td>
6379 | style="color: red !important;" data-contrived="put this here ||" | foo
6384 <td> style="color: red !important;" data-contrived="put this here </td>
6390 <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>
6395 Break on | in element attribute in template
6397 parsoid=wt2html,html2html
6399 {{echo|1=<div class="hi|ho">ha</div>}}
6401 <p>ho">ha</div>
6404 <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>
6408 Indented table markup mixed with indented pre content (proposed in bug 6200)
6413 Text that should be rendered preformatted
6421 <pre>Text that should be rendered preformatted
6430 1. Template-generated table cell attributes and cell content
6435 || {{table_attribs_5}}
6436 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6437 |align=center {{table_attribs}}
6438 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6443 <td style="color:red;">Foo
6445 <td style="color:red;">Foo
6447 <td> style="color:red;"</td>
6450 <td style="color:red;">Foo
6452 <td align="center" style="color:red;">Foo
6454 <td align="center" style="color:red;">Foo
6460 2. Template-generated table cell attributes and cell content
6463 |{{table_attribs_2}}
6468 <td style="color:red;">Foo
6476 <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>
6477 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6482 3. Template-generated table cell attributes and cell content
6485 !align=center {{table_header_cells}}
6487 |align=center {{table_cells}}
6492 <th align="center" style="color:red;">Foo</th>
6493 <th style="color:red;"><i>Bar</i></th>
6494 <th style="color:brown;"><i>Foo</i> and Baz
6497 <td align="center" style="color:red;">Foo</td>
6498 <td style="color:red;"><i>Bar</i></td>
6499 <td style="color:brown;"><i>Foo</i> and Baz
6504 <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>
6505 <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>
6510 4. Template-generated table cell attributes and cell content inside a templated table
6513 !align=center {{table_header_cells}}
6515 |align=center {{table_cells}}
6520 <th align="center" style="color:red;">Foo</th>
6521 <th style="color:red;"><i>Bar</i></th>
6522 <th style="color:brown;"><i>Foo</i> and Baz
6525 <td align="center" style="color:red;">Foo</td>
6526 <td style="color:red;"><i>Bar</i></td>
6527 <td style="color:brown;"><i>Foo</i> and Baz
6531 <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}}]}'>
6532 <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>
6534 <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>
6538 ## Edge case fix to prevent future regressions
6540 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6543 |{{table_attribs_7}}
6548 <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>
6550 <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>
6554 Table with row followed by newlines and table heading
6572 Table with empty line following the start tag
6590 Table attributes with empty value
6592 parsoid=wt2html,html2html
6605 <tbody><tr><td style=""> hello</td></tr>
6610 Wikitext table with a lot of comments
6633 Wikitext table comments represented in parsoid dom
6635 {|<!--c1--><!--c2-->
6646 <table><!--c1--><!--c2-->
6647 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6648 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6653 Wikitext table with double-line table cell
6670 Table cell with a single comment
6687 Table-cell after a comment-only-empty-line
6704 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6706 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6712 Build table with {{!}}
6714 {{{!}} class="wikitable"
6717 {{!}}- style="color:red;"
6718 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6721 <table class="wikitable">
6727 <tr style="color:red;">
6729 <td style="color:red;"> second data
6735 Build table with pipe as data
6737 {| class="wikitable"
6740 |- style="color:red;"
6741 | data || style="color:red;" | second data
6743 | style="color:red;" | data with | || style="color:red;" | second data with |
6745 || data with | ||| second data with |
6748 <table class="wikitable">
6754 <tr style="color:red;">
6756 <td style="color:red;"> second data
6759 <td style="color:red;"> data with | </td>
6760 <td style="color:red;"> second data with |
6763 <td> data with | </td>
6764 <td> second data with |
6770 Build table with wikilink
6772 {| class="wikitable"
6773 ! header || second header
6774 |- style="color:red;"
6775 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6777 | data || second data [[Main Page|link|text with pipe]]
6780 <table class="wikitable">
6785 <tr style="color:red;">
6786 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6787 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6791 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6796 # The expected HTML structure in this test is debatable. The PHP parser does
6797 # not parse this kind of table at all. The main focus for Parsoid is on
6798 # round-tripping, so this output is ok for now. TODO: revisit!
6800 Wikitext table with html-syntax row
6810 <td>foo</td></tr></tbody></table>
6813 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6814 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6815 ## PHP parser, which tidy then compounds by fostering the content
6816 ## entirely out of the table. Parsoid recognizes the table context
6817 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6818 ## depends on PHP's treatment of broken table markup!
6820 Implicit <td> after a |-
6822 parsoid=wt2html,html2html
6842 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6844 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6846 parsoid=wt2html,html2html
6879 <tr><td><pre>a</pre></td></tr>
6880 <tr><td> b</td></tr>
6885 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6886 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6888 Lists should be recognized in an implicit <td> context
6890 parsoid=wt2html,html2html
6917 Table cells not properly parsed in an implicit-td context
6921 {{table_attribs_4}} || a || b
6926 <td style="background-color:#DC241f;" width="10px"></td>
6933 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6934 <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>
6939 Parsoid: Round-trip tables directly followed by content (bug 51219)
6941 parsoid=wt2html,wt2wt
6966 Parsoid: Default to a newline after tables in new content (bug 51219)
6971 <tr><td>foo</td></tr></tbody></table> bar
6973 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6978 <nowiki> </nowiki>bar
6986 Parsoid: newline inducing block nodes don't suppress <nowiki>
6998 Parsoid: Row-syntax table headings followed by comment & table cells
7000 parsoid=wt2html,wt2wt
7004 <!-- foo --> || baz || quux
7018 <tbody><tr><th> foo </th><th> bar
7019 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7024 Parsoid: Recover better from broken table attributes
7044 <p>foo</p></td></tr>
7049 Tables: Digest broken attributes on table and tr tag
7066 Strip unsupported table tags
7114 Testing serialization after deletion of table cells
7117 "modes": ["wt2wt", "selser"],
7125 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7138 Plain link, capitalized
7142 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7147 Plain link, uncapitalized
7151 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7158 [[Main Page|The Main Page]]
7160 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7165 Piped link with comment in link text
7167 [[Main Page|The Main<!--front--> Page]]
7169 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7174 Piped link with multiple pipe characters in link text
7176 [[Main Page||The|Main|Page|]]
7178 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7181 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7185 Piped link with no link text
7187 [[Thomas Bek (bishop of St David's)|]]
7189 <p>[[Thomas Bek (bishop of St David's)|]]
7192 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7200 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7205 Broken link with fragment
7207 [[Zigzagzogzagzig#zug]]
7209 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7214 Special page link with fragment
7216 [[Special:Version#anchor]]
7218 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7223 Nonexistent special page link with fragment
7225 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7227 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7234 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7236 <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>
7243 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7245 <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>!!!
7256 Bug 43661: Piped links with identical prefixes
7258 [[prefixed article|prefixed articles with spaces]]
7260 [[prefixed article|prefixed articlesaoeu]]
7262 [[Main Page|Main Page test]]
7264 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7265 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7266 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7272 Link with HTML entity in suffix / tail
7274 [[Main Page]]", [[Main Page]]a
7276 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7279 <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>
7283 Link with 3 brackets
7294 Link with 4 brackets
7298 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7303 Piped link with 3 brackets
7305 [[[main page|the main page]]]
7307 <p>[[[main page|the main page]]]
7312 Piped link with extlink-like text
7315 [[Main Page|This is a [bar]]]
7317 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7318 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7321 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7322 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7326 Link with multiple pipes
7328 [[Main Page|The|Main|Page]]
7330 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7334 # Note that parsoid does not munge anchor text; all non-space
7335 # characters are valid in HTML5 ids.
7337 Anchor containing a #. (bug 63430)
7339 [[Main Page#And#Link]]
7341 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7344 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7350 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7352 <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>
7357 Link with space in namespace
7359 [[User talk:Foo bar]]
7361 <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>
7366 MemoryAlpha:AlphaTest
7368 This is an article in the MemoryAlpha namespace
7369 (which shadows the memoryalpha interwiki link).
7373 Namespace takes precedence over interwiki link (bug 51680)
7375 [[MemoryAlpha:AlphaTest]]
7377 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7381 # The previous test doesn't work correctly in html2*, due to not recognizing the
7382 # link as an internal one. This one checks for the correct behavior.
7384 Link to namespace preferred over interwiki with correct rel attribute
7386 parsoid=html2wt,html2html
7388 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7390 [[MemoryAlpha:AlphaTest]]
7394 Piped link to namespace
7396 [[Meta:Disclaimers|The disclaimers]]
7398 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7405 [[Usually caused by a typo (oops}]]
7407 <p>[[Usually caused by a typo (oops}]]
7414 Just a test of an article title containing a percent.
7418 Link containing % (not as a hex sequence)
7422 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7425 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7428 # note that the parsoid HTML is identical to the previous test output,
7429 # so the previous test ensures that the html2wt mode will generate the
7430 # "not as a hex sequence" wikitext.
7432 Link containing % as a single hex sequence interpreted to char
7434 parsoid=wt2wt,wt2html,html2html
7438 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7441 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7445 Link containing % as a double hex sequence interpreted to hex sequence
7449 <p>[[7%2525 Solution]]
7453 # note that parsoid does not munge anchor text; all non-space
7454 # characters are valid in HTML5 anchors.
7456 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7457 Example for such a section: == < ==
7459 [[%23%3c]][[%23%3e]]
7461 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7464 <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>
7468 Link containing "<#" and ">#" as a hex sequences
7470 [[%3c%23]][[%3e%23]]
7472 <p>[[%3c%23]][[%3e%23]]
7477 Link containing an equals sign
7479 [[Special:BookSources/isbn=4-00-026157-6]]
7481 <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>
7484 <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>
7490 Just a test of an article title containing a tilde.
7493 # note that links containing signatures, like [[Foo~~~~]], are
7494 # massaged by the pre-save transform (PST) and so the tildes are never
7495 # seen by the parser.
7497 Link containing a tilde
7501 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7504 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7508 Link containing double-single-quotes '' (bug 4598)
7510 [[Lista d''e paise d''o munno]]
7512 <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>
7515 <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>
7519 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7521 Some [[Link|pretty ''italics'' and stuff]]!
7523 <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>!
7526 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7530 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7532 ''Some [[Link|pretty ''italics'' and stuff]]!''
7534 <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>
7539 Link with double quotes in title part (literal) and alternate part (interpreted)
7541 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7545 [[''Pentecoste''|Pentecoste]]
7547 [[''Pentecoste''|''Pentecoste'']]
7549 <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>
7550 </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>
7551 </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>
7552 </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>
7555 <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>
7556 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7557 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7558 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7562 Broken image links with HTML captions (bug 39700)
7564 [[File:Nonexistent|<script></script>]]
7565 [[File:Nonexistent|100x100px|<script></script>]]
7566 [[File:Nonexistent|<]]
7567 [[File:Nonexistent|a<i>b</i>c]]
7569 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7570 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7571 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7572 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7575 <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>
7576 <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>
7577 <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>
7578 <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>
7584 [[http://www.example.com]]
7586 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7589 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7593 Plain link to URL with link text
7595 [[http://www.example.com Link text]]
7597 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7602 Plain link to protocol-relative URL
7604 [[//www.example.com]]
7606 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7609 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7613 Plain link to protocol-relative URL with link text
7615 [[//www.example.com Link text]]
7617 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7622 Plain link to page with question mark in title
7628 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7629 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7634 # I'm fairly sure the expected result here is wrong.
7635 # We want these to be URL links, not pseudo-pages with URLs for titles....
7636 # However the current output is also pretty screwy.
7639 # I'm changing it to match the current output--it arguably makes more
7640 # sense in the light of the test above. Old expected result was:
7641 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7643 # But I think this test is bordering on "garbage in, garbage out" anyway.
7648 Piped link to URL: [[http://www.example.com|an example URL]]
7650 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7653 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7657 BUG 2: [[page|http://url/]] should link to page, not http://url/
7659 [[Main Page|http://url/]]
7661 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7664 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7667 # Parsoid does not mark self-links, by design.
7669 BUG 337: Escaped self-links should be bold
7673 [[Bug462]] [[Bug462]]
7675 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7678 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7680 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7684 Self-link to section should not be bold
7688 [[Main Page#section]]
7690 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7701 Self-link to numeric title
7707 <p><strong class="selflink">0</strong>
7712 Link to numeric-equivalent title
7718 <p><a href="/wiki/00" title="00">00</a>
7723 <nowiki> inside a link
7725 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7727 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7732 Non-breaking spaces in title
7734 [[ Main Page ]]
7736 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7741 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7747 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7752 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7758 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7763 Internal link with en linktrail: no apostrophes (bug 27473)
7769 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7774 Internal link with ca linktrail with apostrophes (bug 27473)
7780 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7785 Internal link with kaa linktrail with apostrophes (bug 27473)
7791 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7796 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7798 [[User:Foo/Test/63636:Bar|Test]]
7800 <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>
7803 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7807 Purely hash wikilink
7809 title=[[User:test/123]]
7813 <p><a href="#a">b</a>
7816 <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>
7820 1. Interaction of linktrail and template encapsulation
7826 <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>
7830 2. Interaction of linktrail and template encapsulation
7834 {{echo|Some [[Fool]]}}s
7836 <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>
7840 3. Interaction of linktrail and template encapsulation
7844 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7846 <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>
7856 Internal link with is link prefix
7860 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7862 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7873 Internal link with is link trail and link prefix
7877 [[mótmælendatrú|xxx]]ar
7879 mótmælenda[[söfnuður]]
7880 mótmælenda[[söfnuður|söfnuðir]]
7881 mótmælenda[[söfnuður|söfnuðir]]xxx
7883 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7884 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7885 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7886 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7887 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7892 Parsoid link trail escaping
7894 parsoid=html2wt,html2html
7896 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7902 Parsoid link prefix escaping
7905 parsoid=html2wt,html2html
7907 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7909 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7913 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7921 [http://wp.org ''foo'']
7923 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7924 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7925 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7926 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7931 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7935 [[Foo|{{echo|a}} b {{echo|c}}]]
7937 <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>
7941 Link with angle bracket after anchor
7945 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7948 <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>
7952 ### Interwiki links (see maintenance/interwiki.sql)
7956 Inline interwiki link
7958 parsoid=wt2html,wt2wt,html2html
7960 [[MeatBall:SoftSecurity]]
7962 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7965 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7969 Inline interwiki link with empty title (bug 2372)
7971 parsoid=wt2html,wt2wt,html2html
7975 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7978 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7982 Interwiki link encoding conversion (bug 1636)
7984 *[[Wikipedia:ro:Olteniţa]]
7985 *[[Wikipedia:ro:Olteniţa]]
7987 <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>
7988 <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>
7992 <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>
7993 <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>
7998 Interwiki link with fragment (bug 2130)
8000 [[MeatBall:SoftSecurity#foo]]
8002 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8006 # Ideally the wikipedia: prefix here should be proto-relative too
8007 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8008 # define the 'en' prefix, and originally the test used 'wikipedia',
8009 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8012 Different interwiki prefixes mapping to the same URL
8020 [[:wikipedia:Foo|Foo]]
8022 [[wikipedia:en:Foo]]
8024 [[:wikipedia:en:Foo]]
8028 <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>
8030 <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>
8032 <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>
8034 <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>
8036 <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>
8038 <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>
8040 <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>
8044 Interwiki links that cannot be represented in wiki syntax
8047 [[meatball:ok#foo|ok with fragment]]
8048 [[meatball:ok_as_well?|ok ending with ? mark]]
8049 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8050 [http://de.wikipedia.org/wiki/#foo is just fragment]
8053 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8054 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8055 <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>
8056 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8057 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8060 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8061 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8062 <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>
8063 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8064 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8068 Interwiki links: trail
8070 [[wikipedia:Foo|Ba]]r
8072 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8075 <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>
8079 Local interwiki link
8081 parsoid=wt2html,wt2wt,html2html
8083 [[local:Template:Foo]]
8085 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8088 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8091 # Parsoid does not mark self-links, by design.
8093 Local interwiki link: self-link to current page
8096 parsoid=wt2html,wt2wt,html2html
8100 <p><strong class="selflink">local:Main Page</strong>
8103 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8107 Local interwiki link: prefix only (bug 64167)
8109 parsoid=wt2html,wt2wt,html2html
8113 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8116 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8120 Local interwiki link: with additional interwiki prefix (bug 61357)
8122 parsoid=wt2html,wt2wt,html2html
8124 [[local:meatball:Hello]]
8126 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8129 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8133 Multiple local interwiki link prefixes
8135 [[local:local:local:local:mi:local:Foo]]
8137 parsoid=wt2html,wt2wt,html2html
8139 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8142 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8146 ### Interlanguage links
8147 ### Language links (so that searching for '### language' matches..)
8153 parsoid=wt2html,wt2wt,html2html
8161 <p>Blah blah blah</p>
8162 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8166 Interlanguage link with spacing
8168 parsoid=wt2html,wt2wt,html2html
8176 <p>Blah blah blah</p>
8177 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8181 Double interlanguage link
8183 parsoid=wt2html,wt2wt,html2html
8192 <p>Blah blah blah</p>
8193 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8194 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8198 Interlanguage link variations
8200 parsoid=wt2html,wt2wt,html2html
8210 <p>Blah blah blah</p>
8211 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8212 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8213 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8217 Space and question mark encoding in interlanguage links (T95473)
8219 parsoid=wt2html,wt2wt,html2html
8227 <p>Blah blah blah</p>
8228 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8232 Interlanguage link, with prefix links
8242 <p>Blah blah blah</p>
8243 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8247 Double interlanguage link, with prefix links (bug 8897)
8258 <p>Blah blah blah</p>
8259 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8260 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8264 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8272 <p>Blah blah blah</p>
8273 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8277 Parsoid-specific test: Wikilinks with should RT properly
8283 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8288 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8292 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8293 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8295 He&nbsp;llo [[Foo|He&nbsp;llo]]
8297 He&nbsp;llo [[He&nbsp;llo]]
8301 Parsoid: handle constructor well
8307 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8308 </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>
8311 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8313 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8322 # Note that `ko` isn't a known interlanguage prefix
8324 Parsoid: recognize interlanguage links without a target page
8334 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8336 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8339 # Note that `ko` isn't a known interwiki prefix
8341 Parsoid: recognize interwiki links without a target page
8343 parsoid=wt2html,wt2wt,html2html
8349 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8350 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8353 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8354 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8358 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8362 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8365 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8369 Interlanguage link with preceding local interwiki link (bug 68085)
8371 parsoid=wt2html,wt2wt,html2html
8374 [[local:es:Spanish]]
8377 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8381 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8385 Looks like an interlanguage link, but is actually a local interwiki
8387 parsoid=wt2html,wt2wt,html2html
8393 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8397 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8401 ### Redirects, Parsoid-only
8405 1. Simple redirect to page
8407 #REDIRECT [[Main Page]]
8409 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8413 2. Other redirect variants
8415 #REDIRECT [[Main_Page]]
8417 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8420 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8421 # This tests the Parsoid bail-out code.
8423 3. Other redirect variants
8425 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8427 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8431 4. Redirect to a templated destination
8433 #REDIRECT [[{{echo|Foo}}bar]]
8435 <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"}]]}'/>
8441 parsoid=wt2html,wt2wt
8446 <li>REDIRECT [[]]</li></ol>
8450 Optional colon in #REDIRECT
8452 # the colon is archaic syntax. we support it for wt2html, but we
8453 # don't care that it roundtrips back to the modern syntax.
8454 parsoid=wt2html,html2html
8456 #REDIRECT:[[Main Page]]
8458 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8462 Whitespace in #REDIRECT with optional colon
8464 # the colon and gratuitous whitespace is archaic syntax. we support
8465 # it for wt2html, but we don't care that it roundtrips back to the
8466 # modern syntax (without extra whitespace)
8467 parsoid=wt2html,html2html
8474 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8478 Piped link in #REDIRECT
8480 # content after piped link is ignored. we support this syntax,
8481 # but don't care that the piped link is lost when we roundtrip this.
8484 #REDIRECT [[Main Page|bar]]
8486 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8490 Redirect to category (T104502)
8492 parsoid=wt2html,wt2wt
8494 #REDIRECT [[Category:Foo]]
8496 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8500 Redirect to category with URL encoding (T104502)
8504 #REDIRECT [[Category%3AFoo]]
8506 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8510 Redirect to category page
8512 #REDIRECT [[:Category:Foo]]
8514 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8518 Redirect to image page (1)
8520 #REDIRECT [[File:Wiki.png]]
8522 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8526 Redirect to image page (2)
8528 #REDIRECT [[Image:Wiki.png]]
8530 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8533 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8534 # Next test confirms this.
8536 Redirect to language (1) (T104918)
8538 parsoid=wt2html,wt2wt,html2html
8540 #REDIRECT [[en:File:Wiki.png]]
8542 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8546 Redirect to language (2) (T104918)
8548 #REDIRECT [[:en:File:Wiki.png]]
8550 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8554 Redirect to interwiki (T104918)
8556 #REDIRECT [[meatball:File:Wiki.png]]
8558 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8562 Non-English #REDIRECT
8566 #TILVÍSUN [[Main Page]]
8568 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8572 Redirect syntax under text isn't considered a redirect
8575 #redirect [[Main Page]]
8578 <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>
8581 # FIXME: Should hoist the redirect to the top of the page and ensure there
8588 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8608 Broken br tag sanitization
8616 # TODO: Fix html2html mode (bug 51055)!
8618 Parsoid: Broken br tag recognition
8631 Incorrecly removing closing slashes from correctly formed XHTML
8633 <br style="clear:both;" />
8635 <p><br style="clear:both;" />
8640 Failing to transform badly formed HTML into correct XHTML
8642 <br style="clear: left;">
8643 <br style="clear: right;">
8644 <br style="clear: both;">
8646 <p><br style="clear: left;" />
8647 <br style="clear: right;" />
8648 <br style="clear: both;" />
8652 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8653 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8655 Handling html with a div self-closing tag
8664 <p><div title />
8668 <p><div title=bar />
8669 <div title=bar/>
8671 <div title="bar/"></div>
8675 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8676 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8677 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8678 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8679 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8680 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8684 Handling html with a br self-closing tag
8711 Horizontal ruler (should it add that extra space?)
8726 Horizontal ruler -- 4+ dashes render hr
8735 Horizontal ruler -- eats additional dashes on the same line
8744 Horizontal ruler -- does not collapse dashes on consecutive lines
8755 Horizontal ruler -- <4 dashes render as plain text
8764 Horizontal ruler -- Supports content following dashes on same line
8776 ### Block-level elements
8785 <ul><li>Common list</li>
8787 <li>item 3</li></ul>
8798 <ol><li>Numbered list</li>
8800 <li> item 3</li></ol>
8814 ***#Number on level 4
8816 **#Number on level 3
8817 **#Number on level 3
8821 #** Level 3, but ordered
8824 <ol><li> with numbers</li></ol>
8825 <ul><li> and bullets</li></ul>
8826 <ol><li> and numbers</li></ol></li>
8828 <ul><li>bullet level 2
8829 <ul><li>bullet level 3
8830 <ol><li>Number on level 4</li></ol></li></ul></li>
8832 <ol><li>Number on level 3</li>
8833 <li>Number on level 3</li></ol></li></ul>
8834 <ol><li>number level 2</li></ol></li>
8836 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8837 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8842 1. Nested mixed wikitext and html list
8845 * <ul><li>ho</li></ul>
8850 <li> <ul><li>ho</li></ul></li>
8852 <ul><li> ho</li></ul></li></ul>
8856 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
8858 <ul><li> ho</li></ul></li></ul>
8862 2. Nested mixed wikitext and html list (incompatible)
8865 : {{echo|<li>ho</li>}}
8868 <dd> <li>ho</li></dd></dl>
8872 <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>
8882 <ul><li>bar</li></ul></li></ul>
8892 <ul><li><ul><li>foo</li></ul></li>
8898 Nested lists 3 (first element empty)
8904 <ul><li>bar</li></ul></li></ul>
8909 Nested lists 4 (first element empty)
8914 <ul><li><ul><li></li></ul></li>
8920 Nested lists 5 (both elements empty)
8925 <ul><li><ul><li></li></ul></li>
8931 Nested lists 6 (both elements empty)
8937 <ul><li></li></ul></li></ul>
8942 Nested lists 7 (skip initial nesting levels)
8946 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8951 Nested lists 8 (multiple nesting transitions)
8959 <ul><li><ul><li> bar</li></ul></li>
8960 <li> baz</li></ul></li>
8966 Nested lists 9 (extension interaction)
8972 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8976 1. Lists with start-of-line-transparent tokens before bullets: Comments
8989 2. Lists with start-of-line-transparent tokens before bullets: Template close
8994 <ul><li>foo bar</li>
9000 List items are not parsed correctly following a <pre> block (bug 785)
9006 <ul><li> <pre>foo</pre></li>
9007 <li> <pre>bar</pre></li>
9011 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9012 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9017 List items from template
9028 * notSOL{{inner list}}
9031 <ul><li> item 1</li>
9032 <li> item 2</li></ul>
9033 <ul><li> item 0</li>
9035 <li> item 2</li></ul>
9036 <ul><li> item 0</li>
9039 <li> item 2</li></ul>
9044 List interrupted by empty line or heading
9052 <ul><li> foo</li></ul>
9053 <ul><li><ul><li> bar</li></ul></li></ul>
9054 <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>
9055 <ul><li> Another list item</li></ul>
9060 Multiple list tags generated by templates
9081 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9084 <!--This line will NOT split the list-->
9086 <!--This line will NOT split the list either-->
9088 <!--foo--> <!----> <!--This line NOT split the list either-->
9099 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9102 <!--This line will NOT split the list-->
9104 <!--This line will NOT split the list either-->
9106 <!--foo--> <!----> <!--This line NOT split the list
9119 (The PHP parser relies on Tidy for the hack)
9121 parsoid=wt2html,wt2wt
9125 * {{echo|<li>templated li-hack}}
9126 * <!--foo--> <li> unsupported li-hack with preceding comments
9129 <li><li>not a li-hack
9136 <li>templated li-hack</li>
9137 <li>unsupported li-hack with preceding comments</li>
9140 <li>not a li-hack</li>
9145 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9172 Parsoid: Test of whitespace serialization with Templated bullets
9179 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9183 # ------------------------------------------------------------------------
9184 # The next set of tests are about Parsoid's ability to handle badly nested
9185 # tags (parse, minimize scope of fixup, and roundtrip back)
9186 # ------------------------------------------------------------------------
9189 Unbalanced closing block tags break a list
9190 (php parser relies on Tidy to fix up)
9208 # Parsoid fails this test, but it might be tricky to support properly.
9211 Unbalanced closing non-block tags don't break a list
9212 (php parser relies on Tidy to fix up)
9219 <li><span>a</span></li>
9220 <li><span>b</span></li>
9234 Unclosed formatting tags that straddle lists are closed and reopened
9235 (php parser relies on Tidy to fix up)
9237 parsoid=wt2html,wt2wt,html2html
9247 <ol><li> <s> a</s></li>
9248 <li><s> b </s></li></ol>
9253 1. List embedded in a formatting tag
9260 <li><small>foo</small></li>
9270 ## Ugly Parsoid output here
9271 ## Not sure what the right output is.
9273 2. List embedded in a formatting tag
9280 <li><small>a</small></li>
9281 <li><small>b</small></li>
9288 <li><small>b</small></li>
9292 # Ugly Parsoid and PHP parser output here
9293 # Not sure if we want to make this a test!
9296 ## 3. Unclosed formatting tags in list elements
9302 ## <li><small>a</small></li>
9303 ## <li><small><small>b</small></small></li>
9307 ## <li><small>a</small></li>
9309 ## <li><small>b</small></li>
9313 # This is a bug in the PHP parser + tidy combination.
9314 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9315 # and then fostered out of the table by tidy.)
9316 # We believe the Parsoid output to be correct.
9318 Table with missing opening <tr> tag
9320 parsoid=wt2html,wt2wt
9338 # Note that the current date is hard-coded as
9339 # 1970-01-01T00:02:03Z (a Thursday)
9340 # when running parser tests. The timezone is also fixed to GMT, so
9341 # local date will be identical to current date.
9344 Magic Word: {{CURRENTDAY}}
9353 Magic Word: {{CURRENTDAY2}}
9362 Magic Word: {{CURRENTDAYNAME}}
9371 Magic Word: {{CURRENTDOW}}
9380 Magic Word: {{CURRENTMONTH}}
9389 Magic Word: {{CURRENTMONTH1}}
9398 Magic Word: {{CURRENTMONTHABBREV}}
9400 {{CURRENTMONTHABBREV}}
9407 Magic Word: {{CURRENTMONTHNAME}}
9409 {{CURRENTMONTHNAME}}
9416 Magic Word: {{CURRENTMONTHNAMEGEN}}
9418 {{CURRENTMONTHNAMEGEN}}
9425 Magic Word: {{CURRENTTIME}}
9434 Magic Word: {{CURRENTHOUR}}
9443 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9452 Magic Word: {{CURRENTYEAR}}
9461 Magic Word: {{CURRENTTIMESTAMP}}
9463 {{CURRENTTIMESTAMP}}
9470 Magic Words LOCAL (UTC)
9474 * {{LOCALMONTHNAME}}
9475 * {{LOCALMONTHNAMEGEN}}
9476 * {{LOCALMONTHABBREV}}
9485 * {{LOCALTIMESTAMP}}
9500 <li> 19700101000203</li></ul>
9505 Magic Word: {{FULLPAGENAME}}
9507 title=[[User:Ævar Arnfjörð Bjarmason]]
9511 <p>User:Ævar Arnfjörð Bjarmason
9516 Magic Word: {{FULLPAGENAMEE}}
9518 title=[[User:Ævar Arnfjörð Bjarmason]]
9522 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9527 Magic Word: {{TALKSPACE}}
9529 title=[[User:Ævar Arnfjörð Bjarmason]]
9538 Magic Word: {{TALKSPACE}}, same namespace
9540 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9549 Magic Word: {{TALKSPACE}}, main namespace
9551 title=[[Parser Test]]
9560 Magic Word: {{TALKSPACEE}}
9562 title=[[User:Ævar Arnfjörð Bjarmason]]
9571 Magic Word: {{SUBJECTSPACE}}
9573 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9582 Magic Word: {{SUBJECTSPACE}}, same namespace
9584 title=[[User:Ævar Arnfjörð Bjarmason]]
9593 Magic Word: {{SUBJECTSPACE}}, main namespace
9595 title=[[Parser Test]]
9603 Magic Word: {{SUBJECTSPACEE}}
9605 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9614 Magic Word: {{NAMESPACE}}
9616 title=[[User:Ævar Arnfjörð Bjarmason]]
9625 Magic Word: {{NAMESPACEE}}
9627 title=[[User:Ævar Arnfjörð Bjarmason]]
9636 Magic Word: {{NAMESPACENUMBER}}
9638 title=[[User:Ævar Arnfjörð Bjarmason]]
9647 Magic Word: {{SUBPAGENAME}}
9649 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9658 Magic Word: {{SUBPAGENAMEE}}
9660 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9669 Magic Word: {{ROOTPAGENAME}}
9671 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9675 <p>Ævar Arnfjörð Bjarmason
9680 Magic Word: {{ROOTPAGENAMEE}}
9682 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9686 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9691 Magic Word: {{BASEPAGENAME}}
9693 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9697 <p>Ævar Arnfjörð Bjarmason
9702 Magic Word: {{BASEPAGENAMEE}}
9704 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9708 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9713 Magic Word: {{TALKPAGENAME}}
9715 title=[[User:Ævar Arnfjörð Bjarmason]]
9719 <p>User talk:Ævar Arnfjörð Bjarmason
9724 Magic Word: {{TALKPAGENAMEE}}
9726 title=[[User:Ævar Arnfjörð Bjarmason]]
9730 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9735 Magic Word: {{SUBJECTPAGENAME}}
9737 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9741 <p>User:Ævar Arnfjörð Bjarmason
9746 Magic Word: {{SUBJECTPAGENAMEE}}
9748 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9750 {{SUBJECTPAGENAMEE}}
9752 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9757 Magic Word: {{NUMBEROFFILES}}
9766 Magic Word: {{PAGENAME}}
9768 title=[[User:Ævar Arnfjörð Bjarmason]]
9772 <p>Ævar Arnfjörð Bjarmason
9777 Magic Word: {{PAGENAME}} with metacharacters
9779 title=[['foo & bar = baz']]
9783 <p><i>'foo & bar = baz'</i>
9786 <p><i>'foo & bar = baz'</i></p>
9790 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9792 title=[[*RFC 1234 http://example.com/]]
9796 <p>*RFC 1234 http://example.com/
9799 <p>*RFC 1234 http://example.com/</p>
9803 Magic Word: {{PAGENAMEE}}
9805 title=[[User:Ævar Arnfjörð Bjarmason]]
9809 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9814 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9816 title=[[*RFC 1234 http://example.com/]]
9820 <p>*RFC_1234_http://example.com/
9823 <p>*RFC_1234_http://example.com/</p>
9827 Magic Word: {{REVISIONID}}
9836 Magic Word: {{SCRIPTPATH}}
9844 Magic Word: {{STYLEPATH}}
9853 Magic Word: {{SERVER}}
9857 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9862 Magic Word: {{SERVERNAME}}
9871 Magic Word: {{SITENAME}}
9880 Case-sensitive magic words, when cased differently, should just be template transclusions
9887 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9888 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9889 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9890 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9895 Case-insensitive magic words should still work with weird casing.
9905 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9909 # From plwiki:PLOS_ONE
9911 Parsoid: Page property magic word with magic word contents
9913 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9915 <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>"}]]}'/>
9919 Parsoid: Template-generated DISPLAYTITLE
9921 {{{{echo|DISPLAYTITLE}}:Foo}}
9923 <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}}]}'/>
9927 Namespace 1 {{ns:1}}
9936 Namespace 1 {{ns:01}}
9945 Namespace 0 {{ns:0}} (bug 4783)
9953 Namespace 0 {{ns:00}} (bug 4783)
9961 Namespace -1 {{ns:-1}}
9970 Namespace User {{ns:User}}
9979 Namespace User talk {{ns:User_talk}}
9988 Namespace User talk {{ns:uSeR tAlK}}
9997 Namespace File {{ns:File}}
10006 Namespace File {{ns:Image}}
10015 Namespace (lang=de) Benutzer {{ns:User}}
10026 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10032 <p>Benutzer Diskussion
10040 {{urlencode:hi world?!}}
10041 {{urlencode:hi world?!|WIKI}}
10042 {{urlencode:hi world?!|PATH}}
10043 {{urlencode:hi world?!|QUERY}}
10053 Magic Word: prioritize type info over data-parsoid
10057 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10063 Magic Word: serialize on separate line (parsoid)
10065 parsoid=wt2wt,html2wt
10071 foo<meta property="mw:PageProp/notoc"/>bar
10075 Magic Word: rt non-english wikis
10082 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10086 __proto__ is treated as normal wikitext (T105997)
10098 Magic links: internal link to RFC (bug 479)
10102 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10105 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10109 Magic links: RFC (bug 479)
10113 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10116 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10120 Magic links: RFC (bug 65278)
10122 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10124 <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.
10127 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10131 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10133 RFC      822
10137 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10142 <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>
10148 Magic links: ISBN (bug 1937)
10152 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10155 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10159 Magic links: ISBN (bug 65278)
10161 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10163 <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.
10166 <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>
10170 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10172 ISBN      978 0 316 09811 3
10178 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10185 <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>
10193 Magic links: PMID incorrectly converts space to underscore
10197 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10200 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10204 Magic links: PMID (bug 65278)
10206 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10208 <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.
10211 <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>
10215 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10217 PMID      1234
10221 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10226 <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>
10231 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10232 # since these are ExtLinkText, not MagicLinkText
10234 Magic links: use appropriate serialization for "almost" magic links.
10236 X[[Special:BookSources/0978739256|foo]]
10238 X[//tools.ietf.org/html/rfc1234 foo]
10240 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10241 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10244 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10245 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10253 Nonexistent template
10255 {{thistemplatedoesnotexist}}
10257 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10262 Template with invalid target containing tags
10264 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10266 <p>{{a<b>b</b>|foo|a=b|a = b}}
10271 Template with invalid target containing unclosed tag
10273 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10275 <p>{{a<b>|foo|a=b|a = b}}</b>
10280 Template with invalid target containing wikilink
10284 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10287 <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>
10291 Template with just whitespace in it, bug #68421
10295 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
10301 This is a test template
10309 <p>This is a test template
10314 Template with explicit namespace
10318 <p>This is a test template
10326 This is a test template with parameter {{{param}}}
10332 {{paramtest|param=foo}}
10334 <p>This is a test template with parameter foo
10339 Template:paramtestnum
10341 [[{{{1}}}|{{{2}}}]]
10345 Template unnamed parameter
10347 {{paramtestnum|Main Page|the main page}}
10349 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10354 Template:templatesimple
10360 Template:templateredirect
10362 #redirect [[Template:templatesimple]]
10366 Template:templateasargtestnum
10372 Template:templateasargtest
10374 {{template{{{templ}}}}}
10378 Template:templateasargtest2
10384 Template with template name as unnamed argument
10386 {{templateasargtestnum|templatesimple}}
10393 Template with template name as argument
10395 {{templateasargtest|templ=simple}}
10402 Template with template name as argument (2)
10404 {{templateasargtest2|templ=templatesimple}}
10411 Template:templateasargtestdefault
10413 {{{{{templ|templatesimple}}}}}
10423 Template with default value
10425 {{templateasargtestdefault}}
10432 Template with default value (value set)
10434 {{templateasargtestdefault|templ=templa}}
10443 {{templateredirect}}
10448 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10452 Template with argument in separate line
10454 {{ templateasargtest |
10462 Template with complex template as argument
10465 param ={{ templateasargtest |
10466 templ = simple }}}}
10468 <p>This is a test template with parameter (test)
10473 Template with thumb image (with link in description)
10475 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10477 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>
10480 <p>This is a test template with parameter</p>
10481 <div class="thumb tright">
10482 <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>
10483 <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>
10487 <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>
10491 Template:complextemplate
10493 {{{1}}} {{paramtest|
10494 param ={{{param}}}}}
10498 Template with complex arguments
10501 param ={{ templateasargtest |
10502 templ = simple }}|[[Template:complextemplate|link]]}}
10504 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10509 BUG 553: link with two variables in a piped link
10512 |[[{{{1}}}|{{{2}}}]]
10517 <td>[[{{{1}}}|{{{2}}}]]
10522 <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>
10527 Abort table cell attribute parsing on wikilink
10530 | testing [[one|two]] | three || four
10531 | testing one two | three || four
10532 | testing="[[one|two]]" | three || four
10537 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10543 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10549 <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>
10550 <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>
10551 <td> testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td></tr>
10556 Don't abort table cell attribute parsing if wikilink is found in template arg
10559 | Test {{#tag:ref|One two "[[three]]" four}}
10563 <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>
10568 Magic variable as template parameter
10570 {{paramtest|param={{SITENAME}}}}
10572 <p>This is a test template with parameter MediaWiki
10579 [[{{{param}}}|link]]
10583 Template parameter as link source
10585 {{linktest|param=Main Page}}
10587 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10592 Template:paramtest2
10594 including another template, {{paramtest|param={{{arg}}}}}
10598 Template passing argument to another template
10600 {{paramtest2|arg='hmm'}}
10602 <p>including another template, This is a test template with parameter 'hmm'
10613 Template as link source
10617 [[{{linktest2}}|Main Page]]
10619 [[{{linktest2}}]]Page
10621 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10622 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10623 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10641 Template infinite loop
10645 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10650 Template from main namespace
10669 BUG 529: Template with table, not included at beginning of line
10688 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10708 BUG 41: Template parameters shown as broken links
10717 Template with targets containing wikilinks
10721 {{[[{{echo|foo}}]]}}
10723 {{{{echo|[[foo}}]]}}
10725 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10726 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10738 Templates: Double quotes as template target
10745 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10749 ## This test is about making sure Parsoid's data-mw is well formed in the
10750 ## face of multiple templates with intersecting and overlapping ranges. The
10751 ## wikitext itself is wretched.
10753 Templates with intersecting and overlapping ranges
10778 <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":""}]]}'>
10780 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
10782 <tbody><tr><td>hi</td></tr>
10787 Template:MSGNW test
10789 ''None'' of '''this''' should be
10791 but rather passed unmodified
10799 # hmm, fix this or just deprecate msgnw and document its behavior?
10803 {{msgnw:MSGNW test}}
10805 <p>''None'' of '''this''' should be
10807  but rather passed unmodified
10808 {{test}}
10812 <!-- comment -->
10819 {{int:youhavenewmessages|lots of money|not!}}
10821 <p>You have lots of money (not!).
10826 int keyword - non-existing message
10837 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10841 <includeonly> and <noinclude> being included
10852 <onlyinclude>Foo</onlyinclude>bar
10856 <onlyinclude> being included
10868 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10872 <onlyinclude> and <includeonly> being included
10881 <includeonly> and <noinclude> on a page
10883 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10890 Un-closed <noinclude>
10897 <onlyinclude> on a page
10899 <onlyinclude>Foo</onlyinclude>bar
10906 Un-closed <onlyinclude>
10913 Self-closed noinclude, includeonly, onlyinclude tags
10924 Unbalanced includeonly and noinclude tags
10928 |b</noinclude></noinclude>
10929 |c</noinclude></includeonly>
10930 |d</includeonly></includeonly>
10939 <td>c</includeonly>
10941 <td>d</includeonly></includeonly>
10947 Template:Includeonly section
10950 ==Includeonly section==
10956 Bug 6563: Edit link generation for section shown by <includeonly>
10958 {{includeonly section}}
10960 <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>
10961 <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>
10965 # Uses same input as the contents of [[Template:Includeonly section]]
10967 Bug 6563: Section extraction for section shown by <includeonly>
10972 ==Includeonly section==
10980 Bug 6563: Edit link generation for section suppressed by <includeonly>
10983 ==Includeonly section==
10987 <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>
10992 Bug 6563: Section extraction for section suppressed by <includeonly>
10997 ==Includeonly section==
11005 Un-closed <includeonly>
11010 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11013 ## We used to, but no longer wt2wt this test since the default serializer
11014 ## will normalize the include directives to serialize on their own line.
11015 ## Selser will take care of preserving formatting in scenarios where they
11016 ## intermingled with other wikitext.
11018 Includes and comments at SOL
11020 parsoid=wt2html,html2html
11022 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11026 </noinclude>* stuff
11029 <includeonly>can have stuff</includeonly>=== here ===
11032 <h2><span class="mw-headline" id="hu">hu</span></h2>
11035 <ul><li> stuff</li>
11036 <li> here</li></ul>
11037 <h3><span class="mw-headline" id="here">here</span></h3>
11040 <!-- 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>
11042 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11044 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11045 <li> here</li></ul>
11047 <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>
11051 # TODO: test with DOM fragment reuse!
11053 Parsoid: DOM fragment reuse
11055 parsoid=wt2wt,wt2html
11057 a{{echo|b<table></table>c}}d
11069 <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>
11071 <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">
11072 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11073 </span><p about="#mwt2">cd</p>
11075 <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">
11077 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11079 </span><p about="#mwt3">b</p>
11083 Parsoid: Merge double tds (T52603)
11088 |{{echo|{{!}} foo}}
11092 <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>
11097 Parsoid: Merge double tds in nested transclusion content (T52603)
11103 |{{echo|{{!}} foo}}
11107 <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}}]}'>
11109 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11115 ### <includeonly> and <noinclude> in attributes
11118 0. includeonly around the entire attribute
11120 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11122 <p><span id="v2">bar</span>
11127 1. includeonly in html attr key
11129 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11131 <p><span id="foo">bar</span>
11136 2. includeonly in html attr value
11138 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11139 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11141 <p><span id="v1">bar</span>
11142 <span id="v1">bar</span>
11147 3. includeonly in part of an attr value
11149 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11151 <p><span style="color:red;">bar</span>
11156 4. includeonly in table attributes
11180 ### Token Stream Patcher tests
11182 ### These tests won't always pass wt2wt and other modes because
11183 ### on serialization, the table will be output on a new line.
11184 ### For now, we are blacklisting them, and using this to test selser.
11188 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11190 parsoid=wt2html,wt2wt
11192 {{echo|}}{| width = '100%'
11196 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11197 <tbody><tr><td>foo</td></tr>
11201 ## We used to, but no longer wt2wt this test since the default serializer
11202 ## will normalize the include directives to serialize on their own line.
11203 ## Selser will take care of preserving formatting in scenarios where they
11204 ## intermingled with other wikitext.
11206 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11210 <includeonly>a</includeonly>{| {{{b}}}
11214 <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}}}":""}}'>
11215 <tbody><tr><td>c</td></tr>
11221 ### Testing parsing of templates where a template arg
11222 ### has the same name as the template itself.
11228 {{{quote|{{{1}}}}}}
11232 Templates: Template Name/Arg clash: 1. Use of positional param
11241 Templates: Template Name/Arg clash: 2. Use of named param
11243 {{quote|quote=foo}}
11250 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11259 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11263 Templates: 1. Simple use
11272 Templates: 2. Inside a block tag
11274 <div>{{echo|Foo}}</div>
11275 <blockquote>{{echo|Foo}}</blockquote>
11278 <blockquote>Foo</blockquote>
11288 Templates: P-wrapping: 1a. Templates on consecutive lines
11299 Templates: P-wrapping: 1b. Templates on consecutive lines
11313 Templates: P-wrapping: 1c. Templates on consecutive lines
11316 {{echo|bar}} <div>baz</div>
11329 Templates: P-wrapping: 1d. Template preceded by comment-only line
11338 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11342 Templates: Inline Text: 1. Multiple template uses
11344 {{echo|Foo}}bar{{echo|baz}}
11351 Templates: Inline Text: 2. Back-to-back template uses
11353 {{echo|Foo}}{{echo|bar}}
11360 Templates: Block Tags: 1. Multiple template uses
11362 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11364 <div>Foo</div><div>bar</div><div>baz</div>
11369 Templates: Block Tags: 2. Back-to-back template uses
11371 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11373 <div>Foo</div><div>bar</div>
11377 # This is an edge case relating to paragraph wrapping.
11379 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11384 <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
11389 Templates: Links: 1. Simple example
11391 {{echo|[[Foo|bar]]}}
11393 <p><a href="/wiki/Foo" title="Foo">bar</a>
11398 Templates: Links: 2. Generation of link href
11400 [[{{echo|Foo}}|bar]]
11402 <p><a href="/wiki/Foo" title="Foo">bar</a>
11407 Templates: Links: 3. Generation of part of a link href
11409 [[Fo{{echo|o}}|bar]]
11411 [[Foo{{echo|bar}}]]
11413 [[Foo{{echo|bar}}baz]]
11415 [[Foo{{echo|bar}}|bar]]
11417 [[:Foo{{echo|bar}}]]
11419 [[:Foo{{echo|bar}}|bar]]
11421 <p><a href="/wiki/Foo" title="Foo">bar</a>
11422 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11423 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11424 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11425 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11426 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11431 Templates: Links: 4. Multiple templates generating link href
11433 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11435 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11440 Templates: Links: 5. Generation of link text
11442 [[Foo|{{echo|bar}}]]
11444 <p><a href="/wiki/Foo" title="Foo">bar</a>
11449 Templates: Links: 5. Nested templates (only outermost template should be marked)
11451 {{echo|[[{{echo|Foo}}|bar]]}}
11453 <p><a href="/wiki/Foo" title="Foo">bar</a>
11458 Templates: HTML Tag: 1. Generation of HTML attr. key
11460 <div {{echo|style}}="color:red;">foo</div>
11462 <div style="color:red;">foo</div>
11467 Templates: HTML Tag: 2. Generation of HTML attr. value
11469 <div style={{echo|'color:red;'}}>foo</div>
11471 <div style="color:red;">foo</div>
11476 Templates: HTML Tag: 3. Generation of HTML attr key and value
11478 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11480 <div style="color:red;">foo</div>
11485 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11487 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11489 <div title="This is a long title with just one piece templated">foo</div>
11494 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11496 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11498 <div title="This is a long title with just one piece templated">foo</div>
11503 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11505 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11507 <div title="This is a long title with just one piece templated">foo</div>
11511 # SSS FIXME: While it is great we added support for all this,
11512 # do we want to make this part of the spec? Maybe we want to
11513 # deprecate this kind of usage in the future?
11515 Templates: HTML Tag: 7. Generation of partial attribute key string
11517 <div st{{echo|yle}}="color:red;">foo</div>
11519 <div style="color:red;">foo</div>
11524 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11526 <div {{echo|1=id="v1"}}>bar</div>
11528 <div id="v1">bar</div>
11533 Templates: HTML Tag: 9. Multiple template-generated attributes
11535 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11537 <div id="v1" title="foo">bar</div>
11542 Templates: Support for templates generating attributes and content
11544 {| {{mixed_attr_content_template}}
11549 <table style="color:red;" title="T48811">
11559 <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|}"]}'>
11568 1. Entities and nowikis inside templated attributes should be handled correctly
11570 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11572 <div style="background:#f9f9f9;">foo</div>
11575 <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>
11579 2. Entities and nowikis inside templated attributes should be handled correctly
11582 |{{table_attribs_3}}
11587 <td style="background:#f9f9f9;">Foo
11592 <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>
11597 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11600 |{{table_attribs_3}}
11605 <td style="background:#f9f9f9;">Foo
11609 <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}}]}'>
11610 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11616 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11619 | {{table_attribs_6}} hi
11624 <td style="background: red;"> hi
11629 <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>
11634 Templates: HTML Tables: 1. Generating start of a HTML table
11636 {{echo|<table><tr><td>foo</td>}}</tr></table>
11638 <table><tr><td>foo</td></tr></table>
11643 Templates: HTML Tables: 2a. Generating middle of a HTML table
11645 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11647 <table><tr><td>foo</td></tr></table>
11652 Templates: HTML Tables: 2b. Generating middle of a HTML table
11654 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11656 <table><tr><td>foo</td></tr></table>
11661 Templates: HTML Tables: 3. Generating end of a HTML table
11663 <table><tr>{{echo|<td>foo</td></tr></table>}}
11665 <table><tr><td>foo</td></tr></table>
11670 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11672 {{echo|<table>}}<tr><td>foo</td></tr></table>
11674 <table><tr><td>foo</td></tr></table>
11679 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11681 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11683 <table><tr><td>foo</td></tr></table>
11688 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11690 <table><tr>{{echo|<td>}}foo</td></tr></table>
11692 <table><tr><td>foo</td></tr></table>
11697 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11699 <table><tr><td>foo{{echo|</td>}}</tr></table>
11701 <table><tr><td>foo</td></tr></table>
11706 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11708 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11710 <table><tr><td>foo</td></tr></table>
11715 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11717 <table><tr><td>foo</td></tr>{{echo|</table>}}
11719 <table><tr><td>foo</td></tr></table>
11724 Templates: HTML Tables: 5. Proper fostering of categories from inside
11726 parsoid=wt2html,wt2wt
11728 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11729 <!--Two categories (Bug 50330)-->
11730 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11732 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11733 <!--Two categories (Bug 50330)-->
11734 <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>
11738 Templates: Wiki Tables: 1a. Fostering of entire template content
11746 <tr><td></td></tr></table>
11758 Templates: Wiki Tables: 1b. Fostering of entire template content
11771 <tr><td></td></tr></table>
11785 Templates: Wiki Tables: 2. Fostering of partial template content
11795 <tr><td></td></tr></table>
11808 Templates: Wiki Tables: 3. td-content via multiple templates
11811 {{echo|{{pipe}}a}}{{echo|b}}
11822 Templates: Wiki Tables: 4. Templated tags, no content
11828 <tr><td></td></tr></table>
11833 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11847 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11860 ## This test case is very specific to Parsoid's internals
11861 ## and is hence only tested for Parsoid's code. Parsoid uses
11862 ## a <meta> marker tag for <ref> tags and they are expanded
11863 ## much later. We are verifying that this <meta> tag usage
11864 ## doesn't prevent foster parenting.
11866 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11868 {{PartialTable}}<ref>foo</ref>
11873 <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">
11877 <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>
11881 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11891 <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{{!}}}"]}'>
11892 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11896 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11901 Templates: Lists: Multi-line list-items via templates
11903 *{{echo|a {{nonexistent|
11905 *{{echo|b {{nonexistent|
11908 <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>
11909 <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>
11914 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11916 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11918 <p><i>ab</i>c<i>d</i>e
11923 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11924 (PHP parser generates misnested html)
11926 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11928 <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>
11932 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11933 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11935 parsoid=wt2html,wt2wt
11937 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11939 <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>
11940 <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>
11941 <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>
11945 Templates: Ugly nesting: 4. Divs opened/closed across templates
11947 a<div>b{{echo|c</div>d}}e
11958 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11964 |{{echo|foo</table>}}
11968 <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|}"]}'>
11972 <td>foo</td></tr></tbody></table><span about="#mwt1">
11973 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11978 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11988 <td>1. {{echo|foo </table>}}</td>
11990 <td>2. {{echo|baz </table>}}</td>
12003 <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>"]}'>
12008 <td>1. foo </td></tr></tbody></table></td>
12010 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12011 </span><span about="#mwt2">
12012 </span><span about="#mwt2">
12013 </span><span about="#mwt2">abc</span><span about="#mwt2">
12014 </span><span about="#mwt2">
12015 </span><span about="#mwt2">
12016 </span><span about="#mwt2">
12017 </span><span about="#mwt2">
12018 </span><span about="#mwt2">
12019 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12020 </span><span about="#mwt2">
12025 Templates: Ugly templates: 3. newline-only template parameter
12034 # This looks like a bug: a single newline triggers p/br for some reason.
12036 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12045 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12046 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12048 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12054 <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
12055 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12059 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12060 # that are "identical" and generate nesting cycles in the algorithm
12062 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12064 {{echo|<table><tr><td><table>}}
12068 <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"}'>
12069 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12070 </table></td></tr></tbody></table>
12074 Templates: Parameters substituted at the top-level
12076 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12078 <p><i>who</i> me? <b>never!</b>
12081 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12085 Parser Functions: 1. Simple example
12094 Parser Functions: 2. Nested use (only outermost should be marked up)
12103 ### Pre-save transform tests
12106 pre-save transform: subst:
12112 This is a test template
12116 pre-save transform: normal template
12126 pre-save transform: nonexistent template
12130 {{thistemplatedoesnotexist}}
12132 {{thistemplatedoesnotexist}}
12136 pre-save transform: subst magic variables
12145 # This is bug 89, which I fixed. -- wtm
12147 pre-save transform: subst: templates with parameters
12151 {{subst:paramtest|param="something else"}}
12153 This is a test template with parameter "something else"
12157 Template:nowikitest
12159 <nowiki>'''not wiki'''</nowiki>
12163 pre-save transform: nowiki in subst (bug 1188)
12167 {{subst:nowikitest}}
12169 <nowiki>'''not wiki'''</nowiki>
12173 Template:commenttest
12175 This template has <!-- a comment --> in it.
12179 pre-save transform: comment in subst (bug 1936)
12183 {{subst:commenttest}}
12185 This template has <!-- a comment --> in it.
12189 pre-save transform: unclosed tag
12193 <nowiki>'''not wiki'''
12195 <nowiki>'''not wiki'''
12199 pre-save transform: mixed tag case
12203 <NOwiki>'''not wiki'''</noWIKI>
12205 <NOwiki>'''not wiki'''</noWIKI>
12209 pre-save transform: unclosed comment in <nowiki>
12213 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12215 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12218 # Leading @ in this template definition works around a limitation
12219 # in parsoid's parserTests which otherwise strips the <span> from the
12220 # result (confusing it for a template wrapper)
12224 @<span onmouseover="alert('crap')">Oh no</span>
12228 (confirming safety of fix for subst bug 1936)
12230 {{Template:dangerous}}
12232 <p>@<span>Oh no</span>
12237 pre-save transform: comment containing gallery (bug 5024)
12241 <!-- <gallery>data</gallery> -->
12243 <!-- <gallery>data</gallery> -->
12247 pre-save transform: comment containing extension
12251 <!-- <tag>data</tag> -->
12253 <!-- <tag>data</tag> -->
12257 pre-save transform: comment containing nowiki
12261 <!-- <nowiki>data</nowiki> -->
12263 <!-- <nowiki>data</nowiki> -->
12267 pre-save transform: <noinclude> in subst (bug 3298)
12277 pre-save transform: <onlyinclude> in subst (bug 3298)
12281 {{subst:Includes2}}
12289 {{<includeonly>subst:</includeonly>Includes}}
12293 Template:SafeSubstTest
12295 {{<includeonly>safesubst:</includeonly>Includes}}
12299 bug 22297: safesubst: works during PST
12303 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12309 bug 22297: safesubst: works during normal parse
12318 subst: does not work during normal parse
12322 <p>{{subst:Includes}}
12327 pre-save transform: context links ("pipe trick")
12331 [[Article (context)|]]
12334 [[Bar:Article (context)|]]
12335 [[:Bar:Article (context)|]]
12337 [[|Article (context)]]
12341 [[Article (context)|Article]]
12342 [[Bar:Article|Article]]
12343 [[:Bar:Article|Article]]
12344 [[Bar:Article (context)|Article]]
12345 [[:Bar:Article (context)|Article]]
12347 [[Article (context)]]
12348 [[Bar:X (Y) Z|X (Y) Z]]
12349 [[:Bar:X (Y) Z|X (Y) Z]]
12353 pre-save transform: context links ("pipe trick") with interwiki prefix
12357 [[interwiki:Article|]]
12358 [[:interwiki:Article|]]
12359 [[interwiki:Bar:Article|]]
12360 [[:interwiki:Bar:Article|]]
12362 [[interwiki:Article|Article]]
12363 [[:interwiki:Article|Article]]
12364 [[interwiki:Bar:Article|Bar:Article]]
12365 [[:interwiki:Bar:Article|Bar:Article]]
12369 pre-save transform: context links ("pipe trick") with parens in title
12371 pst title=[[Somearticle (context)]]
12375 [[Article (context)|Article]]
12379 pre-save transform: context links ("pipe trick") with comma in title
12381 pst title=[[Someplace, Somewhere]]
12384 [[Otherplace, Elsewhere|]]
12385 [[Otherplace, Elsewhere, Anywhere|]]
12387 [[Otherplace, Somewhere|Otherplace]]
12388 [[Otherplace, Elsewhere|Otherplace]]
12389 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12393 pre-save transform: context links ("pipe trick") with parens and comma
12395 pst title=[[Someplace (IGNORED), Somewhere]]
12398 [[Otherplace (place), Elsewhere|]]
12400 [[Otherplace, Somewhere|Otherplace]]
12401 [[Otherplace (place), Elsewhere|Otherplace]]
12405 pre-save transform: context links ("pipe trick") with comma and parens
12407 pst title=[[Who, me? (context)]]
12410 [[Me, Myself, and I (1937 song)|]]
12412 [[Yes, you. (context)|Yes, you.]]
12413 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12417 pre-save transform: context links ("pipe trick") with namespace
12419 pst title=[[Ns:Somearticle]]
12423 [[Ns:Article|Article]]
12427 pre-save transform: context links ("pipe trick") with namespace and parens
12429 pst title=[[Ns:Somearticle (context)]]
12433 [[Ns:Article (context)|Article]]
12437 pre-save transform: context links ("pipe trick") with namespace and comma
12439 pst title=[[Ns:Somearticle, Context, Whatever]]
12443 [[Ns:Article, Context, Whatever|Article]]
12447 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12449 pst title=[[Ns:Somearticle, Context (context)]]
12453 [[Ns:Article (context)|Article]]
12457 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12459 pst title=[[Ns:Somearticle (IGNORED), Context]]
12463 [[Ns:Article, Context|Article]]
12467 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12471 [[Article(context)|]]
12472 [[Bar:Article(context)|]]
12473 [[:Bar:Article(context)|]]
12474 [[|Article(context)]]
12478 [[Article(context)|Article]]
12479 [[Bar:Article(context)|Article]]
12480 [[:Bar:Article(context)|Article]]
12481 [[Article(context)]]
12482 [[Bar:X(Y)Z|X(Y)Z]]
12483 [[:Bar:X(Y)Z|X(Y)Z]]
12487 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12491 [[Article (context)|]]
12492 [[Bar:Article (context)|]]
12493 [[:Bar:Article (context)|]]
12494 [[|Article (context)]]
12498 [[Article (context)|Article]]
12499 [[Bar:Article (context)|Article]]
12500 [[:Bar:Article (context)|Article]]
12501 [[Article (context)]]
12502 [[Bar:X (Y) Z|X (Y) Z]]
12503 [[:Bar:X (Y) Z|X (Y) Z]]
12507 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12511 [[Article(context)|]]
12512 [[Bar:Article(context)|]]
12513 [[:Bar:Article(context)|]]
12514 [[|Article(context)]]
12518 [[Article(context)|Article]]
12519 [[Bar:Article(context)|Article]]
12520 [[:Bar:Article(context)|Article]]
12521 [[Article(context)]]
12522 [[Bar:X(Y)Z|X(Y)Z]]
12523 [[:Bar:X(Y)Z|X(Y)Z]]
12527 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12531 [[Article (context), context|]]
12532 [[Article (context),context|]]
12533 [[Bar:Article (context), context|]]
12534 [[Bar:Article (context),context|]]
12535 [[:Bar:Article (context), context|]]
12536 [[:Bar:Article (context),context|]]
12538 [[Article (context), context|Article]]
12539 [[Article (context),context|Article]]
12540 [[Bar:Article (context), context|Article]]
12541 [[Bar:Article (context),context|Article]]
12542 [[:Bar:Article (context), context|Article]]
12543 [[:Bar:Article (context),context|Article]]
12547 pre-save transform: trim trailing empty lines
12551 Empty lines are trimmed
12557 Empty lines are trimmed
12561 pre-save transform: Signature expansion
12566 * <noinclude>~~~</noinclude>
12567 * <includeonly>~~~</includeonly>
12568 * <onlyinclude>~~~</onlyinclude>
12570 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12571 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12572 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12573 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12578 pre-save transform: Signature expansion in nowiki tags (bug 93)
12584 <nowiki>~~~~</nowiki>
12586 <includeonly><nowiki>~~~~</nowiki></includeonly>
12588 <noinclude><nowiki>~~~~</nowiki></noinclude>
12590 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12592 {{subst:Foo}} shall be converted to FOO
12594 As well as inside noinclude/onlyinclude
12595 <noinclude>{{subst:Foo}}</noinclude>
12596 <onlyinclude>{{subst:Foo}}</onlyinclude>
12598 But not inside includeonly
12599 <includeonly>{{subst:Foo}}</includeonly>
12603 <nowiki>~~~~</nowiki>
12605 <includeonly><nowiki>~~~~</nowiki></includeonly>
12607 <noinclude><nowiki>~~~~</nowiki></noinclude>
12609 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12611 FOO shall be converted to FOO
12613 As well as inside noinclude/onlyinclude
12614 <noinclude>FOO</noinclude>
12615 <onlyinclude>FOO</onlyinclude>
12617 But not inside includeonly
12618 <includeonly>{{subst:Foo}}</includeonly>
12622 Parsoid: Recognize nowiki with trailing space in tags
12626 <nowiki ><div>[[foo]]</nowiki >
12634 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12641 Parsoid: Recognize nowiki with odd capitalization
12645 <noWikI ><div>[[foo]]</Nowiki >
12647 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12652 Parsoid: Escape nowiki with trailing space in tags
12656 <p><nowiki > foo </nowiki ></p>
12657 <p>a<nowiki />b</p>
12658 <p>c<nowiki/ >d</p>
12660 <nowiki > foo </nowiki >
12668 Parsoid: Escape weird noWikI capitalizations
12672 <p><noWikI > foo </NoWikI ></p>
12674 <noWikI > foo </NoWikI >
12678 ### Message transform tests
12681 message transform: magic variables
12691 message transform: should not transform wiki markup
12701 message transform: <noinclude> in transcluded template (bug 4926)
12711 message transform: <onlyinclude> in transcluded template (bug 4926)
12721 {{#special:}} page name, known
12725 {{#special:Recentchanges}}
12727 Special:RecentChanges
12731 {{#special:}} page name with subpage, known
12735 {{#special:Recentchanges/param}}
12737 Special:RecentChanges/param
12741 {{#special:}} page name, unknown
12745 {{#special:foobar nonexistent}}
12747 Special:Foobar nonexistent
12751 {{#speciale:}} page name, known
12755 {{#speciale:Recentchanges}}
12757 Special:RecentChanges
12761 {{#speciale:}} page name with subpage, known
12765 {{#speciale:Recentchanges/param}}
12767 Special:RecentChanges/param
12771 {{#speciale:}} page name, unknown
12775 {{#speciale:foobar nonexistent}}
12777 Special:Foobar_nonexistent
12783 ### For Parsoid-specific tests, see
12784 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12789 parsoid=wt2html,wt2wt,html2html
12791 [[Image:foobar.jpg]]
12793 <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>
12796 <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>
12800 Simple image (using File: namespace, now canonical)
12802 [[File:Foobar.jpg]]
12804 <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>
12807 <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>
12811 Right-aligned image
12813 [[File:Foobar.jpg|right]]
12815 <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>
12818 <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>
12824 [[File:Foobar.jpg|right|Caption text]]
12826 <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>
12829 <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>
12833 Image with caption, bug 53312 #1
12835 [[File:Foobar.jpg|right|Caption page stuff]]
12837 <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>
12840 <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>
12844 Image with caption, bug 53312 #2
12846 [[File:Foobar.jpg|right|Caption page=]]
12848 <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>
12851 <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>
12855 Image with caption, bug 53312 #3
12857 [[File:Foobar.jpg|right|Caption page=stuff]]
12859 <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>
12862 <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>
12866 Allow empty links in image captions (Bug 60753)
12870 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12875 <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>
12878 <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>
12880 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12881 </figcaption></figure>
12885 Titles in unlinked images (T23454)
12887 [[File:Foobar.jpg|link=|stuff]]
12889 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12894 Link with empty target
12903 Image with link trail
12905 Linktrails should not work for images: [[File:Foobar.jpg]]s
12907 <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
12910 <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>
12914 Image with empty attribute
12916 parsoid=wt2html,wt2wt,html2html
12918 [[File:Foobar.jpg|right||Caption text]]
12920 <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>
12923 <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>
12927 1. Block image with individual attributes from templates
12929 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12931 <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>
12934 <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>
12938 2. Block Image with individual attributes from templates
12940 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12942 <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>
12945 <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>
12949 3. Inline image with individual attributes from templates
12951 [[File:Foobar.jpg|{{echo|50px}}]]
12953 <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>
12956 <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>
12959 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12960 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12962 Image with multiple attributes from the same template
12964 [[File:Foobar.jpg|{{image_attribs}}]]
12966 <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>
12969 <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>
12973 Image with link tails
12977 123[[File:Foobar.jpg]]456
12978 123[[File:Foobar.jpg|right]]456
12979 123[[File:Foobar.jpg|thumb]]456
12981 <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
12983 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
12984 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
12987 <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>
12989 <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>
12991 <div class="thumb tright">
12992 <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>
12993 <div class="thumbcaption">
12994 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13000 <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>
13001 <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>
13002 <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>
13006 Image with multiple captions -- only last one is accepted
13008 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13010 <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>
13013 <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>
13017 Image with multiple widths -- use last
13019 [[File:Foobar.jpg|200px|300px|caption]]
13021 <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>
13024 <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>
13028 Image with multiple alignments -- use first (bug 48664)
13032 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13034 [[File:Foobar.jpg|middle|text-top|caption]]
13036 <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>
13037 <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>
13040 <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>
13041 <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>
13045 Image with width attribute at different positions
13047 [[File:Foobar.jpg|200px|right|Caption]]
13048 [[File:Foobar.jpg|right|200px|Caption]]
13049 [[File:Foobar.jpg|right|Caption|200px]]
13051 <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>
13052 <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>
13053 <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>
13056 <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>
13057 <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>
13058 <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>
13061 # a sad bit of backward-compatibility
13063 Image with size specified with pxpx (bug 13500, 51628)
13065 parsoid=wt2html,wt2wt,html2html
13067 [[File:Foobar.jpg|20pxpx]]
13068 [[File:Foobar.jpg|200x20pxpx]]
13070 <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>
13071 <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>
13074 <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>
13078 Image with link parameter, wiki target
13080 [[File:Foobar.jpg|link=Main Page]]
13082 <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>
13085 <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>
13088 # parsoid bug 49293 (part 1)
13090 Image with link parameter, URL target
13092 [[File:Foobar.jpg|link=http://example.com/]]
13094 <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>
13097 <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>
13100 # parsoid bug 49293 (part 2)
13102 Image with link parameter, protocol-less URL target
13104 [[File:Foobar.jpg|link=//example.com/]]
13106 <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>
13109 <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>
13113 Escaping non-block captions (T107435)
13116 "modes": ["wt2wt"],
13118 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13122 [[Image:Foobar.jpg|caption]]
13124 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13127 # wgExternalLinkTarget not supported by Parsoid
13129 Image with link parameter, wgExternalLinkTarget
13131 [[Image:foobar.jpg|link=http://example.com/]]
13133 wgExternalLinkTarget='foobar'
13135 <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>
13140 Image with link parameter, wgNoFollowLinks set to false
13142 [[Image:foobar.jpg|link=http://example.com/]]
13144 wgNoFollowLinks=false
13146 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13151 Image with link parameter, wgNoFollowDomainExceptions
13153 [[Image:foobar.jpg|link=http://example.com/]]
13155 wgNoFollowDomainExceptions='example.com'
13157 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13161 # wgExternalLinkTarget not supported by Parsoid
13163 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13165 [[Image:foobar.jpg|link=http://example.com/|Title]]
13167 wgExternalLinkTarget='foobar'
13169 <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>
13174 Image with empty link parameter
13176 [[File:Foobar.jpg|link=]]
13178 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13181 <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>
13185 Image with link parameter (wiki target) and unnamed parameter
13187 [[File:Foobar.jpg|link=Main_Page|Title]]
13189 <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>
13192 <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>
13196 Image with link parameter (URL target) and unnamed parameter
13198 [[File:Foobar.jpg|link=http://example.com/|Title]]
13200 <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>
13203 <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>
13207 Thumbnail image with link parameter
13210 parsoid=wt2html,wt2wt,html2html
13212 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13214 <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>
13217 <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>
13221 Manually-specified thumbnail image
13225 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13227 <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>
13230 <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>
13234 Manually-specified thumbnail image with explicit link to wiki page
13237 parsoid=wt2html,wt2wt,html2html
13239 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13241 <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>
13244 <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>
13248 Manually-specified thumbnail image with explicit link to url
13251 parsoid=wt2html,wt2wt,html2html
13253 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13255 <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>
13258 <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>
13262 Manually-specified thumbnail image with explicit no link
13265 parsoid=wt2html,wt2wt,html2html
13267 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13269 <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>
13272 <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>
13276 Manually-specified thumbnail image with explicit link and alt text
13279 parsoid=wt2html,wt2wt,html2html
13281 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13283 <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>
13286 <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>
13290 Image with frame and link
13292 parsoid=wt2html,wt2wt,html2html
13294 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13296 <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>
13299 <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>
13303 Image with frame and link and explicit alt
13305 parsoid=wt2html,wt2wt,html2html
13307 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13309 <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>
13312 <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>
13316 Image with wiki markup in implicit alt
13318 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13320 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13322 <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>
13323 </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>
13326 <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>
13327 <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>
13331 Alt image option should handle most kinds of wikitext without barfing
13333 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13335 <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>
13338 <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>
13341 ###################
13342 # Conflicting image format options.
13343 # First option specified should 'win'.
13344 # All three cases in each test should be identical.
13347 Image with 'frameless' first.
13349 parsoid=wt2html,wt2wt,html2html
13351 [[File:Foobar.jpg|frameless|caption]]
13353 [[File:Foobar.jpg|frameless|frame|caption]]
13355 [[File:Foobar.jpg|frameless|thumb|caption]]
13357 <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>
13358 </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>
13359 </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>
13362 <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>
13363 <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>
13364 <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>
13368 Image with 'frame' first.
13370 parsoid=wt2html,wt2wt,html2html
13372 [[File:Foobar.jpg|frame|caption]]
13373 [[File:Foobar.jpg|frame|frameless|caption]]
13374 [[File:Foobar.jpg|frame|thumb|caption]]
13376 <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>
13377 <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>
13378 <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>
13381 <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>
13382 <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>
13383 <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>
13387 Image with 'thumb' first.
13389 parsoid=wt2html,wt2wt,html2html
13391 [[File:Foobar.jpg|thumb|caption]]
13392 [[File:Foobar.jpg|thumb|frameless|caption]]
13393 [[File:Foobar.jpg|thumb|frame|caption]]
13395 <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>
13396 <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>
13397 <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>
13400 <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>
13401 <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>
13402 <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>
13405 ###################
13407 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13408 # and https://phabricator.wikimedia.org/T64258
13409 # Foobar has actual size of 1941x220
13410 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13411 # a scalable format.
13412 # 2. Framed images always ignore size options; always render at default size.
13413 # 3. "Unspecified format" and border are the only types which can be
13417 Image: "unspecified format" and border enlarge
13419 parsoid=wt2html,wt2wt,html2html
13421 [[File:Foobar.jpg|2000px]]
13423 [[File:Foobar.jpg|border|2000px]]
13425 <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>
13426 </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>
13429 <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>
13430 <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>
13434 Image: "unspecified format" and border reduce
13436 parsoid=wt2html,wt2wt,html2html
13438 [[File:Foobar.jpg|1000px]]
13440 [[File:Foobar.jpg|border|1000px]]
13442 <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>
13443 </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>
13446 <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>
13447 <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>
13451 Image: thumbs reduce
13453 parsoid=wt2html,wt2wt,html2html
13455 [[File:Foobar.jpg|thumb|50px]]
13457 <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>
13460 <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>
13464 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13466 parsoid=wt2html,wt2wt,html2html
13468 [[File:Foobar.jpg|thumb|2000px]]
13470 [[File:Foobar.svg|thumb|2000px]]
13472 <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>
13473 <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>
13476 <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>
13477 <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>
13481 Image: frameless can reduce in size
13483 parsoid=wt2html,wt2wt,html2html
13485 [[File:Foobar.jpg|frameless|50px]]
13487 <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>
13490 <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>
13494 Image: bitmap frameless can't be enlarged past original size, but vector can
13496 parsoid=wt2html,wt2wt,html2html
13498 [[File:Foobar.jpg|frameless|2000px]]
13500 [[File:Foobar.svg|frameless|2000px]]
13502 <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>
13503 </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>
13506 <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>
13507 <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>
13511 Image: framed images are always unscaled.
13513 parsoid=wt2html,wt2wt,html2html
13515 [[File:Foobar.jpg|frame]]
13517 [[File:Foobar.jpg|frame|50px]]
13519 [[File:Foobar.jpg|frame|50x50px]]
13521 [[File:Foobar.jpg|frame|2000px]]
13523 <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>
13524 <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>
13525 <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>
13526 <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>
13529 <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>
13530 <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>
13531 <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>
13532 <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>
13535 ###################
13538 Link to image page- image page normally doesn't exists, hence edit link
13539 Add test with existing image page
13540 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13544 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13549 bug 18784 Link to non-existent image page with caption should use caption as link text
13551 [[:Image:test|caption]]
13553 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13558 Frameless image caption with a free URL
13560 [[File:Foobar.jpg|http://example.com]]
13562 <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>
13565 <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>
13569 Thumbnail image caption with a free URL
13573 [[File:Foobar.jpg|thumb|http://example.com]]
13575 <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>
13578 <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>
13582 Thumbnail image caption with a free URL and explicit alt
13585 parsoid=wt2html,wt2wt,html2html
13587 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13589 <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>
13592 <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>
13596 SVG thumbnails with no language set
13599 [[File:Foobar.svg|thumb|caption]]
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>caption</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/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>
13608 SVG thumbnails with language de
13610 parsoid=wt2html,wt2wt,html2html
13612 [[File:Foobar.svg|thumb|caption|lang=de]]
13614 <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>
13617 <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>
13621 SVG thumbnails with invalid language code
13623 parsoid=wt2html,wt2wt,html2html
13625 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13627 <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>
13630 <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>
13634 BUG 1887: A ISBN with a thumbnail
13636 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13638 <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>
13641 <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>
13645 BUG 1887: A RFC with a thumbnail
13647 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13649 <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>
13652 <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>
13656 BUG 1887: A mailto link with a thumbnail
13658 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13660 <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>
13663 <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>
13666 # Pending resolution to bug 368
13668 BUG 648: Frameless image caption with a link
13670 [[File:Foobar.jpg|text with a [[link]] in it]]
13672 <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>
13675 <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>
13679 BUG 648: Frameless image caption with a link (suffix)
13681 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13683 <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>
13686 <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>
13690 BUG 648: Frameless image caption with an interwiki link
13692 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13694 <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>
13697 <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>
13701 BUG 648: Frameless image caption with a piped interwiki link
13703 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13705 <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>
13708 <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>
13712 T107474: Frameless image caption with <nowiki>
13714 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13716 <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>
13720 Escape HTML special chars in image alt text
13722 [[File:Foobar.jpg|& < > "]]
13724 <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>
13727 <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>
13731 BUG 499: Alt text should have Ӓ, not &1234;
13733 [[File:Foobar.jpg|♀]]
13735 <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>
13738 <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>
13742 Broken image caption with link
13744 parsoid=wt2html,wt2wt,html2html
13746 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13748 <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.
13751 <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>
13755 Image caption containing another image
13757 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13759 <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>
13762 <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>
13766 Image: caption containing a newline
13768 [[File:Foobar.jpg|This
13771 <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>
13774 <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>
13778 Image: caption containing leading space
13779 (The leading space should not trigger nowiki escaping in wt2wt mode)
13781 [[File:Foobar.jpg|thumb| bar]]
13783 <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>
13786 <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>
13790 Image: caption containing a table
13792 parsoid=wt2html,wt2wt,html2html
13794 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13800 and some more text.]]
13802 <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>
13805 <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
13808 <tr><th>Foo </th><th>Bar</th></tr>
13811 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13815 Bug 3090: External links other than http: in image captions
13817 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13819 <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>
13822 <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>
13828 parsoid=wt2html,wt2wt,html2html
13830 [[Image:foobar.jpg|a|class=b]]
13832 <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>
13835 <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>
13839 Localized image handling (1).
13841 parsoid=wt2html,wt2wt,html2html
13844 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13846 <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>
13849 <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>
13853 Localized image handling (2).
13856 parsoid=wt2html,wt2wt,html2html
13859 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13861 <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>
13864 <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>
13868 Localized image handling (3).
13873 <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>
13875 [[File:Foobar.jpg|بندانگشتی]]
13879 "border", "frameless" and "class" attributes on an image.
13882 parsoid=wt2html,wt2wt,html2html
13884 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13886 <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>
13889 <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>
13892 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13894 Invalid image attributes (bug 62500)
13897 parsoid=wt2html,wt2wt,html2html
13899 [[File:Foobar.jpg|thumb|float|left|caption]]
13901 [[File:Foobar.jpg|thumb|righ|caption]]
13903 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13905 <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>
13906 <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>
13907 <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>
13910 <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>
13911 <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>
13912 <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>
13918 #REDIRECT [[File:Barfoo.jpg]]
13921 # FIXME: Parsoid should run this test -- but we'd need to teach the
13922 # mockAPI about the redirected Barfoo.jpg image.
13926 [[Image:Barfoo.jpg]]
13928 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13933 Missing image with uploads disabled
13937 [[File:Foobaz.jpg]]
13939 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13942 <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>
13945 # Parsoid-specific testing for images
13946 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13947 # Currently imperfect due to a flaw in the Parsoid testrunner
13949 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13953 Parsoid-specific image handling - simple image with size and middle alignment
13955 [[File:Foobar.jpg|middle|50px]]
13957 <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>
13961 Parsoid-specific image handling - simple image with size, middle alignment,
13962 non-standard namespace alias
13964 parsoid=wt2wt,wt2html,html2html
13966 [[Image:Foobar.jpg|middle|50px]]
13968 <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>
13972 Parsoid-specific image handling - simple image with size and middle alignment
13975 [[File:Foobar.jpg|50px|middle]]
13977 <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>
13981 Parsoid-specific image handling - simple image with size and middle alignment
13982 and non-standard namespace name
13984 parsoid=wt2html,wt2wt,html2html
13986 [[Image:Foobar.jpg|50px|middle]]
13988 <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>
13992 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13994 [[File:Foobar.jpg|500x10px|baseline|caption]]
13996 <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>
14000 Parsoid-specific image handling - simple image with border and size spec
14002 [[File:Foobar.jpg|50px|border|caption]]
14004 <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>
14008 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14010 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14012 <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>
14016 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14019 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14021 <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>
14025 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14027 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14029 <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>
14033 Parsoid-specific image handling - thumbnail with specific size, halign,
14034 valign, and caption (existing content)
14036 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14038 <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>
14042 Parsoid-specific image handling - framed image with specific size and caption
14045 parsoid=wt2html,wt2wt,html2html
14047 [[File:Foobar.jpg|frame|500x50px|caption]]
14049 <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>
14053 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14056 parsoid=wt2html,wt2wt,html2html
14058 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14060 <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>
14064 Parsoid-specific image handling - frameless image with specific size, border, and caption
14066 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14068 <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>
14072 Parsoid-specific image handling - simple image with a formatted caption
14074 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14076 <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>
14080 Parsoid-specific image handling - caption with a template in it
14082 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14084 <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>
14088 Parsoid-specific image handling - caption with unbalanced tags in it
14090 parsoid=wt2html,wt2wt,html2html
14093 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14097 <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>
14102 Parsoid-specific image handling - empty caption (1)
14104 parsoid=wt2html,wt2wt
14106 [[File:Foobar.jpg|thumb|]]
14108 <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>
14111 # empty captions don't get serialized unless we're in the "round trip" case
14113 Parsoid-specific image handling - empty caption (2)
14117 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14118 <a href="./File:Foobar.jpg">
14119 <img resource="./File:Foobar.jpg"
14120 src="//example.com/images/3/3a/Foobar.jpg"
14121 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14122 height="25" width="220"/>
14124 <figcaption></figcaption>
14127 [[File:Foobar.jpg|thumb]]
14131 Parsoid-specific image handling - whitespace caption
14133 [[File:Foobar.jpg|thumb| ]]
14135 <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>
14139 Parsoid-specific image handling - lang option
14142 [[File:Foobar.svg|lang=de|caption]]
14146 <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>
14150 ## Edge case bugs in Parsoid from T93580
14152 T93580: 1. Templated <ref> inside block images
14154 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14158 <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>
14160 <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>
14164 T93580: 2. <ref> inside inline images
14166 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14170 <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>
14172 <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>
14176 T93580: 3. Templated <ref> inside inline images
14178 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14182 <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>
14184 <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>
14191 Subpage test/subpage
14199 subpage title=[[Subpage test]]
14203 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14208 Subpage noslash link
14210 subpage title=[[Subpage test]]
14214 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14219 Subpage test/1/2/subpage
14225 Relative subpage noslash link
14227 parsoid=wt2wt,wt2html,html2html
14228 subpage title=[[Subpage test/1/2/3/4]]
14234 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14235 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14238 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14239 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14243 Parsoid: dot-slash prefixed wikilinks
14253 </p><p>[[././baz/]]
14258 </p><p>[[././baz/]]
14263 Render invalid page names as plain text (bug 51090)
14276 [[{{echo|./../foo}}|bar]]
14277 [[{{echo|foo/.}}|bar]]
14278 [[{{echo|foo/..}}|bar]]
14279 [[{{echo|foo~~~~bar}}]]
14280 [[{{echo|foo>bar}}]]
14281 [[{{echo|foo././bar}}]]
14282 [[{{echo|foo{bar}}]]
14283 [[{{echo|foo}bar}}]]
14284 [[{{echo|foo[bar}}]]
14285 [[{{echo|foo]bar}}]]
14286 [[{{echo|foo<bar}}]]
14288 <p>[[./../foo|bar]]
14298 </p><p>[[./../foo|bar]]
14311 <p>[[./../foo|bar]]
14322 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14323 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14324 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14325 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14326 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14327 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14328 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14329 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14330 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14331 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14332 [[<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>
14340 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14345 BUG 561: {{/Subpage}}
14347 subpage title=[[Page]]
14351 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14359 Category:MediaWiki User's Guide
14367 [[:Category:MediaWiki User's Guide]]
14369 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14378 [[Category:MediaWiki User's Guide]]
14380 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14384 PAGESINCATEGORY invalid title fatal (r33546 fix)
14386 {{PAGESINCATEGORY:<bogus>}}
14393 Category with different sort key
14397 [[Category:MediaWiki User's Guide|Foo]]
14399 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14403 Category with identical sort key
14407 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14409 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14413 Category with empty sort key
14418 [[Category:MediaWiki User's Guide|]]
14420 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14424 Category with empty sort key and parentheses
14429 [[Category:Foo (bar)|]]
14431 [[Category:Foo (bar)|Foo]]
14434 ## We used to, but no longer wt2wt this test since the default serializer
14435 ## will normalize all categories to serialize on their own line.
14436 ## This wikitext usage is going to be fairly uncommon in production and
14437 ## selser will take care of preserving formatting in those scenarios.
14439 Category with link tail
14445 123[[Category:Foo]]456
14447 123[[Category:Foo]]456
14449 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14453 Category with template
14458 [[Category:{{echo|Foo}}]]
14460 [[Category:{{echo|Foo}}]]
14464 Category with template in sort key
14469 [[Category:Foo|{{echo|Bar}}]]
14471 [[Category:Foo|{{echo|Bar}}]]
14475 Category with template in sort key and title
14480 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14482 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14485 ## We used to, but no longer wt2wt this test since the default serializer
14486 ## will normalize all categories to serialize on their own line.
14487 ## This wikitext usage is going to be fairly uncommon in production and
14488 ## selser will take care of preserving formatting in those scenarios.
14490 Category / paragraph interactions
14494 Foo [[Category:Baz]] Bar
14496 Foo [[Category:Baz]]
14504 [[Category:Baz]] Bar
14517 {{echo|[[Category:Baz]]}}
14530 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14531 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14532 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14533 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14534 <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>
14535 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14538 ## We used to, but no longer wt2wt this test since the default serializer
14539 ## will normalize all categories to serialize on their own line.
14540 ## This wikitext usage is going to be fairly uncommon in production and
14541 ## selser will take care of preserving formatting in those scenarios.
14543 ## The whitespace on the empty line is part of the test. Please do not delete
14545 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14551 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14553 {{echo|[[Category:Foo]] and so should this!}}
14555 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14560 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14562 <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>
14565 ## Parsoid will not try to wt2wt this while preserving newlines because
14566 ## it suppresses excess newlines within list items -- and we don't want to
14567 ## introduce a special case just for categories, which is, in reality somewhat
14568 ## odd behavior -- categories are unlikely to be used in list items like this
14569 ## in top-level pages and are only likely to show up in template-generated
14570 ## list items where this RT-ing is a non-issue.
14572 ## The whitespace on the empty line is part of the test. Please do not delete
14574 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14580 [[Category:Foo]] and this should be part of the same list item
14583 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14585 <ul><li>This and this should be part of the same list item</li>
14586 <li>So should this and this should be part of the same list item</li></ul>
14589 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14590 <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>
14594 ## Newlines and categories that follow the last item of a list
14595 ## are treated differently because this (list followed by categories)
14596 ## is an extremely common pattern on wikis.
14598 3. Categories and newlines: newline suppression for last list item should RT properly
14611 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14613 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14614 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14618 4. Categories and newlines: newline suppression for last list item should RT properly
14626 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14628 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14631 ## only wt2html for this to make sure the algo only applies to the rightmost path
14633 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14646 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14648 <ul><li> d</li></ul></li></ul>
14649 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14652 ## We used to, but no longer wt2wt this test since the default serializer
14653 ## will normalize all categories to serialize on their own line.
14654 ## This wikitext usage is going to be fairly uncommon in production and
14655 ## selser will take care of preserving formatting in those scenarios.
14657 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14661 * a [[Category:Foo]]
14663 <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>
14666 # This test also demonstrates because of newline+category tunneling
14667 # through the list hander, template wrapping doesn't expand to the
14668 # containing list when the list item swallows the category.
14670 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14675 <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
14676 </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>
14680 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14684 {{echo|[[Category:Foo]]
14688 <ul><li> a</li></ul>
14690 <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">
14691 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14692 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14696 Parsoid: Serialize link to category page with colon escape
14702 [[:Category:Foo|Bar]]
14705 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14706 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14710 # We used to, but no longer wt2wt this test since the default serializer
14711 # will normalize all categories to serialize on their own line.
14712 # This wikitext usage is going to be fairly uncommon in production and
14713 # selser will take care of preventing whitespace insertion if this
14714 # occurs in an article.
14716 # html2html disabled for the same reason (whitespace insertion between
14719 # html2wt disabled because it localizes the "Category" namespace.
14721 Link prefix/suffixes aren't applied to category links
14731 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14735 Parsoid: Serialize link to file page with colon escape
14741 [[:File:Foo.png|Bar]]
14744 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14745 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14750 Parsoid: Serialize a genuine category link without colon escape
14755 [[Category:Foo|Bar]]
14757 <link rel="mw:PageProp/Category" href="./Category:Foo">
14758 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14762 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14766 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14768 [[Category:Toxine bactérienne]]
14772 Parsoid: Defaultsort
14774 {{DEFAULTSORT:Foo}}
14776 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14780 Parsoid: Defaultsort (template-generated)
14782 {{{{echo|DEFAULTSORT}}:Foo}}
14784 <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}}]}'/>
14788 ### Inter-language links
14791 Interlanguage links
14799 es:Alimento fr:Nourriture zh:食品
14801 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14802 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14803 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14807 Duplicate interlanguage links (bug 24502)
14818 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14819 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14820 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14821 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14828 Basic section headings
14835 ===Smaller headline===
14838 <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>
14841 <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>
14844 <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>
14850 Section headings with TOC
14853 === Subheadline 1 ===
14854 ===== Skipping a level =====
14855 ====== Skipping a level ======
14859 ===Another headline===
14861 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14863 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14865 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14867 <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>
14869 <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>
14876 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14878 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14884 <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>
14885 <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>
14886 <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>
14887 <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>
14888 <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>
14891 <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>
14896 TOC anchors don't collide
14904 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14906 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14907 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14908 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14909 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14913 <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>
14914 <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>
14915 <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>
14916 <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>
14920 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14922 Handling of sections up to level 6 and beyond
14925 == Level 2 Heading==
14926 === Level 3 Heading===
14927 ==== Level 4 Heading====
14928 ===== Level 5 Heading=====
14929 ====== Level 6 Heading======
14930 ======= Level 7 Heading=======
14931 ======== Level 8 Heading========
14932 ========= Level 9 Heading=========
14933 ========== Level 10 Heading==========
14935 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14937 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14939 <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>
14941 <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>
14943 <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>
14945 <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>
14947 <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>
14948 <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>
14949 <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>
14950 <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>
14951 <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>
14965 <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>
14966 <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>
14967 <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>
14968 <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>
14969 <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>
14970 <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>
14971 <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>
14972 <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>
14973 <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>
14974 <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>
14979 TOC regression (T11764)
14983 ==== title 1.1.1 ====
14988 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14990 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14992 <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>
14994 <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>
14997 <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>
15000 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15002 <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>
15008 <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>
15009 <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>
15010 <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>
15011 <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>
15012 <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>
15013 <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>
15018 TOC for heading containing <span id="..."></span> (T96153)
15021 ==<span id="old-anchor"></span>New title==
15023 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15025 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15029 <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>
15034 TOC with wgMaxTocLevel=3 (bug 6204)
15040 ==== title 1.1.1 ====
15045 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15047 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15049 <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>
15050 <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>
15053 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15055 <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>
15061 <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>
15062 <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>
15063 <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>
15064 <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>
15065 <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>
15066 <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>
15071 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15077 ====Section 1.1.1====
15078 ====Section 1.1.1.1====
15081 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15083 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15085 <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>
15088 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15092 <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>
15093 <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>
15094 <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>
15095 <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>
15096 <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>
15102 Resolving duplicate section names
15107 <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>
15108 <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>
15113 Resolving duplicate section names with differing case (bug 10721)
15118 <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>
15119 <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>
15131 Template with sections, __NOTOC__
15138 <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>
15139 <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>
15140 <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>
15141 <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>
15146 __NOEDITSECTION__ keyword
15152 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15153 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15158 Link inside a section heading
15160 ==Section with a [[Main Page|link]] in it==
15162 <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>
15167 TOC regression (T14077)
15174 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15176 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15178 <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>
15181 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15185 <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>
15186 <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>
15187 <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>
15192 BUG 1219 URL next to image (good)
15194 http://example.com [[File:Foobar.jpg]]
15196 <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>
15199 <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>
15203 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15206 The line above must have a trailing space!
15209 But just in case it doesn't...
15211 <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>
15212 <p>The line above must have a trailing space!
15214 <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>
15215 <p>But just in case it doesn't...
15220 Header with special characters (bug 25462)
15222 The tooltips shall not show entities to the user (ie. be double escaped)
15239 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15241 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15243 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15244 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15245 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15246 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15247 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15251 <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>
15254 <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>
15257 <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>
15260 <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>
15263 <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>
15269 Header with space, plus and underscore as entity
15271 Id should not contain + for spaces
15273 == Space between Text ==
15276 == Space-Entity between Text ==
15279 == Plus+between+Text ==
15282 == Plus-Entity+between+Text ==
15285 == Underscore_between_Text ==
15288 == Underscore-Entity_between_Text ==
15291 [[#Space between Text]]
15292 [[#Space-Entity between Text]]
15293 [[#Plus+between+Text]]
15294 [[#Plus-Entity+between+Text]]
15295 [[#Underscore_between_Text]]
15296 [[#Underscore-Entity_between_Text]]
15298 <p>Id should not contain + for spaces
15300 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15302 <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>
15303 <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>
15304 <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>
15305 <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>
15306 <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>
15307 <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>
15311 <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>
15314 <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>
15317 <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>
15320 <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>
15323 <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>
15326 <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>
15328 </p><p><a href="#Space_between_Text">#Space between Text</a>
15329 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15330 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15331 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15332 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15333 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15338 Headers with excess '=' characters
15339 (Are similar tests necessary beyond the 1st level?)
15343 =''italic'' heading==
15344 ==''italic'' heading=
15346 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15348 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15349 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15350 <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>
15351 <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>
15355 <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>
15356 <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>
15357 <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>
15358 <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>
15363 HTML headers vs TOC (bug 23393)
15364 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15376 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15378 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15380 <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>
15381 <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>
15384 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15386 <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>
15387 <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>
15393 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15394 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15395 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15396 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15397 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15398 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15403 Single-line or multiline-comments can follow headings
15405 parsoid=wt2html,wt2wt
15413 <h2><span class="mw-headline" id="foo">foo</span></h2>
15414 <h2><span class="mw-headline" id="bar">bar</span></h2>
15415 <h2><span class="mw-headline" id="baz">baz</span></h2>
15420 BUG 1219 URL next to image (broken)
15422 http://example.com[[File:Foobar.jpg]]
15424 <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>
15427 <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>
15431 Bug 1186 news: in the middle of text
15433 http://en.wikinews.org/wiki/Wikinews:Workplace
15435 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15441 Namespaced link must have a title
15450 Namespaced link must have a title (bad fragment version)
15452 [[Project:#fragment]]
15454 <p>[[Project:#fragment]]
15460 ### HTML tags and HTML attributes
15464 div with no attributes
15466 <div>HTML rocks</div>
15468 <div>HTML rocks</div>
15473 div with double-quoted attribute
15475 <div id="rock">HTML rocks</div>
15477 <div id="rock">HTML rocks</div>
15482 div with single-quoted attribute
15484 <div id='rock'>HTML rocks</div>
15486 <div id="rock">HTML rocks</div>
15491 div with unquoted attribute
15493 <div id=rock>HTML rocks</div>
15495 <div id="rock">HTML rocks</div>
15500 div with illegal double attributes
15502 <div id="a" id="b">HTML rocks</div>
15504 <div id="b">HTML rocks</div>
15509 div with empty attribute value, space before equals
15511 parsoid=wt2html,html2html
15513 <div class =>HTML rocks</div>
15515 <div class="">HTML rocks</div>
15518 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15522 div with multiple empty attribute values
15524 parsoid=wt2html,html2html
15526 <div id= title=>HTML rocks</div>
15528 <div id="title.3D">HTML rocks</div>
15531 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15535 table with multiple empty attribute values
15537 parsoid=wt2html,html2html
15543 <table title="id=">
15549 <table title="id=">
15550 <tbody><tr><td> hi</td></tr>
15555 div with braces in attribute value
15557 <div title="{}">Foo</div>
15559 <div title="{}">Foo</div>
15562 <div title="{}">Foo</div>
15566 div with empty attribute value, no space before equals
15568 parsoid=wt2html,html2html
15570 <div class=>HTML rocks</div>
15572 <div class="">HTML rocks</div>
15575 <div class="">HTML rocks</div>
15579 HTML multiple attributes correction
15581 <p class="error" class="awesome">Awesome!</p>
15583 <p class="awesome">Awesome!</p>
15588 Table multiple attributes correction
15591 !+ class="error" class="awesome"| status
15596 <th class="awesome"> status
15604 <DIV ID="x">HTML ROCKS</DIV>
15606 <div id="x">HTML ROCKS</div>
15611 Non-ASCII pseudo-tags are rendered as text
15620 Pseudo-tag with URL 'name' renders as url link
15622 <http://example.com/>
15624 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15629 text with amp in the middle of nowhere
15633 <p>Remember AT&T?
15638 text with character entity: eacute
15640 I always thought é was a cute letter.
15642 <p>I always thought é was a cute letter.
15645 <p>I always thought é was a cute letter.</p>
15649 text with entity-escaped character entity-like string: eacute
15651 I always thought &eacute; was a cute letter.
15653 <p>I always thought &eacute; was a cute letter.
15658 text with undefined character entity: xacute
15660 I always thought &xacute; was a cute letter.
15662 <p>I always thought &xacute; was a cute letter.
15669 <data value="5">five</data>
15670 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15671 <mark>This highlighted text</mark>
15673 <p><data value="5">five</data>
15674 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15675 <mark>This highlighted text</mark>
15680 HTML tag with leading space is parsed as text
15684 <p>< div>foo< /div>
15689 ### Nesting tests (see bug 41545, 50604, 51081)
15692 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15693 # Note that html2wt is considerably more difficult if we use <b> in
15694 # the test case, instead of <big>
15696 Ensure that HTML adoption agency algorithm is properly implemented.
15698 <big>X<big>Y</big>Z</big>
15700 <p><big>X<big>Y</big>Z</big>
15704 # This was bug 41545 in the PHP parser.
15705 # Note that tidy doesn't handle this correctly.
15709 <kbd>X<kbd>Y</kbd>Z</kbd>
15711 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15715 # The following cases were bug 51081 in the PHP parser.
15716 # Note that there are some other nestable tags (b, i, etc) which are
15717 # not covered; see bug 51081 for discussion.
15719 # Note that tidy doesn't handle this correctly.
15723 <em>X<em>Y</em>Z</em>
15725 <p><em>X<em>Y</em>Z</em>
15729 # Note that tidy doesn't handle this correctly.
15731 Nesting of <strong>
15733 <strong>X<strong>Y</strong>Z</strong>
15735 <p><strong>X<strong>Y</strong>Z</strong>
15744 <p><q>X<q>Y</q>Z</q></p>
15747 # Note that tidy doesn't handle this correctly.
15751 <ruby>X<ruby>Y</ruby>Z</ruby>
15753 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15757 # Note that tidy doesn't handle this correctly.
15761 <bdo>X<bdo>Y</bdo>Z</bdo>
15763 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15775 [[Media:Foobar.jpg]]
15777 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15782 Media link with text
15784 [[Media:Foobar.jpg|A neat file to look at]]
15786 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15790 # FIXME: this is still bad HTML tag nesting
15791 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15793 Media link with nasty text
15795 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15797 <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>
15800 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15801 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15805 Media link to nonexistent file (bug 1702)
15807 [[Media:No such.jpg]]
15809 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15814 Image link to nonexistent file (bug 1850 - good)
15816 [[File:No_such.jpg]]
15818 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15821 <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>
15825 :Image link to nonexistent file (bug 1850 - bad)
15827 [[:Image:No such.jpg]]
15829 <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>
15832 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15838 Character reference normalization in link text (bug 1938)
15840 [[Main Page|this&that]]
15842 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15849 Test for unicode normalization
15851 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15855 (bug 19451) Links should refer to the normalized form.
15863 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15864 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15865 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15866 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15867 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15872 Empty attribute crash test (bug 2067)
15874 <font color="">foo</font>
15876 <p><font color="">foo</font>
15881 Empty attribute crash test single-quotes (bug 2067)
15883 <font color=''>foo</font>
15885 <p><font color="">foo</font>
15890 Attribute test: equals, then nothing
15892 parsoid=wt2html,html2html
15894 <font color=>foo</font>
15896 <p><font color="">foo</font>
15899 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
15903 Attribute test: unquoted value
15905 parsoid=wt2html,html2html
15907 <font color=x>foo</font>
15909 <p><font color="x">foo</font>
15912 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
15916 Attribute test: unquoted but illegal value (hash)
15918 <font color=#x>foo</font>
15920 <p><font color="#x">foo</font>
15924 # Parsoid does not serialize to empty attribute syntax,
15925 # so wt2wt and html2wt cases are skipped
15927 Attribute test: no value (T54330)
15929 parsoid=wt2html,html2html
15931 <font color>foo</font>
15933 <p><font color="">foo</font>
15936 <p><font color="">foo</font></p>
15940 Bug 2095: link with three closing brackets
15944 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15947 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15951 Bug 2095: link with pipe and three closing brackets
15953 [[Main Page|link]]]
15955 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15958 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15962 Bug 2095: link with pipe and three closing brackets, version 2
15964 [[Main Page|[http://example.com/]]]
15966 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15969 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15978 Template:Dangerous attribute
15980 " onmouseover="alert(document.cookie)
15984 Template:Dangerous style attribute
15986 border-size: expression(alert(document.cookie))
15992 <div style="float: right; {{{1}}}">Magic div</div>
15996 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15998 <div title="{{test}}"></div>
16000 <div title="This is a test template"></div>
16004 # Parsoid has enough context to handle this case
16006 Bug 2304: HTML attribute safety (dangerous template; 2309)
16008 <div title="{{dangerous attribute}}"></div>
16010 <div title=""></div>
16013 <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>
16017 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16019 <div style="{{dangerous style attribute}}"></div>
16021 <div style="/* insecure input */"></div>
16026 Bug 2304: HTML attribute safety (safe parameter; 2309)
16028 {{div style|width: 200px}}
16030 <div style="float: right; width: 200px">Magic div</div>
16035 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16037 {{div style|width: expression(alert(document.cookie))}}
16039 <div style="/* insecure input */">Magic div</div>
16044 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16046 {{div style|"><script>alert(document.cookie)</script>}}
16048 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16053 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16055 {{div style|" ><script>alert(document.cookie)</script>}}
16057 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16062 Bug 2304: HTML attribute safety (link)
16064 <div title="[[Main Page]]"></div>
16066 <div title="[[Main Page]]"></div>
16071 Bug 2304: HTML attribute safety (italics)
16073 <div title="''foobar''"></div>
16075 <div title="''foobar''"></div>
16080 Bug 2304: HTML attribute safety (bold)
16082 <div title="'''foobar'''"></div>
16084 <div title="'''foobar'''"></div>
16090 Bug 2304: HTML attribute safety (ISBN)
16092 <div title="ISBN 1234567890"></div>
16094 <div title="ISBN 1234567890"></div>
16099 Bug 2304: HTML attribute safety (RFC)
16101 <div title="RFC 1234"></div>
16103 <div title="RFC 1234"></div>
16108 Bug 2304: HTML attribute safety (PMID)
16110 <div title="PMID 1234567890"></div>
16112 <div title="PMID 1234567890"></div>
16117 Bug 2304: HTML attribute safety (web link)
16119 <div title="http://example.com/"></div>
16121 <div title="http://example.com/"></div>
16126 Bug 2304: HTML attribute safety (named web link)
16128 <div title="[http://example.com/ link]"></div>
16130 <div title="[http://example.com/ link]"></div>
16135 Bug 3244: HTML attribute safety (extension; safe)
16137 <div style="<nowiki>background:blue</nowiki>"></div>
16139 <div style="background:blue"></div>
16144 Bug 3244: HTML attribute safety (extension; unsafe)
16146 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16148 <div style="/* insecure input */"></div>
16152 # More MSIE fun discovered by Tom Gilder
16155 MSIE CSS safety test: spurious slash
16157 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16159 <div style="/* insecure input */">evil</div>
16164 MSIE CSS safety test: hex code
16166 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16168 <div style="/* insecure input */">evil</div>
16173 MSIE CSS safety test: comment in url
16175 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16177 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16182 MSIE CSS safety test: comment in expression
16184 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16186 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16191 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16193 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16195 <p style="/* invalid control char */">A</p>
16200 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16202 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16203 <div style="top:EXPRESSION(alert())">B</div>
16205 <p style="/* insecure input */">A</p>
16206 <div style="/* insecure input */">B</div>
16211 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16213 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16214 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16216 <div style="/* insecure input */">A</div>
16217 <p style="/* insecure input */">B</p>
16222 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16224 <div style="background-image:url⁽javascript:alert())">A</div>
16225 <div style="background-image:url₍javascript:alert())">B</div>
16226 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16228 <div style="/* insecure input */">A</div>
16229 <div style="/* insecure input */">B</div>
16230 <p style="/* insecure input */">C</p>
16234 # FIXME: Parsoid fails to sanitize this! See T58846.
16239 title="data:text/html,<img src=1 onerror=alert(1)>"
16240 style="-o-link:attr(title);-o-link-source:current">X</div>
16242 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16247 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16249 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16250 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16251 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16252 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16253 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16254 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16255 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16257 <p style="/* insecure input */">A</p>
16258 <p style="/* insecure input */">B</p>
16259 <p style="/* insecure input */">C</p>
16260 <p style="/* insecure input */">D</p>
16261 <p style="/* insecure input */">E</p>
16262 <p style="/* insecure input */">F</p>
16263 <p style="/* insecure input */">G</p>
16268 Table attribute legitimate extension
16271 !+ style="<nowiki>color:blue</nowiki>"| status
16276 <th style="color:blue"> status
16282 Table attribute safety
16285 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16290 <th style="/* insecure input */"> status
16296 CSS line continuation 1
16298 <div style="background-image: u\ rl(test.jpg);"></div>
16300 <div style="/* insecure input */"></div>
16305 CSS line continuation 2
16307 <div style="background-image: u\ rl(test.jpg); "></div>
16309 <div style="/* invalid control char */"></div>
16320 Expansion of multi-line templates in attribute values (bug 6255)
16322 <div style="background: {{identity|#00FF00}}">-</div>
16324 <div style="background: #00FF00">-</div>
16330 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16332 <div style="background:
16335 <div style="background: #00FF00">-</div>
16338 <div style="background:
16343 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16345 <div style="background: #00FF00">-</div>
16347 <div style="background: #00FF00">-</div>
16352 evil <math>-wiki-tags without Extension:Math enabled
16354 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16356 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16360 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16363 Parser hook: empty input
16374 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16377 ## Don't expect parsoid to rt this form.
16379 Parser hook: empty input using terminated empty elements
16381 parsoid=wt2html,html2html
16392 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16396 Parser hook: empty input using terminated empty elements (space before)
16407 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16411 Parser hook: basic input
16422 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16425 ## Don't expect parsoid to rt this form.
16427 Parser hook: case insensitive
16429 parsoid=wt2html,html2html
16440 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16443 ## Don't expect parsoid to rt this form.
16445 Parser hook: case insensitive, redux
16447 parsoid=wt2html,html2html
16458 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16462 Parser hook: nested tags
16464 <tag><tag></tag></tag>
16473 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16477 Parser hook: basic arguments
16479 <tag width="200" height="100" depth="50" square=""></tag>
16492 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16495 ## Don't expect parsoid to rt this form.
16497 Parser hook: basic arguments, variations
16499 parsoid=wt2html,html2html
16501 <tag width=200 height = "100" depth = '50' square></tag>
16514 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16518 Parser hook: argument containing a forward slash (bug 5344)
16520 <tag filename="/tmp/bla"></tag>
16525 'filename' => '/tmp/bla',
16530 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16533 ## Don't expect parsoid to rt this form.
16535 Parser hook: empty input using terminated empty elements (bug 2374)
16537 parsoid=wt2html,html2html
16549 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16552 # </tag> should be output literally since there is no matching tag that begins it
16554 Parser hook: basic arguments using terminated empty elements (bug 2374)
16556 <tag width=200 height = "100" depth = '50' square/>
16575 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16579 Parser hook: static parser hook not inside a comment
16581 <statictag>hello, world</statictag>
16583 <statictag action="flush" />
16589 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16590 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16594 Parser hook: static parser hook inside a comment
16596 <!-- <statictag>hello, world</statictag> -->
16597 <statictag action="flush" />
16602 <!-- <statictag>hello, world</statictag> -->
16603 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16606 # Nested template calls; this case was broken by Parser.php rev 1.506,
16610 Template:One-parameter
16612 (My parameter is: {{{1}}})
16616 Template:Map-one-parameter
16618 {{{{{1}}}|{{{2}}}}}
16622 Nested template calls
16624 {{Map-one-parameter|One-parameter|param}}
16626 <p>(My parameter is: param)
16635 # HTML+Tidy effectively strips out the empty tags completely
16636 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16637 # which Tidy would have done for the PHP parser had there been content inside it.
16639 Sanitizer: Closing of open tags
16641 <s></s><table></table>
16643 <s></s><table></table>
16646 <p><s></s></p><table></table>
16650 Sanitizer: Closing of open but not closed tags
16659 Sanitizer: Closing of closed but not open tags
16669 Sanitizer: Closing of closed but not open table tags
16673 Table not started</td></tr></table>
16675 <p>Table not started</p>
16677 <p>Table not started</p>
16681 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16683 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16685 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16689 # In HTML5, the restrictions are that id must contain at least one character,
16690 # and must not contain any space characters.
16692 Sanitizer: Validating the contents of the id attribute (bug 4515)
16696 <br id="" /><br id="a space" />
16701 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16703 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16707 <br id="foo" /><br id="foo" />
16709 Something need to be done. foo-2 ?
16713 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16716 <meta itemprop="hello" content="world">
16717 <meta http-equiv="refresh" content="5">
16718 <meta itemprop="hello" http-equiv="refresh" content="5">
16719 <link itemprop="hello" href="{{SERVER}}">
16720 <link rel="stylesheet" href="{{SERVER}}">
16721 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16725 <p> <meta itemprop="hello" content="world" />
16726 <meta http-equiv="refresh" content="5">
16727 <meta itemprop="hello" content="5" />
16729 <link itemprop="hello" href="http://example.org" />
16730 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16731 <link itemprop="hello" href="http://example.org" />
16737 Language converter: output gets cut off unexpectedly (bug 5757)
16741 this bit is safe: }-
16743 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16745 then we get cut off here: }-
16747 all additional text is vanished
16749 <p>this bit is safe: }-
16750 </p><p>but if we add a conversion instance: xxx
16751 </p><p>then we get cut off here: }-
16752 </p><p>all additional text is vanished
16757 Self closed html pairs (bug 5487)
16760 <center><font id="bug" />Centered text</center>
16761 <div><font id="bug2" />In div text</div>
16763 <center><font id="bug" />Centered text</center>
16764 <div><font id="bug2" />In div text</div>
16773 Punctuation: nbsp before exclamation
16777 <p>C'est grave !
16782 Punctuation: CSS !important (bug 11874)
16784 <div style="width:50% !important">important</div>
16786 <div style="width:50% !important">important</div>
16791 Punctuation: CSS ! important (bug 11874; with space after)
16793 <div style="width:50% ! important">important</div>
16795 <div style="width:50% ! important">important</div>
16800 HTML bullet list, closed tags (bug 5497)
16813 <ul data-parsoid='{"stx":"html"}'>
16814 <li data-parsoid='{"stx":"html"}'>One</li>
16815 <li data-parsoid='{"stx":"html"}'>Two</li>
16821 HTML bullet list, unclosed tags (bug 5497)
16833 <ul data-parsoid='{"stx":"html"}'>
16834 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16835 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16841 HTML ordered list, closed tags (bug 5497)
16854 <ol data-parsoid='{"stx":"html"}'>
16855 <li data-parsoid='{"stx":"html"}'>One</li>
16856 <li data-parsoid='{"stx":"html"}'>Two</li>
16862 HTML ordered list, unclosed tags (bug 5497)
16875 <ol data-parsoid='{"stx":"html"}'>
16876 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16877 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16883 HTML nested bullet list, closed tags (bug 5497)
16908 HTML nested bullet list, open tags (bug 5497)
16945 HTML nested ordered list, closed tags (bug 5497)
16970 HTML nested ordered list, open tags (bug 5497)
17007 HTML ordered list item with parameters oddity
17009 <ol><li id="fragment">One</li>
17012 <ol><li id="fragment">One</li>
17017 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17019 bug 5918: autonumbering
17021 [http://first/] [http://second] [ftp://ftp]
17025 [mailto:enclosed@mail.tld With target]
17027 [mailto:enclosed@mail.tld]
17029 mailto:inline@mail.tld
17031 <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>
17032 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17033 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17034 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17035 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17038 <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>
17039 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17040 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17041 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17042 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17047 # Security and HTML correctness
17048 # From Nick Jenkins' fuzz testing
17052 Fuzz testing: Parser13
17067 Fuzz testing: Parser14
17072 <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>
17073 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17075 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17081 <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>
17083 <div id="toc" class="toc">
17084 <div id="toctitle">
17088 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17095 Fuzz testing: Parser14-table
17097 parsoid=wt2html,html2html
17102 <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>
17103 <table style="__TOC__">
17108 <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>
17109 <table style="__TOC__">
17116 <table style="__TOC__"></table>
17119 # Known to produce bogus xml (extra </td>)
17121 Fuzz testing: Parser16
17148 Fuzz testing: Parser21
17151 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17156 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17166 Fuzz testing: Parser22
17168 http://===r:::https://b
17172 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17180 # Known to produce bad XML for now
17182 Fuzz testing: Parser24
17187 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17188 <br style="onmouseover='alert(document.cookie);' " />
17190 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17195 <u class="|">}}}} >
17196 <br style="onmouseover='alert(document.cookie);'" />
17198 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17207 # Note: the current result listed for this is not what the original one was,
17208 # but the original bug was JavaScript injection, which is fixed in any case.
17209 # It's not clear that the original result listed was any more correct than the
17210 # current one. Original result:
17213 # <li class="||">
17214 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17216 Fuzz testing: Parser25 (bug 6055)
17222 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17224 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17229 Fuzz testing: URL adjacent extension (with space, clean)
17231 http://example.com <nowiki>junk</nowiki>
17233 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17236 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17240 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17242 http://example.com<nowiki>junk</nowiki>
17244 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17247 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17251 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17253 http://example.com<pre>junk</pre>
17255 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17258 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17263 <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>
17267 Fuzz testing: image with bogus manual thumbnail
17269 [[Image:foobar.jpg|thumbnail= ]]
17271 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17274 <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>
17278 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17280 <pre dir=" "></pre>
17282 <pre dir=" "></pre>
17287 Parsing optional HTML elements (Bug 6171)
17292 <td> Some tabular data</td>
17293 <td> More tabular data ...
17294 <td> And yet som tabular data</td>
17300 <td> Some tabular data</td>
17301 <td> More tabular data ...
17302 </td><td> And yet som tabular data</td>
17309 Correct handling of <td>, <tr> (Bug 6171)
17314 <td> Some tabular data</td>
17315 <td> More tabular data ...</td>
17316 <td> And yet som tabular data</td>
17322 <td> Some tabular data</td>
17323 <td> More tabular data ...</td>
17324 <td> And yet som tabular data</td>
17332 Parsing crashing regression (fr:JavaScript)
17336 <p></body></x>
17341 Inline wiki vs wiki block nesting
17347 <p><b>Bold paragraph</b>
17348 </p><p>New wiki paragraph
17352 # FIXME: The current php output is documented
17353 # and desired output is the parsoid target.
17355 Inline HTML vs wiki block nesting
17361 <p><b>Bold paragraph
17362 </p><p>New wiki paragraph</b>
17365 <p><b>Bold paragraph</b>
17366 </p><p>New wiki paragraph
17370 # Original result was this:
17371 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17373 # While that might be marginally more intuitive, maybe, the six-apostrophe
17374 # construct is clearly pathological and the result stated here (which is what
17375 # the parser actually does) is about as reasonable as anything.
17377 Mixing markup for italics and bold
17380 '''bold''''''bold''bolditalics'''''
17382 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17390 Article for special page transclusion test
17394 Special page transclusion
17397 {{Special:Prefixindex/Xyzzyx}}
17399 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17405 Special page transclusion twice (bug 5021)
17408 {{Special:Prefixindex/Xyzzyx}}
17409 {{Special:Prefixindex/Xyzzyx}}
17411 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17413 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17419 Transclusion of default MediaWiki message
17421 {{MediaWiki:Mainpage}}
17428 Transclusion of nonexistent MediaWiki message
17430 {{MediaWiki:Mainpagexxx}}
17432 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17437 Transclusion of MediaWiki message with underscore
17439 {{MediaWiki:history_short}}
17446 Transclusion of MediaWiki message with space
17448 {{MediaWiki:history short}}
17455 Invalid header with following text
17465 Section extraction test (section 0)
17485 Section extraction test (section 1)
17507 Section extraction test (section 2)
17528 Section extraction test (section 3)
17548 Section extraction test (section 4)
17572 Section extraction test (section 5)
17592 Section extraction test (section 6)
17613 Section extraction test (section 7)
17633 Section extraction test (section 8)
17653 Section extraction test (section 9)
17674 Section extraction test (section 10)
17694 Section extraction test (nonexistent section 11)
17713 Section extraction test with bogus heading (section 1)
17718 ==bogus== not a legal section
17722 ==bogus== not a legal section
17726 Section extraction test with bogus heading (section 2)
17731 ==bogus== not a legal section
17738 Section extraction test with comment after heading (section 1)
17750 Section extraction test with comment after heading (section 2)
17762 Section extraction test with bogus <nowiki> heading (section 1)
17767 ==bogus== <nowiki>not a legal section</nowiki>
17771 ==bogus== <nowiki>not a legal section</nowiki>
17775 Section extraction test with bogus <nowiki> heading (section 2)
17780 ==bogus== <nowiki>not a legal section</nowiki>
17786 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17787 # instead of respecting commented sections
17789 Section extraction prefixed by comment (section 1)
17800 Section extraction prefixed by comment (section 2)
17810 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17811 # instead of respecting HTML-style headings
17813 Section extraction, mixed wiki and html (section 1)
17829 Section extraction, mixed wiki and html (section 2)
17845 # Formerly testing for bug 3342
17847 Section extraction, heading surrounded by <noinclude>
17851 <noinclude>==unmarked==</noinclude>
17857 # Test behavior of bug 19910
17859 Sectiion with all-equals
17864 The line above must have a trailing space
17867 But just in case it doesn't...
17871 But just in case it doesn't...
17875 Section replacement test (section 0)
17906 Section replacement test (section 1)
17935 Section replacement test (section 2)
17965 Section replacement test (section 3)
17996 Section replacement test (section 4)
18023 Section replacement test (section 5)
18054 Section replacement test (section 6)
18084 Section replacement test (section 7)
18115 Section replacement test (section 8)
18146 Section replacement test (section 9)
18175 Section replacement test (section 10)
18205 Section replacement test with initial whitespace (bug 13728)
18209 Preformatted initial line
18213 Preformatted initial line
18220 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18232 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18245 Section extraction, <pre> around bogus header (bug 10309)
18262 Section replacement, <pre> around bogus header (bug 10309)
18284 Handling of 
 in URLs
18288 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18291 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18293 a</a></li></ul></li></ul>
18297 Handling of %0A in URLs
18301 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18304 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18308 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18310 5 quotes, code coverage +1 line
18317 <p><b><i></i></b></p>
18320 # same html as previous, but wikitext adjusted to match parsoid html2wt
18321 # note that wt2html and html2html will put the <i> before the <b>
18323 5 quotes, code coverage +1 line w/ nowiki (1)
18325 parsoid=wt2wt,html2wt
18327 '''''<nowiki/>'''''
18332 <p><b><i></i></b></p>
18335 # same as previous, just swapping the <i> and <b>
18337 5 quotes, code coverage +1 line w/ nowiki (2)
18339 '''''<nowiki/>'''''
18344 <p><i><b></b></i></p>
18348 Special:Search page linking.
18352 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18357 {{!}} is a magic word
18359 {{!}} is a magic word there and {{!}} is still a magic word here
18360 | is not a magic word here but {{!}} is still a magic word here
18362 <p>| is a magic word there and | is still a magic word here
18363 | is not a magic word here but | is still a magic word here
18366 <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
18367 | 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>
18374 title=[[Parser test]]
18379 * {{FULLPAGENAMEE}}
18381 * {{BASEPAGENAMEE}}
18385 * {{ROOTPAGENAMEE}}
18387 * {{TALKPAGENAMEE}}
18388 * {{SUBJECTPAGENAME}}
18389 * {{SUBJECTPAGENAMEE}}
18392 * {{NAMESPACENUMBER}}
18396 * {{SUBJECTSPACEE}}
18397 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18399 <ul><li> Parser test</li>
18400 <li> Parser_test</li>
18401 <li> Parser test</li>
18402 <li> Parser_test</li>
18403 <li> Parser test</li>
18404 <li> Parser_test</li>
18405 <li> Parser test</li>
18406 <li> Parser_test</li>
18407 <li> Parser test</li>
18408 <li> Parser_test</li>
18409 <li> Talk:Parser test</li>
18410 <li> Talk:Parser_test</li>
18411 <li> Parser test</li>
18412 <li> Parser_test</li>
18420 <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>
18423 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18433 image4 |300px| centre
18434 image5.svg| http://///////
18439 <ul class="gallery mw-gallery-traditional">
18440 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18441 <div class="thumb" style="height: 150px;">Image1.png</div>
18442 <div class="gallerytext">
18445 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18446 <div class="thumb" style="height: 150px;">Image2.gif</div>
18447 <div class="gallerytext">
18450 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18451 <div class="thumb" style="height: 150px;">Image3</div>
18452 <div class="gallerytext">
18455 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18456 <div class="thumb" style="height: 150px;">Image4</div>
18457 <div class="gallerytext">
18462 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18463 <div class="thumb" style="height: 150px;">Image5.svg</div>
18464 <div class="gallerytext">
18465 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18469 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18470 <div class="thumb" style="height: 150px;">* image6</div>
18471 <div class="gallerytext">
18479 Gallery (with options)
18481 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18482 File:Nonexistent.jpg|caption
18483 File:Nonexistent.jpg
18484 image:foobar.jpg|some '''caption''' [[Main Page]]
18486 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18489 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18490 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18491 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18492 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18493 <div class="gallerytext">
18498 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18499 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18500 <div class="gallerytext">
18503 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18504 <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>
18505 <div class="gallerytext">
18506 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18510 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18511 <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>
18512 <div class="gallerytext">
18515 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18516 <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>
18517 <div class="gallerytext">
18527 Gallery with link that has fragment
18530 image:foobar.jpg|link=Main_Page
18531 image:foobar.jpg|link=Main_Page#section
18532 image:foobar.jpg|link=Main Page#section|caption
18535 <ul class="gallery mw-gallery-traditional">
18536 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18537 <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>
18538 <div class="gallerytext">
18541 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18542 <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>
18543 <div class="gallerytext">
18546 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18547 <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>
18548 <div class="gallerytext">
18558 Gallery with wikitext inside caption
18561 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18562 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18565 <ul class="gallery mw-gallery-traditional">
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="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>
18568 <div class="gallerytext">
18569 <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>
18573 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18574 <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>
18575 <div class="gallerytext">
18576 <p>This is a test template
18585 gallery (with showfilename option)
18587 <gallery showfilename>
18588 File:Nonexistent.jpg|caption
18589 File:Nonexistent.jpg
18590 image:foobar.jpg|some '''caption''' [[Main Page]]
18594 <ul class="gallery mw-gallery-traditional">
18595 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18596 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18597 <div class="gallerytext">
18598 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18603 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18604 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18605 <div class="gallerytext">
18606 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18610 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18611 <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>
18612 <div class="gallerytext">
18613 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18614 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18618 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18619 <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>
18620 <div class="gallerytext">
18621 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18630 Gallery (with namespace-less filenames)
18633 File:Nonexistent.jpg
18639 <ul class="gallery mw-gallery-traditional">
18640 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18641 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18642 <div class="gallerytext">
18645 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18646 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18647 <div class="gallerytext">
18650 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18651 <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>
18652 <div class="gallerytext">
18655 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18656 <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>
18657 <div class="gallerytext">
18665 HTML Hex character encoding (spells the word "JavaScript")
18667 parsoid=wt2html,wt2wt,html2html
18669 JavaScript
18671 <p>JavaScript
18676 <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>
18680 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18684 <p>&#xsee;&#XSEE;
18687 <p>&#xsee;&#XSEE;</p>
18691 HTML Hex character encoding mixed case
18693 parsoid=wt2html,wt2wt,html2html
18702 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18705 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18706 # Note that U+000C (form feed) is not a valid XML character, so
18707 # it is banned even though allowed in HTML5.
18709 Illegal character references (T106578)
18714 ; Control (low): 
18715 ; Control (high):  Ÿ
18716 ; Surrogate: ��
18717 ; This is an okay astral character: 💩
18726 <dt>Control (low)</dt>
18728 <dt>Control (high)</dt>
18729 <dd>&#x7F; &#x9F;</dd>
18731 <dd>&#xD83D;&#xDCA9;</dd>
18732 <dt>This is an okay astral character</dt>
18738 __FORCETOC__ override
18750 ISBN 978-0-1234-56 789
18752 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18755 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18757 <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>
18761 ISBN followed by 5 spaces
18772 ISBN ISBN 1234567890
18774 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18777 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18780 # Uppercase X and lowercase x as well
18791 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18792 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18793 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18794 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18795 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18796 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18799 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18800 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18801 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18802 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18803 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18804 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18808 ISBN with empty prefix (parsoid test)
18812 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18815 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18819 Bug 22905: <abbr> followed by ISBN followed by </a>
18821 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18823 <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>
18826 <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>
18834 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18839 Double RFC with a wiki link
18843 <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>
18852 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18855 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18859 Centre-aligned image
18861 [[Image:foobar.jpg|centre]]
18863 <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>
18870 [[Image:foobar.jpg|none]]
18872 <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>
18877 Width + Height sized image (using px) (height is ignored)
18879 [[Image:foobar.jpg|640x480px]]
18881 <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>
18886 Width-sized image (using px, no following whitespace)
18888 [[Image:foobar.jpg|640px]]
18890 <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>
18895 Width-sized image (using px, with following whitespace - test regression from r39467)
18897 [[Image:foobar.jpg|640px ]]
18899 <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>
18904 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18906 [[Image:foobar.jpg| 640px]]
18908 <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>
18913 Image with page parameter
18917 [[File:LoremIpsum.djvu|page=2]]
18919 <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>
18922 <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>
18926 Another italics / bold test
18934 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18940 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18943 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18948 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18950 Images with the "|" character in the comment
18952 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18954 <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>
18957 <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>
18961 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18963 <html><script>alert(1);</script></html>
18965 <p><html><script>alert(1);</script></html>
18970 HTML with raw HTML ($wgRawHtml==true)
18974 <html><script>alert(1);</script></html>
18976 <p><script>alert(1);</script>
18981 Parents of subpages, one level up
18983 subpage title=[[Subpage test/L1/L2/L3]]
18987 <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>
18993 Parents of subpages, one level up, not named
18995 subpage title=[[Subpage test/L1/L2/L3]]
18999 <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>
19006 Parents of subpages, two levels up
19008 subpage title=[[Subpage test/L1/L2/L3]]
19014 <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
19015 </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>
19020 Parents of subpages, two levels up, without trailing slash or name.
19022 subpage title=[[Subpage test/L1/L2/L3]]
19031 Parents of subpages, two levels up, with lots of extra trailing slashes.
19033 subpage title=[[Subpage test/L1/L2/L3]]
19037 <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>
19042 Subpage test/L1/L2/L3Sibling
19048 Transclusion of a sibling page (one level up)
19050 subpage title=[[Subpage test/L1/L2/L3]]
19059 Transclusion of a child page
19061 subpage title=[[Subpage test/L1/L2]]
19070 Non-transclusion because of too many up levels
19072 subpage title=[[Subpage test/L1/L2/L3]]
19074 {{../../../../More than parent}}
19076 <p>{{../../../../More than parent}}
19081 Definition list code coverage
19087 <dl><dt> title  </dt>
19089 <dt> title </dt>
19095 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19096 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19097 <dt>title</dt><dd> def</dd></dl>
19101 Don't fall for the self-closing div
19103 <div>hello world</div/>
19105 <div>hello world</div>
19114 <p>[[:Template:Msg]]
19123 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19127 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19129 Always escape literal '>' in output, not just after '<'
19143 <p>This is a test template
19144 This is a test template
19156 Inclusion of !userCanEdit() content
19160 <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>
19166 Out-of-order TOC heading levels
19175 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19177 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19179 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19180 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19183 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19185 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19186 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19192 <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>
19193 <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>
19194 <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>
19195 <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>
19196 <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>
19197 <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>
19203 ISBN with a dummy number
19213 ISBN with space-delimited number
19217 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19223 ISBN with multiple spaces, no number
19242 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19243 </p><p>ISBN 12345678901
19249 ISBN with trailing year (bug 8110)
19251 ISBN 1-234-56789-0 - 2006
19253 ISBN 1 234 56789 0 - 2006
19255 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19256 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19264 {{anchorencode:foo bar©#%n}}
19266 <p>foo_bar.C2.A9.23.25n
19271 anchorencode trims spaces
19273 {{anchorencode: __pretty__please__}}
19280 anchorencode deals with links
19282 {{anchorencode: [[hello|world]] [[hi]]}}
19289 anchorencode deals with templates
19291 {{anchorencode: {{Foo}} }}
19298 anchorencode encodes like the TOC generator: (bug 18431)
19300 === _ +:.3A%3A&&]] ===
19301 {{anchorencode: _ +:.3A%3A&&]] }}
19304 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19305 <p>.2B:.3A.253A.26.26.5D.5D
19310 Bug 6200: blockquotes and paragraph formatting
19331 Bug 8293: Use of center tag ruins paragraph formatting
19352 Parsing of overlapping (improperly nested) inline html tags
19354 <span><s>x</span></s>
19356 <p><span><s>x</span></s></span>
19359 <p><span><s>x</s></span>
19364 ### Language variants related tests
19367 Self-link in language variants
19369 title=[[Dunav]] language=sr
19371 Both [[Dunav]] and [[Дунав]] are names for this river.
19373 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19384 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19386 title=[[Duna]] language=sr
19388 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19390 <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.
19395 Link to a section of a variant of this title shouldn't be parsed as self-link
19397 title=[[Duna]] language=sr
19399 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19401 <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.
19406 Link to pages in language variants
19410 Main Page can be written as [[Маин Паге]]
19412 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19418 Multiple links to pages in language variants
19422 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19424 <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>.
19430 Simple template in language variants
19436 <p>This is a test template
19442 Template with explicit namespace in language variants
19448 <p>This is a test template
19454 Basic test for template parameter in language variants
19458 {{парамтест|param=foo}}
19460 <p>This is a test template with parameter foo
19466 Simple category in language variants
19470 [[Category:МедиаWики Усер'с Гуиде]]
19472 <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>
19488 ## We used to, but no longer wt2wt this test since the default serializer
19489 ## will normalize all categories to serialize on their own line.
19490 ## This wikitext usage is going to be fairly uncommon in production and
19491 ## selser will take care of preserving formatting in those scenarios.
19493 Don't convert blue categorylinks to another variant (bug 33210)
19499 [[A]][[Category:分类]]
19501 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19503 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19504 <link rel="mw:PageProp/Category" href="Category:分类"/>
19508 Stripping -{}- tags (language variants)
19512 Latin proverb: -{Ne nuntium necare}-
19514 <p>Latin proverb: Ne nuntium necare
19520 Prevent conversion with -{}- tags (language variants)
19522 language=sr variant=sr-ec
19524 Latinski: -{Ne nuntium necare}-
19526 <p>Латински: Ne nuntium necare
19532 Prevent conversion of text with -{}- tags (language variants)
19534 language=sr variant=sr-ec
19536 Latinski: -{Ne nuntium necare}-
19538 <p>Латински: Ne nuntium necare
19544 Prevent conversion of links with -{}- tags (language variants)
19546 language=sr variant=sr-ec
19550 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19556 -{}- tags within headlines (within html for parserConvert())
19558 language=sr variant=sr-ec
19562 <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>
19568 Explicit definition of language variant alternatives
19570 language=zh variant=zh-tw
19572 -{zh:China;zh-tw:Taiwan}-, not China
19574 <p>Taiwan, not China
19580 Conversion around HTML tags
19582 language=sr variant=sr-ec
19584 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19585 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19588 <span title="ЛаCтин">ски</span>
19594 Explicit session-wise language variant mapping (A flag and - flag)
19596 language=zh variant=zh-tw
19598 Taiwan is not China.
19599 But -{A|zh:China;zh-tw:Taiwan}- is China,
19600 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19601 and -{China}- is China.
19603 <p>Taiwan is not China.
19604 But Taiwan is Taiwan,
19605 (This should be stripped!)
19606 and China is China.
19611 Explicit session-wise language variant mapping (H flag for hide)
19613 language=zh variant=zh-tw
19615 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19618 <p>(This should be stripped!)
19624 Adding explicit conversion rule for title (T flag)
19626 language=zh variant=zh-tw showtitle
19628 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19631 <p>Should be stripped!
19636 Testing that changing the language variant here in the tests actually works
19638 language=zh variant=zh showtitle
19640 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19643 <p>Should be stripped!
19648 Recursive conversion of alt and title attrs shouldn't clear converter state
19650 language=zh variant=zh-cn showtitle
19652 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19653 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19657 Should be stripped<span title="Exclamation">!</span>
19662 Bug 24072: more test on conversion rule for title
19664 language=zh variant=zh-tw showtitle
19666 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19667 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19670 <p>This should be stripped!
19671 This won't take interferes with the title rule.
19676 Partly disable title conversion if variant == main language code
19678 language=zh variant=zh title=[[ZH]] showtitle
19680 -{T|zh-cn:CN;zh-tw:TW}-
19688 Partly disable title conversion if variant == main language code, more
19690 language=zh variant=zh title=[[ZH]] showtitle
19700 Raw output of variant escape tags (R flag)
19702 language=zh variant=zh-tw
19704 Raw: -{R|zh:China;zh-tw:Taiwan}-
19706 <p>Raw: zh:China;zh-tw:Taiwan
19711 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19713 language=zh variant=zh-cn
19715 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19722 Conversion rules from [numeric-only string] to [something else] (T48634)
19724 language=zh variant=zh-cn
19726 -{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
19733 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19735 language=zh variant=zh-cn
19737 -{H|zh-cn:foo;zh-tw:;}-foobar
19744 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19746 language=zh variant=zh-cn
19748 -{H|=>zh-cn:foo;}-foobar
19755 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19757 language=zh variant=zh-cn
19766 Nested using of manual convert syntax
19768 language=zh variant=zh-hk
19770 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19772 <p>Nested: Hello Hong Kong!
19777 Proper conversion of text in external links
19779 language=sr variant=sr-ec
19781 http://www.google.com
19782 gopher://www.google.com
19783 [http://www.google.com http://www.google.com]
19784 [gopher://www.google.com gopher://www.google.com]
19785 [https://www.google.com irc://www.google.com]
19786 [ftp://www.google.com www.google.com/ftp://dir]
19787 [//www.google.com www.google.com]
19789 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19790 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19791 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19792 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19793 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19794 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19795 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19800 Do not convert roman numbers to language variants
19802 language=sr variant=sr-ec
19806 <p>Фридрих IV је цар.
19811 Unclosed language converter markup "-{"
19822 Don't convert raw rule "-{R|=>}-" to "=>"
19833 Don't break link parsing if language converter markup is in the caption.
19835 language=sr variant=sr-ec
19837 [[Main Page|-{R|main page}-]]
19839 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19843 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19845 Don't break image parsing if language converter markup is in the caption.
19849 [[File:Foobar.jpg|-{R|caption}-]]
19851 <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>
19855 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19857 Don't break list handling if language converter markup is in the item.
19859 language=zh variant=zh-cn
19861 ;-{zh-cn:AAA;zh-tw:BBB}-
19863 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19870 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19872 Don't break table handling if language converter markup is in the cell.
19874 language=sr variant=sr-ec
19897 Bug 529: Uncovered bullet
19906 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19907 # Templates in Wikipedia rely on this behavior, as tidy has always been
19908 # enabled there. These tests are normally run *without* tidy, so specify the
19909 # full output here.
19910 # To test realistic parsing behavior, apply a tidy-like transformation to both
19911 # the expected output and your parser's output.
19913 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19915 ******* Foo {{bullet}}
19917 <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>
19923 Bug 529: Uncovered table already at line-start
19946 Bug 529: Uncovered bullet in parser function result
19948 * Foo {{lc:{{bullet}} }}
19956 Bug 5678: Double-parsed template argument
19958 {{lc:{{{1}}}|hello}}
19965 Bug 5678: Double-parsed template invocation
19967 {{lc:{{paramtest {{!}} param = hello }} }}
19969 <p>{{paramtest | param = hello }}
19974 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19977 title=[[Main Page]]
19979 {{PRVNÍVELKÉ:ěščř}}
19980 {{prvnívelké:ěščř}}
20000 Morwen/13: Unclosed link followed by heading
20007 <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>
20012 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20019 <h1><span class="mw-headline" id="heading">heading</span></h1>
20024 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20031 <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>
20046 Paragraphs inside divs (no extra line breaks)
20058 Paragraphs inside divs (extra line break on open)
20073 Paragraphs inside divs (extra line break on close)
20088 Paragraphs inside divs (extra line break on open and close)
20105 Nesting tags, paragraphs on lines which begin with <div>
20107 <div></div><strong>A
20110 <p><strong>A</strong></p>
20111 <p><strong>B</strong></p>
20119 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20121 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20123 <blockquote>Line one
20125 Line two</blockquote>
20127 <blockquote>Line one
20128 Line two</blockquote>
20132 <p>Line one Line two</p>
20137 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20142 Line two</blockquote>
20147 Line two</blockquote>
20152 Line two</blockquote>
20156 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20158 <blockquote>Line one
20163 <blockquote>Line one
20176 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20198 Paragraphs inside blockquotes/divs (no extra line breaks)
20200 <blockquote><div>Line one
20202 Line two</div></blockquote>
20204 <blockquote><div>Line one
20205 Line two</div></blockquote>
20210 Paragraphs inside blockquotes/divs (extra line break on open)
20215 Line two</div></blockquote>
20220 Line two</div></blockquote>
20225 Paragraphs inside blockquotes/divs (extra line break on close)
20227 <blockquote><div>Line one
20230 </div></blockquote>
20232 <blockquote><div>Line one
20235 </div></blockquote>
20240 Paragraphs inside blockquotes/divs (extra line break on open and close)
20246 </div></blockquote>
20252 </div></blockquote>
20257 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20259 wgLinkHolderBatchSize=0
20265 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20266 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20267 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20272 Free external link invading image caption
20274 [[Image:Foobar.jpg|thumb|http://x|hello]]
20276 <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>
20281 Bug 15196: localised external link numbers
20285 [http://en.wikipedia.org/]
20287 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20290 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20294 Multibyte character in padleft
20296 {{padleft:-Hello|7|Æ}}
20303 Multibyte character in padright
20305 {{padright:Hello-|7|Æ}}
20312 formatdate parser function
20314 {{#formatdate:2009-03-24}}
20316 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20321 formatdate parser function, with default format
20323 {{#formatdate:2009-03-24|mdy}}
20325 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20330 Spacing of numbers in formatted dates
20332 {{#formatdate:January 15}}
20334 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20339 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
20341 language=nl title=[[MediaWiki:Common.css]]
20343 {{#formatdate:2009-03-24|dmy}}
20345 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20358 Edit comment with link
20362 I like the [[Main Page]] a lot
20364 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20368 Edit comment with link and link text
20372 I like the [[Main Page|best pages]] a lot
20374 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20378 Edit comment with link and link text with suffix
20382 I like the [[Main Page|best page]]s a lot
20384 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20388 Edit comment with section link (non-local, eg in history list)
20390 comment title=[[Main Page]]
20392 /* External links */ removed bogus entries
20394 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20398 Edit comment with section link and text before it (non-local, eg in history list)
20400 comment title=[[Main Page]]
20402 pre-comment text /* External links */ removed bogus entries
20404 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>
20408 Edit comment with section link (local, eg in diff view)
20410 comment local title=[[Main Page]]
20412 /* External links */ removed bogus entries
20414 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20418 Edit comment with subpage link (bug 14080)
20422 title=[[Subpage test]]
20424 Poked at a [[/subpage]] here...
20426 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20430 Edit comment with subpage link and link text (bug 14080)
20434 title=[[Subpage test]]
20436 Poked at a [[/subpage|neat little page]] here...
20438 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20442 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20445 title=[[Subpage test]]
20447 Poked at a [[/subpage]] here...
20449 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20453 Edit comment with bare anchor link (local, as on diff)
20457 title=[[Main Page]]
20461 <a href="#section">#section</a>
20465 Edit comment with bare anchor link (non-local, as on history)
20468 title=[[Main Page]]
20472 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20476 Anchor starting with underscore
20482 <p><a href="#_ref">One</a>
20485 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20489 Id starting with underscore
20491 <div id="_ref"></div>
20493 <div id="_ref"></div>
20498 Space normalisation on autocomment (bug 22784)
20501 title=[[Main Page]]
20503 /* __hello__world__ */
20505 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20509 percent-encoding and + signs in comments (Bug 26410)
20513 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20515 <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>
20518 # Parsoid doesn't support this yet: see bug 73581
20519 # but it *should* omit the 'src' attribute if the image is bad.
20520 # PHP side of tests was disabled in
20521 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20522 # because of issues in the PHP parserTests infrastructure
20523 # (but the output below is indeed what the PHP side emits)
20525 Bad images - basic functionality
20528 !! DISABLED/html/php
20530 <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>
20534 Bad images - bug 16039: text after bad image disappears
20539 !! DISABLED/html/php
20545 <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>
20550 Verify that displaytitle works (bug #22501) no displaytitle
20554 wgAllowDisplayTitle=true
20555 wgRestrictDisplayTitle=false
20557 this is not the the title
20560 <p>this is not the the title
20565 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20570 wgAllowDisplayTitle=true
20571 wgRestrictDisplayTitle=false
20573 this is not the the title
20574 {{DISPLAYTITLE:whatever}}
20577 <p>this is not the the title
20582 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20587 wgAllowDisplayTitle=true
20588 wgRestrictDisplayTitle=true
20590 this is not the the title
20591 {{DISPLAYTITLE:whatever}}
20594 <p>this is not the the title
20599 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20604 wgAllowDisplayTitle=true
20605 wgRestrictDisplayTitle=true
20607 this is not the the title
20608 {{DISPLAYTITLE:screen}}
20611 <p>this is not the the title
20616 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20621 wgAllowDisplayTitle=false
20623 this is not the the title
20624 {{DISPLAYTITLE:screen}}
20627 <p>this is not the the title
20628 <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>
20633 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20638 wgAllowDisplayTitle=false
20640 this is not the the title
20643 <p>this is not the the title
20648 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20653 wgAllowDisplayTitle=true
20654 wgRestrictDisplayTitle=true
20656 this is not the the title
20657 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20659 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20660 <p>this is not the the title
20665 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20670 wgAllowDisplayTitle=true
20671 wgRestrictDisplayTitle=true
20673 this is not the the title
20674 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20676 <span style="color: red;">s</span>creen
20677 <p>this is not the the title
20682 Page status indicators: Empty name is invalid
20686 <indicator name=" "></indicator>
20687 <indicator></indicator>
20689 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20690 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20695 Page status indicators: Weird syntaxes that are okay
20699 <indicator name="empty" />
20700 <indicator name="name"></indicator>
20709 Page status indicators: Torture test
20713 <indicator name="01">hello world</indicator>
20714 <indicator name="02">[[Main Page]]</indicator>
20715 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20716 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20717 <indicator name="05">* foo
20719 <indicator name="06"><nowiki>foo</nowiki></indicator>
20720 <indicator name="07"> Preformatted</indicator>
20721 <indicator name="08"><div>Broken tag</indicator>
20722 <indicator name="09">{| class=wikitable
20725 <indicator name="10">Two
20727 paragraphs</indicator>
20730 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20731 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" />
20732 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>
20733 05=<ul><li> foo</li>
20737 07=<pre>Preformatted
20739 08=<div>Broken tag</div>
20741 09=<table class="wikitable">
20758 preload: check <noinclude> and <includeonly>
20762 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20768 preload: check <onlyinclude>
20772 Goodbye <onlyinclude>Hello world</onlyinclude>
20778 preload: can pass tags through if we want to
20782 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20784 <includeonly>Hello world</includeonly>
20788 preload: check that it doesn't try to do tricks
20792 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20794 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20798 Play a bit with r67090 and bug 3158
20800 <div style="width:50% !important"> </div>
20801 <div style="width:50% !important"> </div>
20802 <div style="width:50% !important"> </div>
20803 <div style="border : solid;"> </div>
20805 <div style="width:50% !important"> </div>
20806 <div style="width:50% !important"> </div>
20807 <div style="width:50% !important"> </div>
20808 <div style="border : solid;"> </div>
20811 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20812 <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>
20813 <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>
20814 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20819 HTML5 data attributes
20821 <span data-foo="bar">Baz</span>
20822 <p data-abc-def_hij="">Quuz</p>
20824 <p><span data-foo="bar">Baz</span>
20826 <p data-abc-def_hij="">Quuz</p>
20829 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
20830 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
20834 Strip reserved data attributes
20836 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
20838 <div data-ok="fred">d</div>
20841 <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>
20845 percent-encoding and + signs in internal links (Bug 26410)
20847 [[User:+%]] [[Page+title%]]
20848 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20849 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20850 [[%33%45]] [[%33%45+]]
20852 <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>
20853 <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>
20854 <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>
20855 <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>
20858 <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>
20859 <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>
20860 <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>
20861 <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>
20865 Special characters in embedded file links (bug 27679)
20867 [[File:Contains & ampersand.jpg]]
20868 [[File:Does not exist.jpg|Title with & ampersand]]
20870 <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>
20871 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20874 <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>
20875 <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>
20879 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20881 Text's been normalized?
20883 <p>Text's been normalized?
20888 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20890 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20892 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20897 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20899 [http://www.example.org/ ideograms]
20901 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20906 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20908 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20910 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
20934 Bug 31098 Template which includes system messages which includes the template
20938 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20939 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20944 Bug31490 Turkish: ucfirst 'blah'
20955 Bug31490 Turkish: ucfirst 'ix'
20966 Bug31490 Turkish: lcfirst 'BLAH'
20977 Bug31490 Turkish: ucfırst (with a dotless i)
20983 <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>
20988 Bug31490 ucfırst (with a dotless i) with English language
20994 <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>
20999 Bug 26375: TOC with italics
21001 title=[[Main Page]]
21004 == ''Lost'' episodes ==
21006 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21008 <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>
21012 <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>
21017 Bug 26375: TOC with bold
21019 title=[[Main Page]]
21022 == '''should be bold''' then normal text ==
21024 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21026 <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>
21030 <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>
21035 Bug 33845: Headings become cursive in TOC when they contain an image
21037 title=[[Main Page]]
21040 == Image [[Image:foobar.jpg]] ==
21042 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21044 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21048 <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>
21053 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21055 title=[[Main Page]]
21058 == <blockquote>Quote</blockquote> ==
21060 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21062 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21066 <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>
21070 <div id="toc" class="toc">
21071 <div id="toctitle">
21075 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21079 <h2><span class="mw-headline" id="Quote"></span></h2>
21081 <p><span class="mw-headline" id="Quote">Quote</span></p>
21083 <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>
21087 Unclosed tags in TOC
21089 title=[[Main Page]]
21093 <small>Hanc marginis exiguitas non caperet.</small>
21096 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21098 <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>
21102 <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>
21103 <p><small>Hanc marginis exiguitas non caperet.</small>
21109 Multiple tags in TOC
21112 == <i>Foo</i> <b>Bar</b> ==
21114 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21116 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21118 <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>
21119 <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>
21123 <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>
21124 <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>
21128 <div id="toc" class="toc">
21129 <div id="toctitle">
21133 <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>
21134 <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>
21138 <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>
21139 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21141 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21143 <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>
21146 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21147 # html5 tag parsing.
21149 Tags with parameters in TOC
21154 == <sup class="in-h2">Hello</sup> ==
21156 == <sup class="a > b">Evilbye</sup> ==
21158 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21160 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21161 <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>
21165 <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>
21166 <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>
21169 <meta property="mw:PageProp/toc" />
21170 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21172 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21176 span tags with directionality in TOC
21179 == <span dir="ltr">C++</span> ==
21181 == <span dir="rtl">זבנג!</span> ==
21183 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21185 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21187 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21189 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21191 <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>
21192 <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>
21193 <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>
21194 <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>
21195 <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>
21199 <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>
21200 <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>
21201 <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>
21202 <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>
21203 <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>
21208 Bug 72884: bdi element in ToC
21211 == <bdi>test</bdi> ==
21213 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21215 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21219 <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>
21223 # Note that the html output does not have the <p></p>, but the
21224 # html+tidy output *does*. This is because the empty <p></p> is
21225 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21227 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21232 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21234 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21238 <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>
21242 <div id="toc" class="toc">
21243 <div id="toctitle">
21247 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21251 <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>
21257 == {{int:headline_sample}} ==
21261 Bug 32057: Title needed when expanding <h> nodes.
21263 title=[[Main Page]]
21267 <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>
21272 Strip marker in urlencode
21274 {{urlencode:x<nowiki/>y}}
21275 {{urlencode:x<nowiki/>y|wiki}}
21276 {{urlencode:x<nowiki/>y|path}}
21277 {{urlencode:x<pre id="one">two</pre>y}}
21305 Strip marker in formatNum
21307 {{formatnum:1<nowiki/>2}}
21308 {{formatnum:1<nowiki/>2|R}}
21316 Check noCommafy in formatNum
21320 {{formatnum:123456.78}}
21321 {{formatnum:123456.78|NOSEP}}
21329 Wrong option for formatNum (bug 56199)
21331 {{formatnum:1,234.56|Random}}
21332 {{formatnum:1,234.56|EVERYTHING}}
21333 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21342 Strip marker in grammar
21346 {{grammar:elative|foo<nowiki/>bar}}
21353 Strip marker in padleft
21355 {{padleft:|2|x<nowiki/>y}}
21362 Strip marker in padright
21364 {{padright:|2|x<nowiki/>y}}
21371 Strip marker in anchorencode
21373 {{anchorencode:x<nowiki/>y}}
21380 nowiki inside link inside heading (bug 18295)
21382 ==[[foo|x<nowiki>y</nowiki>z]]==
21384 <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>
21389 new support for bdi element (bug 31817)
21391 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21393 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21398 Ignore pipe between table row attributes
21402 |- id=foo | style='color: red'
21410 <tr id="foo" style="color: red">
21417 Gallery override link with WikiLink (bug 34852)
21420 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21423 <ul class="gallery mw-gallery-traditional">
21424 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21425 <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>
21426 <div class="gallerytext">
21436 Gallery override link with absolute external link (bug 34852)
21439 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21442 <ul class="gallery mw-gallery-traditional">
21443 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21444 <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>
21445 <div class="gallerytext">
21455 Gallery override link with malicious javascript (bug 34852)
21458 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21461 <ul class="gallery mw-gallery-traditional">
21462 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21463 <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>
21464 <div class="gallerytext">
21474 Gallery with invalid title as link (bug 43964)
21477 File:foobar.jpg|link=<
21480 <ul class="gallery mw-gallery-traditional">
21481 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21482 <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>
21483 <div class="gallerytext">
21491 Language parser function
21500 Padleft and padright as substr
21502 {{padleft:|3|abcde}}
21503 {{padright:|3|abcde}}
21511 Special parser function
21513 {{#special:RandomPage}}
21514 {{#special:BaDtItLe}}
21515 {{#special:Foobar}}
21524 Bug 34939 - Case insensitive link parsing ([HttP://])
21526 [HttP://MediaWiki.Org/]
21528 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21531 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21535 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21537 [HttP://MediaWiki.Org/ MediaWiki]
21539 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21544 Bug 34939 - Case insensitive link parsing (HttP://)
21546 HttP://MediaWiki.Org/
21548 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21551 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21569 <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>
21570 <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>
21571 <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>
21572 <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>
21573 <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>
21579 ### Parsoid-specific tests
21580 ### Parsoid-PHP parser incompatibilities
21583 1. SOL-sensitive wikitext tokens as template-args
21585 parsoid=wt2html,wt2wt
21591 <span about="#mwt1" typeof="mw:Transclusion">
21592 </span><ul about="#mwt1"><li>a</li>
21594 <span about="#mwt2" typeof="mw:Transclusion">
21595 </span><ol about="#mwt2"><li>a</li>
21597 <span about="#mwt3" typeof="mw:Transclusion">
21598 </span><dl about="#mwt3"><dd>a</dd>
21602 #### -----------------------------------------------------------------
21603 #### Parsoid-specific functionality tests
21604 #### -----------------------------------------------------------------
21606 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21607 # We know wt2wt will fail, but we expect selser to pass.
21608 # Due to the nature of our testing, wt2wt and selser tests will enter the
21609 # blacklist and we'll catch selser regressions based on changes to the
21610 # blacklist entries for selser tests.
21612 1. Bad treebuilder fixup of formatting elt is cleaned up
21614 parsoid=wt2html,wt2wt
21619 [[Image:Foobar.jpg|right|Test]]
21626 <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>
21633 2. Bad treebuilder fixup of formatting elt is cleaned up
21635 parsoid=wt2html,wt2wt
21637 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21639 <small>[[Image:Foobar.jpg|right|300px]]</small>
21643 <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>
21645 <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>
21649 3. Bad treebuilder fixup of formatting elt is cleaned up
21651 parsoid=wt2html,wt2wt
21653 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21655 <p><small><b>foo</b></small></p>
21656 <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>
21657 <p><small><b>bar</b></small></p>
21661 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21663 parsoid=wt2html,wt2wt
21665 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21667 <p><b><small></small></b></p>
21668 <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>
21672 #### ----------------------------------------------------------------
21673 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21674 #### tags. Parsoid's output for these tags differs from that of the
21676 #### ----------------------------------------------------------------
21679 Ref: 1. ref-location should be replaced with an index span
21682 B <ref name="x">foo</ref>
21686 <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>
21687 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>
21688 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>
21689 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21690 <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>
21691 <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>
21692 <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>
21697 Ref: 2. ref-tags with identical names should all get the same index
21699 A <ref name="x">foo</ref>
21703 <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>
21704 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>
21705 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21706 <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>
21711 Ref: 3. spaces in ref-names should be ignored
21713 A <ref name="x">foo</ref>
21714 B <ref name=" x " />
21718 <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>
21719 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>
21720 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>
21721 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21722 <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>
21726 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21728 Ref: 4. 'constructor' should be accepted as a valid ref-name
21730 A <ref name="constructor">foo</ref>
21733 <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>
21734 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21735 <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>
21740 Ref: 5. body should accept generic wikitext
21743 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21748 <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>
21750 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21751 <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>
21757 Ref: 6. indent-pres should not be output in ref-body
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></p>
21769 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21770 <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
21778 Ref: 7. No p-wrapping in ref-body
21795 <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>
21797 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21798 <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
21813 Ref: 8. transclusion wikitext has lower precedence
21815 A <ref> foo {{echo|</ref> B C}}
21819 <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>
21820 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21821 <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>
21826 Ref: 9. unclosed comments should not leak out of ref-body
21828 A <ref> foo <!--</ref> B C
21831 <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>
21832 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21833 <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>
21838 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21840 A <ref> <b> foo </ref> B C
21844 <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>
21847 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21848 <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>
21853 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21859 <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
21860 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>
21861 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21862 <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>
21863 <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>
21868 Ref: 12. ref-tags act as trailing newline migration barrier
21870 <!--the newline at the end of this line moves out of the p tag-->a
21872 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21878 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21881 <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>
21882 <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>
21885 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21886 <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>
21887 <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>
21891 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21898 <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
21899 <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>
21900 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21901 <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>
21902 <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
21908 Ref: 14. A nested ref-tag should be emitted as plain text
21910 <ref>foo <ref>bar</ref> baz</ref>
21914 <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>
21916 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21917 <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>
21922 Ref: 15. ref-tags with identical names should get identical indexes
21924 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21925 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21929 <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>
21930 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>
21932 <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>
21936 ## We don't bother wt2wt-ing non-standard whitespace
21938 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21946 <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>
21947 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21948 <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>
21952 Ref: 17. Generate valid HTML5 id/about attributes
21954 <ref name="a b">foo</ref>
21958 <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>
21961 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21962 <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>
21967 Ref: 18. T58916: Extension attributes should be parsed as plain text
21969 <ref name="{{echo|a}}">foo</ref>
21973 <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>
21976 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21977 <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>
21982 Ref: 19. ref-tags with identical name encodings should get identical indexes
21984 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21988 <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>
21990 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21991 <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>
21996 Ref: 20. ref-tags with identical names but different content should keep it
21998 A <ref name="foo">Foo one</ref>
21999 B <ref name="foo">Foo two</ref>
22000 C <ref name="foo" />
22004 <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>
22005 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>
22006 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>
22008 <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>
22013 References: 1. references tag without any refs should be handled properly
22017 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22021 References: 2. references tag with group only outputs references from that group
22023 A <ref group="a">foo</ref>
22024 B <ref group="b">bar</ref>
22027 <references group="a" />
22029 <references group="b" />
22031 <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>
22032 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>
22033 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>
22035 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22036 <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>
22038 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22039 <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>
22041 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22042 <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>
22047 References: 3. ref list should be cleared after processing references
22057 <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>
22059 <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>
22062 <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>
22064 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22065 <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>
22070 References: 4. only referenced group should be cleared after processing references
22072 A <ref group="a">afoo</ref>
22075 <references group="a" />
22081 <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>
22082 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>
22084 <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>
22087 <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>
22089 <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>
22093 ## Don't expect this to rt since we're dropping content
22095 References: 5. ref tags in references should be processed while ignoring all other content
22097 parsoid=wt2html,html2html
22100 B <ref name="b">bar</ref>
22103 <ref name="a">foo</ref>
22104 This should just get lost.
22107 <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>
22108 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>
22111 <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>
22116 References: 6. <references /> from a transclusion
22118 <ref>Foo</ref> {{echo|<references />}}
22120 <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>
22125 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22127 A <ref>foo bar for a</ref>
22128 B <ref group="X" name="b" />
22132 <references group="X">
22133 <ref name="b">foo</ref>
22136 <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>
22137 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>
22140 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22141 <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>
22144 <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"}}'>
22145 <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>
22150 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22152 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22155 <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>
22156 <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>
22160 # This test only works in wt2html now as the <references /> are always generated
22161 # unless selser is active. Once T72722 is fixed, we should add a changes test
22162 # here to ensure that unrelated changes don't add the new <references />
22163 # when selser is active.
22165 References: 9. Generate missing references list at the end
22168 B <ref group="inexistent">bar</ref>
22170 <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>
22171 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22172 <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>
22174 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22175 <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>
22180 References: 10. New <references/> shouldn't be added for unrelated edits.
22183 "modes": ["selser"],
22184 "changes": [["#x", "remove"]],
22188 Unrelated text<span id="x"> that's going to disappear</span>.
22196 Entities in ref name
22198 <ref name="test & me">hi</ref>
22201 <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>
22202 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22203 <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>
22207 # This test is wt2html only because we're permitting the serializer to produce
22208 # dirty diffs, normalizing the unclosed references to the self-closed version.
22210 Generate references for unclosed references tag
22218 <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>
22219 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22220 <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>
22224 New reference serializes on its own line
22226 parsoid=wt2wt,html2wt
22231 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22234 #### ----------------------------------------------------------------
22235 #### Parsoid-only testing of Parsoid's impl of LST
22236 #### Not implemented yet, see
22237 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22238 #### ----------------------------------------------------------------
22241 LST Sections: 1. Simple section start and end
22243 parsoid={ "suppressErrors": true }
22245 <section begin="2011-05-16" />
22246 <section end="2014-04-10 (MW 1.23wmf22)" />
22248 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22249 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22252 #--------- Test stripping of empty nodes in template content ----------
22254 Empty LI and TR nodes should be stripped from template content
22259 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22263 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22276 Empty LI and TR nodes should not be stripped from top-level content
22303 Empty TR nodes should not be stripped if they have any attributes set
22305 {{EmptyTRWithHTMLAttrTest}}
22307 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22308 <tr align="center"></tr>
22309 <tr><td>foo</td></tr>
22310 <tr align="center"></tr>
22311 <tr><td>bar</td></tr>
22315 #### ----------------------------------------------------------------
22316 #### The following section of tests are primarily to test
22317 #### wikitext escaping capabilities of Parsoid. Given that
22318 #### escaping can be done any number of ways, the wikitext (input)
22319 #### is always adjusted to reflect how Parsoid adds nowiki
22322 #### We are marking several tests as parsoid-only since the
22323 #### HTML in the result section is different from what the
22324 #### PHP parser generates for it.
22325 #### ----------------------------------------------------------------
22328 #### --------------- Headings ---------------
22330 #### 1. Nested inside html <h1>=foo=</h1>
22331 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22332 #### 3. Nested inside html with wikitext split by html tags
22333 #### 4. No escape needed
22334 #### 5. Empty headings <h1></h1>
22335 #### 6. Heading chars in SOL context
22336 #### ----------------------------------------
22338 Headings: 0. Unnested
22348 <p>=foo<i>a</i>=</p>
22350 <nowiki>=foo=</nowiki>
22352 <nowiki> </nowiki>=foo=
22354 <nowiki>=foo=</nowiki>
22356 =foo''a''<nowiki>=</nowiki>
22359 # New headings and existing headings are handled differently
22361 Headings: 1. Nested inside html
22369 <h1 data-parsoid=''>=foo=</h1>
22370 <h2 data-parsoid=''>=foo=</h2>
22371 <h3 data-parsoid=''>=foo=</h3>
22372 <h4 data-parsoid=''>=foo=</h4>
22373 <h5 data-parsoid=''>=foo=</h5>
22374 <h6 data-parsoid=''>=foo=</h6>
22382 =<nowiki>=foo=</nowiki>=
22383 ==<nowiki>=foo=</nowiki>==
22384 ===<nowiki>=foo=</nowiki>===
22385 ====<nowiki>=foo=</nowiki>====
22386 =====<nowiki>=foo=</nowiki>=====
22387 ======<nowiki>=foo=</nowiki>======
22392 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22401 <nowiki>*</nowiki>bar
22407 <nowiki>=bar=</nowiki>
22411 Headings: 3. Nested inside html with wikitext split by html tags
22415 <h1>=<b>bold</b>foo=</h1>
22417 = ='''bold'''foo= =
22421 Headings: 4a. No escaping needed (testing just h1 and h2)
22432 <h1><i>=</i>foo=</h1>
22452 Headings: 4b. No escaping needed (inside p-tags)
22467 Headings: 5. Empty headings
22471 <h1 data-parsoid='{}'></h1>
22473 <h2 data-parsoid='{}'></h2>
22475 <h3 data-parsoid='{}'></h3>
22477 <h4 data-parsoid='{}'></h4>
22479 <h5 data-parsoid='{}'></h5>
22481 <h6 data-parsoid='{}'></h6>
22491 =====<nowiki/>=====
22493 ======<nowiki/>======
22497 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22507 <nowiki>=a=</nowiki>
22509 <nowiki>=a=</nowiki>
22511 <nowiki>=a=</nowiki>
22515 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22528 <nowiki>=a=</nowiki>
22531 <nowiki>=a=</nowiki>
22534 <nowiki>=a=</nowiki>
22539 Headings: 6c. Heading chars in SOL context (leading newline break)
22547 <nowiki>=b=</nowiki>
22551 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22555 <!--c0--><p>=a=</p>
22557 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22559 <!--c0--><nowiki>=a=</nowiki>
22561 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22565 Headings: 6d. Heading chars in SOL context (No escaping needed)
22575 Headings: 7. Insert a newline between new content and headings
22581 <h2 data-parsoid='{}'>A</h2>
22582 <p data-parsoid='{}'>a</p>
22592 #### --------------- Lists ---------------
22593 #### 0. Outside nests (*foo, etc.)
22594 #### 1. Nested inside html <ul><li>*foo</li></ul>
22595 #### 2. Inside definition lists
22596 #### 3. Only bullets at start should be escaped
22597 #### 4. No escapes needed
22598 #### 5. No unnecessary escapes
22599 #### 6. Escape bullets in SOL position
22600 #### 7. Escape bullets in a multi-line context
22601 #### ----------------------------------------
22604 Lists: 0. Outside nests
22614 <nowiki>*</nowiki>foo
22616 <nowiki>#</nowiki>foo
22618 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22621 ## Making these next 3 tests Parsoid-only since they are html2wt tests
22622 ## to test wikitext escaping, and insignificant whitespace diffs
22623 ## cause PHP parser tests to barf
22625 Lists: 1. Nested inside html (No unnecessary escapes)
22634 <li data-parsoid='{}'>*foo</li>
22635 <li data-parsoid='{}'>#foo</li>
22636 <li data-parsoid='{}'>:foo</li>
22637 <li data-parsoid='{}'>;foo</li>
22645 <li data-parsoid='{}'>*foo</li>
22646 <li data-parsoid='{}'>#foo</li>
22647 <li data-parsoid='{}'>:foo</li>
22648 <li data-parsoid='{}'>;foo</li>
22655 *<nowiki>*foo</nowiki>
22656 *<nowiki>#foo</nowiki>
22657 *<nowiki>:foo</nowiki>
22658 *<nowiki>;foo</nowiki>
22664 #<nowiki>*foo</nowiki>
22665 #<nowiki>#foo</nowiki>
22666 #<nowiki>:foo</nowiki>
22667 #<nowiki>;foo</nowiki>
22671 Lists: 2. Inside definition lists
22675 <dl><dt>;foo</dt></dl>
22676 <dl><dt>:foo</dt></dl>
22679 <dl><dd>:foo</dd></dl>
22683 ; <nowiki>:foo</nowiki>
22685 ; <nowiki>:foo</nowiki>
22692 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
22698 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
22702 *<nowiki>*foo</nowiki>''it''*bar
22706 Lists: 4. No escapes needed
22719 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22723 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22737 Lists: 5. No unnecessary escapes
22741 <ul><li> bar <span>[[foo]]</span></li></ul>
22742 <ul><li> =bar <span>[[foo]]</span></li></ul>
22743 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22744 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22745 <ul><li> =bar <span>foo]]</span>=</li></ul>
22746 <ul><li> <s></s>: a</li></ul>
22747 <ul><li> <i>* foo</i></li></ul>
22750 * bar <span><nowiki>[[foo]]</nowiki></span>
22752 * =bar <span><nowiki>[[foo]]</nowiki></span>
22754 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22756 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22758 * =bar <span>foo]]</span>=
22766 Lists: 6. Escape bullets in SOL position
22770 <p><!--cmt-->*foo</p>
22772 <!--cmt--><nowiki>*</nowiki>foo
22776 Lists: 7. Escape bullets in a multi-line context
22785 <nowiki>*</nowiki>b
22789 Lists: 8. Escape colons only if not present in tags
22793 <dl><dt>a:b<i>c:d</i></dt></dl>
22795 ; <nowiki>a:b</nowiki>''c:d''
22798 #### --------------- HRs ---------------
22799 #### 1. Single line
22800 #### -----------------------------------
22803 HRs: 1. Single line
22811 ----<nowiki>----</nowiki>
22816 #### --------------- Tables ---------------
22817 #### 1a. Simple example
22818 #### 1b. No escaping needed (!foo)
22819 #### 1c. No escaping needed (|foo)
22820 #### 1d. No escaping needed (|}foo)
22822 #### 2a. Nested in td (<td>foo|bar</td>)
22823 #### 2b. Nested in td (<td>foo||bar</td>)
22824 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22826 #### 3a. Nested in th (<th>foo!bar</th>)
22827 #### 3b. Nested in th (<th>foo!!bar</th>)
22828 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22832 #### 4c. No escaping needed
22833 #### --------------------------------------
22836 Tables: 1a. Simple example
22844 <nowiki>{|</nowiki>
22849 Tables: 1b. No escaping needed
22860 Tables: 1c. No escaping needed
22871 Tables: 1d. No escaping needed
22882 Tables: 2a. Nested in td
22887 <td>foo|bar</td></tr>
22888 <tr><td>x<div>a|b</div></td>
22892 |<nowiki>foo|bar</nowiki>
22894 |x<div><nowiki>a|b</nowiki></div>
22910 Tables: 2b. Nested in td
22916 <td>a<i>b||c</i></td>
22917 <td>a<i><div>b||c</div></i></td>
22918 </tr></tbody></table>
22921 |<nowiki>foo||bar</nowiki>
22922 |a''<nowiki>b||c</nowiki>''
22923 |a''<div><nowiki>b||c</nowiki></div>''
22932 <td>a<i><div>b||c</div></i>
22938 Tables: 2c. Nested in td -- no escaping needed
22956 Tables: 3a. Nested in th
22974 Tables: 3b. Nested in th
22979 <tr><th>foo!!bar</th>
22980 <th><i>foo|bar</i></th>
22981 <th><i>foo!!bar</i></th>
22982 <th><i><span>foo!!bar</span></i></th>
22983 </tr></tbody></table>
22986 !<nowiki>foo!!bar</nowiki>
22987 !''<nowiki>foo|bar</nowiki>''
22988 !''<nowiki>foo!!bar</nowiki>''
22989 !''<span><nowiki>foo!!bar</nowiki></span>''
22998 <th><i>foo!!bar</i>
23000 <th><i><span>foo!!bar</span></i>
23006 Tables: 3c. Nested in th
23011 <tr><th>foo||bar</th>
23012 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23013 </tr></tbody></table>
23016 !<nowiki>foo||bar</nowiki>
23017 !<nowiki>foo||bar</nowiki>
23030 Tables: 4a. Escape -
23049 |<nowiki>-bar</nowiki>
23054 Tables: 4b. Escape +
23073 |<nowiki>+bar</nowiki>
23078 Tables: 4c. No escaping needed
23083 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23084 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23090 <div>a|b</div></td>
23135 Tables: 4d. No escaping needed
23140 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23141 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23142 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23153 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23163 T97430: Don't emit empty nowiki pairs around marker meta tags
23167 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23168 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23170 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23171 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23175 Unclosed xmlish element in table line shouldn't eat end delimiters
23180 <tbody><tr><td> <foo</td>
23181 <td> bar></td></tr>
23198 #### --------------- Links ----------------
23199 #### 1. Quote marks in link text
23200 #### 2. Wikilinks: Escapes needed
23201 #### 3. Wikilinks: No escapes needed
23202 #### 4. Extlinks: Escapes needed
23203 #### 5. Extlinks: No escapes needed
23204 #### --------------------------------------
23206 Links 1. WikiLinks: No escapes needed
23210 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23211 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23212 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23216 [[Foo|x [Foobar] x]]
23218 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23219 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23220 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23225 Links 2. WikiLinks: Escapes needed
23229 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23230 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23231 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23232 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23233 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23234 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23235 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23236 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23237 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23238 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23240 [[Foo|<nowiki>Foobar]</nowiki>]]
23241 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23242 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23243 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23244 [[Foo|<nowiki>|Bar</nowiki>]]
23245 [[Foo|<nowiki>]]bar</nowiki>]]
23246 [[Foo|<nowiki>[[bar</nowiki>]]
23247 [[Foo|<nowiki>x [[ y</nowiki>]]
23248 [[Foo|<nowiki>x ]] y</nowiki>]]
23249 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23251 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23252 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23253 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23254 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23255 <a href="/wiki/Foo" title="Foo">|Bar</a>
23256 <a href="/wiki/Foo" title="Foo">]]bar</a>
23257 <a href="/wiki/Foo" title="Foo">[[bar</a>
23258 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23259 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23260 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23265 Links 3. WikiLinks: No escapes needed
23269 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23270 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23275 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23276 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23281 Links 4. ExtLinks: Escapes needed
23285 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23286 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23287 <p>[http://google.com]</p>
23288 <p>[http://google.com google]</p>
23289 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23290 <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>
23292 [http://google.com <nowiki>[google]</nowiki>]
23293 [http://google.com <nowiki>google]</nowiki>]
23295 <nowiki>[http://google.com]</nowiki>
23297 <nowiki>[http://google.com google]</nowiki>
23299 [http://google.com<nowiki>]</nowiki>
23301 [{{echo|http://google.com}}<nowiki>]</nowiki>
23303 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23304 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23305 </p><p>[http://google.com]
23306 </p><p>[http://google.com google]
23307 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23308 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23313 Links 5. ExtLinks: No escapes needed
23317 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23318 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23320 [http://google.com [google]
23322 [[http://google.com]]
23324 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23325 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23330 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23334 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23335 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23336 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23337 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23338 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23339 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23340 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23341 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23342 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23343 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23344 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23345 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23346 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23349 x<nowiki/>http://example.com<nowiki/>y
23350 http://example.com<nowiki/>?x
23351 http://example.com<nowiki/>&x
23352 http://example.com<nowiki/>'x
23353 http://example.com<nowiki/>,x
23354 http://example.com<nowiki/>.x
23355 http://example.com<nowiki/>;x
23356 http://example.com<nowiki/>:x
23357 http://example.com<nowiki/>;x
23358 http://example.com<nowiki/>!x
23359 http://example.com<nowiki/>=x
23360 http://example.com<nowiki/>(x)
23361 http://example.com(x<nowiki/>)
23365 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23370 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23372 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23373 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23374 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23375 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23376 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23382 "http://example.com"
23383 (http://example.com)
23384 (http://example.com) foo
23385 http://example.com,
23386 http://example.com, foo
23389 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23391 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23392 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23393 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23394 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23395 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23400 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23404 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23405 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23407 http://example.com.,;:!?\
23408 -http://example.com:
23410 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23411 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23416 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23420 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23421 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23422 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23426 X<nowiki/>RFC 123<nowiki/>y
23430 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23434 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23435 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23436 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23443 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23444 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23445 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23450 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23454 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23455 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23456 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23460 X<nowiki/>PMID 123<nowiki/>y
23464 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23468 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23469 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23470 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23477 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23478 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23479 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23484 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23488 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23489 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23490 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23493 ISBN 1234567890<nowiki/>1
23494 ISBN 1234567890<nowiki/>x
23495 a<nowiki/>ISBN 1234567890<nowiki/>b
23499 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23503 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23507 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23512 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23516 <p>this is not a link: http://example.com
23519 this is not a link: <nowiki>http://example.com</nowiki>
23523 Links 15. Link trails can't become link prefixes.
23528 <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>
23530 [[Söfnuður]]-[[00]]
23532 <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>
23536 #### --------------- Quotes ---------------
23537 #### 1. Quotes inside <b> and <i>
23538 #### 2. Link fragments separated by <i> and <b> tags
23539 #### 3. Link fragments inside <i> and <b>
23540 #### 4. No escaping needed
23541 #### --------------------------------------
23543 1a. Quotes inside <b> and <i>
23554 <b>foo'<i>bar'</i>baz</b>
23563 <i>fools'<span> errand</span></i>
23564 <i><span>fool</span>'s errand</i>
23565 '<i>foo</i> bar '<i>baz</i>
23566 a|!*#-:;+-~[]{}b'<i>x</i>
23570 ''<nowiki>''foo''</nowiki>''
23571 ''<nowiki>'''foo'''</nowiki>''
23573 '''<nowiki/>'foo''''
23574 '''<nowiki>''foo''</nowiki>'''
23575 '''<nowiki>'''foo'''</nowiki>'''
23576 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23577 '''foo'''<nowiki/>'s
23583 '''foo'''<nowiki/>'
23584 ''''foo'''<nowiki/>'
23585 ''fools'<span> errand</span>''
23586 ''<span>fool</span>'s errand''
23587 '<nowiki/>''foo'' bar '''baz''
23588 a|!*#-:;+-~[]{}b'''x''
23592 1b. Quotes inside <b> and <i> with other tags on same line
23596 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23597 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23598 <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>
23599 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23600 '<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>
23601 '<i>foo</i> <div title="name">test</div>
23602 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23603 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23604 <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>
23607 '''a'' foo ''[[bar]]''
23608 ''a''' foo ''[[bar]]''
23609 ''a''' foo '''{{echo|[[bar]]}}'''
23610 [[foo]] x'''[[bar]]''
23611 '''foo'' <ref>test</ref>
23612 '''foo'' <div title="name">test</div>
23613 '''foo'' and <br> bar
23618 2. Link fragments separated by <i> and <b> tags
23622 <p>[[<i>foo</i>hello]]</p>
23623 <p>[[<b>foo</b>hello]]</p>
23625 [[''foo''<nowiki>hello]]</nowiki>
23627 [['''foo'''<nowiki>hello]]</nowiki>
23630 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23631 # this is one of the shortcomings of this format
23633 3. Link fragments inside <i> and <b>
23637 <p><i>[[foo</i>]]</p>
23638 <p><b>[[foo</b>]]</p>
23640 ''[[foo''<nowiki>]]</nowiki>
23642 '''[[foo'''<nowiki>]]</nowiki>
23646 4. No escaping needed
23650 <p>'<span><i>bar</i></span>'
23651 '<span><b>bar</b></span>'
23655 '<span>''bar''</span>'
23656 '<span>'''bar'''</span>'
23660 #### ----------- Paragraphs ---------------
23661 #### 1. No unnecessary escapes
23662 #### --------------------------------------
23665 1. No unnecessary escapes
23669 <p>bar <span>[[foo]]</span>
23670 </p><p>=bar <span>[[foo]]</span>
23671 </p><p>[[bar <span>[[foo]]</span>
23672 </p><p>]]bar <span>[[foo]]</span>
23673 </p><p>=bar <span>foo]]</span>=
23676 bar <span><nowiki>[[foo]]</nowiki></span>
23678 =bar <span><nowiki>[[foo]]</nowiki></span>
23680 [[bar <span><nowiki>[[foo]]</nowiki></span>
23682 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23684 =bar <span>foo]]</span><nowiki>=</nowiki>
23687 #### ----------------------- PRE --------------------------
23688 #### 1. Leading whitespace in SOL context should be escaped
23689 #### ------------------------------------------------------
23691 1. Leading whitespace in SOL context should be escaped
23714 <nowiki> </nowiki>a
23716 <nowiki> </nowiki> a
23720 <nowiki> </nowiki> a
23722 <nowiki> </nowiki>a
23725 <nowiki> </nowiki>b
23748 2. Leading whitespace in non-indent-pre contexts should not be escaped
23752 <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>
23753 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23754 <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>
23764 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23783 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23787 <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>
23789 [[File:Foobar.jpg|thumb|caption]]
23793 5. Nowiki escaping should account for indent-pres
23803 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23816 #### --------------- Behavior Switches --------------------
23819 1. Valid behavior switches should be escaped
23826 <nowiki>__TOC__</nowiki>
23827 ''<nowiki>__TOC__</nowiki>''
23831 2. Invalid behavior switches should not be escaped
23842 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23844 Behavior switches should be SOL-transparent
23848 <meta property="mw:PageProp/toc" />
23850 <!-- this one's bogus -->
23853 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23855 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23859 <!-- this one's bogus -->
23868 #### --------------- HTML tags ---------------
23871 #### 3. multi-line html tag
23872 #### 4. extension tags
23873 #### -----------------------------------------
23879 <a href="http://google.com">google</a>
23881 <a href="http://google.com">google</a>
23889 <ul><li> <div>foo</div></li>
23890 <li> <div style="color:red">foo</div></li>
23891 <li> <td></li></ul>
23894 * <nowiki><div>foo</div></nowiki>
23895 * <nowiki><div style="color:red">foo</div></nowiki>
23896 * <nowiki><td></nowiki>
23900 3. multi-line html tag
23919 <p><ref>foo</ref>
23920 </p><p><ref>bar
23921 </p><p>baz</ref>
23924 <nowiki><ref>foo</ref></nowiki>
23926 <nowiki><ref>bar</nowiki>
23928 baz<nowiki></ref></nowiki>
23931 #### --------------- Others ---------------
23937 <p><nowiki>foo</nowiki>
23940 <nowiki>foo</nowiki>
23943 ## The quote-char in the input is necessary for triggering the bug
23945 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23954 #----------- End of wikitext escaping tests --------------
23958 Tag-like HTML structures are passed through as text
23980 </p><p>1<d e>f
23985 HTML tag with necessary entities in attributes
23987 <span title="&amp;">foo</span>
23989 <p><span title="&amp;">foo</span>
23994 HTML tag with 'unnecessary' entity encoding in attributes
23996 <span title="&">foo</span>
23998 <p><span title="&">foo</span>
24003 HTML tag with broken attribute value quoting
24005 parsoid=wt2html,html2html
24007 <span title="Hello world>Foo</span>
24009 <p><span title="Hello world">Foo</span>
24012 <p><span title="Hello world">Foo</span></p>
24016 Self-closed tag with broken attribute value quoting
24018 parsoid=wt2html,html2html
24020 <div title="Hello world />Foo
24022 <div title="Hello world"></div>
24025 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24029 Table with broken attribute value quoting
24031 parsoid=wt2html,html2html
24034 | title="Hello world|Foo
24039 <td title="Hello world">Foo
24045 <td title="Hello world">Foo
24051 Table with broken attribute value quoting on consecutive lines
24053 parsoid=wt2html,html2html
24056 | title="Hello world|Foo
24057 | style="color:red|Bar
24062 <td title="Hello world">Foo
24064 <td style="color:red">Bar
24070 <td title="Hello world">Foo
24071 </td><td style="color: red">Bar
24072 </td></tr></tbody></table>
24077 Accept empty td cell attribute
24080 | align="center" | foo || |
24085 <td align="center"> foo </td>
24092 Non-empty attributes in th-cells
24095 ! Foo !! style="color: red" | Bar
24101 <th style="color: red"> Bar
24107 Accept empty attributes in th-cells
24122 Empty table rows go away
24143 ### Parsoid-centric tests for testing RTing of inter-element separators
24144 ### Edge cases not tested by existing parser tests and specific to
24145 ### Parsoid-specific serialization strategies.
24149 RT-ed inter-element separators should be valid separators
24161 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24165 # Parsoid-only since PHP parser relies on Tidy for correct output
24167 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24181 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24182 <p>bar</p></small></td></tr>
24186 <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>
24190 # Note that the "style" attribute is really a template parameter here.
24191 # The = would have to be {{=}} if you wanted the literal.
24193 Empty TD followed by TD with tpl-generated attribute
24198 |{{echo|style='color:red'}}|foo
24212 Indented table with an empty td
24230 ## We have some newline diffs RT-ing this edge case
24231 ## and it is not important enough -- we seem to be emitting
24232 ## at most 2 newlines after a </tr> and this is unrelated to
24233 ## the issue from T85627 that this is testing.
24235 Indented table with blank lines in between (T85627)
24254 Indented block & table
24268 <div data-parsoid='{"stx":"html"}'>foo</div>
24270 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24275 Indent and comment before table row
24290 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24291 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24295 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24297 Empty TR followed by a template-generated TR
24303 {{echo|<tr><td>foo</td></tr>}}
24309 <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}}]}'>
24314 ## PHP and parsoid output differ for this, and since this is primarily
24315 ## for testing Parsoid's serializer, marking this Parsoid only
24317 Empty TR followed by mixed-ws-comment line should RT correctly
24333 <!--c--> </tr><!--d-->
24339 Multi-line image caption generated by templates with/without trailing newlines
24341 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24342 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24344 <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>
24345 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/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>
24349 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24353 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24355 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24357 <includeonly>foo</includeonly>
24365 ## PHP emits broken html for this, and since this is primarily
24366 ## a Parsoid serializer test, marking this Parsoid only
24368 Improperly nested inline or quotes tags with whitespace in between
24370 <span> <s>x</span> </s>
24373 <p><span> <s>x</s></span><s> </s>
24374 <b> <i>x</i></b><i> </i>
24379 Encapsulate protected attributes from wt
24381 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24383 <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>
24387 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24388 ## Having nested or stray pre tags results in the attempt to add duplicates,
24389 ## causing an assertion fail. This test tries to prevent that situation.
24391 Ensure ParagraphWrapper can deal with stray closing pre tags
24401 1. Ensure fostered text content is wrapped in element nodes
24405 <table>hi</table><table>ho</table>
24414 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24416 parsoid=wt2html,wt2wt
24425 <tbody><tr><td> a</td></tr>
24430 Encapsulation properly handles null DSR information from foster box
24432 parsoid=wt2html,wt2wt
24434 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24436 <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>
24440 1. Encapsulate foster-parented transclusion content
24442 parsoid=wt2wt,wt2html
24444 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24446 <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>
24456 2. Encapsulate foster-parented transclusion content
24458 parsoid=wt2wt,wt2html
24460 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24462 <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>
24473 3. Encapsulate foster-parented transclusion content
24475 parsoid=wt2wt,wt2html
24477 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24479 <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>"]}">
24492 4. Encapsulate foster-parented transclusion content
24494 parsoid=wt2wt,wt2html
24496 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24498 <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>"]}">
24511 5. Encapsulate foster-parented transclusion content
24513 parsoid=wt2wt,wt2html
24515 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24517 <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>
24532 6. Encapsulate foster-parented transclusion content
24534 parsoid=wt2wt,wt2html
24536 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24538 <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>
24554 7. Encapsulate foster-parented transclusion content
24556 parsoid=wt2wt,wt2html
24558 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24560 <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>
24570 # Note that the wt is broken on purpose: the = should be {{=}} if you
24571 # don't want it to be a template parameter key.
24573 8. Encapsulate foster-parented transclusion content
24575 parsoid=wt2wt,wt2html
24578 }}{|{{echo|style='color:red'}}
24583 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24585 <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>
24596 9. Encapsulate foster-parented transclusion content
24598 parsoid=wt2wt,wt2html
24600 <table>{{echo|hi</table>hello}}
24602 <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>
24606 Table in fosterable position
24617 <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">
24619 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24625 # Parsoid only for bug 64747
24627 Properly encapsulate empty-content transclusions in fosterable positions
24635 <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"}]]}'>
24641 Always encapsulate foster box when template range is expanded to table
24654 T115289: Unclosed table
24656 {{echo|<table>}}<!--c-->[[Category:Two]]
24658 <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>
24662 T115289: Don't migrate newlines out of tables with fostered content
24664 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
24666 <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>
24670 T73074: More fostering fun
24672 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
24674 <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>
24678 Support <object> element with .data attribute
24682 <object data="test.swf"></object>
24684 <object data="test.swf"></object>
24688 Don't block XML namespace declaration
24690 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24692 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24695 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24698 # -----------------------------------------------------------------
24699 # The following section of tests are primarily to spec requirements
24700 # around serialization of new/edited content.
24702 # All these tests are marked Parsoid html2wt and html2html only
24703 # ----------------------------------------------------------------
24705 # 'mi' is a localinterwiki prefix as well as a language
24707 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24711 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24718 New wikilinks should be serialized properly
24722 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24723 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24730 New wiki links (href variations)
24734 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24735 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24736 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24737 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24742 [[Toxine bactérienne]]
24746 New wiki links (content string variations)
24750 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24751 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24752 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24756 [[Foo_bar|./Foo_bar]]
24760 New category links (href variations)
24764 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24765 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24766 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24768 [[Category:Toxine bactérienne]]
24769 [[Category:Toxine bactérienne]]
24770 [[Category:Toxine bactérienne]]
24774 New sol transparent links don't need indent-pre nowiki protection
24779 <link rel="mw:PageProp/redirect" href="./Main_Page">
24780 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24781 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24783 #WEITERLEITUNG [[Main Page]]
24784 <!-- this is good --> [[Category:Good]]
24785 <!-- this is great --> [[Kategorie:Great]]
24789 New interlanguage links (href variations)
24793 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24794 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24795 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24797 [[es:Toxine bactérienne]]
24798 [[es:Toxine_bactérienne]]
24799 [[es:Toxine_bactérienne]]
24803 Image: Modifying size of an image (1)
24806 "modes": ["wt2wt"],
24808 ["img[height]", "attr", "height", "22"],
24809 ["img[width]", "attr", "width", "200"]
24813 [[Image:Foobar.jpg|230x230px]]
24815 [[Image:Foobar.jpg|200x200px]]
24819 Image: Modifying size of an image (2)
24822 "modes": ["wt2wt"],
24824 ["img[height]", "attr", "height", "100"],
24825 ["img[width]", "attr", "width", "500"]
24829 [[Image:Foobar.jpg|230x230px]]
24831 [[Image:Foobar.jpg|500x500px]]
24834 # Change in size is ignored so long as class='mw-default-size'
24836 Image: Modifying size of an image (3)
24839 "modes": ["wt2wt"],
24841 ["figure[class]", "removeClass", "mw-default-size"],
24842 ["figure img", "attr", "height", "19"],
24843 ["figure img", "attr", "width", "170"]
24847 [[Image:Foobar.jpg|thumb]]
24849 [[Image:Foobar.jpg|thumb|170x170px]]
24853 Image: Modifying alignment of an image (bug 48665)
24856 "modes": ["wt2wt"],
24858 ["figure[class]", "removeClass", "mw-halign-right"],
24859 ["figure[class]", "addClass", "mw-halign-left"]
24863 [[Image:Foobar.jpg|thumb|caption|right]]
24865 [[Image:Foobar.jpg|thumb|caption|left]]
24869 Image: Modifying mw-default-size of an frameless image (bug 62805)
24872 "modes": ["wt2wt"],
24874 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24878 [[Image:Foobar.jpg|frameless|right]]
24880 [[Image:Foobar.jpg|frameless|right|220x220px]]
24884 Image: Modifying valign of an image (bug 49221)
24887 "modes": ["wt2wt"],
24889 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24890 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24894 [[File:Foobar.jpg|20px|middle]]
24896 [[File:Foobar.jpg|20px|text-top]]
24900 Image: Modifying alt attribute of an image (bug 56400)
24903 "modes": ["wt2wt"],
24905 ["img[alt]", "attr", "alt", "some alternate edited text"]
24909 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24911 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24915 Image: Modifying caption of an image
24918 "modes": ["wt2wt"],
24920 ["figcaption", "text", "new caption"]
24924 [[Image:Foobar.jpg|thumb|original caption]]
24926 [[Image:Foobar.jpg|thumb|new caption]]
24930 Image: empty alt attribute (bug 48924)
24934 [[File:Foobar.jpg|thumb|alt=|bar]]
24936 <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>
24940 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24946 <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>
24948 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24952 Image: Block level image should have \n before and after
24955 [[File:Foobar.jpg|right|thumb|150x150px]]
24959 <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>
24964 Image: New block level image should have \n before and after (existing content)
24967 [[File:Foobar.jpg|right|thumb|150x150px]]
24971 <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>
24976 Image: upright option (parsoid)
24978 [[File:Foobar.jpg|thumb|upright|caption]]
24979 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24980 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24982 <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>
24983 <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>
24984 <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>
24988 Image: upright option is ignored on inline and frame images (parsoid)
24990 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24992 <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>
24996 Image: from basic HTML (1)
25000 <span typeof="mw:Image">
25001 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25004 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25008 Image: from basic HTML (2)
25012 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25014 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25018 Image: from basic HTML (3)
25022 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25024 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25028 Image: from basic HTML (4)
25032 <img src="./File:Foobar.jpg">
25034 [[File:Foobar.jpg|link=]]
25038 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25043 <li><p>foo</p></li>
25050 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25054 <ul> <li>foo</li></ul>
25060 Don't strip leading whitespace when handling indent-pre suppressing tags
25065 <tr><td> indented row</td></tr>
25068 <b>This is very bold of you!</b>
25071 indented cell (no pre-wrapping!)
25081 '''This is very bold of you!'''
25085 indented cell (no pre-wrapping!)
25093 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25115 <nowiki> </nowiki></span>bar2
25118 <nowiki> </nowiki><span>bar</span>
25121 <nowiki> </nowiki><span>foo</span>
25126 Lists: Dont insert newlines in a serialized list item.
25130 <ul><li>a<br>b</li><li>c</li></ul>
25137 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25140 "modes": ["html2wt"],
25141 "scrubWikitext": false
25144 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25145 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25147 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25148 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25150 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25152 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25154 == hello there [[Category:A1]] ==
25156 == [[Category:A2]] hi pal ==
25158 == <!--foo--> [[Category:A3]] how goes it ==
25160 == it goes well [[Category:A4]] <!--bar--> ==
25162 ==howdy [[Category:A5]]==
25168 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25171 "modes": ["html2wt"],
25172 "scrubWikitext": true
25175 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25176 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25178 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25179 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25181 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25189 <!--foo--> [[Category:A3]]
25194 [[Category:A4]] <!--bar-->
25202 Headings: Don't hoist metas that come from templates
25205 "modes": ["html2wt"],
25206 "scrubWikitext": true
25209 <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>
25211 == {{echo|foo [[Category:Foo]]}} ==
25215 Headings: Category in ref isn't hoisted
25218 "modes": ["html2wt"],
25219 "scrubWikitext": true
25222 <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>
25224 <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>
25227 [[Category:Baz]] </ref> ==
25233 Parsoid: Serialize positional parameters with = in them as named parameter
25237 <p about="#mwt1" typeof="mw:Transclusion"
25238 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25240 <p about="#mwt1" typeof="mw:Transclusion"
25241 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25243 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25244 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25245 <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>
25249 {{echo|1=f=oo|2=bar}}
25251 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25252 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25253 {{echo|<nowiki>f=oo</nowiki>|bar}}
25257 Parsoid: Serialize positional parameters with = in extlink as named parameter
25261 <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>
25263 {{echo|1=http://stuff?is=ok}}
25267 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25271 <div>a<p>b</p></div>
25292 Substrings resembling wikitext in hrefs should not get nowiki escapes
25296 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25302 Enforce single-line context in the serializer
25309 <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">
25310 </span><span about="#mwt1">you</span> </h2>
25312 <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>
25314 <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
25315 there</span></li></ol>
25327 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25334 </tbody></table></dd></dl>
25338 == hi {{bogus|there
25349 * foo '''bar''' baz
25361 Serialize new placeholder space without spans
25365 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25367 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25369 <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>
25375 <ref>foo : bar</ref>ok
25379 #-----------------------
25380 # Tag minimization tests
25381 #-----------------------
25384 1. I/B quote minimization: wikitext-only tags should be combined
25388 <p><i>A</i><i>B</i></p>
25389 <p><b>A</b><b>B</b></p>
25390 <p><i>A</i><b><i>B</i></b></p>
25391 <p><b>A</b><i><b>B</b></i></p>
25392 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25393 <p><i><b>A</b></i><i><b>B</b></i></p>
25394 <p><i><b>A</b></i><b><i>B</i></b></p>
25395 <p><b><i>A</i></b><i><b>B</b></i></p>
25415 2. I/B quote minimization: wikitext and html tags should not be combined
25419 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25420 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25424 ''A''<nowiki/>'''<i>B</i>'''
25428 3. I/B quote minimization: templated content stops minimization
25432 <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>
25433 <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>
25435 ''A''{{echo|''B''}}
25437 ''A''{{echo|'''''B'''''}}
25441 4. I/B quote minimization: new content should be mimimized with adjacent old content
25445 <p><i>A</i><i>B</i></p>
25446 <p><b>A</b><b>B</b></p>
25447 <p><i>A</i><b><i>B</i></b></p>
25457 5a. Merge adjacent quote nodes if they've been edited
25460 "modes": ["wt2wt", "selser"],
25462 ["p", "contents", "remove", ":contains('b')"]
25472 5b. Merge adjacent quote nodes if they've been edited
25475 "modes": ["wt2wt", "selser"],
25481 ''a''<span id="x">b</span>''c''
25487 1. Merge adjacent link nodes as long as at least one element is new
25490 "modes": ["html2wt"],
25491 "scrubWikitext": true
25494 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25495 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25496 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25500 [[Football|Foot]][[Football|ball]]
25504 2. Merge adjacent link nodes and enable additional normalizations
25507 "modes": ["html2wt"],
25508 "scrubWikitext": true
25511 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25513 [[Football|''Football'']]
25517 3. Don't merge adjacent link nodes if scrubWikitext is false
25520 "modes": ["html2wt"],
25521 "scrubWikitext": false
25524 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25526 [[Football|Foot]][[Football|ball]]
25529 #------------------------------
25530 # End of tag minimization tests
25531 #------------------------------
25534 Bug 54262: New entities
25538 <span typeof="mw:Entity"> </span>
25543 ## Note that there is no wikitext output for 'unknownproperty' ##
25544 ## Unknown magic words are silently dropped ##
25551 <meta property='mw:PageProp/toc' />
25552 <meta property='mw:PageProp/notoc' />
25553 <meta property='mw:PageProp/forcetoc' />
25554 <meta property='mw:PageProp/index' />
25555 <meta property='mw:PageProp/noindex' />
25556 <meta property='mw:PageProp/nogallery' />
25557 <meta property='mw:PageProp/noeditsection' />
25558 <meta property='mw:PageProp/notitleconvert' />
25559 <meta property='mw:PageProp/nocontentconvert' />
25560 <meta property='mw:PageProp/unknownproperty' />
25570 __NOCONTENTCONVERT__
25574 Consecutive <pre>s should not get merged
25576 parsoid=html2wt,html2html
25578 <pre>a</pre><pre>b</pre>
25606 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25610 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25612 [[Special:BookSources/1234567890|ISBN 1234567895]]
25616 Edited RFC links not serializable as RFC links should serialize as extlinks
25620 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25622 [//tools.ietf.org/html/rfc123 New RFC]
25626 Edited PMID links not serializable as PMID links should serialize as extlinks
25630 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25632 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25636 WTS of autolinks with trailing/surrounding context
25640 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25641 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25642 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25643 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25644 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25645 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25647 http://cscott.net'''foo'''
25649 http://cscott.net<b>foo</b>
25651 '''http://cscott.net'''
25653 '''http://cscott.net '''
25655 '''http://cscott.net<nowiki/>x'''
25657 http://cscott.net<nowiki/>x
25661 WTS of autolinks with nowikis (round-trip)
25663 x<nowiki/>http://cscott.net<nowiki/>x
25665 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25668 # this is the "easy" test because it leaves in place all the
25669 # data-parsoid information indicating this is an autolink
25671 WTS of autolinks with escapes (editing)
25674 "modes": ["wt2wt"],
25676 [ "meta", "remove" ]
25680 x<nowiki/>http://cscott.net<nowiki/>x
25682 x<nowiki/>http://cscott.net<nowiki/>x
25686 WTS of edited autolink-like text (T103364)
25689 "modes": ["wt2wt"],
25691 [ "span[typeof]", "removeAttr", "typeof" ]
25695 Not a link: <nowiki>http://example.com</nowiki>.
25697 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25701 WTS of newly-authored autolink-like text (T103364)
25705 <p>http://example.com is not a link.</p>
25707 <nowiki>http://example.com</nowiki> is not a link.
25711 WTS of autolink-like text after an autolink (T108563)
25715 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25717 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25721 Magic links inside links (not autolinked)
25723 [[Foo|http://example.com]]
25726 [[Foo|ISBN 123456789x]]
25728 [http://foo.com http://example.com]
25729 [http://foo.com RFC 1234]
25730 [http://foo.com PMID 1234]
25731 [http://foo.com ISBN 123456789x]
25733 <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>
25734 <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>
25736 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25737 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25738 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25739 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25741 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25742 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25743 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25744 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25748 Magic links inside image captions (autolinked)
25750 [[File:Foobar.jpg|thumb|http://example.com]]
25751 [[File:Foobar.jpg|thumb|RFC 1234]]
25752 [[File:Foobar.jpg|thumb|PMID 1234]]
25753 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25755 <div class="thumb tright">
25756 <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>
25757 <div class="thumbcaption">
25758 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25759 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25762 <div class="thumb tright">
25763 <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>
25764 <div class="thumbcaption">
25765 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25766 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25769 <div class="thumb tright">
25770 <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>
25771 <div class="thumbcaption">
25772 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25773 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25776 <div class="thumb tright">
25777 <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>
25778 <div class="thumbcaption">
25779 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25780 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25784 <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>
25785 <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>
25786 <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>
25787 <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>
25791 WTS of magic word text (T109371)
25796 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25797 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25799 <nowiki>RFC 1234</nowiki>
25801 [http://foo.com RFC 1234]
25807 Edited Redirect link should emit a non-piped wikitext link
25811 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25817 T75121: Infer extension name from typeOf if data-mw is not present
25819 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25821 <div typeOf="mw:Extension/foo"></div>
25826 # Note that the <p> wrapping isn't present in PHP parser output
25827 # The important thing for this test is that P-wrapping doesn't
25828 # interfere with the <nowiki> protection for leading - in <td>
25829 # (which isn't necessary for <th>).
25831 T88318: p-wrapped dash in table.
25833 parsoid=html2wt,wt2wt
25836 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25837 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25838 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25845 |<nowiki>-</nowiki>
25846 |<nowiki>- </nowiki>
25865 <td><small>-</small></td>
25877 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25882 <td id='mwAc'>foo</td>
25883 <td id='serialize-this'>bar</td>
25888 | id="serialize-this" |bar
25893 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25897 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25899 <div id="hello">ok</div>
25906 "modes": ["wt2wt"],
25908 [ "#xyz", "before", "<b>before</b> stuff " ],
25909 [ "#xyz", "after", " stuff <i>after</i>" ],
25910 [ "#xyz", "html", "x <b>y</b> z" ]
25914 <span id="xyz">hello</span>
25916 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25920 Never serialize a-tag as html, regardless of what data-parsoid has to say
25922 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25924 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25929 ## SSS FIXME: This is broken output nevertheless.
25930 ## What might be a reasonable non-broken output for this?
25931 ## This is an edge case unlikely to be seen in production
25932 ## that I am not wasting more time on this right now.
25934 Never serialize a-tag as html, no matter what attributes it has
25936 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25938 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25940 [http://boo.org http://boohoo.org]
25943 # Misnested is an indication that selser can reuse the source but these have
25944 # shown to sneak through on occasion. See T101768.
25945 # The original wikitext here is: [http://test.com [[one]] two three]
25947 Strip span tags added to mark misnested links
25951 <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>
25953 [http://test.com][[one]] two three
25957 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
25961 <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|}"]}'>
25973 ## This test verifies the presence and computation of this attribute indirectly
25974 ## by making an edit and ensuring that the serialization is correct (which it would be
25975 ## only if firstWikitextNode is properly set).
25977 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
25980 "modes": ["wt2wt"],
25982 [ "div#x", "remove" ],
25983 [ "div", "before", "<div>new</div>" ]
25987 <div id="x">foo</div>
25989 {{echo|<div>boo</div>
25997 {{echo|<div>boo</div>
26003 # --------------------------------------------
26004 # Tests spec'ing wikitext serialization norms |
26005 # --------------------------------------------
26008 1. Categories should always be serialized on their own line
26012 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26020 2. Categories that are part of templates should not introduce a line break
26022 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26024 <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>
26027 # Careful while editing these next 2 tests. There are \u200f characters
26028 # before and after the <link> tags in the HTML and following some
26029 # of the categories in wikitext
26030 # Do not remove these characters in edits.
26032 # As part of the serialization, these bidi characters will get stripped.
26034 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26037 "modes": ["html2wt"],
26038 "scrubWikitext": true
26041 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26042 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26045 [[קטגוריה: שיטות משפט]]
26049 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26052 "modes": ["html2wt"],
26053 "scrubWikitext": true
26056 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26063 Lists: Add space after bullets
26070 <li><span> baz</span></li>
26075 * <span> baz</span>
26079 1. Headings: Add space before/after == (T53744)
26086 <h2><span> baz</span></h2>
26094 == <span> baz</span> ==
26098 2. Headings: Add space before/after == even after hoisted content
26101 "modes": ["html2wt"],
26102 "scrubWikitext": true
26105 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26113 1. Headings: suppress newly created empty headings
26116 "modes": ["html2wt"],
26117 "scrubWikitext": true
26125 2. Headings: don't suppress empty headings if scrubWikitext is false
26135 3. Headings: suppress empty headings on edits
26138 "modes": ["selser"],
26139 "scrubWikitext": true,
26145 ==<span id="x">foo</span>==
26150 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26153 "modes": ["html2wt"],
26154 "scrubWikitext": true
26157 <h2>foo<br/>bar</h2>
26158 <h2>foo <span><br/>bar</span> baz</h2>
26162 == foo <span> bar</span> baz ==
26166 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26169 "modes": ["html2wt"],
26170 "scrubWikitext": false
26173 <h2>foo<br/>bar</h2>
26179 1. WT Quote Tags: suppress newly created empty style tags
26182 "modes": ["html2wt"],
26183 "scrubWikitext": true
26191 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26197 ''<nowiki/>'''''<nowiki/>'''
26201 3. WT Quote Tags: suppress empty style tags on edits
26204 "modes": ["selser"],
26205 "scrubWikitext": true,
26211 '''<span id="x">foo</span>'''
26216 1. Anchors: suppress newly created empty anchors
26219 "modes": ["html2wt"],
26220 "scrubWikitext": true
26223 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26228 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26231 "modes": ["html2wt"],
26232 "scrubWikitext": false
26235 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26241 3. Anchors: suppress empty anchors on edits
26244 "modes": ["selser"],
26245 "scrubWikitext": true,
26251 [[Test|<span id="x">foo</span>]]
26256 3a. Anchors: do not suppress numbered extlinks
26259 "modes": ["wt2wt"],
26260 "scrubWikitext": true
26265 <a rel="mw:ExtLink" href="http://foo.com"></a>
26269 3b. Anchors: do not suppress numbered extlinks
26272 "modes": ["wt2wt"],
26273 "scrubWikitext": true,
26279 [http://foo.com <span id="x">foo</span>]
26285 Normalizations should be restricted to edited content
26288 "modes": ["selser"],
26289 "scrubWikitext": true,
26291 [ "h1", "before", "<i></i>"]
26305 1. Multiple normalizations (html2wt)
26308 "modes": ["html2wt"],
26309 "scrubWikitext": true
26313 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26314 </a><b><i></i></b>x</p>
26323 2. Multiple normalizations (selser)
26326 "modes": ["selser"],
26327 "scrubWikitext": true,
26329 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26333 <span id="x">foo</span>
26335 <span id="x">foo</span>
26341 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26344 "modes": ["html2wt"],
26345 "scrubWikitext": true
26357 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26364 <nowiki> </nowiki>hi
26366 <nowiki> </nowiki> hello
26370 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26373 "modes": ["html2wt"],
26374 "scrubWikitext": true
26383 baz bang</td></tr></table>
26389 bar<span>boo</span></p>
26405 bar<span>boo</span>
26409 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26412 "modes": ["selser"],
26413 "scrubWikitext": true,
26415 [ "p", "html", " a\n b" ]
26426 1. New links that end in spaces
26429 "modes": ["html2wt"],
26430 "scrubWikitext": false
26433 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26434 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26435 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26437 [[Berlin ]]<nowiki/>is the capital of Germany.
26441 [[Boston ]] is a city.
26445 2. New links that end in spaces
26448 "modes": ["html2wt"],
26449 "scrubWikitext": true
26452 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26453 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26454 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26456 [[Berlin]] is the capital of Germany.
26460 [[Boston]] is a city.
26464 1. Table cells with escapable prefixes
26467 "modes": ["html2wt"],
26468 "scrubWikitext": false
26472 <tr><td>a</td></tr>
26473 <tr><td>-</td></tr>
26474 <tr><td>+</td></tr>
26480 |<nowiki>-</nowiki>
26482 |<nowiki>+</nowiki>
26487 2. Table cells with escapable prefixes
26490 "modes": ["html2wt"],
26491 "scrubWikitext": true
26495 <tr><td>a</td></tr>
26496 <tr><td>-</td></tr>
26497 <tr><td>+</td></tr>
26510 3a. Table cells with escapable prefixes after edits
26513 "modes": ["selser"],
26514 "scrubWikitext": true,
26516 [ "table tbody tr:first-child td:first-child", "remove"]
26530 3b. Table cells with escapable prefixes after edits
26533 "modes": ["selser"],
26534 "scrubWikitext": true,
26536 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26543 |<span id="x">foo</span>+
26552 # FIXME: This test will fail because
26553 # normalization doesn't realize that the id attribute
26554 # will eliminate the escapable scenario
26556 4a. Table cells without escapable prefixes after edits
26559 "modes": ["selser"],
26560 "scrubWikitext": true,
26562 [ "#x", "html", "-" ]
26575 ## This tests normalizer's ability to discriminate between
26576 ## cells having identical content.
26578 4b. Table cells without escapable prefixes after edits
26581 "modes": ["selser"],
26582 "scrubWikitext": true,
26584 [ "td", "html", "-" ]
26597 ## This tests normalizer's ability to not be tripped by
26598 ## comments (and whitespace)
26600 4c. Table cells without escapable prefixes after edits
26603 "modes": ["selser"],
26604 "scrubWikitext": true,
26606 [ "table tbody tr td:first-child", "remove" ]
26621 ## This tests normalizer's ability to handle HTML cells
26623 4d. Table cells without escapable prefixes after edits
26626 "modes": ["selser"],
26627 "scrubWikitext": true,
26629 [ "td", "html", "-" ]
26634 <tr><td>a</td></tr>
26638 <tr><td>-</td></tr>
26642 ## T111151 Remove font elements without attributes
26644 5a. font tags without attributes should be dropped in scrubWikitext mode
26647 "modes": ["html2wt"],
26648 "scrubWikitext": true
26652 <font><font>bar</font></font>
26653 <font class="x">boo</font>
26657 <font class="x">boo</font>
26661 5b. font tags should not be dropped without scrubWikitext being enabled
26664 "modes": ["html2wt"],
26665 "scrubWikitext": false
26674 Escape nowiki DOM elements
26678 <nowiki><i>foo</i></nowiki>
26680 <nowiki>''foo''</nowiki>
26683 # This is meant to be an interim fix while we go about figuring out
26684 # how to not introduce these trailing <nowiki/>s in the first place.
26686 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
26690 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
26692 <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>
26693 <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>
26706 # ---------------------------------------------------
26707 # End of tests spec'ing wikitext serialization norms |
26708 # ---------------------------------------------------
26712 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
26720 <td><b>c</b><p>d</p></td>
26738 # -----------------------------------------------------------------
26739 # End of section for Parsoid-only html2wt tests for serialization
26741 # -----------------------------------------------------------------
26743 # -----------------------------------------------------------------
26744 # The following section of tests are primarily to spec behavior of
26745 # the selective serializer. All these tests have manual selser
26746 # changes. The automated selser changes for all tests handle the
26747 # wide variation of changes, but these tests here capture specs
26748 # deterministically.
26749 # ----------------------------------------------------------------
26753 Selser: New comments should not be lost
26756 "modes": ["selser"],
26758 [ "#a", "after", "<!--c1-->" ],
26759 [ "#b", "before", "<!--c2-->" ]
26763 <span id="a">a</span>
26765 <span id="b">b</span>
26767 <span id="a">a</span><!--c1-->
26769 <!--c2--><span id="b">b</span>
26774 Selser: Check for validity of DSR before using it
26777 "modes": ["selser"],
26779 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26783 <span id="a">a</span>
26785 {{DISPLAYTITLE:foo}}
26786 <span id="a">a</span>
26790 1. DOMDiff: Changes to <ref> content should be looked up using id
26793 "modes": ["selser"],
26795 ["#X", "after", "bar"],
26796 ["#Y", "after", "baz"]
26800 X <ref><span id="X">foo</span></ref>
26803 <ref name="a"><span id="Y">foo</span></ref>
26806 X <ref><span id="X">foo</span>bar</ref>
26809 <ref name="a"><span id="Y">foo</span>baz</ref>
26814 2. DOMDiff: Changes to <ref> content should be looked up using id
26817 "modes": ["selser"],
26819 ["#Z", "after", "bar"]
26823 A <ref>foo bar for a</ref>
26824 B <ref group="X" name="b" />
26828 <references group="X">
26829 <ref name="b"><span id="Z">foo</span></ref>
26832 A <ref>foo bar for a</ref>
26833 B <ref group="X" name="b" />
26837 <references group="X">
26838 <ref name="b"><span id="Z">foo</span>bar</ref>
26852 <li class="mw-empty-li"></li>
26853 <li class="mw-empty-li"></li>